Index: branches/xZenu/src/util/Makefile =================================================================== --- branches/xZenu/src/util/Makefile (revision 1321) +++ branches/xZenu/src/util/Makefile (revision 1322) @@ -36,7 +36,7 @@ include ${ROOT}/Make.rules -all: $(OBJROOT) $(SYMROOT) $(SYMPROG) fdisk440 +all: $(OBJROOT) $(SYMROOT) $(SYMPROG) fdisk440 ${SYMROOT}/doxygen @@ -52,6 +52,13 @@ install: +${SYMROOT}/doxygen: + @echo ================= make all for doxygen =================; + @cd doxygen && ./configure && $(MAKE) + @cp doxygen/bin/doxygen ${SYMROOT} + @cp doxygen/bin/doxytag ${SYMROOT} + + #dependencies -include $(OBJROOT)/Makedep Index: branches/xZenu/src/util/doxygen/qtools/qptrdict.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qptrdict.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qptrdict.h (revision 1322) @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** +** Definition of QPtrDict template class +** +** Created : 970415 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QPTRDICT_H +#define QPTRDICT_H + +#ifndef QT_H +#include "qgdict.h" +#endif // QT_H + + +template class Q_EXPORT QPtrDict : public QGDict +{ +public: + QPtrDict(int size=17) : QGDict(size,PtrKey,0,0) {} + QPtrDict( const QPtrDict &d ) : QGDict(d) {} + ~QPtrDict() { clear(); } + QPtrDict &operator=(const QPtrDict &d) + { return (QPtrDict&)QGDict::operator=(d); } + uint count() const { return QGDict::count(); } + uint size() const { return QGDict::size(); } + bool isEmpty() const { return QGDict::count() == 0; } + void insert( void *k, const type *d ) + { QGDict::look_ptr(k,(Item)d,1); } + void replace( void *k, const type *d ) + { QGDict::look_ptr(k,(Item)d,2); } + bool remove( void *k ) { return QGDict::remove_ptr(k); } + type *take( void *k ) { return (type*)QGDict::take_ptr(k); } + type *find( void *k ) const + { return (type *)((QGDict*)this)->QGDict::look_ptr(k,0,0); } + type *operator[]( void *k ) const + { return (type *)((QGDict*)this)->QGDict::look_ptr(k,0,0); } + void clear() { QGDict::clear(); } + void resize( uint n ) { QGDict::resize(n); } + void statistics() const { QGDict::statistics(); } +private: + void deleteItem( Item d ); +}; + +#if defined(Q_DELETING_VOID_UNDEFINED) +template<> inline void QPtrDict::deleteItem( QCollection::Item ) +{ +} +#endif + +template inline void QPtrDict::deleteItem( QCollection::Item d ) +{ + if ( del_item ) delete (type *)d; +} + + +template class Q_EXPORT QPtrDictIterator : public QGDictIterator +{ +public: + QPtrDictIterator(const QPtrDict &d) :QGDictIterator((QGDict &)d) {} + ~QPtrDictIterator() {} + uint count() const { return dict->count(); } + bool isEmpty() const { return dict->count() == 0; } + type *toFirst() { return (type *)QGDictIterator::toFirst(); } + operator type *() const { return (type *)QGDictIterator::get(); } + type *current() const { return (type *)QGDictIterator::get(); } + void *currentKey() const { return QGDictIterator::getKeyPtr(); } + type *operator()() { return (type *)QGDictIterator::operator()(); } + type *operator++() { return (type *)QGDictIterator::operator++(); } + type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);} +}; + + +#endif // QPTRDICT_H Index: branches/xZenu/src/util/doxygen/qtools/qfile.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qfile.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qfile.cpp (revision 1322) @@ -0,0 +1,550 @@ +/**************************************************************************** +** +** +** Implementation of QFile class +** +** Created : 930812 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qglobal.h" +#if defined(_OS_WIN32_) +#ifdef UNICODE +#ifndef _UNICODE +#define _UNICODE +#endif +#endif +#endif + +#include "qfile.h" +#include "qfiledefs_p.h" + +extern bool qt_file_access( const QString& fn, int t ); + +// NOT REVISED +/*! + \class QFile qfile.h + \brief The QFile class is an I/O device that operates on files. + + \ingroup io + + QFile is an I/O device for reading and writing binary and text files. A + QFile may be used by itself (readBlock and writeBlock) or by more + conveniently using QDataStream or QTextStream. + + Here is a code fragment that uses QTextStream to read a text + file line by line. It prints each line with a line number. + \code + QFile f("file.txt"); + if ( f.open(IO_ReadOnly) ) { // file opened successfully + QTextStream t( &f ); // use a text stream + QString s; + int n = 1; + while ( !t.eof() ) { // until end of file... + s = t.readLine(); // line of text excluding '\n' + printf( "%3d: %s\n", n++, (const char *)s ); + } + f.close(); + } + \endcode + + The QFileInfo class holds detailed information about a file, such as + access permissions, file dates and file types. + + The QDir class manages directories and lists of file names. + + \sa QDataStream, QTextStream +*/ + + +/*! + Constructs a QFile with no name. +*/ + +QFile::QFile() +{ + init(); +} + +/*! + Constructs a QFile with a file name \e name. + \sa setName() +*/ + +QFile::QFile( const QString &name ) + : fn(name) +{ + init(); +} + + +/*! + Destructs a QFile. Calls close(). +*/ + +QFile::~QFile() +{ + close(); +} + + +/*! + \internal + Initialize internal data. +*/ + +void QFile::init() +{ + setFlags( IO_Direct ); + setStatus( IO_Ok ); + fh = 0; + fd = 0; + length = 0; + ioIndex = 0; + ext_f = FALSE; // not an external file handle +} + + +/*! + \fn QString QFile::name() const + Returns the name set by setName(). + \sa setName(), QFileInfo::fileName() +*/ + +/*! + Sets the name of the file. The name can include an absolute directory + path or it can be a name or a path relative to the current directory. + + Do not call this function if the file has already been opened. + + Note that if the name is relative QFile does not associate it with the + current directory. If you change directory before calling open(), open + uses the new current directory. + + Example: + \code + QFile f; + QDir::setCurrent( "/tmp" ); + f.setName( "readme.txt" ); + QDir::setCurrent( "/home" ); + f.open( IO_ReadOnly ); // opens "/home/readme.txt" under UNIX + \endcode + + Also note that the directory separator '/' works for all operating + systems supported by Qt. + + \sa name(), QFileInfo, QDir +*/ + +void QFile::setName( const QString &name ) +{ + if ( isOpen() ) { +#if defined(CHECK_STATE) + qWarning( "QFile::setName: File is open" ); +#endif + close(); + } + fn = name; +} + +/*! + Returns TRUE if this file exists, otherwise FALSE. + \sa name() +*/ + +bool QFile::exists() const +{ + return qt_file_access( fn, F_OK ); +} + +/*! + Returns TRUE if the file given by \e fileName exists, otherwise FALSE. +*/ + +bool QFile::exists( const QString &fileName ) +{ + return qt_file_access( fileName, F_OK ); +} + + +/*! + Removes the file specified by the file name currently set. + Returns TRUE if successful, otherwise FALSE. + + The file is closed before it is removed. +*/ + +bool QFile::remove() +{ + close(); + return remove( fn ); +} + +#if defined(_OS_MAC_) || defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_) || defined(_OS_CYGWIN_) +# define HAS_TEXT_FILEMODE // has translate/text filemode +#endif +#if defined(O_NONBLOCK) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NONBLOCK +#elif defined(O_NDELAY) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NDELAY +#endif + +/*! + Flushes the file buffer to the disk. + + close() also flushes the file buffer. +*/ + +void QFile::flush() +{ + if ( isOpen() && fh ) // can only flush open/buffered + fflush( fh ); // file +} + +/*! + Returns TRUE if the end of file has been reached, otherwise FALSE. + \sa size() +*/ + +bool QFile::atEnd() const +{ + if ( !isOpen() ) { +#if defined(CHECK_STATE) + qWarning( "QFile::atEnd: File is not open" ); +#endif + return FALSE; + } + if ( isDirectAccess() && !isTranslated() ) { + if ( at() < length ) + return FALSE; + } + return QIODevice::atEnd(); +} + +/*! + Reads a line of text. + + Reads bytes from the file until end-of-line is reached, or up to \a + maxlen bytes, and returns the number of bytes read, or -1 in case of + error. The terminating newline is not stripped. + + This function is efficient only for buffered files. Avoid + readLine() for files that have been opened with the \c IO_Raw + flag. + + \sa readBlock(), QTextStream::readLine() +*/ + +int QFile::readLine( char *p, uint maxlen ) +{ + if ( maxlen == 0 ) // application bug? + return 0; +#if defined(CHECK_STATE) + CHECK_PTR( p ); + if ( !isOpen() ) { // file not open + qWarning( "QFile::readLine: File not open" ); + return -1; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QFile::readLine: Read operation not permitted" ); + return -1; + } +#endif + int nread; // number of bytes read + if ( isRaw() ) { // raw file + nread = QIODevice::readLine( p, maxlen ); + } else { // buffered file + p = fgets( p, maxlen, fh ); + if ( p ) { + nread = qstrlen( p ); + ioIndex += nread; + } else { + nread = -1; + setStatus(IO_ReadError); + } + } + return nread; +} + + +/*! + Reads a line of text. + + Reads bytes from the file until end-of-line is reached, or up to \a + maxlen bytes, and returns the number of bytes read, or -1 in case of + error. The terminating newline is not stripped. + + This function is efficient only for buffered files. Avoid + readLine() for files that have been opened with the \c IO_Raw + flag. + + Note that the string is read as plain Latin1 bytes, not Unicode. + + \sa readBlock(), QTextStream::readLine() +*/ + +int QFile::readLine( QString& s, uint maxlen ) +{ + QByteArray ba(maxlen); + int l = readLine(ba.data(),maxlen); + if ( l >= 0 ) { + ba.truncate(l); + s = QString(ba); + } + return l; +} + + +/*! + Reads a single byte/character from the file. + + Returns the byte/character read, or -1 if the end of the file has been + reached. + + \sa putch(), ungetch() +*/ + +int QFile::getch() +{ +#if defined(CHECK_STATE) + if ( !isOpen() ) { // file not open + qWarning( "QFile::getch: File not open" ); + return EOF; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QFile::getch: Read operation not permitted" ); + return EOF; + } +#endif + + int ch; + + if ( !ungetchBuffer.isEmpty() ) { + int len = ungetchBuffer.length(); + ch = ungetchBuffer[ len-1 ]; + ungetchBuffer.truncate( len - 1 ); + return ch; + } + + if ( isRaw() ) { // raw file (inefficient) + char buf[1]; + ch = readBlock( buf, 1 ) == 1 ? buf[0] : EOF; + } else { // buffered file + if ( (ch = getc( fh )) != EOF ) + ioIndex++; + else + setStatus(IO_ReadError); + } + return ch; +} + +/*! + \fn int QFile::writeBlock( const QByteArray& data ) + \reimp + \internal + Should be removed in 3.0 +*/ + +/*! + Writes the character \e ch to the file. + + Returns \e ch, or -1 if some error occurred. + + \sa getch(), ungetch() +*/ + +int QFile::putch( int ch ) +{ +#if defined(CHECK_STATE) + if ( !isOpen() ) { // file not open + qWarning( "QFile::putch: File not open" ); + return EOF; + } + if ( !isWritable() ) { // writing not permitted + qWarning( "QFile::putch: Write operation not permitted" ); + return EOF; + } +#endif + if ( isRaw() ) { // raw file (inefficient) + char buf[1]; + buf[0] = ch; + ch = writeBlock( buf, 1 ) == 1 ? ch : EOF; + } else { // buffered file + if ( (ch = putc( ch, fh )) != EOF ) { + ioIndex++; + if ( ioIndex > length ) // update file length + length = ioIndex; + } else { + setStatus(IO_WriteError); + } + } + return ch; +} + +/*! + Puts the character \e ch back into the file and decrements the index if it + is not zero. + + This function is normally called to "undo" a getch() operation. + + Returns \e ch, or -1 if some error occurred. + + \sa getch(), putch() +*/ + +int QFile::ungetch( int ch ) +{ +#if defined(CHECK_STATE) + if ( !isOpen() ) { // file not open + qWarning( "QFile::ungetch: File not open" ); + return EOF; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QFile::ungetch: Read operation not permitted" ); + return EOF; + } +#endif + if ( ch == EOF ) // cannot unget EOF + return ch; + + if ( isSequentialAccess() && !fh) { + // pipe or similar => we cannot ungetch, so do it manually + ungetchBuffer +=ch; + return ch; + } + + if ( isRaw() ) { // raw file (very inefficient) + char buf[1]; + at( ioIndex-1 ); + buf[0] = ch; + if ( writeBlock(buf, 1) == 1 ) + at ( ioIndex-1 ); + else + ch = EOF; + } else { // buffered file + if ( (ch = ungetc(ch, fh)) != EOF ) + ioIndex--; + else + setStatus( IO_ReadError ); + } + return ch; +} + + +static QCString locale_encoder( const QString &fileName ) +{ + return fileName.local8Bit(); +} + + +static QFile::EncoderFn encoder = locale_encoder; + +/*! + When you use QFile, QFileInfo, and QDir to access the filesystem + with Qt, you can use Unicode filenames. On Unix, these filenames + are converted to an 8-bit encoding. If you want to do your own + file I/O on Unix, you should convert the filename using this + function. On Windows NT, Unicode filenames are supported directly + in the filesystem and this function should be avoided. On Windows 95, + non-Latin1 locales are not supported at this time. + + By default, this function converts to the local 8-bit encoding + determined by the user's locale. This is sufficient for + filenames that the user chooses. Filenames hard-coded into the + application should only use 7-bit ASCII filename characters. + + The conversion scheme can be changed using setEncodingFunction(). + This might be useful if you wish to give the user an option to + store in filenames in UTF-8, etc., but beware that such filenames + would probably then be unrecognizable when seen by other programs. + + \sa decodeName() +*/ + +QCString QFile::encodeName( const QString &fileName ) +{ + return (*encoder)(fileName); +} + +/*! + \enum QFile::EncoderFn + + This is used by QFile::setEncodingFunction(). +*/ + +/*! + Sets the function for encoding Unicode filenames. + The default encodes in the locale-specific 8-bit encoding. + + \sa encodeName() +*/ +void QFile::setEncodingFunction( EncoderFn f ) +{ + encoder = f; +} + +static +QString locale_decoder( const QCString &localFileName ) +{ + return QString::fromLocal8Bit(localFileName); +} + +static QFile::DecoderFn decoder = locale_decoder; + +/*! + This does the reverse of QFile::encodeName(). + + \sa setDecodingFunction() +*/ +QString QFile::decodeName( const QCString &localFileName ) +{ + return (*decoder)(localFileName); +} + +/*! + \enum QFile::DecoderFn + + This is used by QFile::setDecodingFunction(). +*/ + +/*! + Sets the function for decoding 8-bit filenames. + The default uses the locale-specific 8-bit encoding. + + \sa encodeName(), decodeName() +*/ + +void QFile::setDecodingFunction( DecoderFn f ) +{ + decoder = f; +} Index: branches/xZenu/src/util/doxygen/qtools/scstring.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/scstring.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/scstring.h (revision 1322) @@ -0,0 +1,155 @@ +/****************************************************************************** + * + * Copyright (C) 1997-2004 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef SCSTRING_H +#define SCSTRING_H + +#include + +class QRegExp; + +/** This is an alternative implementation of QCString. It provides basically + * the same functions but uses less memory for administration. This class + * is just a wrapper around a plain C string requiring only 4 bytes "overhead". + * QCString features sharing of data and stores the string length, but + * requires 4 + 12 bytes for this (even for the empty string). As doxygen + * uses a LOT of string during a run it saves a lot of memory to use a + * more memory efficient implementation at the cost of relatively low + * runtime overhead. + */ +class SCString +{ +public: + SCString() : m_data(0) {} // make null string + SCString( const SCString &s ); + SCString( int size ); + SCString( const char *str ); + SCString( const char *str, uint maxlen ); + ~SCString(); + + SCString &operator=( const SCString &s );// deep copy + SCString &operator=( const char *str ); // deep copy + + bool isNull() const; + bool isEmpty() const; + uint length() const; + uint size() const { return m_data ? length()+1 : 0; } + char * data() const { return m_data; } + bool resize( uint newlen ); + bool truncate( uint pos ); + bool fill( char c, int len = -1 ); + + SCString copy() const; + + SCString &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 find( const QCString &str, int index, bool cs ) 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; + bool stripPrefix(const char *prefix); + + SCString left( uint len ) const; + SCString right( uint len ) const; + SCString mid( uint index, uint len=0xffffffff) const; + + SCString lower() const; + SCString upper() const; + + SCString stripWhiteSpace() const; + SCString simplifyWhiteSpace() const; + + SCString &assign( const char *str ); + SCString &insert( uint index, const char * ); + SCString &insert( uint index, char ); + SCString &append( const char *s ); + SCString &prepend( const char *s ); + SCString &remove( uint index, uint len ); + SCString &replace( uint index, uint len, const char * ); + SCString &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; + + SCString &setNum( short ); + SCString &setNum( ushort ); + SCString &setNum( int ); + SCString &setNum( uint ); + SCString &setNum( long ); + SCString &setNum( ulong ); + QCString &setNum( float, char f='g', int prec=6 ); + QCString &setNum( double, char f='g', int prec=6 ); + + operator const char *() const; + SCString &operator+=( const char *str ); + SCString &operator+=( char c ); + char &at( uint index ) const; + char &operator[]( int i ) const { return at(i); } + + private: + static void msg_index( uint ); + void duplicate( const SCString &s ); + void duplicate( const char *str); + SCString &duplicate( const char *str, int); + + char * m_data; +}; + +inline char &SCString::at( uint index ) const +{ + return m_data[index]; +} + +inline void SCString::duplicate( const SCString &s ) +{ + if (!s.isEmpty()) + { + uint l = strlen(s.data()); + m_data = (char *)malloc(l+1); + if (m_data) memcpy(m_data,s.data(),l+1); + } + else + m_data=0; +} +inline void SCString::duplicate( const char *str) +{ + if (str && str[0]!='\0') + { + uint l = strlen(str); + m_data = (char *)malloc(l+1); + if (m_data) memcpy(m_data,str,l+1); + } + else + m_data=0; +} +inline SCString &SCString::duplicate( const char *str, int) +{ + if (m_data) free(m_data); + duplicate(str); + return *this; +} + +#endif + Index: branches/xZenu/src/util/doxygen/qtools/qwaitcondition.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qwaitcondition.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qwaitcondition.h (revision 1322) @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QWAITCONDITION_H +#define QWAITCONDITION_H + +#include "qglobal.h" + +class QWaitConditionPrivate; +class QMutex; + +class QWaitCondition +{ +public: + QWaitCondition(); + ~QWaitCondition(); + + void wait(QMutex *mutex); + + void wakeOne(); + void wakeAll(); + +private: + QWaitCondition(const QWaitCondition &); + QWaitCondition &operator=(const QWaitCondition &); + + QWaitConditionPrivate * d; +}; + +#endif // QWAITCONDITION_H Index: branches/xZenu/src/util/doxygen/qtools/Makefile.in =================================================================== --- branches/xZenu/src/util/doxygen/qtools/Makefile.in (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/Makefile.in (revision 1322) @@ -0,0 +1,30 @@ +# +# +# +# Copyright (C) 1997-2000 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. +# + +all: Makefile.qtools Makefile + $(MAKE) -f Makefile.qtools $@ + +Makefile.qtools: qtools.pro + $(ENV) $(PERL) $(TMAKE) qtools.pro >Makefile.qtools + +tmake: + $(ENV) $(PERL) $(TMAKE) qtools.pro >Makefile.qtools + +clean: Makefile.qtools + $(MAKE) -f Makefile.qtools clean + +distclean: clean + +FORCE: Index: branches/xZenu/src/util/doxygen/qtools/Doxyfile =================================================================== --- branches/xZenu/src/util/doxygen/qtools/Doxyfile (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/Doxyfile (revision 1322) @@ -0,0 +1,277 @@ +# Doxyfile 1.7.2 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = Qtools +PROJECT_NUMBER = +OUTPUT_DIRECTORY = ../qtools_docs +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = $(PWD)/ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +TYPEDEF_HIDES_STRUCT = NO +SYMBOL_CACHE_SIZE = 0 +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text " +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = . +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.h \ + *.cpp \ + *.doc +RECURSIVE = NO +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 4 +IGNORE_PREFIX = Q +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = YES +HTML_ALIGN_MEMBERS = YES +HTML_DYNAMIC_SECTIONS = NO +GENERATE_DOCSET = YES +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = YES +QCH_FILE = +QHP_NAMESPACE = com.qtools +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = YES +ECLIPSE_DOC_ID = org.doxygen.qtools +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +USE_INLINE_TREES = NO +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = NO +MATHJAX_RELPATH = http://www.mathjax.org/mathjax +SEARCHENGINE = YES +SERVER_BASED_SEARCH = YES +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = YES +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = ../qtools_docs/qtools.tag +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +DOT_NUM_THREADS = 0 +DOT_FONTNAME = FreeSans.ttf +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MSCFILE_DIRS = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = YES +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = NO Index: branches/xZenu/src/util/doxygen/qtools/qmap.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qmap.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qmap.h (revision 1322) @@ -0,0 +1,606 @@ +/**************************************************************************** +** +** +** Definition of QMap class +** +** Created : 990406 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QMAP_H +#define QMAP_H + +#ifndef QT_H +#include "qshared.h" +#include "qdatastream.h" +#endif // QT_H + + +struct QMapNodeBase +{ + enum Color { Red, Black }; + + QMapNodeBase* left; + QMapNodeBase* right; + QMapNodeBase* parent; + + Color color; + + QMapNodeBase* minimum() { + QMapNodeBase* x = this; + while ( x->left ) + x = x->left; + return x; + } + + QMapNodeBase* maximum() { + QMapNodeBase* x = this; + while ( x->right ) + x = x->right; + return x; + } +}; + + +template +struct QMapNode : public QMapNodeBase +{ + QMapNode( const K& _key, const T& _data ) { data = _data; key = _key; } + QMapNode( const K& _key ) { key = _key; } + QMapNode( const QMapNode& _n ) { key = _n.key; data = _n.data; } + QMapNode() { } + T data; + K key; +}; + + +template +class Q_EXPORT QMapIterator +{ + public: + /** + * Typedefs + */ + typedef QMapNode< K, T >* NodePtr; + + /** + * Variables + */ + QMapNode* node; + + /** + * Functions + */ + QMapIterator() : node( 0 ) {} + QMapIterator( QMapNode* p ) : node( p ) {} + QMapIterator( const QMapIterator& it ) : node( it.node ) {} + + bool operator==( const QMapIterator& it ) const { return node == it.node; } + bool operator!=( const QMapIterator& it ) const { return node != it.node; } + T& operator*() { return node->data; } + const T& operator*() const { return node->data; } + + // Cannot have this - some compilers are too stupid + //T* operator->() const { return &(node->data); } + + const K& key() const { return node->key; } + T& data() { return node->data; } + const T& data() const { return node->data; } + +private: + int inc() { + QMapNodeBase* tmp = node; + if ( tmp->right ) { + tmp = tmp->right; + while ( tmp->left ) + tmp = tmp->left; + } else { + QMapNodeBase* y = tmp->parent; + while (tmp == y->right) { + tmp = y; + y = y->parent; + } + if (tmp->right != y) + tmp = y; + } + node = (NodePtr)tmp; + return 0; + } + + int dec() { + QMapNodeBase* tmp = node; + if (tmp->color == QMapNodeBase::Red && + tmp->parent->parent == tmp ) { + tmp = tmp->right; + } else if (tmp->left != 0) { + QMapNodeBase* y = tmp->left; + while ( y->right ) + y = y->right; + tmp = y; + } else { + QMapNodeBase* y = tmp->parent; + while (tmp == y->left) { + tmp = y; + y = y->parent; + } + tmp = y; + } + node = (NodePtr)tmp; + return 0; + } + +public: + QMapIterator& operator++() { + inc(); + return *this; + } + + QMapIterator operator++(int) { + QMapIterator tmp = *this; + inc(); + return tmp; + } + + QMapIterator& operator--() { + dec(); + return *this; + } + + QMapIterator operator--(int) { + QMapIterator tmp = *this; + dec(); + return tmp; + } +}; + +template +class Q_EXPORT QMapConstIterator +{ + public: + /** + * Typedefs + */ + typedef QMapNode< K, T >* NodePtr; + + /** + * Variables + */ + QMapNode* node; + + /** + * Functions + */ + QMapConstIterator() : node( 0 ) {} + QMapConstIterator( QMapNode* p ) : node( p ) {} + QMapConstIterator( const QMapConstIterator& it ) : node( it.node ) {} + QMapConstIterator( const QMapIterator& it ) : node( it.node ) {} + + bool operator==( const QMapConstIterator& it ) const { return node == it.node; } + bool operator!=( const QMapConstIterator& it ) const { return node != it.node; } + const T& operator*() const { return node->data; } + + // Cannot have this - some compilers are too stupid + //const T* operator->() const { return &(node->data); } + + const K& key() const { return node->key; } + const T& data() const { return node->data; } + +private: + int inc() { + QMapNodeBase* tmp = node; + if ( tmp->right ) { + tmp = tmp->right; + while ( tmp->left ) + tmp = tmp->left; + } else { + QMapNodeBase* y = tmp->parent; + while (tmp == y->right) { + tmp = y; + y = y->parent; + } + if (tmp->right != y) + tmp = y; + } + node = (NodePtr)tmp; + return 0; + } + + int dec() { + QMapNodeBase* tmp = node; + if (tmp->color == QMapNodeBase::Red && + tmp->parent->parent == tmp ) { + tmp = tmp->right; + } else if (tmp->left != 0) { + QMapNodeBase* y = tmp->left; + while ( y->right ) + y = y->right; + tmp = y; + } else { + QMapNodeBase* y = tmp->parent; + while (tmp == y->left) { + tmp = y; + y = y->parent; + } + tmp = y; + } + node = (NodePtr)tmp; + return 0; + } + +public: + QMapConstIterator& operator++() { + inc(); + return *this; + } + + QMapConstIterator operator++(int) { + QMapConstIterator tmp = *this; + inc(); + return tmp; + } + + QMapConstIterator& operator--() { + dec(); + return *this; + } + + QMapConstIterator operator--(int) { + QMapConstIterator tmp = *this; + dec(); + return tmp; + } +}; + + +class Q_EXPORT QMapPrivateBase : public QShared +{ +public: + QMapPrivateBase() { + node_count = 0; + } + QMapPrivateBase( const QMapPrivateBase* _map) { + node_count = _map->node_count; + } + + /** + * Implementations of basic tree algorithms + */ + void rotateLeft( QMapNodeBase* x, QMapNodeBase*& root); + void rotateRight( QMapNodeBase* x, QMapNodeBase*& root ); + void rebalance( QMapNodeBase* x, QMapNodeBase*& root ); + QMapNodeBase* removeAndRebalance( QMapNodeBase* z, QMapNodeBase*& root, + QMapNodeBase*& leftmost, + QMapNodeBase*& rightmost ); + + /** + * Variables + */ + int node_count; +}; + + +template +class QMapPrivate : public QMapPrivateBase +{ +public: + /** + * Typedefs + */ + typedef QMapIterator< Key, T > Iterator; + typedef QMapConstIterator< Key, T > ConstIterator; + typedef QMapNode< Key, T > Node; + typedef QMapNode< Key, T >* NodePtr; + + /** + * Functions + */ + QMapPrivate() { + header = new Node; + header->color = QMapNodeBase::Red; // Mark the header + header->parent = 0; + header->left = header->right = header; + } + QMapPrivate( const QMapPrivate< Key, T >* _map ) : QMapPrivateBase( _map ) { + header = new Node; + header->color = QMapNodeBase::Red; // Mark the header + if ( _map->header->parent == 0 ) { + header->parent = 0; + header->left = header->right = header; + } else { + header->parent = copy( (NodePtr)(_map->header->parent) ); + header->parent->parent = header; + header->left = header->parent->minimum(); + header->right = header->parent->maximum(); + } + } + ~QMapPrivate() { clear(); delete header; } + + NodePtr copy( NodePtr p ) { + if ( !p ) + return 0; + NodePtr n = new Node( *p ); + n->color = p->color; + if ( p->left ) { + n->left = copy( (NodePtr)(p->left) ); + n->left->parent = n; + } else { + n->left = 0; + } + if ( p->right ) { + n->right = copy( (NodePtr)(p->right) ); + n->right->parent = n; + } else { + n->right = 0; + } + return n; + } + + void clear() { + clear( (NodePtr)(header->parent) ); + header->color = QMapNodeBase::Red; + header->parent = 0; + header->left = header->right = header; + node_count = 0; + } + + void clear( NodePtr p ) { + while ( p != 0 ) { + clear( (NodePtr)p->right ); + NodePtr y = (NodePtr)p->left; + delete p; + p = y; + } + } + + Iterator begin() { return Iterator( (NodePtr)(header->left ) ); } + Iterator end() { return Iterator( header ); } + ConstIterator begin() const { return ConstIterator( (NodePtr)(header->left ) ); } + ConstIterator end() const { return ConstIterator( header ); } + + ConstIterator find(const Key& k) const { + QMapNodeBase* y = header; // Last node + QMapNodeBase* x = header->parent; // Root node. + + while ( x != 0 ) { + // If as k <= key(x) go left + if ( !( key(x) < k ) ) { + y = x; + x = x->left; + } else { + x = x->right; + } + } + + // Was k bigger/smaller then the biggest/smallest + // element of the tree ? Return end() + if ( y == header || k < key(y) ) + return ConstIterator( header ); + return ConstIterator( (NodePtr)y ); + } + + void remove( Iterator it ) { + NodePtr del = (NodePtr) removeAndRebalance( it.node, header->parent, header->left, header->right ); + delete del; + --node_count; + } + +#ifdef QT_QMAP_DEBUG + void inorder( QMapNodeBase* x = 0, int level = 0 ){ + if ( !x ) + x = header->parent; + if ( x->left ) + inorder( x->left, level + 1 ); + //cout << level << " Key=" << key(x) << " Value=" << ((NodePtr)x)->data << endl; + if ( x->right ) + inorder( x->right, level + 1 ); + } +#endif + + Iterator insertMulti(const Key& v){ + QMapNodeBase* y = header; + QMapNodeBase* x = header->parent; + while (x != 0){ + y = x; + x = ( v < key(x) ) ? x->left : x->right; + } + return insert(x, y, v); + } + + Iterator insertSingle( const Key& k ) { + // Search correct position in the tree + QMapNodeBase* y = header; + QMapNodeBase* x = header->parent; + bool result = TRUE; + while ( x != 0 ) { + result = ( k < key(x) ); + y = x; + x = result ? x->left : x->right; + } + // Get iterator on the last not empty one + Iterator j( (NodePtr)y ); + if ( result ) { + // Smaller then the leftmost one ? + if ( j == begin() ) { + return insert(x, y, k ); + } else { + // Perhaps daddy is the right one ? + --j; + } + } + // Really bigger ? + if ( (j.node->key) < k ) + return insert(x, y, k ); + // We are going to replace a node + return j; + } + + Iterator insert( QMapNodeBase* x, QMapNodeBase* y, const Key& k ) { + NodePtr z = new Node( k ); + if (y == header || x != 0 || k < key(y) ) { + y->left = z; // also makes leftmost = z when y == header + if ( y == header ) { + header->parent = z; + header->right = z; + } else if ( y == header->left ) + header->left = z; // maintain leftmost pointing to min node + } else { + y->right = z; + if ( y == header->right ) + header->right = z; // maintain rightmost pointing to max node + } + z->parent = y; + z->left = 0; + z->right = 0; + rebalance( z, header->parent ); + ++node_count; + return Iterator(z); + } + +protected: + /** + * Helpers + */ + const Key& key( QMapNodeBase* b ) const { return ((NodePtr)b)->key; } + + /** + * Variables + */ + NodePtr header; +}; + + +template +class Q_EXPORT QMap +{ +public: + /** + * Typedefs + */ + typedef QMapIterator< Key, T > Iterator; + typedef QMapConstIterator< Key, T > ConstIterator; + typedef T ValueType; + typedef QMapPrivate< Key, T > Priv; + + /** + * API + */ + QMap() { sh = new QMapPrivate< Key, T >; } + QMap( const QMap& m ) { sh = m.sh; sh->ref(); } + ~QMap() { if ( sh->deref() ) delete sh; } + + QMap& operator= ( const QMap& m ) + { m.sh->ref(); if ( sh->deref() ) delete sh; sh = m.sh; return *this; } + + Iterator begin() { detach(); return sh->begin(); } + Iterator end() { detach(); return sh->end(); } + ConstIterator begin() const { return ((const Priv*)sh)->begin(); } + ConstIterator end() const { return ((const Priv*)sh)->end(); } + + Iterator find ( const Key& k ) + { detach(); return Iterator( sh->find( k ).node ); } + ConstIterator find ( const Key& k ) const + { return sh->find( k ); } + T& operator[] ( const Key& k ) { + detach(); QMapNode* p = sh->find( k ).node; + if ( p != sh->end().node ) return p->data; + return insert( k, T() ).data(); } + const T& operator[] ( const Key& k ) const + { return sh->find( k ).data(); } + bool contains ( const Key& k ) const + { return find( k ) != end(); } + //{ return sh->find( k ) != ((const Priv*)sh)->end(); } + + uint count() const { return sh->node_count; } + + bool isEmpty() const { return sh->node_count == 0; } + + Iterator insert( const Key& key, const T& value ) { + detach(); + Iterator it = sh->insertSingle( key ); + it.data() = value; + return it; + } + + void remove( Iterator it ) { detach(); sh->remove( it ); } + void remove( const Key& k ) { + detach(); + Iterator it( sh->find( k ).node ); + if ( it != end() ) + sh->remove( it ); + } + + Iterator replace( const Key& k, const T& v ) { + remove( k ); + return insert( k, v ); + } + + void clear() { if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new QMapPrivate; } } + +#if defined(Q_FULL_TEMPLATE_INSTANTIATION) + bool operator==( const QMap& ) const { return FALSE; } +#endif + +protected: + /** + * Helpers + */ + void detach() { if ( sh->count > 1 ) { sh->deref(); sh = new QMapPrivate( sh ); } } + + Priv* sh; +}; + + +#ifndef QT_NO_DATASTREAM +template +inline QDataStream& operator>>( QDataStream& s, QMap& m ) { + m.clear(); + Q_UINT32 c; + s >> c; + for( Q_UINT32 i = 0; i < c; ++i ) { + Key k; T t; + s >> k >> t; + m.insert( k, t ); + } + return s; +} + + +template +inline QDataStream& operator<<( QDataStream& s, const QMap& m ) { + s << (Q_UINT32)m.count(); + QMapConstIterator it = m.begin(); + for( ; it != m.end(); ++it ) + s << it.key() << it.data(); + return s; +} +#endif + +#endif // QMAP_H Index: branches/xZenu/src/util/doxygen/qtools/qdir.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qdir.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qdir.h (revision 1322) @@ -0,0 +1,235 @@ +/**************************************************************************** +** +** +** Definition of QDir class +** +** Created : 950427 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QDIR_H +#define QDIR_H + +#ifndef QT_H +#include "qstrlist.h" +#include "qfileinfo.h" +#endif // QT_H + +#ifndef QT_NO_DIR +typedef QList QFileInfoList; +typedef QListIterator QFileInfoListIterator; +class QStringList; + + +class Q_EXPORT QDir +{ +public: + enum FilterSpec { Dirs = 0x001, + Files = 0x002, + Drives = 0x004, + NoSymLinks = 0x008, + All = 0x007, + TypeMask = 0x00F, + + Readable = 0x010, + Writable = 0x020, + Executable = 0x040, + RWEMask = 0x070, + + Modified = 0x080, + Hidden = 0x100, + System = 0x200, + AccessMask = 0x3F0, + + DefaultFilter = -1 }; + + enum SortSpec { Name = 0x00, + Time = 0x01, + Size = 0x02, + Unsorted = 0x03, + SortByMask = 0x03, + + DirsFirst = 0x04, + Reversed = 0x08, + IgnoreCase = 0x10, + DefaultSort = -1 }; + + QDir(); + QDir( const QString &path, const QString &nameFilter = QString::null, + int sortSpec = Name | IgnoreCase, int filterSpec = All ); + QDir( const QDir & ); + + virtual ~QDir(); + + QDir &operator=( const QDir & ); + QDir &operator=( const QString &path ); + + virtual void setPath( const QString &path ); + virtual QString path() const; + virtual QString absPath() const; + virtual QString canonicalPath() const; + + virtual QString dirName() const; + virtual QString filePath( const QString &fileName, + bool acceptAbsPath = TRUE ) const; + virtual QString absFilePath( const QString &fileName, + bool acceptAbsPath = TRUE ) const; + + static QString convertSeparators( const QString &pathName ); + + virtual bool cd( const QString &dirName, bool acceptAbsPath = TRUE ); + virtual bool cdUp(); + + QString nameFilter() const; + virtual void setNameFilter( const QString &nameFilter ); + FilterSpec filter() const; + virtual void setFilter( int filterSpec ); + SortSpec sorting() const; + virtual void setSorting( int sortSpec ); + + bool matchAllDirs() const; + virtual void setMatchAllDirs( bool ); + + uint count() const; + QString operator[]( int ) const; + + virtual QStrList encodedEntryList( int filterSpec = DefaultFilter, + int sortSpec = DefaultSort ) const; + virtual QStrList encodedEntryList( const QString &nameFilter, + int filterSpec = DefaultFilter, + int sortSpec = DefaultSort ) const; + virtual QStringList entryList( int filterSpec = DefaultFilter, + int sortSpec = DefaultSort ) const; + virtual QStringList entryList( const QString &nameFilter, + int filterSpec = DefaultFilter, + int sortSpec = DefaultSort ) const; + + virtual const QFileInfoList *entryInfoList( int filterSpec = DefaultFilter, + int sortSpec = DefaultSort ) const; + virtual const QFileInfoList *entryInfoList( const QString &nameFilter, + int filterSpec = DefaultFilter, + int sortSpec = DefaultSort ) const; + + static const QFileInfoList *drives(); + + virtual bool mkdir( const QString &dirName, + bool acceptAbsPath = TRUE ) const; + virtual bool rmdir( const QString &dirName, + bool acceptAbsPath = TRUE ) const; + + virtual bool isReadable() const; + virtual bool exists() const; + virtual bool isRoot() const; + + virtual bool isRelative() const; + virtual void convertToAbs(); + + virtual bool operator==( const QDir & ) const; + virtual bool operator!=( const QDir & ) const; + + virtual bool remove( const QString &fileName, + bool acceptAbsPath = TRUE ); + virtual bool rename( const QString &name, const QString &newName, + bool acceptAbsPaths = TRUE ); + virtual bool exists( const QString &name, + bool acceptAbsPath = TRUE ); + + static char separator(); + + static bool setCurrent( const QString &path ); + static QDir current(); + static QDir home(); + static QDir root(); + static QString currentDirPath(); + static QString homeDirPath(); + static QString rootDirPath(); + + static bool match( const QStringList &filters, const QString &fileName ); + static bool match( const QString &filter, const QString &fileName ); + static QString cleanDirPath( const QString &dirPath ); + static bool isRelativePath( const QString &path ); + +private: + void init(); + virtual bool readDirEntries( const QString &nameFilter, + int FilterSpec, int SortSpec ); + + static void slashify ( QString &); + + QString dPath; + QStringList *fList; + QFileInfoList *fiList; + QString nameFilt; + FilterSpec filtS; + SortSpec sortS; + uint dirty : 1; + uint allDirs : 1; +}; + + +inline QString QDir::path() const +{ + return dPath; +} + +inline QString QDir::nameFilter() const +{ + return nameFilt; +} + +inline QDir::FilterSpec QDir::filter() const +{ + return filtS; +} + +inline QDir::SortSpec QDir::sorting() const +{ + return sortS; +} + +inline bool QDir::matchAllDirs() const +{ + return allDirs; +} + +inline bool QDir::operator!=( const QDir &d ) const +{ + return !(*this == d); +} + + +struct QDirSortItem { + QString filename_cache; + QFileInfo* item; +}; + +#endif // QT_NO_DIR +#endif // QDIR_H Index: branches/xZenu/src/util/doxygen/qtools/qvector.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qvector.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qvector.doc (revision 1322) @@ -0,0 +1,344 @@ +/**************************************************************************** +** +** +** QVector class documentation +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + + +/***************************************************************************** + QVector documentation + *****************************************************************************/ + +// BEING REVISED: ettrich +/*! + \class QVector qvector.h + + \brief The QVector class is a template collection class that + provides a vector (array). + + \ingroup tools + + QVector is implemented as a template class. Define a template + instance QVector\ to create a vector that contains pointers to + X, or X*. + + A vector is the same as an array. The main difference between + QVector and QArray is that QVector stores pointers to the elements, + while QArray stores the elements themselves (i.e. QArray is + value-based). + + Unless where otherwise stated, all functions that remove items from + the vector will also delete the element pointed to if auto-deletion + is enabled - see setAutoDelete(). By default, auto-deletion is + disabled. This behaviour can be changed in a subclass by + reimplementing the virtual method deleteItem(). + + Functions that compares items, e.g. find() and sort(), will do so + using the virtual function compareItems(). The default + implementation of this function will only compare the absolute + pointer values. Reimplement compareItems() in a subclass to get + searching and sorting based on the item contents. + + \sa \link collection.html Collection Classes\endlink, QArray +*/ + +/*! + \fn QVector::QVector() + + Constructs a null vector. + + \sa isNull() +*/ + +/*! + \fn QVector::QVector( uint size ) + + Constructs an vector with room for \a size items. Makes a null + vector if \a size == 0. + + All \a size positions in the vector are initialized to 0. + + \sa size(), resize(), isNull() +*/ + +/*! + \fn QVector::QVector( const QVector &v ) + + Constructs a copy of \a v. Only the pointers are copied (i.e. shallow copy). +*/ + +/*! + \fn QVector::~QVector() + + Removes all items from the vector, and destroys the vector itself. + + \sa clear() +*/ + +/*! + \fn QVector &QVector::operator=( const QVector &v ) + + Assigns \a v to this vector and returns a reference to this vector. + + This vector is first cleared, then all the items from \a v is copied + into this vector. Only the pointers are copied (i.e. shallow copy). + + \sa clear() +*/ + +/*! + \fn type **QVector::data() const + Returns a pointer to the actual vector data, which is an array of type*. + + The vector is a null vector if data() == 0 (null pointer). + + \sa isNull() +*/ + +/*! + \fn uint QVector::size() const + + Returns the size of the vector, i.e. the number of vector + positions. This is also the maximum number of items the vector can + hold. + + The vector is a null vector if size() == 0. + + \sa isNull(), resize(), count() +*/ + +/*! + \fn uint QVector::count() const + + Returns the number of items in the vector. The vector is empty if + count() == 0. + + \sa isEmpty(), size() +*/ + +/*! + \fn bool QVector::isEmpty() const + + Returns TRUE if the vector is empty, i.e. count() == 0, otherwise FALSE. + + \sa count() +*/ + +/*! + \fn bool QVector::isNull() const + + Returns TRUE if the vector is null, otherwise FALSE. + + A null vector has size() == 0 and data() == 0. + + \sa size() +*/ + +/*! + \fn bool QVector::resize( uint size ) + Resizes (expands or shrinks) the vector to \a size elements. The array + becomes a null array if \a size == 0. + + Any items in position \a size or beyond in the vector are removed. + New positions are initialized 0. + + Returns TRUE if successful, or FALSE if the memory cannot be allocated. + + \sa size(), isNull() +*/ + +/*! + \fn bool QVector::insert( uint i, const type *d ) + + Sets position \a i in the vector to contain the item \a d. \a i must + be less than size(). Any previous element in position \a i is removed. + + \sa at() +*/ + +/*! + \fn bool QVector::remove( uint i ) + + Removes the item at position \a i in the vector, if there is one. + \a i must be less than size(). + + Returns TRUE unless \a i is out of range. + + \sa take(), at() +*/ + +/*! + \fn type* QVector::take( uint i ) + + Returns the item at position \a i in the vector, and removes that + item from the vector. \a i must be less than size(). If there is no + item at position \a i, 0 is returned. + + In contrast to remove(), this function does \e not call deleteItem() + for the removed item. + + \sa remove(), at() +*/ + +/*! + \fn void QVector::clear() + + Removes all items from the vector, and destroys the vector + itself. + + The vector becomes a null vector. + + \sa isNull() +*/ + +/*! + \fn bool QVector::fill( const type *d, int size ) + + Inserts item \a d in all positions in the vector. Any existing items + are removed. If \a d is 0, the vector becomes empty. + + If \a size >= 0, the vector is first resized to \a size. By default, + \a size is -1. + + Returns TRUE if successful, or FALSE if the memory cannot be allocated + (only if a resize has been requested). + + \sa resize(), insert(), isEmpty() +*/ + +/*! + \fn void QVector::sort() + + Sorts the items in ascending order. Any empty positions will be put + last. + + Compares items using the virtual function compareItems(). + + \sa bsearch() +*/ + +/*! + \fn int QVector::bsearch( const type* d ) const + + In a sorted array, finds the first occurrence of \a d using binary + search. For a sorted array, this is generally much faster than + find(), which does a linear search. + + Returns the position of \a d, or -1 if \a d could not be found. \a d + may not be 0. + + Compares items using the virtual function compareItems(). + + \sa sort(), find() +*/ + + +/*! + \fn int QVector::findRef( const type *d, uint i ) const + + Finds the first occurrence of the item pointer \a d in the vector, + using linear search. The search starts at position \a i, which must + be less than size(). \a i is by default 0; i.e. the search starts at + the start of the vector. + + Returns the position of \a d, or -1 if \a d could not be found. + + This function does \e not use compareItems() to compare items. + + \sa find(), bsearch() +*/ + +/*! + \fn int QVector::find( const type *d, uint i ) const + + Finds the first occurrence of item \a d in the vector, using linear + search. The search starts at position \a i, which must be less than + size(). \a i is by default 0; i.e. the search starts at the start of + the vector. + + Returns the position of \e v, or -1 if \e v could not be found. + + Compares items using the virtual function compareItems(). + + \sa findRef(), bsearch() +*/ + + +/*! + \fn uint QVector::containsRef( const type *d ) const + + Returns the number of occurrences of the item pointer \a d in the + vector. + + This function does \e not use compareItems() to compare items. + + \sa findRef() +*/ + +/*! + \fn uint QVector::contains( const type *d ) const + + Returns the number of occurrences of item \a d in the vector. + + Compares items using the virtual function compareItems(). + + \sa containsRef() +*/ + +/*! + \fn type *QVector::operator[]( int i ) const + + Returns the item at position \a i, or 0 if there is no item at + that position. \a i must be less than size(). + + Equivalent to at( \a i ). + + \sa at() +*/ + +/*! + \fn type *QVector::at( uint i ) const + + Returns the item at position \a i, or 0 if there is no item at + that position. \a i must be less than size(). +*/ + + +/*! + \fn void QVector::toList( QGList *list ) const + + Copies all items in this vector to the list \a list. First, \a list + is cleared, then all items are appended to \a list. + + \sa QList, QStack, QQueue +*/ + Index: branches/xZenu/src/util/doxygen/qtools/qdatastream.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qdatastream.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qdatastream.cpp (revision 1322) @@ -0,0 +1,951 @@ +/**************************************************************************** +** +** +** Implementation of QDataStream class +** +** Created : 930831 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qdatastream.h" + +#ifndef QT_NO_DATASTREAM +#include "qbuffer.h" +#include +#include +#include + +// REVISED: warwick +/*! + \class QDataStream qdatastream.h + + \brief The QDataStream class provides serialization of + binary data to a QIODevice. + + \ingroup io + + A data stream is a binary stream of encoded information which is 100% + independent of the host computer operation system, CPU or byte order. A + stream that is written by a PC under DOS/Windows can be read by a + Sun SPARC running Solaris. + + The QDataStream class implements serialization of primitive types, like + \c char, \c short, \c int, \c char* etc. Serialization of more complex + data is accomplished by breaking up the data into primitive units. + + The programmer can select which byte order to use when serializing data. + The default setting is big endian (MSB first). Changing it to little + endian breaks the portability (unless the reader also changes to little + endian). We recommend keeping this setting unless you have + special requirements. + + A data stream cooperates closely with a QIODevice. A QIODevice + represents an input/output medium one can read data from and write data + to. The QFile class is an example of an IO device. + + Example (write data to a stream): + \code + QFile f( "file.dta" ); + f.open( IO_WriteOnly ); // open file for writing + QDataStream s( &f ); // serialize using f + s << "the answer is"; // serialize string + s << (Q_INT32)42; // serialize integer + \endcode + + Example (read data from a stream): + \code + QFile f( "file.dta" ); + f.open( IO_ReadOnly ); // open file for reading + QDataStream s( &f ); // serialize using f + char *str; + Q_INT32 a; + s >> str >> a; // "the answer is" and 42 + delete str; // delete string + \endcode + + In the last example, if you read into a QString instead of a \c char* + you do not have to delete it. + + Normally, each item written to the stream is written in a fixed binary + format. + For example, a \c char* is written as a 32-bit integer equal to the + length of the string including the NUL byte, followed by all the + characters of the string including the NUL byte. Similarly when + reading a string, 4 bytes are read to create the 32-bit length value, + then that many characters for the string including the NUL. For a complete + description of all Qt types supporting data streaming see \link + datastreamformat.html Format of the QDataStream operators \endlink . + + If you want a "parsing" input stream, see QTextStream. If you just want the + data to be human-readable to aid in debugging, you can set the data + stream into printable data mode with setPrintableData(). The data is + then written slower, in a human readable bloated form that is sufficient + for debugging. + + If you are producing a new binary data format, such as a file format + for documents created by your application, you could use a QDataStream + to write the data in a portable format. Typically, you would write + a brief header containing a magic string and a version number to give + yourself room for future expansion. For example: + + \code + // Open the file. + QFile f( "file.xxx" ); + f.open( IO_WriteOnly ); + QDataStream s( &f ); + + // Write a header with a "magic number" and a version + s << 0xa0b0c0d0; + s << 123; + + // Write the data + s << [lots of interesting data] + \endcode + + Then read it in with: + + \code + // Open the file. + QFile f( "file.xxx" ); + f.open( IO_ReadOnly ); + QDataStream s( &f ); + + // Read and check the header + Q_UINT32 magic; + s >> magic; + if ( magic != 0xa0b0c0d0 ) + return XXX_BAD_FILE_FORMAT; + + // Read the version + Q_INT32 version; + s >> version; + if ( version < 100 ) + return XXX_BAD_FILE_TOO_OLD; + if ( version > 123 ) + return XXX_BAD_FILE_TOO_NEW; + if ( version <= 110 ) + s.setVersion(1); + + // Read the data + s >> [lots of interesting data]; + if ( version > 120 ) + s >> [data new in XXX version 1.2]; + s >> [other interesting data]; + \endcode + + \sa QTextStream QVariant +*/ + + +/***************************************************************************** + QDataStream member functions + *****************************************************************************/ + +#if defined(CHECK_STATE) +#undef CHECK_STREAM_PRECOND +#define CHECK_STREAM_PRECOND if ( !dev ) { \ + qWarning( "QDataStream: No device" ); \ + return *this; } +#else +#define CHECK_STREAM_PRECOND +#endif + +static int systemWordSize = 0; +static bool systemBigEndian; + +static const int DefaultStreamVersion = 3; +// 3 is default in Qt 2.1 +// 2 is the Qt 2.0.x format +// 1 is the Qt 1.x format + +/*! + Constructs a data stream that has no IO device. + + \sa setDevice() +*/ + +QDataStream::QDataStream() +{ + if ( systemWordSize == 0 ) // get system features + qSysInfo( &systemWordSize, &systemBigEndian ); + dev = 0; // no device set + owndev = FALSE; + byteorder = BigEndian; // default byte order + printable = FALSE; + ver = DefaultStreamVersion; + noswap = systemBigEndian; +} + +/*! + Constructs a data stream that uses the IO device \a d. + + \sa setDevice(), device() +*/ + +QDataStream::QDataStream( QIODevice *d ) +{ + if ( systemWordSize == 0 ) // get system features + qSysInfo( &systemWordSize, &systemBigEndian ); + dev = d; // set device + owndev = FALSE; + byteorder = BigEndian; // default byte order + printable = FALSE; + ver = DefaultStreamVersion; + noswap = systemBigEndian; +} + +/*! + Constructs a data stream that operates on a byte array through an + internal QBuffer device. + + Example: + \code + static char bindata[] = { 231, 1, 44, ... }; + QByteArray a; + a.setRawData( bindata, sizeof(bindata) ); // a points to bindata + QDataStream s( a, IO_ReadOnly ); // open on a's data + s >> [something]; // read raw bindata + a.resetRawData( bindata, sizeof(bindata) ); // finished + \endcode + + The QArray::setRawData() function is not for the inexperienced. +*/ + +QDataStream::QDataStream( QByteArray a, int mode ) +{ + if ( systemWordSize == 0 ) // get system features + qSysInfo( &systemWordSize, &systemBigEndian ); + dev = new QBuffer( a ); // create device + ((QBuffer *)dev)->open( mode ); // open device + owndev = TRUE; + byteorder = BigEndian; // default byte order + printable = FALSE; + ver = DefaultStreamVersion; + noswap = systemBigEndian; +} + +/*! + Destructs the data stream. + + The destructor will not affect the current IO device, unless it + is an internal IO device processing a QByteArray passed in the constructor. +*/ + +QDataStream::~QDataStream() +{ + if ( owndev ) + delete dev; +} + + +/*! + \fn QIODevice *QDataStream::device() const + Returns the IO device currently set. + \sa setDevice(), unsetDevice() +*/ + +/*! + void QDataStream::setDevice(QIODevice *d ) + Sets the IO device to \a d. + \sa device(), unsetDevice() +*/ + +void QDataStream::setDevice(QIODevice *d ) +{ + if ( owndev ) { + delete dev; + owndev = FALSE; + } + dev = d; +} + +/*! + Unsets the IO device. This is the same as calling setDevice( 0 ). + \sa device(), setDevice() +*/ + +void QDataStream::unsetDevice() +{ + setDevice( 0 ); +} + + +/*! + \fn bool QDataStream::atEnd() const + Returns TRUE if the IO device has reached the end position (end of + stream or file) or if there is no IO device set. + + Returns FALSE if the current position of the read/write head of the IO + device is somewhere before the end position. + + \sa QIODevice::atEnd() +*/ + +/*!\fn bool QDataStream::eof() const + + \obsolete + + Returns TRUE if the IO device has reached the end position (end of + stream or file) or if there is no IO device set. + + Returns FALSE if the current position of the read/write head of the IO + device is somewhere before the end position. + + \sa QIODevice::atEnd() +*/ + +/*! + \fn int QDataStream::byteOrder() const + Returns the current byte order setting - either \c BigEndian or + \c LittleEndian. + + \sa setByteOrder() +*/ + +/*! + Sets the serialization byte order to \a bo. + + The \a bo parameter can be \c QDataStream::BigEndian or + \c QDataStream::LittleEndian. + + The default setting is big endian. We recommend leaving this setting unless + you have special requirements. + + \sa byteOrder() +*/ + +void QDataStream::setByteOrder( int bo ) +{ + byteorder = bo; + if ( systemBigEndian ) + noswap = byteorder == BigEndian; + else + noswap = byteorder == LittleEndian; +} + + +/*! + \fn bool QDataStream::isPrintableData() const + Returns TRUE if the printable data flag has been set. + \sa setPrintableData() +*/ + +/*! + \fn void QDataStream::setPrintableData( bool enable ) + Sets or clears the printable data flag. + + If this flag is set, the write functions will generate output that + consists of printable characters (7 bit ASCII). + + We recommend enabling printable data only for debugging purposes + (it is slower and creates larger output). +*/ + + +/*! + \fn int QDataStream::version() const + Returns the version number of the data serialization format. + In Qt 2.1, this number is by default 3. + \sa setVersion() +*/ + +/*! + \fn void QDataStream::setVersion( int v ) + Sets the version number of the data serialization format. + + In order to accomodate for new functionality, the datastream + serialization format of some Qt classes has changed in some versions of + Qt. If you want to read data that was created by an earlier version of + Qt, or write data that can be read by a program that was compiled with + an earlier version of Qt, use this function to modify the serialization + format of QDataStream. + + For Qt 1.x compatibility, use \a v == 1. + + For Qt 2.0.x compatibility, use \a v == 2 (Not required for reading in + Qt 2.1). + + \sa version() +*/ + +/***************************************************************************** + QDataStream read functions + *****************************************************************************/ + + +static Q_INT32 read_int_ascii( QDataStream *s ) +{ + register int n = 0; + char buf[40]; + while ( TRUE ) { + buf[n] = s->device()->getch(); + if ( buf[n] == '\n' || n > 38 ) // $-terminator + break; + n++; + } + buf[n] = '\0'; + return atol( buf ); +} + + +/*! + \fn QDataStream &QDataStream::operator>>( Q_UINT8 &i ) + Reads an unsigned byte from the stream and returns a reference to + the stream. +*/ + +/*! + Reads a signed byte from the stream. +*/ + +QDataStream &QDataStream::operator>>( Q_INT8 &i ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + i = (Q_INT8)dev->getch(); + if ( i == '\\' ) { // read octal code + char buf[4]; + dev->readBlock( buf, 3 ); + i = (buf[2] & 0x07)+((buf[1] & 0x07) << 3)+((buf[0] & 0x07) << 6); + } + } else { // data or text + i = (Q_INT8)dev->getch(); + } + return *this; +} + + +/*! + \fn QDataStream &QDataStream::operator>>( Q_UINT16 &i ) + Reads an unsigned 16-bit integer from the stream and returns a reference to + the stream. +*/ + +/*! + Reads a signed 16-bit integer from the stream and returns a reference to + the stream. +*/ + +QDataStream &QDataStream::operator>>( Q_INT16 &i ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + i = (Q_INT16)read_int_ascii( this ); + } else if ( noswap ) { // no conversion needed + dev->readBlock( (char *)&i, sizeof(Q_INT16) ); + } else { // swap bytes + register uchar *p = (uchar *)(&i); + char b[2]; + dev->readBlock( b, 2 ); + *p++ = b[1]; + *p = b[0]; + } + return *this; +} + + +/*! + \fn QDataStream &QDataStream::operator>>( Q_UINT32 &i ) + Reads an unsigned 32-bit integer from the stream and returns a reference to + the stream. +*/ + +/*! + Reads a signed 32-bit integer from the stream and returns a reference to + the stream. +*/ + +QDataStream &QDataStream::operator>>( Q_INT32 &i ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + i = read_int_ascii( this ); + } else if ( noswap ) { // no conversion needed + dev->readBlock( (char *)&i, sizeof(Q_INT32) ); + } else { // swap bytes + register uchar *p = (uchar *)(&i); + char b[4]; + dev->readBlock( b, 4 ); + *p++ = b[3]; + *p++ = b[2]; + *p++ = b[1]; + *p = b[0]; + } + return *this; +} + +/*! + \fn QDataStream &QDataStream::operator>>( Q_UINT64 &i ) + Reads an unsigned 64-bit integer from the stream and returns a reference to + the stream, or uses the Q_UINT32 operator if 64 bit is not available. +*/ + +/*! + Reads a signed 64-bit integer from the stream and returns a reference to + the stream, or uses the Q_UINT32 operator if 64 bit is not available. +*/ + +QDataStream &QDataStream::operator>>( Q_INT64 &i ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + i = read_int_ascii( this ); + } else if ( noswap ) { // no conversion needed + dev->readBlock( (char *)&i, sizeof(Q_INT64) ); + } else { // swap bytes + register uchar *p = (uchar *)(&i); + char b[sizeof(Q_INT64)]; + dev->readBlock( b, sizeof(Q_INT64) ); + if ( sizeof(Q_INT64) == 8 ) { + *p++ = b[7]; + *p++ = b[6]; + *p++ = b[5]; + *p++ = b[4]; + } + *p++ = b[3]; + *p++ = b[2]; + *p++ = b[1]; + *p = b[0]; + } + return *this; +} + +static double read_double_ascii( QDataStream *s ) +{ + register int n = 0; + char buf[80]; + while ( TRUE ) { + buf[n] = s->device()->getch(); + if ( buf[n] == '\n' || n > 78 ) // $-terminator + break; + n++; + } + buf[n] = '\0'; + return atof( buf ); +} + + +/*! + Reads a 32-bit floating point number from the stream using the standard + IEEE754 format. Returns a reference to the stream. +*/ + +QDataStream &QDataStream::operator>>( float &f ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + f = (float)read_double_ascii( this ); + } else if ( noswap ) { // no conversion needed + dev->readBlock( (char *)&f, sizeof(float) ); + } else { // swap bytes + register uchar *p = (uchar *)(&f); + char b[4]; + dev->readBlock( b, 4 ); + *p++ = b[3]; + *p++ = b[2]; + *p++ = b[1]; + *p = b[0]; + } + return *this; +} + + +/*! + Reads a 64-bit floating point number from the stream using the standard + IEEE754 format. Returns a reference to the stream. +*/ + +QDataStream &QDataStream::operator>>( double &f ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + f = read_double_ascii( this ); + } else if ( noswap ) { // no conversion needed + dev->readBlock( (char *)&f, sizeof(double) ); + } else { // swap bytes + register uchar *p = (uchar *)(&f); + char b[8]; + dev->readBlock( b, 8 ); + *p++ = b[7]; + *p++ = b[6]; + *p++ = b[5]; + *p++ = b[4]; + *p++ = b[3]; + *p++ = b[2]; + *p++ = b[1]; + *p = b[0]; + } + return *this; +} + + +/*! + Reads the '\0'-terminated string \a s from the stream and returns + a reference to the stream. + + Space for the string is allocated using \c new - the caller must + eventually call delete[] on the value. +*/ + +QDataStream &QDataStream::operator>>( char *&s ) +{ + uint len = 0; + return readBytes( s, len ); +} + + +/*! + Reads the buffer \a s from the stream and returns a reference to the + stream. + + The buffer \a s is allocated using \c new. Destroy it with the \c delete[] + operator. If the length is zero or \a s cannot be allocated, \a s is + set to 0. + + The \a l parameter will be set to the length of the buffer. + + The serialization format is an Q_UINT32 length specifier first, then the + data (\a l bytes). + + \sa readRawBytes(), writeBytes() +*/ + +QDataStream &QDataStream::readBytes( char *&s, uint &l ) +{ + CHECK_STREAM_PRECOND + Q_UINT32 len; + *this >> len; // first read length spec + l = (uint)len; + if ( len == 0 || eof() ) { + s = 0; + return *this; + } else { + s = new char[len]; // create char array + CHECK_PTR( s ); + if ( !s ) // no memory + return *this; + return readRawBytes( s, (uint)len ); + } +} + + +/*! + Reads \a len bytes from the stream into \a s and returns a reference to + the stream. + + The buffer \a s must be preallocated. + + \sa readBytes(), QIODevice::readBlock(), writeRawBytes() +*/ + +QDataStream &QDataStream::readRawBytes( char *s, uint len ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + register Q_INT8 *p = (Q_INT8*)s; + while ( len-- ) + *this >> *p++; + } else { // read data char array + dev->readBlock( s, len ); + } + return *this; +} + + +/***************************************************************************** + QDataStream write functions + *****************************************************************************/ + + +/*! + \fn QDataStream &QDataStream::operator<<( Q_UINT8 i ) + Writes an unsigned byte to the stream and returns a reference to + the stream. +*/ + +/*! + Writes a signed byte to the stream. +*/ + +QDataStream &QDataStream::operator<<( Q_INT8 i ) +{ + CHECK_STREAM_PRECOND + if ( printable && (i == '\\' || !isprint(i)) ) { + char buf[6]; // write octal code + buf[0] = '\\'; + buf[1] = '0' + ((i >> 6) & 0x07); + buf[2] = '0' + ((i >> 3) & 0x07); + buf[3] = '0' + (i & 0x07); + buf[4] = '\0'; + dev->writeBlock( buf, 4 ); + } else { + dev->putch( i ); + } + return *this; +} + + +/*! + \fn QDataStream &QDataStream::operator<<( Q_UINT16 i ) + Writes an unsigned 16-bit integer to the stream and returns a reference + to the stream. +*/ + +/*! + Writes a signed 16-bit integer to the stream and returns a reference to + the stream. +*/ + +QDataStream &QDataStream::operator<<( Q_INT16 i ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + char buf[16]; + sprintf( buf, "%d\n", i ); + dev->writeBlock( buf, strlen(buf) ); + } else if ( noswap ) { // no conversion needed + dev->writeBlock( (char *)&i, sizeof(Q_INT16) ); + } else { // swap bytes + register uchar *p = (uchar *)(&i); + char b[2]; + b[1] = *p++; + b[0] = *p; + dev->writeBlock( b, 2 ); + } + return *this; +} + + +/*! + \fn QDataStream &QDataStream::operator<<( Q_UINT32 i ) + Writes an unsigned 32-bit integer to the stream and returns a reference to + the stream. +*/ + +/*! + Writes a signed 32-bit integer to the stream and returns a reference to + the stream. +*/ + +QDataStream &QDataStream::operator<<( Q_INT32 i ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + char buf[16]; + sprintf( buf, "%d\n", i ); + dev->writeBlock( buf, strlen(buf) ); + } else if ( noswap ) { // no conversion needed + dev->writeBlock( (char *)&i, sizeof(Q_INT32) ); + } else { // swap bytes + register uchar *p = (uchar *)(&i); + char b[4]; + b[3] = *p++; + b[2] = *p++; + b[1] = *p++; + b[0] = *p; + dev->writeBlock( b, 4 ); + } + return *this; +} + +/*! + \fn QDataStream &QDataStream::operator<<( Q_UINT64 i ) + Writes an unsigned 64-bit integer to the stream and returns a reference to + the stream, or uses the Q_UINT32-operator if 64 bit is not available. +*/ + +/*! + Writes a signed 64-bit integer to the stream and returns a reference to + the stream, or calls the Q_INT32-operator if 64 bit is not available. +*/ + +QDataStream &QDataStream::operator<<( Q_INT64 i ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + char buf[20]; + sprintf( buf, "%ld\n", i ); + dev->writeBlock( buf, strlen(buf) ); + } else if ( noswap ) { // no conversion needed + dev->writeBlock( (char *)&i, sizeof(Q_INT64) ); + } else { // swap bytes + register uchar *p = (uchar *)(&i); + char b[sizeof(Q_INT64)]; + if ( sizeof(Q_INT64) == 8 ) { + b[7] = *p++; + b[6] = *p++; + b[5] = *p++; + b[4] = *p++; + } + b[3] = *p++; + b[2] = *p++; + b[1] = *p++; + b[0] = *p; + dev->writeBlock( b, sizeof(Q_INT64) ); + } + return *this; +} + +/*! + \fn QDataStream &QDataStream::operator<<( uint i ) + Writes an unsigned integer to the stream as a 32-bit unsigned integer + (Q_UINT32). + Returns a reference to the stream. +*/ + +/*! + \fn QDataStream &QDataStream::operator<<( int i ) + Writes a signed integer to the stream as a 32-bit signed integer (Q_INT32). + Returns a reference to the stream. +*/ + + +/*! + Writes a 32-bit floating point number to the stream using the standard + IEEE754 format. Returns a reference to the stream. +*/ + +QDataStream &QDataStream::operator<<( float f ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + char buf[32]; + sprintf( buf, "%g\n", (double)f ); + dev->writeBlock( buf, strlen(buf) ); + } else { + float g = f; // fixes float-on-stack problem + if ( noswap ) { // no conversion needed + dev->writeBlock( (char *)&g, sizeof(float) ); + } else { // swap bytes + register uchar *p = (uchar *)(&g); + char b[4]; + b[3] = *p++; + b[2] = *p++; + b[1] = *p++; + b[0] = *p; + dev->writeBlock( b, 4 ); + } + } + return *this; +} + + +/*! + Writes a 64-bit floating point number to the stream using the standard + IEEE754 format. Returns a reference to the stream. +*/ + +QDataStream &QDataStream::operator<<( double f ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // printable data + char buf[32]; + sprintf( buf, "%g\n", f ); + dev->writeBlock( buf, strlen(buf) ); + } else if ( noswap ) { // no conversion needed + dev->writeBlock( (char *)&f, sizeof(double) ); + } else { // swap bytes + register uchar *p = (uchar *)(&f); + char b[8]; + b[7] = *p++; + b[6] = *p++; + b[5] = *p++; + b[4] = *p++; + b[3] = *p++; + b[2] = *p++; + b[1] = *p++; + b[0] = *p; + dev->writeBlock( b, 8 ); + } + return *this; +} + + +/*! + Writes the '\0'-terminated string \a s to the stream and returns + a reference to the stream. + + The string is serialized using writeBytes(). +*/ + +QDataStream &QDataStream::operator<<( const char *s ) +{ + if ( !s ) { + *this << (Q_UINT32)0; + return *this; + } + uint len = qstrlen( s ) + 1; // also write null terminator + *this << (Q_UINT32)len; // write length specifier + return writeRawBytes( s, len ); +} + + +/*! + Writes the length specifier \a len and the buffer \a s to the stream and + returns a reference to the stream. + + The \a len is serialized as an Q_UINT32, followed by \a len bytes from + \a s. + + \sa writeRawBytes(), readBytes() +*/ + +QDataStream &QDataStream::writeBytes(const char *s, uint len) +{ + CHECK_STREAM_PRECOND + *this << (Q_UINT32)len; // write length specifier + if ( len ) + writeRawBytes( s, len ); + return *this; +} + + +/*! + Writes \a len bytes from \a s to the stream and returns a reference to the + stream. + + \sa writeBytes(), QIODevice::writeBlock(), readRawBytes() +*/ + +QDataStream &QDataStream::writeRawBytes( const char *s, uint len ) +{ + CHECK_STREAM_PRECOND + if ( printable ) { // write printable + register char *p = (char *)s; + while ( len-- ) + *this << *p++; + } else { // write data char array + dev->writeBlock( s, len ); + } + return *this; +} + +#endif // QT_NO_DATASTREAM Index: branches/xZenu/src/util/doxygen/qtools/qmutex_p.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qmutex_p.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qmutex_p.h (revision 1322) @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMUTEX_P_H +#define QMUTEX_P_H + +#include "qglobal.h" + +#if defined(_OS_UNIX_) || defined(_OS_MAC_) +#include +#elif defined(_OS_WIN32_) +#include +#endif + +class QAtomicInt +{ + public: + QAtomicInt(int v=0) : m_value(v) {} + bool testAndSet(int expectedValue,int newValue); + int fetchAndAdd(int valueToAdd); + operator int () const { return m_value; } + bool operator==(int value) const { return m_value == value; } + bool operator!=(int value) const { return m_value != value; } + bool operator!() const { return m_value == 0; } + + private: + volatile int m_value; +}; + +class QMutexPrivate +{ +public: + QMutexPrivate(); + ~QMutexPrivate(); + + void wait(); + void wakeUp(); + + QAtomicInt contenders; + +#if defined(_OS_UNIX_) || defined(_OS_MAC_) + volatile bool wakeup; + pthread_mutex_t mutex; + pthread_cond_t cond; +#elif defined(_OS_WIN32_) + HANDLE event; +#else +#error "unsupported platform" +#endif +}; + +#endif // QMUTEX_P_H Index: branches/xZenu/src/util/doxygen/qtools/qgarray.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgarray.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgarray.h (revision 1322) @@ -0,0 +1,120 @@ +/**************************************************************************** +** +** +** Definition of QGArray class +** +** Created : 930906 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QGARRAY_H +#define QGARRAY_H + +#ifndef QT_H +#include "qshared.h" +#endif // QT_H + + +class Q_EXPORT QGArray // generic array +{ +friend class QBuffer; +public: + //### DO NOT USE THIS. IT IS PUBLIC BUT DO NOT USE IT IN NEW CODE. + struct array_data : public QShared { // shared array + array_data() { data=0; len=0; } + char *data; // actual array data + uint len; + }; + QGArray(); +protected: + QGArray( int, int ); // dummy; does not alloc + QGArray( int size ); // allocate 'size' bytes + QGArray( const QGArray &a ); // shallow copy + virtual ~QGArray(); + + QGArray &operator=( const QGArray &a ) { return assign( a ); } + + virtual void detach() { duplicate(*this); } + + char *data() const { return shd->data; } + uint nrefs() const { return shd->count; } + uint size() const { return shd->len; } + bool isEqual( const QGArray &a ) const; + + bool resize( uint newsize ); + + bool fill( const char *d, int len, uint sz ); + + QGArray &assign( const QGArray &a ); + QGArray &assign( const char *d, uint len ); + QGArray &duplicate( const QGArray &a ); + QGArray &duplicate( const char *d, uint len ); + void store( const char *d, uint len ); + + array_data *sharedBlock() const { return shd; } + void setSharedBlock( array_data *p ) { shd=(array_data*)p; } + + QGArray &setRawData( const char *d, uint len ); + void resetRawData( const char *d, uint len ); + + int find( const char *d, uint index, uint sz ) const; + int contains( const char *d, uint sz ) const; + + void sort( uint sz ); + int bsearch( const char *d, uint sz ) const; + + char *at( uint index ) const; + + bool setExpand( uint index, const char *d, uint sz ); + +protected: + virtual array_data *newData(); + virtual void deleteData( array_data *p ); + +private: + static void msg_index( uint ); + array_data *shd; +}; + + +inline char *QGArray::at( uint index ) const +{ +#if defined(CHECK_RANGE) + if ( index >= size() ) { + msg_index( index ); + index = 0; + } +#endif + return &shd->data[index]; +} + + +#endif // QGARRAY_H Index: branches/xZenu/src/util/doxygen/qtools/qvaluelist.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qvaluelist.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qvaluelist.doc (revision 1322) @@ -0,0 +1,772 @@ +/**************************************************************************** +** +** +** QValueList and QValueListIterator class documentation +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + + +/***************************************************************************** + QValueList documentation + *****************************************************************************/ + +/*! + \class QValueList qvaluelist.h + \brief The QValueList class is a value based template class that provides doubly linked lists. + + \ingroup qtl + \ingroup tools + \ingroup shared + + Define a template instance QValueList\ to create a list of values which all + have the class X. Please notice that QValueList does not store pointers to the + members of the list. It holds a copy of every member. That is the reason why this + kind of classes are called "value based" while QList and QDict are "reference based". + + Some classes can not be used within a QValueList, for example everything + derived from QObject and thus all classes that implement widgets. + Only values can be used in a QValueList. To qualify as a value, the class + must provide +
    +
  • a copy constructor, +
  • an assignment operator and +
  • a default constructor, i.e. a constructor that does not take any arguments. +
+ + Note that C++ defaults to field-by-field assignment operators and + copy constructors if no explicit version is supplied. In many cases, + this is sufficient. + + Example: + \code + #include + #include + #include + + class Employee + { + public: + Employee(): s(0) {} + Employee( const QString& name, int salary ) + : n(name), s(salary) + {} + + QString name() const { return n; } + int salary() const { return s; } + void setSalary( int salary ) { s = salary; } + private: + QString n; + int s; + }; + + void main() + { + typedef QValueList EmployeeList; + EmployeeList list; // list of Employee + + list.append( Employee("Bill", 50000) ); + list.append( Employee("Steve",80000) ); + list.append( Employee("Ron", 60000) ); + + Employee joe( "Joe", 50000 ); + list.append( joe ); + joe.setSalary( 4000 ); + + EmployeeList::Iterator it; + for( it = list.begin(); it != list.end(); ++it ) + printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary().latin1() ); + } + \endcode + + Program output: + \code + Bill earns 50000 + Steve earns 80000 + Ron earns 60000 + Joe earns 50000 + \endcode + + As you can see, the latest changes to Joes salary did not affect the value + in the list because the list created a copy of Joes entry. + + There are three ways of finding items in the list. The first one is by using + the at() function. It returns an iterator. The advantages of + getting an iterator is that you can now move forward or backward from this + position by incrementing/decrementing the iterator. To get the amount of + items in the list call count(). Valid indices are 0..count(). + + The second way of accessing a list is with operator[]. That means you can address + it like an array. The return value is a reference to the value stored in the list. + There exist two versions of this operator. The first one is const and returns a + const reference to the value. The second on is non const and returns a non const + reference to the value. It is up to your compiler to choose the correct one. + + The third method is to use the functions begin() and end(). + With a simple for loop as shown in the example you can iterate over the complete list. + It is save to have multiple iterators at the same time. If some member of the list is + removed then only iterators pointing to the removed member become invalid. Inserting in + the list does not invalidate any iterator. For convenience the function last() returns + an iterator for the last and first() for the first element in the list. + + In addition you can search items in the list with the find() function. It exists in a const + and a non const version. It starts searching from the beginning of the list, but another + flavor of the find() function allows you to specify where searching should start. + If you just want to know wether a certain item is at least once in the list, then you + can use the contains() function. + + Since QValueList is value based there is no need to care about deleting elements in the + list. The list holds its own copies and will free them if the corresponding member or + the list itself is deleted. You can force the list to free all of its item with clear(). + + QValueList is implicitly shared. That means you can just make copies of the list + in time O(1). If multiple QValueList instances share the same data and one + is doing a modification of the lists data then this modifying instance makes a copy + and modifies its private copy. So it does not affect the other instances. + From a developers point of view you can think that a QValueList and a copy of this + list have nothing to do with each other. Developers may only notice that copying is + very fast. People known to a CPUs MMU architecture will know this pattern as "copy on write". + + There exist three functions to insert items in the list. append() + inserts an item at the end, prepend() inserts at the beginning + and insert() inserts in front of the position given by an iterator. + + Items can be removed from the list in two ways. The first is to pass an iterator to + the remove(). The other possibility is to pass a value to remove() which will + delete all members which match this value. + + Lists can be sorted with the algorithms provided by the Qt Template Library, for example with + qHeapSort(): + + Example: + \code + QValueList l; + l.append( 5 ); + l.append( 8 ); + l.append( 3 ); + l.append( 4 ); + qHeapSort( l ); + \endcode + + \sa QValueListIterator +*/ + + +/*! + \fn QValueList::QValueList() + Constructs an empty list. +*/ + +/*! + \fn QValueList::QValueList( const QValueList& l ) + Constructs a copy of \e l. + + This operation costs O(1) time since QValueList is implicit shared. + The first instance applying modifications to a shared list will create + a copy which takes in turn O(n) time. However returning a QValueList from + a function is very fast. +*/ + +/*! + \fn QValueList::~QValueList() + Destroys the list. References to the values in the list and all iterators + of this list become invalidated. Since QValueList is highly tuned for performance + you wont see warnings if you use invalid iterators, + because it is impossible for + an iterator to check wether it is valid or not. +*/ + +/*! + \fn QValueList& QValueList::operator= ( const QValueList& l ) + Assigns \e l to this list and returns a reference to this list. + + All iterators of the current list become invalidated by this operation. + The cost of such an assignment is O(1) since QValueList is implicitly shared. +*/ + +/*! + \fn QValueList QValueList::operator+ ( const QValueList& l ) const + Creates a new list and fills it with the elements of this list. Then the + elements of \e l are appended. + + Returns the new list. +*/ + +/*! + \fn QValueList& QValueList::operator+= ( const QValueList& l ) + Adds \e list to this list. + + Returns a reference to this list. +*/ + +/*! + \fn bool QValueList::operator== ( const QValueList& l ) const + Compares both lists. + + Returns TRUE if both list are equal. +*/ + +/*! + \fn bool QValueList::operator!= ( const QValueList& l ) const + Compares both lists. + + Returns TRUE if both list are unequal. +*/ + +/*! + \fn QValueList& QValueList::operator+= ( const T& x ) + Adds the value \e x to the end of the list. + + Returns a reference to the list. +*/ + +/*! + \fn QValueList& QValueList::operator<< ( const T& x ) + Adds the value \e x to the end of the list. + + Returns a reference to the list. +*/ + +/*! + \fn const T& QValueList::operator[] ( uint i ) const + Returns a const reference to the item with index \e i in the list. + It is up to you to check wether this item really exists. You can do that easily + with the count() function. However this operator does not check wether \e i + is in range and will deliver undefined results if it does not exist. +*/ + +/*! + \fn T& QValueList::operator[] ( uint i ) + Returns a reference to the item with index \e i in the list. + It is up to you to check wether this item really exists. You can do that easily + with the count() function. However this operator does not check wether \e i + is in range and will deliver undefined results if it does not exist. + In contrast to the const operator[] you may manipulate the value returned by this + operator. +*/ + +/*! + \fn uint QValueList::count() const + Returns the number of items in the list. + \sa isEmpty() +*/ + +/*! + \fn bool QValueList::isEmpty() const + Returns TRUE if the list is empty, i.e. count() == 0. Returns FALSE + otherwise. + \sa count() +*/ + +/*! + \fn Iterator QValueList::insert( Iterator it, const T& x ) + Inserts the value \e x in front of the iterator \e it. + + Returns an iterator pointing at the inserted item. + + \sa append(), prepend() +*/ + +/*! + \fn Iterator QValueList::append( const T& x ) + Inserts the value \e x at the end of the list. + + Returns an iterator pointing at the inserted item. + + \sa insert(), prepend() +*/ + +/*! + \fn Iterator QValueList::prepend( const T& x ) + Inserts the value \e x at the beginning of the list. + + Returns an iterator pointing at the inserted item. + + \sa insert(), append() +*/ + +/*! + \fn Iterator QValueList::remove( Iterator it ) + Removes the item at position \e it in the list. + + Returns an iterator pointing to the item following the + removed on or end() if the last item was deleted. + + \sa clear() +*/ + +/*! + \fn void QValueList::remove( const T& x ) + Removes all items which have the value \e x. + + \sa clear() +*/ + +/*! + \fn void QValueList::clear() + Removes all items from the list. + + \sa remove() +*/ + +/*! + \fn Iterator QValueList::find( const T& x ) + Finds the first occurrence of \e x in the list. + + Returns end() if no item did match. +*/ + +/*! + \fn ConstIterator QValueList::find( const T& x ) const + Finds the first occurrence of \e x in the list. + + Returns end() if no item did match. +*/ + +/*! + \fn Iterator QValueList::find( Iterator it, const T& x ) + Finds the first occurrence of \e x in the list starting at + the position given by \e it. + + Returns end() if no item did match. +*/ + +/*! + \fn ConstIterator QValueList::find( ConstIterator it, const T& x ) const + Finds the first occurrence of \e x in the list starting at + the position given by \e it. + + Returns end() if no item did match. +*/ + +/*! + \fn uint QValueList::contains( const T& x ) const + Counts and returns the number of occurrences of the value \e x in the list. +*/ + +/*! + \fn int QValueList::findIndex( const T& x ) const + Returns the first index of the value \e x in the list or -1 if no such value + can be found in the list. +*/ + +/*! + \fn Iterator QValueList::at( uint i ) + Returns an iterator pointing to the item at position \e i in the list, or + end() if the index is out of range. +*/ + +/*! + \fn ConstIterator QValueList::at( uint i ) const + Returns an iterator pointing to the item at position \e i in the list, or + end() if the index is out of range. +*/ + +/*! + \fn T& QValueList::first() + Returns a reference to the first item in the list or the item + referenced by end() + if no such items exists. Please note that you may not change + the value the end() Iterator is pointing to. + + \sa begin(), last() +*/ + +/*! + \fn const T& QValueList::first() const + Returns a reference to the first item in the list or the item + referenced by end() if + no such items exists. + + \sa begin(), last() +*/ + +/*! + \fn Iterator QValueList::fromLast() + Returns an iterator pointing to the last element in the list or + end() if no such item exists. + + \sa last() +*/ + +/*! + \fn ConstIterator QValueList::fromLast() const + Returns an iterator pointing to the last element in the list or + end() if no such item exists. + + \sa last() +*/ + +/*! + \fn T& QValueList::last() + Returns a reference to the last item in the list or the item + referenced by end() if no + such item exists. Please note that you may not change + the value the end() Iterator is pointing to. + + \sa end(), first(), fromLast() +*/ + +/*! + \fn const T& QValueList::last() const + Returns a reference to the last item in the list or the item + referenced by end() if no such item exists. + + \sa end(), first(), fromLast() +*/ + +/*! + \fn Iterator QValueList::begin() + Returns an iterator pointing to the first element in the list. This + iterator equals end() if the list is empty; + \sa first(), end() +*/ + +/*! + \fn ConstIterator QValueList::begin() const + Returns an iterator pointing to the first element in the list. This + iterator equals end() if the list is empty; + \sa first(), end() +*/ + +/*! + \fn Iterator QValueList::end() + Returns an iterator pointing behind the last element in the list. This + iterator equals begin() if the list is empty. + + \sa last(), begin() +*/ + +/*! + \fn ConstIterator QValueList::end() const + Returns an iterator pointing behind the last element in the list. This + iterator equals begin() if the list is empty. + + \sa last(), begin() +*/ + +/*! + \fn void QValueList::detach() + If the list does not share its data with another QValueList instance, then nothing + happens, otherwise the function creates a new copy of this data and detaches + from the shared one. This function is called whenever the list is modified. + The implicit sharing mechanism is implemented this way. +*/ + +/*! + \fn QDataStream& operator>>( QDataStream& s, QValueList& l ) + \relates QValueList + Reads a list from the stream. The type \e T stored in the list must implement + the streaming operator, too. +*/ + +/*! + \fn QDataStream& operator<<( QDataStream& s, const QValueList& l ) + \relates QValueList + Writes a list to the stream. The type \e T stored in the list must implement + the streaming operator, too. +*/ + +/***************************************************************************** + QValueListIterator documentation + *****************************************************************************/ + +/*! + \class QValueListIterator qvaluelist.h + \brief The QValueListIterator class provides an iterator for QValueList. + + \ingroup qtl + \ingroup tools + + You can not create an iterator by yourself. Instead you have to + ask a list to give you one. An iterator has only the size of a pointer. + On 32 bit machines that means 4 bytes otherwise 8 bytes. That makes them + very fast. In fact they resemble the semantics of pointers as good as possible + and they are almost as fast as usual pointers. + + Example: + \code + #include + #include + #include + + class Employee + { + public: + Employee(): s(0) {} + Employee( const QString& name, int salary ) + : n(name), s(salary) + {} + + QString name() const { return n; } + int salary() const { return s; } + void setSalary( int salary ) { s = salary; } + private: + QString n; + int s; + }; + + void main() + { + typedef QValueList EmployeeList; + EmployeeList list; // list of Employee + + list.append( Employee("Bill", 50000) ); + list.append( Employee("Steve",80000) ); + list.append( Employee("Ron", 60000) ); + + Employee joe( "Joe", 50000 ); + list.append( joe ); + joe.setSalary( 4000 ); + + EmployeeList::Iterator it; + for( it = list.begin(); it != list.end(); ++it ) + printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary() ); + } + \endcode + + Program output: + \code + Bill earns 50000 + Steve earns 80000 + Ron earns 60000 + Joe earns 50000 + \endcode + + In contrast to QList there are no built in functions in QValueList to + traverse the list. The only way to do this is to use iterators. + QValueList is highly optimized for performance and memory usage. + On the other hand that means that you have to be a bit more careful + by what you are doing. QValueList does not know about all its iterators + and the iterators dont even know to which list they belong. That makes + things fast and slim but a bit dangerous because it is up to you to make + sure that iterators you are using are still valid. QListIterator will be able + to give warnings while QValueListIterator may end up in an undefined state. + + For every Iterator there is a ConstIterator. When accessing a QValueList + in a const environment or if the reference or pointer to the list is itself + const, then you have to use the ConstIterator. Its semantics are the same, + but it returns only const references to the item it points to. + + \sa QValueList, QValueListConstIterator +*/ + +/*! + \fn QValueListIterator::QValueListIterator() + Creates un uninitialized iterator. +*/ + +/*! + \fn QValueListIterator::QValueListIterator( NodePtr p ) + Internal function. +*/ + +/*! + \fn QValueListIterator::QValueListIterator( const QValueListIterator& it ) + Constructs a copy of the iterator \e it. +*/ + +/*! + \fn QValueListIterator::~QValueListIterator() + Destroys the iterator. +*/ + +/* Unfortunately not with MSVC + \fn T *QValueListIterator::operator->() + Pointer operator. Returns a pointer to the current iterator item. + The great advantage of this operator is that you can treat the + iterator like a pointer. + + Example: + \code + QValueList::Iterator it = list.begin(); + for( ; it != end(); ++it ) + it->show(); + \endcode +*/ + +/*! + \fn T& QValueListIterator::operator*() + Asterix operator. Returns a reference to the current iterator item. +*/ + +/*! + \fn const T& QValueListIterator::operator*() const + Asterix operator. Returns a reference to the current iterator item. +*/ + +/*! + \fn QValueListIterator& QValueListIterator::operator++() + Prefix ++ makes the succeeding item current and returns + an iterator pointing to the new current item. + The iterator can not check wether it reached the end of the list. Incrementing + the iterator as returned by end() causes undefined results. +*/ + +/*! + \fn QValueListIterator QValueListIterator::operator++(int) + Postfix ++ makes the succeeding item current and returns + an iterator pointing to the new current item. + The iterator can not check wether it reached the end of the list. Incrementing + the iterator as returned by end() causes undefined results. +*/ + +/*! + \fn QValueListIterator& QValueListIterator::operator--() + Prefix -- makes the previous item current and returns + an iterator pointing to the new current item. + The iterator can not check wether it reached the beginning of the list. Decrementing + the iterator as returned by begin() causes undefined results. +*/ + +/*! + \fn QValueListIterator QValueListIterator::operator--(int) + Postfix -- makes the previous item current and returns + an iterator pointing to the new current item. + The iterator can not check wether it reached the beginning of the list. Decrementing + the iterator as returned by begin() causes undefined results. +*/ + +/*! + \fn bool QValueListIterator::operator==( const QValueListIterator& it ) const + Compares both iterators and returns TRUE if they point to the same item. +*/ + +/*! + \fn bool QValueListIterator::operator!=( const QValueListIterator& it ) const + Compares both iterators and returns TRUE if they point to different items. +*/ + +/***************************************************************************** + QValueListConstIterator documentation + *****************************************************************************/ + +/*! + \class QValueListConstIterator qvaluelist.h + \brief The QValueListConstIterator class provides an iterator for QValueList. + + \ingroup qtl + \ingroup tools + + In contrast to QValueListIterator this class is used to iterate over a const + list. It does not allow to modify the values of the list since this would + break the const semantics. + + For more informations on QValueList iterators see QValueListIterator. + + \sa QValueListIterator, QValueList +*/ + +/*! + \fn QValueListConstIterator::QValueListConstIterator() + Creates un uninitialized iterator. +*/ + +/*! + \fn QValueListConstIterator::QValueListConstIterator( NodePtr p ) + Internal function. +*/ + +/*! + \fn QValueListConstIterator::QValueListConstIterator( const QValueListConstIterator& it ) + Constructs a copy of the iterator \e it. +*/ + +/*! + \fn QValueListConstIterator::QValueListConstIterator( const QValueListIterator& it ) + Constructs a copy of the iterator \e it. +*/ + +/*! + \fn QValueListConstIterator::~QValueListConstIterator() + Destroys the iterator. +*/ + +/* Unfortunately not with MSVC + \fn const T *QValueListConstIterator::operator->() + Pointer operator. Returns a pointer to the current iterator item. + The great advantage of this operator is that you can treat the + iterator like a pointer. + + Example: + \code + QValueList::Iterator it = list.begin(); + for( ; it != end(); ++it ) + it->show(); + \endcode +*/ + +/*! + \fn const T& QValueListConstIterator::operator*() const + Asterix operator. Returns a reference to the current iterator item. +*/ + +/*! + \fn QValueListConstIterator& QValueListConstIterator::operator++() + Prefix ++ makes the succeeding item current and returns + an iterator pointing to the new current item. + The iterator can not check wether it reached the end of the list. Incrementing + the iterator as returned by end() causes undefined results. +*/ + +/*! + \fn QValueListConstIterator QValueListConstIterator::operator++(int) + Postfix ++ makes the succeeding item current and returns + an iterator pointing to the new current item. + The iterator can not check wether it reached the end of the list. Incrementing + the iterator as returned by end() causes undefined results. +*/ + +/*! + \fn QValueListConstIterator& QValueListConstIterator::operator--() + Prefix -- makes the previous item current and returns + an iterator pointing to the new current item. + The iterator can not check wether it reached the beginning of the list. Decrementing + the iterator as returned by begin() causes undefined results. +*/ + +/*! + \fn QValueListConstIterator QValueListConstIterator::operator--(int) + Postfix -- makes the previous item current and returns + an iterator pointing to the new current item. + The iterator can not check wether it reached the beginning of the list. Decrementing + the iterator as returned by begin() causes undefined results. +*/ + +/*! + \fn bool QValueListConstIterator::operator==( const QValueListConstIterator& it ) const + Compares both iterators and returns TRUE if they point to the same item. +*/ + +/*! + \fn bool QValueListConstIterator::operator!=( const QValueListConstIterator& it ) const + Compares both iterators and returns TRUE if they point to different items. +*/ Index: branches/xZenu/src/util/doxygen/qtools/qthread_p.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qthread_p.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qthread_p.h (revision 1322) @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTHREAD_P_H +#define QTHREAD_P_H + +#include "qglobal.h" + +#if defined(_OS_UNIX_) || defined(_OS_MAC_) +#include +#elif defined(_OS_WIN32_) +#include +#endif + +#include "qthread.h" +#include "qmutex.h" +#include "qwaitcondition.h" + +class QThreadPrivate +{ +public: + QThreadPrivate(); + ~QThreadPrivate(); + + mutable QMutex mutex; + + bool running; + bool finished; + bool terminated; + uint stackSize; + +#if defined(_OS_UNIX_) || defined(_OS_MAC_) + pthread_t thread_id; + QWaitCondition thread_done; + static void *start(void *arg); + static void finish(void *arg); +#elif defined(_OS_WIN32_) + HANDLE handle; + static unsigned int __stdcall start(void *); + static void finish(void *,bool lockAnyway=TRUE); + int waiters; +#else +#error "unsupported platform!" +#endif +}; + +#endif // QTHREAD_P_H Index: branches/xZenu/src/util/doxygen/qtools/qutfcodec.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qutfcodec.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qutfcodec.cpp (revision 1322) @@ -0,0 +1,276 @@ +/**************************************************************************** +** $Id: qt/src/tools/qutfcodec.cpp 2.3.2 edited 2001-01-26 $ +** +** Implementation of QEucCodec class +** +** Created : 981015 +** +** Copyright (C)1998-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qutfcodec.h" + +#ifndef QT_NO_TEXTCODEC + +int QUtf8Codec::mibEnum() const +{ + return 106; +} + +QCString QUtf8Codec::fromUnicode(const QString& uc, int& len_in_out) const +{ + int l = QMIN((int)uc.length(),len_in_out); + int rlen = l*3+1; + QCString rstr(rlen); + uchar* cursor = (uchar*)rstr.data(); + for (int i=0; i> 6); + if ( ch.row() < 0x08 ) { + *cursor++ = 0xc0 | b; + } else { + *cursor++ = 0xe0 | (ch.row() >> 4); + *cursor++ = 0x80 | (b&0x3f); + } + *cursor++ = 0x80 | (ch.cell()&0x3f); + } + } + len_in_out = cursor - (uchar*)rstr.data(); + rstr.truncate(len_in_out); + return rstr; +} + +const char* QUtf8Codec::name() const +{ + return "UTF-8"; +} + +int QUtf8Codec::heuristicContentMatch(const char* chars, int len) const +{ + int score = 0; + for (int i=0; i= 2 && ((uchars[0] == 0xff && uchars[1] == 0xfe) || + (uchars[1] == 0xff && uchars[0] == 0xfe)) ) + return len; + else + return 0; +} + + + + +class QUtf16Encoder : public QTextEncoder { + bool headerdone; +public: + QUtf16Encoder() : headerdone(FALSE) + { + } + + QCString fromUnicode(const QString& uc, int& len_in_out) + { + if ( headerdone ) { + len_in_out = uc.length()*sizeof(QChar); + QCString d(len_in_out); + memcpy(d.data(),uc.unicode(),len_in_out); + return d; + } else { + headerdone = TRUE; + len_in_out = (1+uc.length())*sizeof(QChar); + QCString d(len_in_out); + memcpy(d.data(),&QChar::byteOrderMark,sizeof(QChar)); + memcpy(d.data()+sizeof(QChar),uc.unicode(),uc.length()*sizeof(QChar)); + return d; + } + } +}; + +class QUtf16Decoder : public QTextDecoder { + uchar buf; + bool half; + bool swap; + bool headerdone; + +public: + QUtf16Decoder() : half(FALSE), swap(FALSE), headerdone(FALSE) + { + } + + QString toUnicode(const char* chars, int len) + { + QString r; + + while ( len-- ) { + if ( half ) { + QChar ch; + if ( swap ) { + ch.row() = *chars++; + ch.cell() = buf; + } else { + ch.row() = buf; + ch.cell() = *chars++; + } + if ( !headerdone ) { + if ( ch == QChar::byteOrderSwapped ) { + swap = !swap; + } else if ( ch == QChar::byteOrderMark ) { + // Ignore ZWNBSP + } else { + r += ch; + } + headerdone = TRUE; + } else + r += ch; + half = FALSE; + } else { + buf = *chars++; + half = TRUE; + } + } + + return r; + } +}; + +QTextDecoder* QUtf16Codec::makeDecoder() const +{ + return new QUtf16Decoder; +} + +QTextEncoder* QUtf16Codec::makeEncoder() const +{ + return new QUtf16Encoder; +} + +#endif // QT_NO_TEXTCODEC Index: branches/xZenu/src/util/doxygen/qtools/qfileinfo_unix.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qfileinfo_unix.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qfileinfo_unix.cpp (revision 1322) @@ -0,0 +1,425 @@ +/**************************************************************************** +** +** +** Implementation of QFileInfo class +** +** Created : 950628 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses for Unix/X11 or for Qt/Embedded may use this file in accordance +** with the Qt Commercial License Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qglobal.h" + +#if defined(_OS_SUN_) +#define readlink _qt_hide_readlink +#endif + +#include +#include + +#include "qfileinfo.h" +#include "qfiledefs_p.h" +#include "qdatetime.h" +#include "qdir.h" + +#if defined(_OS_SUN_) +#undef readlink +extern "C" int readlink( const char *, void *, uint ); +#endif + + +void QFileInfo::slashify( QString& ) +{ + return; +} + + +void QFileInfo::makeAbs( QString & ) +{ + return; +} + +extern bool qt_file_access( const QString& fn, int t ); + +/*! + Returns TRUE if we are pointing to a real file. + \sa isDir(), isSymLink() +*/ +bool QFileInfo::isFile() const +{ + if ( !fic || !cache ) + doStat(); + return fic ? (fic->st.st_mode & STAT_MASK) == STAT_REG : FALSE; +} + +/*! + Returns TRUE if we are pointing to a directory or a symbolic link to + a directory. + \sa isFile(), isSymLink() +*/ + +bool QFileInfo::isDir() const +{ + if ( !fic || !cache ) + doStat(); + return fic ? (fic->st.st_mode & STAT_MASK) == STAT_DIR : FALSE; +} + +/*! + Returns TRUE if we are pointing to a symbolic link. + \sa isFile(), isDir(), readLink() +*/ + +bool QFileInfo::isSymLink() const +{ + if ( !fic || !cache ) + doStat(); + return fic ? fic->isSymLink : FALSE; +} + + +/*! + Returns the name a symlink points to, or a null QString if the + object does not refer to a symbolic link. + + This name may not represent an existing file; it is only a string. + QFileInfo::exists() returns TRUE if the symlink points to an + existing file. + + \sa exists(), isSymLink(), isDir(), isFile() +*/ + +QString QFileInfo::readLink() const +{ + QString r; + +#if defined(_OS_UNIX_) && !defined(_OS_OS2EMX_) + char s[PATH_MAX+1]; + if ( !isSymLink() ) + return QString(); + int len = readlink( QFile::encodeName(fn).data(), s, PATH_MAX ); + if ( len >= 0 ) { + s[len] = '\0'; + r = QFile::decodeName(s); + } +#endif + + return r; +} + +static const uint nobodyID = (uint) -2; + +/*! + Returns the owner of the file. + + On systems where files do not have owners this function returns 0. + + Note that this function can be time-consuming under UNIX. (in the order + of milliseconds on a 486 DX2/66 running Linux). + + \sa ownerId(), group(), groupId() +*/ + +QString QFileInfo::owner() const +{ + passwd *pw = getpwuid( ownerId() ); + if ( pw ) + return QFile::decodeName( pw->pw_name ); + return QString::null; +} + +/*! + Returns the id of the owner of the file. + + On systems where files do not have owners this function returns ((uint) -2). + + \sa owner(), group(), groupId() +*/ + +uint QFileInfo::ownerId() const +{ + if ( !fic || !cache ) + doStat(); + if ( fic ) + return fic->st.st_uid; + return nobodyID; +} + +/*! + Returns the group the file belongs to. + + On systems where files do not have groups this function always + returns 0. + + Note that this function can be time-consuming under UNIX (in the order of + milliseconds on a 486 DX2/66 running Linux). + + \sa groupId(), owner(), ownerId() +*/ + +QString QFileInfo::group() const +{ + struct group *gr = getgrgid( groupId() ); + if ( gr ) + return QFile::decodeName( gr->gr_name ); + return QString::null; +} + +/*! + Returns the id of the group the file belongs to. + + On systems where files do not have groups this function always + returns ((uind) -2). + + \sa group(), owner(), ownerId() +*/ + +uint QFileInfo::groupId() const +{ + if ( !fic || !cache ) + doStat(); + if ( fic ) + return fic->st.st_gid; + return nobodyID; +} + + +/*! + \fn bool QFileInfo::permission( int permissionSpec ) const + + Tests for file permissions. The \e permissionSpec argument can be several + flags of type PermissionSpec or'ed together to check for permission + combinations. + + On systems where files do not have permissions this function always + returns TRUE. + + Example: + \code + QFileInfo fi( "/tmp/tonsils" ); + if ( fi.permission( QFileInfo::WriteUser | QFileInfo::ReadGroup ) ) + qWarning( "Tonsils can be changed by me, and the group can read them."); + if ( fi.permission( QFileInfo::WriteGroup | QFileInfo::WriteOther ) ) + qWarning( "Danger! Tonsils can be changed by the group or others!" ); + \endcode + + \sa isReadable(), isWritable(), isExecutable() +*/ + +bool QFileInfo::permission( int permissionSpec ) const +{ + if ( !fic || !cache ) + doStat(); + if ( fic ) { + uint mask = 0; + if ( permissionSpec & ReadUser) + mask |= S_IRUSR; + if ( permissionSpec & WriteUser) + mask |= S_IWUSR; + if ( permissionSpec & ExeUser) + mask |= S_IXUSR; + if ( permissionSpec & ReadGroup) + mask |= S_IRGRP; + if ( permissionSpec & WriteGroup) + mask |= S_IWGRP; + if ( permissionSpec & ExeGroup) + mask |= S_IXGRP; + if ( permissionSpec & ReadOther) + mask |= S_IROTH; + if ( permissionSpec & WriteOther) + mask |= S_IWOTH; + if ( permissionSpec & ExeOther) + mask |= S_IXOTH; + if ( mask ) { + return (fic->st.st_mode & mask) == mask; + } else { +#if defined(CHECK_NULL) + qWarning( "QFileInfo::permission: permissionSpec is 0" ); +#endif + return TRUE; + } + } else { + return FALSE; + } +} + +/*! + Returns the file size in bytes, or 0 if the file does not exist if the size + cannot be fetched. +*/ + +uint QFileInfo::size() const +{ + if ( !fic || !cache ) + doStat(); + if ( fic ) + return (uint)fic->st.st_size; + else + return 0; +} + + +/*! + Returns the date and time when the file was last modified. + \sa lastRead() +*/ + +QDateTime QFileInfo::lastModified() const +{ + QDateTime dt; + if ( !fic || !cache ) + doStat(); + if ( fic ) + dt.setTime_t( fic->st.st_mtime ); + return dt; +} + +/*! + Returns the date and time when the file was last read (accessed). + + On systems that do not support last read times, the modification time is + returned. + + \sa lastModified() +*/ + +QDateTime QFileInfo::lastRead() const +{ + QDateTime dt; + if ( !fic || !cache ) + doStat(); + if ( fic ) + dt.setTime_t( fic->st.st_atime ); + return dt; +} + + +void QFileInfo::doStat() const +{ + QFileInfo *that = ((QFileInfo*)this); // mutable function + if ( !that->fic ) + that->fic = new QFileInfoCache; + STATBUF *b = &that->fic->st; + that->fic->isSymLink = FALSE; + +#if defined(_OS_UNIX_) && defined(S_IFLNK) + if ( ::lstat(QFile::encodeName(fn),b) == 0 ) { + if ( S_ISLNK( b->st_mode ) ) + that->fic->isSymLink = TRUE; + else + return; + } +#endif + int r; + + r = STAT( QFile::encodeName(fn), b ); + + if ( r != 0 ) { + delete that->fic; + that->fic = 0; + } +} + +/*! + Returns the directory path of the file. + + If \e absPath is TRUE an absolute path is always returned. + + \sa dir(), filePath(), fileName(), isRelative() +*/ +#ifndef QT_NO_DIR +QString QFileInfo::dirPath( bool absPath ) const +{ + QString s; + if ( absPath ) + s = absFilePath(); + else + s = fn; + int pos = s.findRev( '/' ); + if ( pos == -1 ) { + return QString::fromLatin1("."); + } else { + if ( pos == 0 ) + return QString::fromLatin1( "/" ); + return s.left( pos ); + } +} +#endif +/*! + Returns the name of the file, the file path is not included. + + Example: + \code + QFileInfo fi( "/tmp/abdomen.lower" ); + QString name = fi.fileName(); // name = "abdomen.lower" + \endcode + + \sa isRelative(), filePath(), baseName(), extension() +*/ + +QString QFileInfo::fileName() const +{ + int p = fn.findRev( '/' ); + if ( p == -1 ) { + return fn; + } else { + return fn.mid(p+1); + } +} + +/*! + Returns the absolute path name. + + The absolute path name is the file name including the absolute path. If + the QFileInfo is absolute (i.e. not relative) this function will return + the same string as filePath(). + + Note that this function can be time-consuming under UNIX. (in the order + of milliseconds on a 486 DX2/66 running Linux). + + \sa isRelative(), filePath() +*/ +#ifndef QT_NO_DIR +QString QFileInfo::absFilePath() const +{ + if ( QDir::isRelativePath(fn) ) { + QString tmp = QDir::currentDirPath(); + tmp += '/'; + tmp += fn; + makeAbs( tmp ); + return QDir::cleanDirPath( tmp ); + } else { + QString tmp = fn; + makeAbs( tmp ); + return QDir::cleanDirPath( tmp ); + } + +} +#endif Index: branches/xZenu/src/util/doxygen/qtools/qgdict.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgdict.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgdict.h (revision 1322) @@ -0,0 +1,222 @@ +/**************************************************************************** +** +** +** Definition of QGDict and QGDictIterator classes +** +** Created : 920529 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QGDICT_H +#define QGDICT_H + +#ifndef QT_H +#include "qcollection.h" +#include "qstring.h" +#endif // QT_H + +class QGDictIterator; +class QGDItList; + + +class QBaseBucket // internal dict node +{ +public: + QCollection::Item getData() { return data; } + QCollection::Item setData( QCollection::Item d ) { return data = d; } + QBaseBucket *getNext() { return next; } + void setNext( QBaseBucket *n) { next = n; } +protected: + QBaseBucket( QCollection::Item d, QBaseBucket *n ) : data(d), next(n) {} + QCollection::Item data; + QBaseBucket *next; +}; + +class QStringBucket : public QBaseBucket +{ +public: + QStringBucket( const QString &k, QCollection::Item d, QBaseBucket *n ) + : QBaseBucket(d,n), key(k) {} + const QString &getKey() const { return key; } +private: + QString key; +}; + +class QAsciiBucket : public QBaseBucket +{ +public: + QAsciiBucket( const char *k, QCollection::Item d, QBaseBucket *n ) + : QBaseBucket(d,n), key(k) {} + const char *getKey() const { return key; } +private: + const char *key; +}; + +class QIntBucket : public QBaseBucket +{ +public: + QIntBucket( long k, QCollection::Item d, QBaseBucket *n ) + : QBaseBucket(d,n), key(k) {} + long getKey() const { return key; } +private: + long key; +}; + +class QPtrBucket : public QBaseBucket +{ +public: + QPtrBucket( void *k, QCollection::Item d, QBaseBucket *n ) + : QBaseBucket(d,n), key(k) {} + void *getKey() const { return key; } +private: + void *key; +}; + + +class Q_EXPORT QGDict : public QCollection // generic dictionary class +{ +public: + uint count() const { return numItems; } + uint size() const { return vlen; } + QCollection::Item look_string( const QString& key, QCollection::Item, + int ); + QCollection::Item look_ascii( const char *key, QCollection::Item, int ); + QCollection::Item look_int( long key, QCollection::Item, int ); + QCollection::Item look_ptr( void *key, QCollection::Item, int ); +#ifndef QT_NO_DATASTREAM + QDataStream &read( QDataStream & ); + QDataStream &write( QDataStream & ) const; +#endif +protected: + enum KeyType { StringKey, AsciiKey, IntKey, PtrKey }; + + QGDict( uint len, KeyType kt, bool cs, bool ck ); + QGDict( const QGDict & ); + ~QGDict(); + + QGDict &operator=( const QGDict & ); + + bool remove_string( const QString &key, QCollection::Item item=0 ); + bool remove_ascii( const char *key, QCollection::Item item=0 ); + bool remove_int( long key, QCollection::Item item=0 ); + bool remove_ptr( void *key, QCollection::Item item=0 ); + QCollection::Item take_string( const QString &key ); + QCollection::Item take_ascii( const char *key ); + QCollection::Item take_int( long key ); + QCollection::Item take_ptr( void *key ); + + void clear(); + void resize( uint ); + + int hashKeyString( const QString & ); + int hashKeyAscii( const char * ); + + void statistics() const; + +#ifndef QT_NO_DATASTREAM + virtual QDataStream &read( QDataStream &, QCollection::Item & ); + virtual QDataStream &write( QDataStream &, QCollection::Item ) const; +#endif +private: + QBaseBucket **vec; + uint vlen; + uint numItems; + uint keytype : 2; + uint cases : 1; + uint copyk : 1; + QGDItList *iterators; + void unlink_common( int, QBaseBucket *, QBaseBucket * ); + QStringBucket *unlink_string( const QString &, + QCollection::Item item = 0 ); + QAsciiBucket *unlink_ascii( const char *, QCollection::Item item = 0 ); + QIntBucket *unlink_int( long, QCollection::Item item = 0 ); + QPtrBucket *unlink_ptr( void *, QCollection::Item item = 0 ); + void init( uint, KeyType, bool, bool ); + friend class QGDictIterator; +}; + + +class Q_EXPORT QGDictIterator // generic dictionary iterator +{ +friend class QGDict; +public: + QGDictIterator( const QGDict & ); + QGDictIterator( const QGDictIterator & ); + QGDictIterator &operator=( const QGDictIterator & ); + ~QGDictIterator(); + + QCollection::Item toFirst(); + + QCollection::Item get() const; + QString getKeyString() const; + const char *getKeyAscii() const; + long getKeyInt() const; + void *getKeyPtr() const; + + QCollection::Item operator()(); + QCollection::Item operator++(); + QCollection::Item operator+=(uint); + +protected: + QGDict *dict; + +private: + QBaseBucket *curNode; + uint curIndex; +}; + +inline QCollection::Item QGDictIterator::get() const +{ + return curNode ? curNode->getData() : 0; +} + +inline QString QGDictIterator::getKeyString() const +{ + return curNode ? ((QStringBucket*)curNode)->getKey() : QString::null; +} + +inline const char *QGDictIterator::getKeyAscii() const +{ + return curNode ? ((QAsciiBucket*)curNode)->getKey() : 0; +} + +inline long QGDictIterator::getKeyInt() const +{ + return curNode ? ((QIntBucket*)curNode)->getKey() : 0; +} + +inline void *QGDictIterator::getKeyPtr() const +{ + return curNode ? ((QPtrBucket*)curNode)->getKey() : 0; +} + + +#endif // QGDICT_H Index: branches/xZenu/src/util/doxygen/qtools/qcollection.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qcollection.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qcollection.h (revision 1322) @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** +** Definition of base class for all collection classes +** +** Created : 920629 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QCOLLECTION_H +#define QCOLLECTION_H + +#ifndef QT_H +#include "qglobal.h" +#endif // QT_H + + +class QGVector; +class QGList; +class QGDict; + + +class Q_EXPORT QCollection // inherited by all collections +{ +public: + bool autoDelete() const { return del_item; } + void setAutoDelete( bool enable ) { del_item = enable; } + + virtual uint count() const = 0; + virtual void clear() = 0; // delete all objects + + typedef void *Item; // generic collection item + +protected: + QCollection() { del_item = FALSE; } // no deletion of objects + QCollection(const QCollection &) { del_item = FALSE; } + virtual ~QCollection() {} + + bool del_item; // default FALSE + + virtual Item newItem( Item ); // create object + virtual void deleteItem( Item ); // delete object +}; + + +#endif // QCOLLECTION_H Index: branches/xZenu/src/util/doxygen/qtools/qarray.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qarray.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qarray.doc (revision 1322) @@ -0,0 +1,486 @@ +/**************************************************************************** +** +** +** QArray class documentation +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + + +/***************************************************************************** + QArray documentation + *****************************************************************************/ + +/*! + \class QArray qarray.h + \brief The QArray class is a template class that provides arrays of simple types. + + \ingroup tools + + QArray is implemented as a template class. Define a template + instance QArray\ to create an array that contains X items. + + QArray stores the array elements directly in the array. It can only + deal with simple types, i.e. C++ types, structs and classes that have + no constructors, destructors or virtual functions. QArray uses + bitwise operations to copy and compare array elements. + + The QVector collection class is also a kind of array. Like most + \link collection.html collection classes\endlink, it has pointers to the + contained items. + + QArray uses explicit \link shclass.html sharing\endlink with a reference + count. If more than one array share common data, and one array is + modified, all arrays will be modified. + + The benefit of sharing is that a program does not need to duplicate + data when it is not required, which results in less memory usage and + less copying of data. + + Example: + \code + #include + #include + + QArray fib( int num ) // returns fibonacci array + { + ASSERT( num > 2 ); + QArray f( num ); // array of ints + + f[0] = f[1] = 1; // initialize first two numbers + for ( int i=2; i a = fib( 6 ); // get 6 first fibonaccis + int i; + + for ( i=0; i a(1); + a[0].i = 5; + a[0].c = 't'; + + MyStruct x; + x.i = '5'; + x.c = 't'; + int i = a.find( x ); // May return -1 if the pad bytes differ + \endcode + + To workaround this, make sure that you use a struct where sizeof() + returns the same as the sum of the sizes of the members, either by + changing the types of the struct members or by adding dummy members. + + \sa \link shclass.html Shared Classes\endlink +*/ + + +/*! + \fn QArray::QArray() + Constructs a null array. + \sa isNull() +*/ + +/*! + \fn QArray::QArray( int size ) + Constructs an array with room for \e size elements. + Makes a null array if \e size == 0. + + Note that the elements are not initialized. + + \sa resize(), isNull() +*/ + +/*! + \fn QArray::QArray( const QArray &a ) + Constructs a shallow copy of \e a. + \sa assign() +*/ + +/*! + \fn QArray::QArray( int, int ) + Constructs an array without allocating array space. + The arguments should be (0, 0). Use at own risk. +*/ + +/*! + \fn QArray::~QArray() + Dereferences the array data and deletes it if this was the last + reference. +*/ + +/*! + \fn QArray &QArray::operator=( const QArray &a ) + Assigns a shallow copy of \e a to this array and returns a reference + to this array. + + Equivalent to assign( a ). +*/ + +/*! + \fn type *QArray::data() const + Returns a pointer to the actual array data. + + The array is a null array if data() == 0 (null pointer). + + \sa isNull() +*/ + +/*! + \fn uint QArray::nrefs() const + Returns the reference count for the shared array data. This reference count + is always greater than zero. +*/ + +/*! + \fn uint QArray::size() const + Returns the size of the array (max number of elements). + + The array is a null array if size() == 0. + + \sa isNull(), resize() +*/ + +/*! + \fn uint QArray::count() const + Returns the same as size(). + + \sa size() +*/ + +/*! + \fn bool QArray::isEmpty() const + Returns TRUE if the array is empty, i.e. size() == 0, otherwise FALSE. + + isEmpty() is equivalent with isNull() for QArray. Note that this is not + the case for QCString::isEmpty(). +*/ + +/*! + \fn bool QArray::isNull() const + Returns TRUE if the array is null, otherwise FALSE. + + A null array has size() == 0 and data() == 0. +*/ + +/*! + \fn bool QArray::resize( uint size ) + Resizes (expands or shrinks) the array to \e size elements. The array + becomes a null array if \e size == 0. + + Returns TRUE if successful, or FALSE if the memory cannot be allocated. + + New elements will not be initialized. + + \sa size() +*/ + +/*! + \fn bool QArray::truncate( uint pos ) + Truncates the array at position \e pos. + + Returns TRUE if successful, or FALSE if the memory cannot be allocated. + + Equivalent to resize(\e pos). + + \sa resize() +*/ + +/*! + \fn bool QArray::fill( const type &v, int size ) + Fills the array with the value \e v. If \e size is specified as different + from -1, then the array will be resized before filled. + + Returns TRUE if successful, or FALSE if the memory cannot be allocated + (only when \e size != -1). + + \sa resize() +*/ + +/*! + \fn void QArray::detach() + Detaches this array from shared array data, i.e. makes a private, deep + copy of the data. + + Copying will only be performed if the + \link nrefs() reference count\endlink is greater than one. + + \sa copy() +*/ + +/*! + \fn QArray QArray::copy() const + Returns a deep copy of this array. + \sa detach(), duplicate() +*/ + +/*! + \fn QArray &QArray::assign( const QArray &a ) + Shallow copy. Dereferences the current array and references the data + contained in \e a instead. Returns a reference to this array. + \sa operator=() +*/ + +/*! + \fn QArray &QArray::assign( const type *data, uint size ) + Shallow copy. Dereferences the current array and references the + array data \e data, which contains \e size elements. + Returns a reference to this array. + + Do not delete \e data later, QArray takes care of that. +*/ + +/*! + \fn QArray &QArray::duplicate( const QArray &a ) + Deep copy. Dereferences the current array and obtains a copy of the data + contained in \e a instead. Returns a reference to this array. + \sa copy() +*/ + +/*! + \fn QArray &QArray::duplicate( const type *data, uint size ) + Deep copy. Dereferences the current array and obtains a copy of the + array data \e data instead. Returns a reference to this array. + \sa copy() +*/ + +/*! + \fn QArray &QArray::setRawData( const type *data, uint size ) + + Sets raw data and returns a reference to the array. + + Dereferences the current array and sets the new array data to \e data and + the new array size to \e size. Do not attempt to resize or re-assign the + array data when raw data has been set. + Call resetRawData(d,len) to reset the array. + + Setting raw data is useful because it sets QArray data without allocating + memory or copying data. + + Example I (intended use): + \code + static char bindata[] = { 231, 1, 44, ... }; + QByteArray a; + a.setRawData( bindata, sizeof(bindata) ); // a points to bindata + QDataStream s( a, IO_ReadOnly ); // open on a's data + s >> ; // read raw bindata + a.resetRawData( bindata, sizeof(bindata) ); // finished + \endcode + + Example II (you don't want to do this): + \code + static char bindata[] = { 231, 1, 44, ... }; + QByteArray a, b; + a.setRawData( bindata, sizeof(bindata) ); // a points to bindata + a.resize( 8 ); // will crash + b = a; // will crash + a[2] = 123; // might crash + // forget to resetRawData - will crash + \endcode + + \warning If you do not call resetRawData(), QArray will attempt to + deallocate or reallocate the raw data, which might not be too good. + Be careful. + + \sa resetRawData() +*/ + +/*! + \fn void QArray::resetRawData( const type *data, uint size ) + Resets raw data that was set using setRawData(). + + The arguments must be the data and length that were passed to + setRawData(). This is for consistency checking. + + \sa setRawData() +*/ + +/*! + \fn int QArray::find( const type &v, uint index ) const + Finds the first occurrence of \e v, starting at position \e index. + + Returns the position of \e v, or -1 if \e v could not be found. + + \sa contains() +*/ + +/*! + \fn int QArray::contains( const type &v ) const + Returns the number of times \e v occurs in the array. + \sa find() +*/ + +/*! + \fn void QArray::sort() + Sorts the array elements in ascending order, using bitwise + comparison (memcmp()). + + \sa bsearch() +*/ + +/*! + \fn int QArray::bsearch( const type &v ) const + In a sorted array, finds the first occurrence of \e v using binary + search. For a sorted array, this is generally much faster than + find(), which does a linear search. + + Returns the position of \e v, or -1 if \e v could not be found. + + \sa sort(), find() +*/ + +/*! + \fn type &QArray::operator[]( int index ) const + Returns a reference to the element at position \e index in the array. + + This can be used to both read and set an element. Equivalent to at(). + + \sa at() +*/ + +/*! + \fn type &QArray::at( uint index ) const + Returns a reference to the element at position \e index in the array. + + This can be used to both read and set an element. + + \sa operator[]() +*/ + +/*! + \fn QArray::operator const type *() const + Cast operator. Returns a pointer to the array. + \sa data() +*/ + +/*! + \fn bool QArray::operator==( const QArray &a ) const + Returns TRUE if this array is equal to \e a, otherwise FALSE. + + The two arrays are bitwise compared. + + \sa operator!=() +*/ + +/*! + \fn bool QArray::operator!=( const QArray &a ) const + Returns TRUE if this array is different from \e a, otherwise FALSE. + + The two arrays are bitwise compared. + + \sa operator==() +*/ + +/*! + \fn Iterator QArray::begin() + Returns an iterator pointing at the beginning of this array. + This iterator can be used as the iterators of QValueList and QMap + for example. In fact it does not only behave like a usual pointer: + It is a pointer. +*/ + +/*! + \fn Iterator QArray::end() + Returns an iterator pointing behind the last element of this array. + This iterator can be used as the iterators of QValueList and QMap + for example. In fact it does not only behave like a usual pointer: + It is a pointer. +*/ + +/*! + \fn ConstIterator QArray::begin() const + Returns a const iterator pointing at the beginning of this array. + This iterator can be used as the iterators of QValueList and QMap + for example. In fact it does not only behave like a usual pointer: + It is a pointer. +*/ + +/*! + \fn ConstIterator QArray::end() const + Returns a const iterator pointing behind the last element of this array. + This iterator can be used as the iterators of QValueList and QMap + for example. In fact it does not only behave like a usual pointer: + It is a pointer. +*/ + + +/***************************************************************************** + QByteArray documentation + *****************************************************************************/ + +/*! + \class QByteArray qcstring.h + \brief The QByteArray class provides an array of bytes. + + \inherit QArray + + \ingroup tools + + The QByteArray class provides an explicitly shared array of + bytes. It is useful for manipulating memory areas with custom + data. QByteArray is implemented as QArray. See the QArray + documentation for further information. +*/ Index: branches/xZenu/src/util/doxygen/qtools/qtl.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qtl.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qtl.doc (revision 1322) @@ -0,0 +1,249 @@ +/**************************************************************************** +** +** +** Qt template library classes documentation +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +/*! +\page qtl.html + +\title Qt Template library + +Thq Qt Template Library is a set of templates within Qt dealing with +containers of objects. It provides a list of objects, a stack of +objects, a map (or dictionary) from one type to another, and +associated iterators and algorithms. + +Qt also contains similar classes that deal with pointers to objects; +\l QValueList vs. \l QList, etc. Compared to the pointer-based +templates, the QTL offers easy copying of the container, real support +for classes that e.g. require constructors, expand to much more object +code, can often be a bit faster, require that the objects stored can +be copied, and finally, have a worse record of compiler problems. + +Compared to the STL, the QTL contains only the most important features +of the STL, has more regular function naming, has no platform +differences, is often a little slower and often expands to less object +code. + + +If you can not make copies of the objects you want to store you are +better off with QCollection and friends. They were designed to handle +exactly that kind of pointer semantics. This applies for example to +all classes derived from \l QObject. A QObject does not have a copy +constructor, so using it as value is impossible. You may choose be +store pointers to QObjects in a QValueList, but using QList directly +seems to be the better choice for this kind of application +domain. QList, like all other QCollection based containers, provides +far more sanity checking than a speed-optimized value +based container. + +If you have objects that implement value semantics, use the Qt +template library. Value semantics require at least +
    +
  • a copy constructor, +
  • an assignment operator and +
  • a default constructor, i.e. a constructor that does not take +any arguments. +
+Note that a fast copy constructor is absolutely crucial for a good +overall performance of the container, since many copy operations are +going to happen. + +Examples for value based classes are QRect, QPoint, QSize and all +simple C++ types like int, bool or double. + +The Qt template library is designed for speed. Especially iterators +are extremely fast. On the drawback side, less error checking is done +than in the QCollection based containers. A template library container +for example does not track associated iterators. This makes certain +validity checks, like on removing items, impossible to perform +automatically. + +

Iterators

+ +The Qt template library deals with value objects, not with pointers. +For that reason, there is no other way of iterating over containers +than using iterators. This is no disadvantage as the size of an +iterator matches the size of a normal pointer - 32 or 64 bits +depending on your CPU architecture. + +To iterate over a container, use a loop like this: + +\code + typedef QValueList List; + List l; + for( List::Iterator it = l.begin(); it != l.end(); ++it ) + printf("Number is %i\n",*it); +\endcode + +begin() returns the iterator pointing at the first element, while +end() returns an iterator that points \e after the last +element. end() marks an invalid position, it can never be +dereferenced. It's the break condition in any iteration, may it be +from begin() or fromLast(). For maximum speed, use increment or +decrement iterators with the prefix operator (++it, --it) instead of the the +postfix one (it++, it--), since the former is slightly faster. + +The same concept applies to the other container classes: + +\code + typedef QMap Map; + Map map; + for( Map::Iterator it = map.begin(); it != map.end(); ++it ) + printf("Key=%s Data=%s\n", it.key().ascii(), it.data().ascii() ); + + typedef QArray Array; + Array array; + for( Array::Iterator it = array.begin(); it != array.end(); ++it ) + printf("Data=%i\n", *it ); +\endcode + +There are two kind of iterators, the volatile iterator shown in the +examples above and a version that returns a const reference to its +current object, the ConstIterator. Const iterators are required +whenever the container itself is const, such as a member variable +inside a const function. Assigning a ConstIterator to a normal +Iterator is not allowed as it would violate const semantics. + +

Algorithms

+ +The template library defines a number of algorithms that operate on +its containers: qHeapSort(), qBubbleSort(), qSwap() and +qCopy(). These algorithms are implemented as template functions. + +qHeapSort() and qBubbleSort() provide the well known sorting +algorithms. You can use them like this: + +\code + typedef QValueList List; + List l; + l << 42 << 100 << 1234 << 12 << 8; + qHeapSort( l ); + + List l2; + l2 << 42 << 100 << 1234 << 12 << 8; + List::Iterator b = l2.find( 100 ); + List::Iterator e = l2.find( 8 ); + qHeapSort( b, e ); + + double arr[] = { 3.2, 5.6, 8.9 }; + qHeapSort( arr, arr + 3 ); +\endcode + +The first example sorts the entire list. The second one sorts all +elements enclosed in the two iterators, namely 100, 1234 and 12. The +third example shows that iterators act like pointers and can be +treated as such. + +Naturally, the sorting templates won't work with const iterators. + +Another utility is qSwap(). It exchanges the values of two variables: + +\code + QString second( "Einstein" ); + QString name( "Albert" ); + qSwap( second, name ); +\endcode + +Another template function is qCopy(). It copies a container or a slice +of it to an OutputIterator, in this case a QTextOStreamIterator: + +\code + typedef QValueList List; + List l; + l << 100 << 200 << 300; + QTextOStream str( stdout ); + qCopy( l, QTextOStreamIterator( str ) ); +\endcode + +In addition, you can use any Qt template library iterator as the +OutputIterator. Just make sure that the right hand of the iterator has +as many elements present as you want to insert. The following example +illustrates this: + +\code + QStringList l1, l2; + l1 << "Weis" << "Ettrich" << "Arnt" << "Sue"; + l2 << "Torben" << "Matthias"; + qCopy( l2, l1.begin(); +\endcode + +At the end of this code fragment, the List l1 contains "Torben", +"Matthias", "Arnt" and "Sue", with the prior contents being +overwritten. Another flavor of qCopy() takes three arguments to make +it possible to copy a slice of a container: + +\code + typedef QValueList List; + List l; + l << 42 << 100 << 1234 << 12 << 8; + List::Iterator b = l.find( 100 ); + List::Iterator e = l.find( 8 ); + QTextOStream str( stdout ); + qCopy( b, e, QTextOStreamIterator( str ) ); +\endcode + +If you write new algorithms, consider writing them as template +functions in order to make them usable with as many containers +possible. In the above example, you could just as easily print out a +standard C++ array with qCopy(): + +\code + int arr[] = { 100, 200, 300 }; + QTextOStream str( stdout ); + qCopy( arr, arr + 3, QTextOStreamIterator( str ) ); +\endcode + + +

Streaming

+ +All mentioned containers can be serialized with the respective +streaming operators. Here is an example. + +\code + QDataStream str(...); + QValueList l; + // ... fill the list here + str << l; +\endcode + +The container can be read in again with: + +\code + QValueList l; + str >> l; +\endcode + +The same applies to QStringList, QValueStack and QMap. + +*/ Index: branches/xZenu/src/util/doxygen/qtools/qglobal.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qglobal.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qglobal.h (revision 1322) @@ -0,0 +1,641 @@ +/**************************************************************************** +** +** +** Global type declarations and definitions +** +** Created : 920529 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QGLOBAL_H +#define QGLOBAL_H + + +#define QT_VERSION 223 +#define QT_VERSION_STR "2.2.3" + + +// +// The operating system, must be one of: (_OS_x_) +// +// MAC - Macintosh +// MSDOS - MS-DOS and Windows +// OS2 - OS/2 +// OS2EMX - XFree86 on OS/2 (not PM) +// WIN32 - Win32 (Windows 95/98 and Windows NT) +// SUN - SunOS +// SOLARIS - Sun Solaris +// HPUX - HP-UX +// ULTRIX - DEC Ultrix +// LINUX - Linux +// FREEBSD - FreeBSD +// NETBSD - NetBSD +// OPENBSD - OpenBSD +// IRIX - SGI Irix +// OSF - OSF Unix +// BSDI - BSDI Unix +// SCO - SCO of some sort +// AIX - AIX Unix +// UNIXWARE - SCO UnixWare +// GNU - GNU Hurd +// DGUX - DG Unix +// UNIX - Any UNIX bsd/sysv system +// + +#if defined(__APPLE__) || defined(macintosh) +#define _OS_MAC_ +# ifdef MAC_OS_X_VERSION_MIN_REQUIRED +# undef MAC_OS_X_VERSION_MIN_REQUIRED +# endif +# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3 +# include +# if !defined(MAC_OS_X_VERSION_10_3) +# define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1 +# endif +# if !defined(MAC_OS_X_VERSION_10_4) +# define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1 +# endif +# if !defined(MAC_OS_X_VERSION_10_5) +# define MAC_OS_X_VERSION_10_5 MAC_OS_X_VERSION_10_4 + 1 +# endif +# if !defined(MAC_OS_X_VERSION_10_6) +# define MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_5 + 1 +# endif +# if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6) +# error "This version of Mac OS X is unsupported" +# endif +#elif defined(MSDOS) || defined(_MSDOS) || defined(__MSDOS__) +#define _OS_MSDOS_ +#elif defined(OS2) || defined(_OS2) || defined(__OS2__) +#if defined(__EMX__) +#define _OS_OS2EMX_ +#else +#define _OS_OS2_ +#endif +#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) +#define _OS_WIN32_ +#elif defined(__MWERKS__) && defined(__INTEL__) +#define _OS_WIN32_ +#elif defined(sun) || defined(__sun) || defined(__sun__) +#if defined(__SVR4) +#define _OS_SOLARIS_ +#else +#define _OS_SUN_ +#endif +#elif defined(hpux) || defined(__hpux) || defined(__hpux__) +#define _OS_HPUX_ +#elif defined(ultrix) || defined(__ultrix) || defined(__ultrix__) +#define _OS_ULTRIX_ +#elif defined(reliantunix) +#define _OS_RELIANTUNIX_ +#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) +#define _OS_LINUX_ +#elif defined(__FreeBSD__) +#define _OS_FREEBSD_ +#elif defined(__NetBSD__) +#define _OS_NETBSD_ +#elif defined(__OpenBSD__) +#define _OS_OPENBSD_ +#elif defined(sgi) || defined(__sgi) +#define _OS_IRIX_ +#elif defined(__osf__) +#define _OS_OSF_ +#elif defined(bsdi) || defined(__bsdi__) +#define _OS_BSDI_ +#elif defined(_AIX) +#define _OS_AIX_ +#elif defined(__Lynx__) +#define _OS_LYNXOS_ +#elif defined(_UNIXWARE) +#define _OS_UNIXWARE_ +#elif defined(DGUX) +#define _OS_DGUX_ +#elif defined(__QNX__) +#define _OS_QNX_ +#elif defined(_SCO_DS) || defined(M_UNIX) || defined(M_XENIX) +#define _OS_SCO_ +#elif defined(sco) || defined(_UNIXWARE7) +#define _OS_UNIXWARE7_ +#elif !defined(_SCO_DS) && defined(__USLC__) && defined(__SCO_VERSION__) +#define _OS_UNIXWARE7_ +#elif defined(__CYGWIN__) +#define _OS_CYGWIN_ +#elif defined(__BEOS__) +#define _OS_BEOS_ +#elif defined(__MINT__) +#define _OS_MINT_ +#else +#error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" +#endif + +#if defined(_OS_MAC_) || defined(_OS_MSDOS_) || defined(_OS_OS2_) || defined(_OS_WIN32_) +#undef _OS_UNIX_ +#elif !defined(_OS_UNIX_) +#define _OS_UNIX_ +// QT_CLEAN_NAMESPACE is not defined by default; it would break too +// much code. +#if !defined(QT_CLEAN_NAMESPACE) && !defined(UNIX) +// ### remove 3.0 +#define UNIX +#endif +#endif + + +// +// The compiler, must be one of: (_CC_x_) +// +// SYM - Symantec C++ for both PC and Macintosh +// MPW - MPW C++ +// MWERKS - Metrowerks CodeWarrior +// MSVC - Microsoft Visual C/C++ +// BOR - Borland/Turbo C++ +// WAT - Watcom C++ +// GNU - GNU C++ +// COMEAU - Comeau C++ +// EDG - Edison Design Group C++ +// OC - CenterLine C++ +// SUN - Sun C++ +// DEC - DEC C++ +// HP - HPUX C++ +// USLC - SCO UnixWare7 C++ +// CDS - Reliant C++ +// KAI - KAI C++ +// + + +// Should be sorted most-authorative to least-authorative + +#if defined(__SC__) +#define _CC_SYM_ +#elif defined( __KCC ) +#define _CC_KAI_ +#define _CC_EDG_ +#define Q_HAS_BOOL_TYPE +#elif defined(applec) +#define _CC_MPW_ +#elif defined(__MWERKS__) +#define _CC_MWERKS_ +#define Q_HAS_BOOL_TYPE +#elif defined(_MSC_VER) +#define _CC_MSVC_ +#elif defined(__BORLANDC__) || defined(__TURBOC__) +#define _CC_BOR_ +#elif defined(__WATCOMC__) +#define _CC_WAT_ +#define Q_HAS_BOOL_TYPE +#elif defined(__GNUC__) +#define _CC_GNU_ +#if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 +#define Q_FULL_TEMPLATE_INSTANTIATION +#define Q_TEMPLATE_NEEDS_CLASS_DECLARATION +#define Q_TEMPLATE_NEEDS_EXPLICIT_CONVERSION +#define Q_SPURIOUS_NON_VOID_WARNING +#endif +#if __GNUC__ == 2 && __GNUC_MINOR__ >= 95 +#define Q_DELETING_VOID_UNDEFINED +#endif +#if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) +#define Q_PACKED __attribute__ ((packed)) +#endif +#elif defined(__xlC__) +#define _CC_XLC_ +#define Q_FULL_TEMPLATE_INSTANTIATION +#if __xlC__ >= 0x400 +#define Q_HAS_BOOL_TYPE +#endif +#if __xlC__ <= 0x0306 +#define Q_TEMPLATE_NEEDS_EXPLICIT_CONVERSION +#endif +#elif defined(como40) +#define _CC_EDG_ +#define _CC_COMEAU_ +#define Q_HAS_BOOL_TYPE +#define Q_C_CALLBACKS +#elif defined(__USLC__) +#define _CC_USLC_ +#ifdef __EDG__ // UnixWare7 +#define Q_HAS_BOOL_TYPE +#endif +#elif defined(__DECCXX) +#define _CC_DEC_ +#if __DECCXX_VER >= 60060005 +#define Q_HAS_BOOL_TYPE +#endif +#elif defined(__EDG) || defined(__EDG__) +// one observed on SGI DCC, the other documented +#define _CC_EDG_ +#elif defined(OBJECTCENTER) || defined(CENTERLINE_CLPP) +#define _CC_OC_ +#if defined(_BOOL) +#define Q_HAS_BOOL_TYPE +#endif +#elif defined(__SUNPRO_CC) +#define _CC_SUN_ +#if __SUNPRO_CC >= 0x500 +#define Q_HAS_BOOL_TYPE +#define Q_C_CALLBACKS +#endif +#elif defined(__CDS__) +#define _CC_CDS_ +#define Q_HAS_BOOL_TYPE +#elif defined(_OS_HPUX_) +// this test is from aCC online help +#if defined(__HP_aCC) || __cplusplus >= 199707L +// this is the aCC +#define _CC_HP_ACC_ +#define Q_HAS_BOOL_TYPE +#else +// this is the CC +#define _CC_HP_ +#define Q_FULL_TEMPLATE_INSTANTIATION +#define Q_TEMPLATE_NEEDS_EXPLICIT_CONVERSION +#endif // __HP_aCC +#else +#error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com" +#endif + +// detect Microsoft compiler version +#ifdef _CC_MSVC_ +#if _MSC_VER >= 1400 +#define _CC_V2005 +#elif _MSC_VER >= 1310 +#define _CC_V2003 +#elif _MSC_VER > 1300 +#define _CC_V2002 +#else +#define _CC_V1998 +#endif +#endif + +#ifndef Q_PACKED +#define Q_PACKED +#endif + +// Window system setting + +#if defined(_OS_MAC_) +#define _WS_MAC_ +#elif defined(_OS_MSDOS_) +#define _WS_WIN16_ +#error "Qt requires Win32 and does not work with Windows 3.x" +#elif defined(_WIN32_X11_) +#define _WS_X11_ +#elif defined(_OS_WIN32_) +#define _WS_WIN32_ +#elif defined(_OS_OS2_) +#error "Qt does not work with OS/2 Presentation Manager or Workplace Shell" +#elif defined(_OS_UNIX_) +#ifdef QWS +#define _WS_QWS_ +#else +#define _WS_X11_ +#endif +#endif + +#if defined(_WS_WIN16_) || defined(_WS_WIN32_) +#define _WS_WIN_ +#endif + + +// +// Some classes do not permit copies to be made of an object. +// These classes contains a private copy constructor and operator= +// to disable copying (the compiler gives an error message). +// Undefine Q_DISABLE_COPY to turn off this checking. +// + +#define Q_DISABLE_COPY + + +// +// Useful type definitions for Qt +// + +#if defined(bool) +#define Q_HAS_BOOL_TYPE +#elif __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6) +#define Q_HAS_BOOL_TYPE +#elif _MSC_VER >= 1100 || __BORLANDC__ >= 0x500 +#define Q_HAS_BOOL_TYPE +#elif defined(sgi) && defined(_BOOL) +#define Q_HAS_BOOL_TYPE +#endif + +#if (QT_VERSION >= 300) +#error "Use an enum for bool" +#endif + +#if !defined(Q_HAS_BOOL_TYPE) +#if defined(_CC_MSVC_) +#define _CC_BOOL_DEF_ +#define bool int +#else +typedef int bool; +#endif +#endif + +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; +#if defined(_OS_WIN32_) && !defined(_CC_GNU_) +typedef __int64 int64; +typedef unsigned __int64 uint64; +#else +typedef long long int64; +typedef unsigned long long uint64; +#endif + + +// +// Constant bool values +// + +#ifndef TRUE +const bool FALSE = 0; +const bool TRUE = !0; +#endif + + +#if defined(_CC_MSVC_) +// Workaround for static const members. +#define QT_STATIC_CONST static +#define QT_STATIC_CONST_IMPL +#else +#define QT_STATIC_CONST static const +#define QT_STATIC_CONST_IMPL const +#endif + + + +// +// Utility macros and inline functions +// + +#define QMAX(a,b) ((a) > (b) ? (a) : (b)) +#define QMIN(a,b) ((a) < (b) ? (a) : (b)) +#define QABS(a) ((a) >= 0 ? (a) : -(a)) + +inline int qRound( double d ) +{ + return d > 0.0 ? int(d+0.5) : int(d-0.5); +} + + +// +// Size-dependent types (architechture-dependent byte order) +// + +// QT_CLEAN_NAMESPACE is not defined by default; it would break too +// much code. +#if !defined(QT_CLEAN_NAMESPACE) +typedef signed char INT8; // 8 bit signed +typedef unsigned char UINT8; // 8 bit unsigned +typedef short INT16; // 16 bit signed +typedef unsigned short UINT16; // 16 bit unsigned +typedef int INT32; // 32 bit signed +typedef unsigned int UINT32; // 32 bit unsigned +#endif + +typedef signed char Q_INT8; // 8 bit signed +typedef unsigned char Q_UINT8; // 8 bit unsigned +typedef short Q_INT16; // 16 bit signed +typedef unsigned short Q_UINT16; // 16 bit unsigned +typedef int Q_INT32; // 32 bit signed +typedef unsigned int Q_UINT32; // 32 bit unsigned +typedef long Q_INT64; // up to 64 bit signed +typedef unsigned long Q_UINT64; // up to 64 bit unsigned + +// +// Data stream functions is provided by many classes (defined in qdatastream.h) +// + +class QDataStream; + + + +#ifdef _WS_WIN_ +extern bool qt_winunicode; +#endif + +#ifndef QT_H +#include +#endif // QT_H + +// +// Create Qt DLL if QT_DLL is defined (Windows only) +// + +#if defined(_OS_WIN32_) +#if defined(QT_NODLL) +#undef QT_MAKEDLL +#undef QT_DLL +#endif +#ifdef QT_DLL +#if defined(QT_MAKEDLL) /* create a Qt DLL library */ +#undef QT_DLL +#define Q_EXPORT __declspec(dllexport) +#define Q_TEMPLATEDLL +#undef Q_DISABLE_COPY /* avoid unresolved externals */ +#endif +#endif +#if defined(QT_DLL) /* use a Qt DLL library */ +#define Q_EXPORT __declspec(dllimport) +#define Q_TEMPLATEDLL +#undef Q_DISABLE_COPY /* avoid unresolved externals */ +#endif +#else // ! _OS_WIN32_ +#undef QT_MAKEDLL /* ignore these for other platforms */ +#undef QT_DLL +#endif + +#ifndef Q_EXPORT +#define Q_EXPORT +#endif + +// +// System information +// + +Q_EXPORT const char *qVersion(); +Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); + + +// +// Debugging and error handling +// + +#if !defined(NO_CHECK) +#define CHECK_STATE // check state of objects etc. +#define CHECK_RANGE // check range of indexes etc. +#define CHECK_NULL // check null pointers +#define CHECK_MATH // check math functions +#endif + +#if !defined(NO_DEBUG) && !defined(DEBUG) +#define DEBUG // display debug messages +#endif + +// +// Avoid some particularly useless warnings from some stupid compilers. +// To get ALL C++ compiler warnings, define CC_WARNINGS or comment out +// the line "#define Q_NO_WARNINGS" +// + +#if !defined(CC_WARNINGS) +#define Q_NO_WARNINGS +#endif +#if defined(Q_NO_WARNINGS) +#if defined(_CC_MSVC_) +#pragma warning(disable: 4244) +#pragma warning(disable: 4275) +#pragma warning(disable: 4514) +#pragma warning(disable: 4800) +#pragma warning(disable: 4097) +#pragma warning(disable: 4706) +#elif defined(_CC_BOR_) +#pragma option -w-inl +#pragma option -w-aus +#pragma warn -inl +#pragma warn -pia +#pragma warn -ccc +#pragma warn -rch +#pragma warn -sig +#elif defined(_CC_MWERKS_) +#pragma warn_possunwant off +#endif +#endif // Q_NO_WARNINGS + +// +// Avoid dead code +// + +#if defined(_CC_EDG_) || defined(_CC_WAT_) +#define Q_NO_DEAD_CODE +#endif + +// +// Use to avoid "unused parameter" warnings +// + +#define Q_UNUSED(x) x=x; +#define Q_CONST_UNUSED(x) (void)x; + +Q_EXPORT void qDebug( const char *, ... ) // print debug message +#if defined(_CC_GNU_) && !defined(__INSURE__) + __attribute__ ((format (printf, 1, 2))) +#endif +; + +Q_EXPORT void qWarning( const char *, ... ) // print warning message +#if defined(_CC_GNU_) && !defined(__INSURE__) + __attribute__ ((format (printf, 1, 2))) +#endif +; + +Q_EXPORT void qFatal( const char *, ... ) // print fatal message and exit +#if defined(_CC_GNU_) + __attribute__ ((format (printf, 1, 2))) +#endif +; + + +// QT_CLEAN_NAMESPACE is not defined by default; it would break too +// much code. +#if !defined(QT_CLEAN_NAMESPACE) +// in that case, also define the old ones... + +Q_EXPORT void debug( const char *, ... ) // print debug message +#if defined(_CC_GNU_) && !defined(__INSURE__) + __attribute__ ((format (printf, 1, 2))) +#endif +; + +Q_EXPORT void warning( const char *, ... ) // print warning message +#if defined(_CC_GNU_) && !defined(__INSURE__) + __attribute__ ((format (printf, 1, 2))) +#endif +; + +Q_EXPORT void fatal( const char *, ... ) // print fatal message and exit +#if defined(_CC_GNU_) && !defined(__INSURE__) + __attribute__ ((format (printf, 1, 2))) +#endif +; + +// okay, that was debug()/warning()/fatal() +#endif + +#if !defined(ASSERT) +#if defined(CHECK_STATE) +#if defined(QT_FATAL_ASSERT) +#define ASSERT(x) if ( !(x) )\ + qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__) +#else +#define ASSERT(x) if ( !(x) )\ + qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__) +#endif +#else +#define ASSERT(x) +#endif +#endif + +Q_EXPORT bool qt_check_pointer( bool c, const char *, int ); + +#if defined(CHECK_NULL) +#define CHECK_PTR(p) (qt_check_pointer((p)==0,__FILE__,__LINE__)) +#else +#define CHECK_PTR(p) +#endif + +enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg }; + +typedef void (*msg_handler)(QtMsgType, const char *); +Q_EXPORT msg_handler qInstallMsgHandler( msg_handler ); + + +Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE ); + +#if !defined(QT_REJECT_OBSOLETE) +#define QT_OBSOLETE +Q_EXPORT void qObsolete( const char *obj, const char *oldfunc, + const char *newfunc ); +Q_EXPORT void qObsolete( const char *obj, const char *oldfunc ); +Q_EXPORT void qObsolete( const char *message ); +#endif + +// DvH: added to avoid warnings on recent gcc versions +#define Q_DELETING_VOID_UNDEFINED + +#endif // QGLOBAL_H Index: branches/xZenu/src/util/doxygen/qtools/qxml.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qxml.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qxml.h (revision 1322) @@ -0,0 +1,671 @@ +/**************************************************************************** +** +** +** Definition of QXmlSimpleReader and related classes. +** +** Created : 000518 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the XML module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition licenses may use this +** file in accordance with the Qt Commercial License Agreement provided +** with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QXML_H +#define QXML_H + +#include + +#if !defined(QT_MODULE_XML) +#define QM_EXPORT +#else +#define QM_EXPORT Q_EXPORT +#endif + +#ifndef QT_H +#include +#include +#include +#include +#include +#include +#endif // QT_H + +#ifndef QT_NO_XML + +class QXmlNamespaceSupport; +class QXmlAttributes; +class QXmlContentHandler; +class QXmlDefaultHandler; +class QXmlDTDHandler; +class QXmlEntityResolver; +class QXmlErrorHandler; +class QXmlLexicalHandler; +class QXmlDeclHandler; +class QXmlInputSource; +class QXmlLocator; +class QXmlNamespaceSupport; +class QXmlParseException; + +class QXmlReader; +class QXmlSimpleReader; + +class QXmlSimpleReaderPrivate; +class QXmlNamespaceSupportPrivate; +class QXmlAttributesPrivate; +class QXmlInputSourcePrivate; +class QXmlParseExceptionPrivate; +class QXmlLocatorPrivate; +class QXmlDefaultHandlerPrivate; + + +// +// SAX Namespace Support +// + +#if defined(Q_TEMPLATEDLL) +// MOC_SKIP_BEGIN +template class QM_EXPORT QMap; +template class QM_EXPORT QValueStack >; +template class QM_EXPORT QValueStack; +// MOC_SKIP_END +#endif + +class QM_EXPORT QXmlNamespaceSupport +{ +public: + QXmlNamespaceSupport(); + ~QXmlNamespaceSupport(); + + void setPrefix( const QString&, const QString& ); + + QString prefix( const QString& ) const; + QString uri( const QString& ) const; + void splitName( const QString&, QString&, QString& ) const; + void processName( const QString&, bool, QString&, QString& ) const; + QStringList prefixes() const; + QStringList prefixes( const QString& ) const; + + void pushContext(); + void popContext(); + void reset(); +private: + QValueStack > nsStack; + QMap ns; + + QXmlNamespaceSupportPrivate *d; +}; + + +// +// SAX Attributes +// + +class QM_EXPORT QXmlAttributes +{ +public: + QXmlAttributes() {} + virtual ~QXmlAttributes() {} + + int index( const QString& qName ) const; + int index( const QString& uri, const QString& localPart ) const; + int length() const; + QString localName( int index ) const; + QString qName( int index ) const; + QString uri( int index ) const; + QString type( int index ) const; + QString type( const QString& qName ) const; + QString type( const QString& uri, const QString& localName ) const; + QString value( int index ) const; + QString value( const QString& qName ) const; + QString value( const QString& uri, const QString& localName ) const; + +private: + QStringList qnameList; + QStringList uriList; + QStringList localnameList; + QStringList valueList; + + QXmlAttributesPrivate *d; + + friend class QXmlSimpleReader; +}; + +// +// SAX Input Source +// + +class QM_EXPORT QXmlInputSource +{ +public: + QXmlInputSource(); + QXmlInputSource( QTextStream& stream ); + QXmlInputSource( QFile& file ); + virtual ~QXmlInputSource(); + + virtual const QString& data() const; + virtual void setData( const QString& d ); + +private: + void readInput( QByteArray& rawData ); + + QString input; + + QXmlInputSourcePrivate *d; +}; + +// +// SAX Exception Classes +// + +class QM_EXPORT QXmlParseException +{ +public: + QXmlParseException( const QString& name="", int c=-1, int l=-1, const QString& p="", const QString& s="" ) + : msg( name ), column( c ), line( l ), pub( p ), sys( s ) + { } + + int columnNumber() const; + int lineNumber() const; + QString publicId() const; + QString systemId() const; + QString message() const; + +private: + QString msg; + int column; + int line; + QString pub; + QString sys; + + QXmlParseExceptionPrivate *d; +}; + + +// +// XML Reader +// + +class QM_EXPORT QXmlReader +{ +public: + virtual ~QXmlReader() {} + virtual bool feature( const QString& name, bool *ok = 0 ) const = 0; + virtual void setFeature( const QString& name, bool value ) = 0; + virtual bool hasFeature( const QString& name ) const = 0; + virtual void* property( const QString& name, bool *ok = 0 ) const = 0; + virtual void setProperty( const QString& name, void* value ) = 0; + virtual bool hasProperty( const QString& name ) const = 0; + virtual void setEntityResolver( QXmlEntityResolver* handler ) = 0; + virtual QXmlEntityResolver* entityResolver() const = 0; + virtual void setDTDHandler( QXmlDTDHandler* handler ) = 0; + virtual QXmlDTDHandler* DTDHandler() const = 0; + virtual void setContentHandler( QXmlContentHandler* handler ) = 0; + virtual QXmlContentHandler* contentHandler() const = 0; + virtual void setErrorHandler( QXmlErrorHandler* handler ) = 0; + virtual QXmlErrorHandler* errorHandler() const = 0; + virtual void setLexicalHandler( QXmlLexicalHandler* handler ) = 0; + virtual QXmlLexicalHandler* lexicalHandler() const = 0; + virtual void setDeclHandler( QXmlDeclHandler* handler ) = 0; + virtual QXmlDeclHandler* declHandler() const = 0; + virtual bool parse( const QXmlInputSource& input ) = 0; +}; + +class QM_EXPORT QXmlSimpleReader : public QXmlReader +{ +public: + QXmlSimpleReader(); + virtual ~QXmlSimpleReader(); + + bool feature( const QString& name, bool *ok = 0 ) const; + void setFeature( const QString& name, bool value ); + bool hasFeature( const QString& name ) const; + + void* property( const QString& name, bool *ok = 0 ) const; + void setProperty( const QString& name, void* value ); + bool hasProperty( const QString& name ) const; + + void setEntityResolver( QXmlEntityResolver* handler ); + QXmlEntityResolver* entityResolver() const; + void setDTDHandler( QXmlDTDHandler* handler ); + QXmlDTDHandler* DTDHandler() const; + void setContentHandler( QXmlContentHandler* handler ); + QXmlContentHandler* contentHandler() const; + void setErrorHandler( QXmlErrorHandler* handler ); + QXmlErrorHandler* errorHandler() const; + void setLexicalHandler( QXmlLexicalHandler* handler ); + QXmlLexicalHandler* lexicalHandler() const; + void setDeclHandler( QXmlDeclHandler* handler ); + QXmlDeclHandler* declHandler() const; + + bool parse( const QXmlInputSource& input ); + +private: + // variables + QXmlContentHandler* contentHnd; + QXmlErrorHandler* errorHnd; + QXmlDTDHandler* dtdHnd; + QXmlEntityResolver* entityRes; + QXmlLexicalHandler* lexicalHnd; + QXmlDeclHandler* declHnd; + + QChar c; // the character at reading position + int lineNr; // number of line + int columnNr; // position in line + int pos; // position in string + + int namePos; + QChar nameArray[256]; // only used for names + QString nameValue; // only used for names + int refPos; + QChar refArray[256]; // only used for references + QString refValue; // only used for references + int stringPos; + QChar stringArray[256]; // used for any other strings that are parsed + QString stringValue; // used for any other strings that are parsed + + QString xml; + int xmlLength; + QString xmlRef; // used for parsing of entity references + + QValueStack tags; + + QXmlSimpleReaderPrivate* d; + + static const QChar QEOF; + + // inlines + virtual bool is_S( const QChar& ); + virtual bool is_Letter( const QChar& ); + virtual bool is_NameBeginning( const QChar& ); + virtual bool is_Digit( const QChar& ); + virtual bool is_CombiningChar( const QChar& ); + virtual bool is_Extender( const QChar& ); + virtual bool is_NameChar( const QChar& ); + + QString& string(); + void stringClear(); + void stringAddC(); + void stringAddC(const QChar&); + QString& name(); + void nameClear(); + void nameAddC(); + void nameAddC(const QChar&); + QString& ref(); + void refClear(); + void refAddC(); + void refAddC(const QChar&); + + // used by parseReference() and parsePEReference() + enum EntityRecognitionContext { InContent, InAttributeValue, InEntityValue, InDTD }; + + // private functions + void eat_ws(); + void next_eat_ws(); + + void next(); + bool atEnd(); + + void init( const QXmlInputSource& i ); + + bool entityExist( const QString& ) const; + + bool parseProlog(); + bool parseElement(); + bool parseElementEmptyTag( bool &t, QString &uri, QString &lname ); + bool parseElementETagBegin2(); + bool parseElementAttribute( QString &prefix, QString &uri, QString &lname ); + bool parseMisc(); + bool parseContent(); + + bool parsePI(bool xmldecl=FALSE); + bool parseDoctype(); + bool parseComment(); + + bool parseName( bool useRef=FALSE ); + bool parseNmtoken(); + bool parseAttribute(); + bool parseReference( bool &charDataRead, EntityRecognitionContext context ); + bool processReference( bool &charDataRead, EntityRecognitionContext context ); + + bool parseExternalID( bool allowPublicID = FALSE ); + bool parsePEReference( EntityRecognitionContext context ); + bool parseMarkupdecl(); + bool parseAttlistDecl(); + bool parseAttType(); + bool parseAttValue(); + bool parseElementDecl(); + bool parseNotationDecl(); + bool parseChoiceSeq(); + bool parseEntityDecl(); + bool parseEntityValue(); + + bool parseString( const QString& s ); + + void reportParseError(); + + friend class QXmlSimpleReaderPrivate; + friend class QXmlLocator; +}; + +// +// SAX Locator +// + +class QM_EXPORT QXmlLocator +{ +public: + QXmlLocator( QXmlSimpleReader* parent ) + { reader = parent; } + ~QXmlLocator() + { } + + int columnNumber(); + int lineNumber(); +// QString getPublicId() +// QString getSystemId() + +private: + QXmlSimpleReader* reader; + + QXmlLocatorPrivate *d; +}; + +// +// SAX handler classes +// + +class QM_EXPORT QXmlContentHandler +{ +public: + virtual ~QXmlContentHandler() {} + virtual void setDocumentLocator( QXmlLocator* locator ) = 0; + virtual bool startDocument() = 0; + virtual bool endDocument() = 0; + virtual bool startPrefixMapping( const QString& prefix, const QString& uri ) = 0; + virtual bool endPrefixMapping( const QString& prefix ) = 0; + virtual bool startElement( const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts ) = 0; + virtual bool endElement( const QString& namespaceURI, const QString& localName, const QString& qName ) = 0; + virtual bool characters( const QString& ch ) = 0; + virtual bool ignorableWhitespace( const QString& ch ) = 0; + virtual bool processingInstruction( const QString& target, const QString& data ) = 0; + virtual bool skippedEntity( const QString& name ) = 0; + virtual QString errorString() = 0; +}; + +class QM_EXPORT QXmlErrorHandler +{ +public: + virtual ~QXmlErrorHandler() {} + virtual bool warning( const QXmlParseException& exception ) = 0; + virtual bool error( const QXmlParseException& exception ) = 0; + virtual bool fatalError( const QXmlParseException& exception ) = 0; + virtual QString errorString() = 0; +}; + +class QM_EXPORT QXmlDTDHandler +{ +public: + virtual ~QXmlDTDHandler() {} + virtual bool notationDecl( const QString& name, const QString& publicId, const QString& systemId ) = 0; + virtual bool unparsedEntityDecl( const QString& name, const QString& publicId, const QString& systemId, const QString& notationName ) = 0; + virtual QString errorString() = 0; +}; + +class QM_EXPORT QXmlEntityResolver +{ +public: + virtual ~QXmlEntityResolver() {} + virtual bool resolveEntity( const QString& publicId, const QString& systemId, QXmlInputSource* ret ) = 0; + virtual QString errorString() = 0; +}; + +class QM_EXPORT QXmlLexicalHandler +{ +public: + virtual ~QXmlLexicalHandler() {} + virtual bool startDTD( const QString& name, const QString& publicId, const QString& systemId ) = 0; + virtual bool endDTD() = 0; +// virtual bool startEntity( const QString& name ) = 0; +// virtual bool endEntity( const QString& name ) = 0; + virtual bool startCDATA() = 0; + virtual bool endCDATA() = 0; + virtual bool comment( const QString& ch ) = 0; + virtual QString errorString() = 0; +}; + +class QM_EXPORT QXmlDeclHandler +{ +public: + virtual ~QXmlDeclHandler() {} + virtual bool attributeDecl( const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value ) = 0; + virtual bool internalEntityDecl( const QString& name, const QString& value ) = 0; + virtual bool externalEntityDecl( const QString& name, const QString& publicId, const QString& systemId ) = 0; + virtual QString errorString() = 0; +}; + + +class QM_EXPORT QXmlDefaultHandler : public QXmlContentHandler, public QXmlErrorHandler, public QXmlDTDHandler, public QXmlEntityResolver, public QXmlLexicalHandler, public QXmlDeclHandler +{ +public: + QXmlDefaultHandler() { } + virtual ~QXmlDefaultHandler() { } + + void setDocumentLocator( QXmlLocator* locator ); + bool startDocument(); + bool endDocument(); + bool startPrefixMapping( const QString& prefix, const QString& uri ); + bool endPrefixMapping( const QString& prefix ); + bool startElement( const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts ); + bool endElement( const QString& namespaceURI, const QString& localName, const QString& qName ); + bool characters( const QString& ch ); + bool ignorableWhitespace( const QString& ch ); + bool processingInstruction( const QString& target, const QString& data ); + bool skippedEntity( const QString& name ); + + bool warning( const QXmlParseException& exception ); + bool error( const QXmlParseException& exception ); + bool fatalError( const QXmlParseException& exception ); + + bool notationDecl( const QString& name, const QString& publicId, const QString& systemId ); + bool unparsedEntityDecl( const QString& name, const QString& publicId, const QString& systemId, const QString& notationName ); + + bool resolveEntity( const QString& publicId, const QString& systemId, QXmlInputSource* ret ); + + bool startDTD( const QString& name, const QString& publicId, const QString& systemId ); + bool endDTD(); +// bool startEntity( const QString& name ); +// bool endEntity( const QString& name ); + bool startCDATA(); + bool endCDATA(); + bool comment( const QString& ch ); + + bool attributeDecl( const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value ); + bool internalEntityDecl( const QString& name, const QString& value ); + bool externalEntityDecl( const QString& name, const QString& publicId, const QString& systemId ); + + QString errorString(); + +private: + QXmlDefaultHandlerPrivate *d; +}; + +#ifdef _WS_QWS_ +#ifdef QT_XML_CPP +#define inline +#else +#define QT_NO_XML_INLINE +#endif +#endif + +#ifndef QT_NO_XML_INLINE +// +// inlines +// + +inline bool QXmlSimpleReader::is_S(const QChar& ch) +{ return ch==' ' || ch=='\t' || ch=='\n' || ch=='\r'; } + +inline bool QXmlSimpleReader::is_Letter( const QChar& ch ) +{ return ch.isLetter(); } + +inline bool QXmlSimpleReader::is_NameBeginning( const QChar& ch ) +{ return ch=='_' || ch==':' || ch.isLetter(); } + +inline bool QXmlSimpleReader::is_Digit( const QChar& ch ) +{ return ch.isDigit(); } + +inline bool QXmlSimpleReader::is_CombiningChar( const QChar& ) +{ return FALSE; } + +inline bool QXmlSimpleReader::is_Extender( const QChar& ) +{ return FALSE; } + +inline bool QXmlSimpleReader::is_NameChar( const QChar& ch ) +{ + return ch=='.' || ch=='-' || ch=='_' || ch==':' || + is_Letter(ch) || is_Digit(ch) || + is_CombiningChar(ch) || is_Extender(ch); +} + +inline void QXmlSimpleReader::next() +{ + if ( !xmlRef.isEmpty() ) { + c = xmlRef[0]; + xmlRef.remove( 0, 1 ); + } else { + if ( c=='\n' || c=='\r' ) { + lineNr++; + columnNr = -1; + } + if ( pos >= xmlLength ) { + c = QEOF; + } else { + c = xml[pos]; + columnNr++; + pos++; + } + } +} + +inline bool QXmlSimpleReader::atEnd() +{ return c == QEOF; } + +inline void QXmlSimpleReader::eat_ws() +{ while ( !atEnd() && is_S(c) ) next(); } + +inline void QXmlSimpleReader::next_eat_ws() +{ next(); eat_ws(); } + + +// use buffers instead of QString::operator+= when single characters are read +inline QString& QXmlSimpleReader::string() +{ + stringValue += QString( stringArray, stringPos ); + stringPos = 0; + return stringValue; +} +inline QString& QXmlSimpleReader::name() +{ + nameValue += QString( nameArray, namePos ); + namePos = 0; + return nameValue; +} +inline QString& QXmlSimpleReader::ref() +{ + refValue += QString( refArray, refPos ); + refPos = 0; + return refValue; +} + +inline void QXmlSimpleReader::stringClear() +{ stringValue = ""; stringPos = 0; } +inline void QXmlSimpleReader::nameClear() +{ nameValue = ""; namePos = 0; } +inline void QXmlSimpleReader::refClear() +{ refValue = ""; refPos = 0; } + +inline void QXmlSimpleReader::stringAddC() +{ + if ( stringPos >= 256 ) { + stringValue += QString( stringArray, stringPos ); + stringPos = 0; + } + stringArray[stringPos++] = c; +} +inline void QXmlSimpleReader::nameAddC() +{ + if ( namePos >= 256 ) { + nameValue += QString( nameArray, namePos ); + namePos = 0; + } + nameArray[namePos++] = c; +} +inline void QXmlSimpleReader::refAddC() +{ + if ( refPos >= 256 ) { + refValue += QString( refArray, refPos ); + refPos = 0; + } + refArray[refPos++] = c; +} + +inline void QXmlSimpleReader::stringAddC(const QChar& ch) +{ + if ( stringPos >= 256 ) { + stringValue += QString( stringArray, stringPos ); + stringPos = 0; + } + stringArray[stringPos++] = ch; +} +inline void QXmlSimpleReader::nameAddC(const QChar& ch) +{ + if ( namePos >= 256 ) { + nameValue += QString( nameArray, namePos ); + namePos = 0; + } + nameArray[namePos++] = ch; +} +inline void QXmlSimpleReader::refAddC(const QChar& ch) +{ + if ( refPos >= 256 ) { + refValue += QString( refArray, refPos ); + refPos = 0; + } + refArray[refPos++] = ch; +} +#endif + +#ifdef _WS_QWS_ +#ifdef QT_XML_CPP +#undef inline +#endif +#endif + +#endif //QT_NO_XML + +#endif Index: branches/xZenu/src/util/doxygen/qtools/qmutex.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qmutex.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qmutex.h (revision 1322) @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMUTEX_H +#define QMUTEX_H + +#include "qglobal.h" + +class QMutexPrivate; + +class QMutex +{ +public: + QMutex(); + ~QMutex(); + + void lock(); + bool tryLock(); + void unlock(); + +private: + QMutex(const QMutex &); + QMutex &operator=(const QMutex &); + + QMutexPrivate *d; +}; + +class QMutexLocker +{ + public: + QMutexLocker(QMutex *m) : m_mutex(m) + { + m_mutex->lock(); + } + ~QMutexLocker() + { + m_mutex->unlock(); + } + QMutex *mutex() const { return m_mutex; } + + private: + QMutex *m_mutex; +}; + +#endif // QMUTEX_H Index: branches/xZenu/src/util/doxygen/qtools/qstringlist.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qstringlist.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qstringlist.h (revision 1322) @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** +** Definition of QStringList class +** +** Created : 990406 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QSTRINGLIST_H +#define QSTRINGLIST_H + +#ifndef QT_H +#include "qvaluelist.h" +#include "qstring.h" +#include "qregexp.h" +#endif // QT_H + +#ifndef QT_NO_STRINGLIST + +class QStrList; + +class Q_EXPORT QStringList : public QValueList +{ +public: + QStringList() { } + QStringList( const QStringList& l ) : QValueList(l) { } + QStringList( const QValueList& l ) : QValueList(l) { } + QStringList( const QString& i ) { append(i); } +#ifndef QT_NO_CAST_ASCII + QStringList( const char* i ) { append(i); } +#endif + + static QStringList fromStrList(const QStrList&); + + void sort(); + + static QStringList split( const QString &sep, const QString &str, bool allowEmptyEntries = FALSE ); + static QStringList split( const QCString &sep, const QCString &str, bool allowEmptyEntries = FALSE ); + static QStringList split( const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE ); + static QStringList split( const QRegExp &sep, const QString &str, bool allowEmptyEntries = FALSE ); + QString join( const QString &sep ) const; + + QStringList grep( const QString &str, bool cs = TRUE ) const; + QStringList grep( const QRegExp &expr ) const; +}; + +#ifndef QT_NO_DATASTREAM +class QDataStream; +extern Q_EXPORT QDataStream &operator>>( QDataStream &, QStringList& ); +extern Q_EXPORT QDataStream &operator<<( QDataStream &, const QStringList& ); +#endif +#endif // QT_NO_STRINGLIST +#endif // QSTRINGLIST_H Index: branches/xZenu/src/util/doxygen/qtools/qcstring.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qcstring.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qcstring.cpp (revision 1322) @@ -0,0 +1,799 @@ +/****************************************************************************** + * + * Copyright (C) 1997-2004 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include "qcstring.h" +#include "qgstring.h" + +#include +#include +#include +#include +#include +#include +#include + + +QCString::QCString(int size) +{ + if (size>0) + { + m_data = (char *)malloc(size); + if (m_data) + { + if (size>1) memset(m_data,' ',size-1); + m_data[size-1]='\0'; + } + } + else + { + m_data=0; + } +} + +QCString::QCString( const QCString &s ) +{ + duplicate(s); +} + +QCString::QCString( const char *str ) +{ + duplicate(str); +} + +QCString::QCString( const char *str, uint maxlen ) +{ + uint l; + if (str && ( l = QMIN(qstrlen(str),maxlen) )) + { + m_data=(char *)malloc(l+1); + strncpy(m_data,str,l+1); + m_data[l]='\0'; + } + else + { + m_data=0; + } +} + +QCString::~QCString() +{ + if (m_data) free(m_data); + m_data=0; +} + +QCString &QCString::assign( const char *str ) +{ + if (m_data) free(m_data); + duplicate(str); + return *this; +} + +bool QCString::resize( uint newlen ) +{ + if (newlen==0) + { + if (m_data) { free(m_data); m_data=0; } + return TRUE; + } + if (m_data==0) // newlen>0 + { + m_data = (char *)malloc(newlen); + } + else + { + m_data = (char *)realloc(m_data,newlen); + } + if (m_data==0) return FALSE; + m_data[newlen-1]='\0'; + return TRUE; +} + +bool QCString::fill( char c, int len ) +{ + uint l=length(); + if (len<0) len=l; + if ((uint)len!=l) + { + if (m_data) free(m_data); + if (len>0) + { + m_data=(char *)malloc(len+1); + if (m_data==0) return FALSE; + m_data[len]='\0'; + } + else + { + m_data=0; + } + } + if (len>0) + { + uint i; + for (i=0;i<(uint)len;i++) m_data[i]=c; + } + return TRUE; +} + +QCString &QCString::sprintf( const char *format, ... ) +{ + va_list ap; + va_start( ap, format ); + uint l = length(); + const uint minlen=256; + if (llen ) // index outside string + return -1; + register const char *d; + if ( cs ) // case sensitive + { + d = strchr( m_data+index, c ); + } + else + { + d = m_data+index; + c = tolower( (uchar) c ); + while ( *d && tolower((uchar) *d) != c ) + d++; + if ( !*d && c ) // not found + d = 0; + } + return d ? (int)(d - m_data) : -1; +} + +int QCString::find( const char *str, int index, bool cs ) const +{ + uint l = length(); + if ( m_data==0 || (uint)index > l ) // index outside string + return -1; + if ( !str ) // no search string + return -1; + if ( !*str ) // zero-length search string + return index; + register const char *d; + if ( cs ) // case sensitive + { + d = strstr( m_data+index, str ); + } + else // case insensitive + { + d = m_data+index; + int len = qstrlen( str ); + while ( *d ) + { + if ( qstrnicmp(d, str, len) == 0 ) + break; + d++; + } + if ( !*d ) // not found + d = 0; + } + return d ? (int)(d - m_data) : -1; +} + +int QCString::find( const QCString &str,int index,bool cs) const +{ + return find(str.data(),index,cs); +} + +int QCString::find( const QRegExp &rx, int index ) const +{ + QString d = QString::fromLatin1( m_data ); + return d.find( rx, index ); +} + +int QCString::findRev( char c, int index, bool cs) const +{ + const char *b = m_data; + const char *d; + uint len = length(); + if ( b == 0 ) return -1; // empty string + if ( index < 0 ) // neg index ==> start from end + { + if ( len == 0 ) return -1; + if ( cs ) + { + d = strrchr( b, c ); + return d ? (int)(d - b) : -1; + } + index = len; + } + else if ( (uint)index > len ) // bad index + { + return -1; + } + d = b+index; + if ( cs ) // case sensitive + { + while ( d >= b && *d != c ) + d--; + } + else // case insensitive + { + c = tolower( (uchar) c ); + while ( d >= b && tolower((uchar) *d) != c ) + d--; + } + return d >= b ? (int)(d - b) : -1; +} + +int QCString::findRev( const char *str, int index, bool cs) const +{ + int slen = qstrlen(str); + uint len = length(); + if ( index < 0 ) // neg index ==> start from end + index = len-slen; + else if ( (uint)index > len ) // bad index + return -1; + else if ( (uint)(index + slen) > len ) // str would be too long + index = len - slen; + if ( index < 0 ) + return -1; + + register char *d = m_data + index; + if ( cs ) // case sensitive + { + for ( int i=index; i>=0; i-- ) + if ( qstrncmp(d--,str,slen)==0 ) + return i; + } + else // case insensitive + { + for ( int i=index; i>=0; i-- ) + if ( qstrnicmp(d--,str,slen)==0 ) + return i; + } + return -1; + +} + +int QCString::findRev( const QRegExp &rx, int index ) const +{ + QString d = QString::fromLatin1( m_data ); + return d.findRev( rx, index ); +} + +int QCString::contains( char c, bool cs ) const +{ + int count = 0; + char *d = m_data; + if ( !d ) + return 0; + if ( cs ) // case sensitive + { + while ( *d ) + if ( *d++ == c ) + count++; + } + else // case insensitive + { + c = tolower( (uchar) c ); + while ( *d ) { + if ( tolower((uchar) *d) == c ) + count++; + d++; + } + } + return count; +} + +int QCString::contains( const char *str, bool cs ) const +{ + int count = 0; + char *d = data(); + if ( !d ) + return 0; + int len = qstrlen( str ); + while ( *d ) // counts overlapping strings + { + if ( cs ) + { + if ( qstrncmp( d, str, len ) == 0 ) + count++; + } + else + { + if ( qstrnicmp(d, str, len) == 0 ) + count++; + } + d++; + } + return count; +} + +int QCString::contains( const QRegExp &rx ) const +{ + QString d = QString::fromLatin1( m_data ); + return d.contains( rx ); +} + +QCString QCString::left( uint len ) const +{ + if ( isEmpty() ) + { + return QCString(); + } + else if ( len >= length() ) + { + return *this; + } + else + { + QCString s( len+1 ); + strncpy( s.data(), m_data, len ); + *(s.data()+len) = '\0'; + return s; + } +} + +QCString QCString::right( uint len ) const +{ + if ( isEmpty() ) + { + return QCString(); + } + else + { + uint l = length(); + if ( len > l ) len = l; + char *p = m_data + (l - len); + return QCString( p ); + } +} + +QCString QCString::mid( uint index, uint len) const +{ + uint slen = length(); + if ( len == 0xffffffff ) len = slen-index; + if ( isEmpty() || index >= slen ) + { + return QCString(); + } + else + { + register char *p = data()+index; + QCString s( len+1 ); + strncpy( s.data(), p, len ); + *(s.data()+len) = '\0'; + return s; + } +} + +QCString QCString::lower() const +{ + QCString s( m_data ); + register char *p = s.data(); + if ( p ) + { + while ( *p ) + { + *p = tolower((uchar) *p); + p++; + } + } + return s; +} + +QCString QCString::upper() const +{ + QCString s( m_data ); + register char *p = s.data(); + if ( p ) { + while ( *p ) { + *p = toupper((uchar)*p); + p++; + } + } + return s; +} + +QCString QCString::stripWhiteSpace() const +{ + if ( isEmpty() ) // nothing to do + return *this; + + register char *s = m_data; + int reslen = length(); + if ( !isspace((uchar) s[0]) && !isspace((uchar) s[reslen-1]) ) + return *this; // returns a copy + + QCString result(s); + s = result.data(); + int start = 0; + int end = reslen - 1; + while ( isspace((uchar) s[start]) ) // skip white space from start + start++; + if ( s[start] == '\0' ) + { // only white space + return QCString(); + } + while ( end && isspace((uchar) s[end]) ) // skip white space from end + end--; + end -= start - 1; + memmove( result.data(), &s[start], end ); + result.resize( end + 1 ); + return result; +} + +QCString QCString::simplifyWhiteSpace() const +{ + if ( isEmpty() ) // nothing to do + return *this; + + QCString result( length()+1 ); + char *from = data(); + char *to = result.data(); + char *first = to; + while ( TRUE ) + { + while ( *from && isspace((uchar) *from) ) + from++; + while ( *from && !isspace((uchar)*from) ) + *to++ = *from++; + if ( *from ) + *to++ = 0x20; // ' ' + else + break; + } + if ( to > first && *(to-1) == 0x20 ) + to--; + *to = '\0'; + result.resize( (int)((long)to - (long)result.data()) + 1 ); + return result; +} + +QCString &QCString::insert( uint index, const char *s ) +{ + int len = s ? qstrlen(s) : 0; + if ( len == 0 ) + return *this; + uint olen = length(); + int nlen = olen + len; + if ( index >= olen ) // insert after end of string + { + m_data = (char *)realloc(m_data,nlen+index-olen+1); + if ( m_data ) + { + memset( m_data+olen, ' ', index-olen ); + memcpy( m_data+index, s, len+1 ); + } + } + else if ( (m_data = (char *)realloc(m_data,nlen+1)) ) // normal insert + { + memmove( m_data+index+len, m_data+index, olen-index+1 ); + memcpy( m_data+index, s, len ); + } + return *this; +} + +QCString &QCString::insert( uint index, char c ) // insert char +{ + char buf[2]; + buf[0] = c; + buf[1] = '\0'; + return insert( index, buf ); +} + +QCString& QCString::operator+=( const char *str ) +{ + if ( !str ) return *this; // nothing to append + uint len1 = length(); + uint len2 = qstrlen(str); + char *newData = (char *)realloc( m_data, len1 + len2 + 1 ); + if (newData) + { + m_data = newData; + memcpy( m_data + len1, str, len2 + 1 ); + } + return *this; +} + +QCString &QCString::operator+=( char c ) +{ + uint len = length(); + char *newData = (char *)realloc( m_data, length()+2 ); + if (newData) + { + m_data = newData; + m_data[len] = c; + m_data[len+1] = '\0'; + } + return *this; +} + +QCString &QCString::remove( uint index, uint len ) +{ + uint olen = length(); + if ( index + len >= olen ) // range problems + { + if ( index < olen ) // index ok + { + resize( index+1 ); + } + } + else if ( len != 0 ) + { + memmove( m_data+index, m_data+index+len, olen-index-len+1 ); + resize( olen-len+1 ); + } + return *this; +} + +QCString &QCString::replace( uint index, uint len, const char *s ) +{ + remove( index, len ); + insert( index, s ); + return *this; +} + +QCString &QCString::replace( const QRegExp &rx, const char *str ) +{ + QString d = QString::fromLatin1( m_data ); + QString r = QString::fromLatin1( str ); + d.replace( rx, r ); + operator=( d.ascii() ); + return *this; +} + +long QCString::toLong( bool *ok ) const +{ + QString s(m_data); + return s.toLong(ok); +} + +ulong QCString::toULong( bool *ok ) const +{ + QString s(m_data); + return s.toULong(ok); +} + +short QCString::toShort( bool *ok ) const +{ + QString s(m_data); + return s.toShort(ok); +} + +ushort QCString::toUShort( bool *ok ) const +{ + QString s(m_data); + return s.toUShort(ok); +} + +int QCString::toInt( bool *ok ) const +{ + QString s(m_data); + return s.toInt(ok); +} + +uint QCString::toUInt( bool *ok ) const +{ + QString s(m_data); + return s.toUInt(ok); +} + +QCString &QCString::setNum( long n ) +{ + char buf[20]; + register char *p = &buf[19]; + bool neg; + if ( n < 0 ) + { + neg = TRUE; + n = -n; + } + else + { + neg = FALSE; + } + *p = '\0'; + do + { + *--p = ((int)(n%10)) + '0'; + n /= 10; + } while ( n ); + if ( neg ) *--p = '-'; + operator=( p ); + return *this; +} + +QCString &QCString::setNum( ulong n ) +{ + char buf[20]; + register char *p = &buf[19]; + *p = '\0'; + do + { + *--p = ((int)(n%10)) + '0'; + n /= 10; + } while ( n ); + operator=( p ); + return *this; +} + +void QCString::msg_index( uint index ) +{ +#if defined(CHECK_RANGE) + qWarning( "QCString::at: Absolute index %d out of range", index ); +#else + Q_UNUSED( index ) +#endif +} + +bool QCString::stripPrefix(const char *prefix) +{ + if (prefix==0) return FALSE; + uint plen = qstrlen(prefix); + if (m_data && qstrncmp(prefix,m_data,plen)==0) // prefix matches + { + uint len = qstrlen(m_data); + uint newlen = len-plen+1; + qmemmove(m_data,m_data+plen,newlen); + resize(newlen); + return TRUE; + } + return FALSE; +} + +//--------------------------------------------------------------------------- + +void *qmemmove( void *dst, const void *src, uint len ) +{ + register char *d; + register char *s; + if ( dst > src ) { + d = (char *)dst + len - 1; + s = (char *)src + len - 1; + while ( len-- ) + *d-- = *s--; + } else if ( dst < src ) { + d = (char *)dst; + s = (char *)src; + while ( len-- ) + *d++ = *s++; + } + return dst; +} + +char *qstrdup( const char *str ) +{ + if ( !str ) + return 0; + char *dst = new char[strlen(str)+1]; + CHECK_PTR( dst ); + return strcpy( dst, str ); +} + +char *qstrncpy( char *dst, const char *src, uint len ) +{ + if ( !src ) + return 0; + strncpy( dst, src, len ); + if ( len > 0 ) + dst[len-1] = '\0'; + return dst; +} + +int qstricmp( const char *str1, const char *str2 ) +{ + register const uchar *s1 = (const uchar *)str1; + register const uchar *s2 = (const uchar *)str2; + int res; + uchar c; + if ( !s1 || !s2 ) + return s1 == s2 ? 0 : (int)((long)s2 - (long)s1); + for ( ; !(res = (c=tolower(*s1)) - tolower(*s2)); s1++, s2++ ) + if ( !c ) // strings are equal + break; + return res; +} + +int qstrnicmp( const char *str1, const char *str2, uint len ) +{ + register const uchar *s1 = (const uchar *)str1; + register const uchar *s2 = (const uchar *)str2; + int res; + uchar c; + if ( !s1 || !s2 ) + return (int)((long)s2 - (long)s1); + for ( ; len--; s1++, s2++ ) { + if ( (res = (c=tolower(*s1)) - tolower(*s2)) ) + return res; + if ( !c ) // strings are equal + break; + } + return 0; +} + +#ifndef QT_NO_DATASTREAM + +QDataStream &operator<<( QDataStream &s, const QByteArray &a ) +{ + return s.writeBytes( a.data(), a.size() ); +} + +QDataStream &operator>>( QDataStream &s, QByteArray &a ) +{ + Q_UINT32 len; + s >> len; // read size of array + if ( len == 0 || s.eof() ) { // end of file reached + a.resize( 0 ); + return s; + } + if ( !a.resize( (uint)len ) ) { // resize array +#if defined(CHECK_NULL) + qWarning( "QDataStream: Not enough memory to read QByteArray" ); +#endif + len = 0; + } + if ( len > 0 ) // not null array + s.readRawBytes( a.data(), (uint)len ); + return s; +} + +QDataStream &operator<<( QDataStream &s, const QCString &str ) +{ + return s.writeBytes( str.data(), str.size() ); +} + +QDataStream &operator>>( QDataStream &s, QCString &str ) +{ + Q_UINT32 len; + s >> len; // read size of string + if ( len == 0 || s.eof() ) { // end of file reached + str.resize( 0 ); + return s; + } + if ( !str.resize( (uint)len )) {// resize string +#if defined(CHECK_NULL) + qWarning( "QDataStream: Not enough memory to read QCString" ); +#endif + len = 0; + } + if ( len > 0 ) // not null array + s.readRawBytes( str.data(), (uint)len ); + return s; +} + +#endif //QT_NO_DATASTREAM + +inline QCString operator+( const QCString &s1, const QGString &s2 ) +{ + QCString tmp(s1); + tmp += s2.data(); + return tmp; +} + +inline QCString operator+( const QGString &s1, const QCString &s2 ) +{ + QCString tmp(s1.data()); + tmp += s2; + return tmp; +} + Index: branches/xZenu/src/util/doxygen/qtools/qstrlist.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qstrlist.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qstrlist.h (revision 1322) @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** +** Definition of QStrList, QStrIList and QStrListIterator classes +** +** Created : 920730 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QSTRLIST_H +#define QSTRLIST_H + +#ifndef QT_H +#include "qstring.h" +#include "qlist.h" +#include "qdatastream.h" +#endif // QT_H + + +#if defined(Q_TEMPLATEDLL) +template class Q_EXPORT QList; +template class Q_EXPORT QListIterator; +#endif + +typedef QList QStrListBase; +typedef QListIterator QStrListIterator; + + +class Q_EXPORT QStrList : public QStrListBase +{ +public: + QStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; } + QStrList( const QStrList & ); + ~QStrList() { clear(); } + QStrList& operator=( const QStrList & ); + +private: + QCollection::Item newItem( QCollection::Item d ) { return dc ? qstrdup( (const char*)d ) : d; } + void deleteItem( QCollection::Item d ) { if ( del_item ) delete[] (char*)d; } + int compareItems( QCollection::Item s1, QCollection::Item s2 ) { return qstrcmp((const char*)s1, + (const char*)s2); } +#ifndef QT_NO_DATASTREAM + QDataStream &read( QDataStream &s, QCollection::Item &d ) + { s >> (char *&)d; return s; } + QDataStream &write( QDataStream &s, QCollection::Item d ) const + { return s << (const char *)d; } +#endif + bool dc; +}; + + +class Q_EXPORT QStrIList : public QStrList // case insensitive string list +{ +public: + QStrIList( bool deepCopies=TRUE ) : QStrList( deepCopies ) {} + ~QStrIList() { clear(); } +private: + int compareItems( QCollection::Item s1, QCollection::Item s2 ) + { return qstricmp((const char*)s1, + (const char*)s2); } +}; + + +inline QStrList & QStrList::operator=( const QStrList &strList ) +{ + clear(); + dc = strList.dc; + del_item = dc; + QStrListBase::operator=(strList); + return *this; +} + +inline QStrList::QStrList( const QStrList &strList ) + : QStrListBase( strList ) +{ + dc = FALSE; + operator=(strList); +} + + +#endif // QSTRLIST_H Index: branches/xZenu/src/util/doxygen/qtools/Makefile =================================================================== --- branches/xZenu/src/util/doxygen/qtools/Makefile (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/Makefile (revision 1322) @@ -0,0 +1,50 @@ +# +# This file was generated from Makefile.in on Mon Mar 28 15:09:00 CEST 2011 +# + +DOXYGEN = /Users/dimitri/doxygen +TMAKEPATH = /Users/dimitri/doxygen/tmake/lib/macosx-c++ +ENV = env TMAKEPATH=$(TMAKEPATH) +TMAKE = /Users/dimitri/doxygen/tmake/bin/tmake +MAKE = /opt/local/bin/gmake +PERL = /opt/local/bin/perl +RM = rm -f +CP = cp +VERSION = 1.7.3 +INSTALL = /usr/local +INSTTOOL = /opt/local/bin/ginstall +DOXYDOCS = .. +DOCDIR = $(INSTALL)/share/doc/packages/doxygen +QTDIR = /usr +HAVE_DOT = /usr/local/bin/dot +MKSPECS = -spec macx-g++ +# +# +# +# Copyright (C) 1997-2000 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. +# + +all: Makefile.qtools Makefile + $(MAKE) -f Makefile.qtools $@ + +Makefile.qtools: qtools.pro + $(ENV) $(PERL) $(TMAKE) qtools.pro >Makefile.qtools + +tmake: + $(ENV) $(PERL) $(TMAKE) qtools.pro >Makefile.qtools + +clean: Makefile.qtools + $(MAKE) -f Makefile.qtools clean + +distclean: clean + +FORCE: Index: branches/xZenu/src/util/doxygen/qtools/qgstring.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgstring.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgstring.cpp (revision 1322) @@ -0,0 +1,258 @@ +/****************************************************************************** + * + * Copyright (C) 1997-2004 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include +#include "qgstring.h" + +#include + +#define BLOCK_SIZE 64 +#define ROUND_SIZE(x) ((x)+BLOCK_SIZE-1)&~(BLOCK_SIZE-1) + +#define DBG_STR(x) do { } while(0) +//#define DBG_STR(x) printf x + +QGString::QGString() // make null string + : m_data(0), m_len(0), m_memSize(0) +{ + DBG_STR(("%p: QGString::QGString() %d:%s\n",this,m_len,m_data?m_data:"")); +} + +QGString::QGString(uint size) +{ + if (size==0) + { + m_data=0; + m_len=0; + } + else + { + m_memSize = ROUND_SIZE(size+1); + m_data = (char*)malloc(m_memSize); + memset(m_data,' ',size); + m_data[size]='\0'; + m_len=size; + } + DBG_STR(("%p: QGString::QGString(uint size=%d) %d:%s\n", + this,size,m_len,m_data?m_data:"")); +} + +QGString::QGString( const QGString &s ) +{ + if (s.m_memSize==0) + { + m_data = 0; + m_len = 0; + m_memSize = 0; + } + else + { + m_data = (char *)malloc(s.m_memSize); + m_len = s.m_len; + m_memSize = s.m_memSize; + qstrcpy(m_data,s.m_data); + } + DBG_STR(("%p: QGString::QGString(const QGString &) %d:%s\n",this,m_len,m_data?m_data:"")); +} + +QGString::QGString( const char *str ) +{ + if (str==0) + { + m_data=0; + m_len=0; + m_memSize=0; + } + else + { + m_len = qstrlen(str); + m_memSize = ROUND_SIZE(m_len+1); + assert(m_memSize>=m_len+1); + m_data = (char *)malloc(m_memSize); + qstrcpy(m_data,str); + } + DBG_STR(("%p: QGString::QGString(const char *) %d:%s\n",this,m_len,m_data?m_data:"")); +} + +QGString::~QGString() +{ + free(m_data); + m_data=0; + DBG_STR(("%p: QGString::~QGString() %d:%s\n",this,m_len,m_data?m_data:"")); +} + +bool QGString::resize( uint newlen ) +{ + m_len = 0; + if (newlen==0) + { + if (m_data) { free(m_data); m_data=0; } + m_memSize=0; + DBG_STR(("%p: 1.QGString::resize() %d:%s\n",this,m_len,m_data?m_data:"")); + return TRUE; + } + m_memSize = ROUND_SIZE(newlen+1); + assert(m_memSize>=newlen+1); + if (m_data==0) + { + m_data = (char *)malloc(m_memSize); + } + else + { + m_data = (char *)realloc(m_data,m_memSize); + } + if (m_data==0) + { + DBG_STR(("%p: 2.QGString::resize() %d:%s\n",this,m_len,m_data?m_data:"")); + return FALSE; + } + m_data[newlen]='\0'; + m_len = qstrlen(m_data); + DBG_STR(("%p: 3.QGString::resize() %d:%s\n",this,m_len,m_data?m_data:"")); + return TRUE; +} + +bool QGString::enlarge( uint newlen ) +{ + if (newlen==0) + { + if (m_data) { free(m_data); m_data=0; } + m_memSize=0; + m_len=0; + return TRUE; + } + uint newMemSize = ROUND_SIZE(newlen+1); + if (newMemSize==m_memSize) return TRUE; + m_memSize = newMemSize; + if (m_data==0) + { + m_data = (char *)malloc(m_memSize); + } + else + { + m_data = (char *)realloc(m_data,m_memSize); + } + if (m_data==0) + { + return FALSE; + } + m_data[newlen-1]='\0'; + if (m_len>newlen) m_len=newlen; + return TRUE; +} + +void QGString::setLen( uint newlen ) +{ + m_len = newlen<=m_memSize ? newlen : m_memSize; +} + +QGString &QGString::operator=( const QGString &s ) +{ + if (m_data) free(m_data); + if (s.m_memSize==0) // null string + { + m_data = 0; + m_len = 0; + m_memSize = 0; + } + else + { + m_len = s.m_len; + m_memSize = s.m_memSize; + m_data = (char*)malloc(m_memSize); + qstrcpy(m_data,s.m_data); + } + DBG_STR(("%p: QGString::operator=(const QGString &%p) %d:%s\n", + this,&s,m_len,m_data?m_data:"")); + return *this; +} + +QGString &QGString::operator=( const char *str ) +{ + if (m_data) free(m_data); + if (str==0) // null string + { + m_data = 0; + m_len = 0; + m_memSize = 0; + } + else + { + m_len = qstrlen(str); + m_memSize = ROUND_SIZE(m_len+1); + assert(m_memSize>=m_len+1); + m_data = (char*)malloc(m_memSize); + qstrcpy(m_data,str); + } + DBG_STR(("%p: QGString::operator=(const char *) %d:%s\n",this,m_len,m_data?m_data:"")); + return *this; +} + +QGString &QGString::operator+=( const QGString &s ) +{ + if (s.m_memSize==0) return *this; + uint len1 = length(); + uint len2 = s.length(); + uint memSize = ROUND_SIZE(len1 + len2 + 1); + assert(memSize>=len1+len2+1); + char *newData = memSize!=m_memSize ? (char*)realloc( m_data, memSize ) : m_data; + m_memSize = memSize; + if (m_data) + { + m_data = newData; + memcpy( m_data + len1, s, len2 + 1 ); + } + m_len = len1+len2; + DBG_STR(("%p: QGString::operator+=(const QGString &) %d:%s\n",this,m_len,m_data?m_data:"")); + return *this; +} + +QGString &QGString::operator+=( const char *str ) +{ + if (!str) return *this; + uint len1 = length(); + uint len2 = qstrlen(str); + uint memSize = ROUND_SIZE(len1 + len2 + 1); + assert(memSize>=len1+len2+1); + char *newData = memSize!=m_memSize ? (char *)realloc( m_data, memSize ) : m_data; + m_memSize = memSize; + if (newData) + { + m_data = newData; + memcpy( m_data + len1, str, len2 + 1 ); + } + m_len+=len2; + DBG_STR(("%p: QGString::operator+=(const char *) %d:%s\n",this,m_len,m_data?m_data:"")); + return *this; +} + +QGString &QGString::operator+=( char c ) +{ + uint len = m_len; + uint memSize = ROUND_SIZE(len+2); + assert(memSize>=len+2); + char *newData = memSize!=m_memSize ? (char *)realloc( m_data, memSize ) : m_data; + m_memSize = memSize; + if (newData) + { + m_data = newData; + m_data[len] = c; + m_data[len+1] = '\0'; + } + m_len++; + DBG_STR(("%p: QGString::operator+=(char s) %d:%s\n",this,m_len,m_data?m_data:"")); + return *this; +} + Index: branches/xZenu/src/util/doxygen/qtools/qdir.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qdir.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qdir.cpp (revision 1322) @@ -0,0 +1,1200 @@ +/**************************************************************************** +** +** +** Implementation of QDir class +** +** Created : 950427 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qglobal.h" + +#include "qdir.h" + +#ifndef QT_NO_DIR +#include "qfileinfo.h" +#include "qfiledefs_p.h" +#include "qregexp.h" +#include "qstringlist.h" +#include +#include + +// NOT REVISED +/*! + \class QDir qdir.h + \brief Traverses directory structures and contents in a + platform-independent way. + + \ingroup io + + A QDir can point to a file using either a relative or an absolute file + path. Absolute file paths begin with the directory separator ('/') or a + drive specification (not applicable to UNIX). Relative file names begin + with a directory name or a file name and specify a path relative to the + current directory. + + An example of an absolute path is the string "/tmp/quartz", a relative + path might look like "src/fatlib". You can use the function isRelative() + to check if a QDir is using a relative or an absolute file path. You can + call the function convertToAbs() to convert a relative QDir to an + absolute one. + + The directory "example" under the current directory is checked for existence + in the example below: + + \code + QDir d( "example" ); // "./example" + if ( !d.exists() ) + qWarning( "Cannot find the example directory" ); + \endcode + + If you always use '/' as a directory separator, Qt will translate your + paths to conform to the underlying operating system. + + cd() and cdUp() can be used to navigate the directory tree. Note that the + logical cd and cdUp operations are not performed if the new directory does + not exist. + + Example: + \code + QDir d = QDir::root(); // "/" + if ( !d.cd("tmp") ) { // "/tmp" + qWarning( "Cannot find the \"/tmp\" directory" ); + } else { + QFile f( d.filePath("ex1.txt") ); // "/tmp/ex1.txt" + if ( !f.open(IO_ReadWrite) ) + qWarning( "Cannot create the file %s", f.name() ); + } + \endcode + + To read the contents of a directory you can use the entryList() and + entryInfoList() functions. + + Example: + \code + #include + #include + + // + // This program scans the current directory and lists all files + // that are not symbolic links, sorted by size with the smallest files + // first. + // + + int main( int argc, char **argv ) + { + QDir d; + d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); + d.setSorting( QDir::Size | QDir::Reversed ); + + const QFileInfoList *list = d.entryInfoList(); + QFileInfoListIterator it( *list ); // create list iterator + QFileInfo *fi; // pointer for traversing + + printf( " BYTES FILENAME\n" ); // print header + while ( (fi=it.current()) ) { // for each file... + printf( "%10li %s\n", fi->size(), fi->fileName().data() ); + ++it; // goto next list element + } + } + \endcode +*/ + + +/*! + Constructs a QDir pointing to the current directory. + \sa currentDirPath() +*/ + +QDir::QDir() +{ + dPath = QString::fromLatin1("."); + init(); +} + +/*! + Constructs a QDir. + + \arg \e path is the directory. + \arg \e nameFilter is the file name filter. + \arg \e sortSpec is the sort specification, which describes how to + sort the files in the directory. + \arg \e filterSpec is the filter specification, which describes how + to filter the files in the directory. + + Most of these arguments (except \e path) have optional values. + + Example: + \code + // lists all files in /tmp + + QDir d( "/tmp" ); + for ( int i=0; i= 0 + || old == QString::fromLatin1(".") + || dirName == QString::fromLatin1("..") ) + dPath = cleanDirPath( dPath ); + } + if ( !exists() ) { + dPath = old; // regret + return FALSE; + } + dirty = TRUE; + return TRUE; +} + +/*! + Changes directory by moving one directory up the path followed to arrive + at the current directory. + + Returns TRUE if the new directory exists and is readable. Note that the + logical cdUp() operation is not performed if the new directory does not + exist. + + \sa cd(), isReadable(), exists(), path() +*/ + +bool QDir::cdUp() +{ + return cd( QString::fromLatin1("..") ); +} + +/*! + \fn QString QDir::nameFilter() const + Returns the string set by setNameFilter() +*/ + +/*! + Sets the name filter used by entryList() and entryInfoList(). + + The name filter is a wildcarding filter that understands "*" and "?" + wildcards, You may specify several filter entries separated by a " " or a ";". If + you want entryList() and entryInfoList() to list all files ending with + ".cpp" and all files ending with ".h", you simply call + dir.setNameFilter("*.cpp *.h") or dir.setNameFilter("*.cpp;*.h") + + \sa nameFilter(), setFilter() +*/ + +void QDir::setNameFilter( const QString &nameFilter ) +{ + nameFilt = nameFilter; + if ( nameFilt.isEmpty() ) + nameFilt = QString::fromLatin1("*"); + dirty = TRUE; +} + +/*! + \fn QDir::FilterSpec QDir::filter() const + Returns the value set by setFilter() +*/ + +/*! \enum QDir::FilterSpec + + This enum describes how QDir is to select what entries in a + directory to return. The filter value is specified by or-ing + together values from the following list:
    + +
  • \c Dirs - List directories only +
  • \c Files - List files only + +
  • \c Drives - List disk drives (does nothing under unix) +
  • \c NoSymLinks - Do not list symbolic links (where they exist) +
  • \c Readable - List files for which the application has read access. +
  • \c Writable - List files for which the application has write access. +
  • \c Executable - List files for which the application has execute access +
  • \c Modified - Only list files that have been modified (does nothing + under unix) +
  • \c Hidden - List hidden files (on unix, files starting with a .) +
  • \c System - List system files (does nothing under unix) +
+ + If you do not set any of \c Readable, \c Writable or \c Executable, + QDir will set all three of them. This makes the default easy to + write and at the same time useful. + + Examples: \c Readable|Writable means list all files for which the + application has read access, write access or both. \c Dirs|Drives + means list drives, directories, all files that the application can + read, write or execute, and also symlinks to such files/directories. +*/ + + +/*! + Sets the filter used by entryList() and entryInfoList(). The filter is used + to specify the kind of files that should be returned by entryList() and + entryInfoList(). + + \sa filter(), setNameFilter() +*/ + +void QDir::setFilter( int filterSpec ) +{ + if ( filtS == (FilterSpec) filterSpec ) + return; + filtS = (FilterSpec) filterSpec; + dirty = TRUE; +} + +/*! + \fn QDir::SortSpec QDir::sorting() const + + Returns the value set by setSorting() + + \sa setSorting() +*/ + +/*! \enum QDir::SortSpec + + This enum describes how QDir is to sort entries in a directory when + it returns a list of them. The sort value is specified by or-ing + together values from the following list:
    + +
  • \c Name - sort by name +
  • \c Time - sort by time (modification time) +
  • \c Size - sort by file size +
  • \c Unsorted - do not sort + +
  • \c DirsFirst - put all directories first in the list +
  • \c Reversed - reverse the sort order +
  • \c IgnoreCase - sort case-insensitively + +
+ + You can only specify one of the first four. If you specify both \c + DirsFirst and \c Reversed, directories are still put first but the + list is otherwise reversed. +*/ + +// ### Unsorted+DirsFirst ? Unsorted+Reversed? + +/*! + Sets the sorting order used by entryList() and entryInfoList(). + + The \e sortSpec is specified by or-ing values from the enum + SortSpec. The different values are: + + One of these: +
+
Name
Sort by name (alphabetical order). +
Time
Sort by time (most recent first). +
Size
Sort by size (largest first). +
Unsorted
Use the operating system order (UNIX does NOT sort + alphabetically). + + ORed with zero or more of these: + +
DirsFirst
Always put directory names first. +
Reversed
Reverse sort order. +
IgnoreCase
Ignore case when sorting by name. +
+*/ + +void QDir::setSorting( int sortSpec ) +{ + if ( sortS == (SortSpec) sortSpec ) + return; + sortS = (SortSpec) sortSpec; + dirty = TRUE; +} + +/*! + \fn bool QDir::matchAllDirs() const + Returns the value set by setMatchAllDirs() + + \sa setMatchAllDirs() +*/ + +/*! + If \e enable is TRUE, all directories will be listed (even if they do not + match the filter or the name filter), otherwise only matched directories + will be listed. + + \bug Currently, directories that do not match the filter will not be + included (the name filter will be ignored as expected). + + \sa matchAllDirs() +*/ + +void QDir::setMatchAllDirs( bool enable ) +{ + if ( (bool)allDirs == enable ) + return; + allDirs = enable; + dirty = TRUE; +} + + +/*! + Returns the number of files that was found. + Equivalent to entryList().count(). + \sa operator[](), entryList() +*/ + +uint QDir::count() const +{ + return entryList().count(); +} + +/*! + Returns the file name at position \e index in the list of found file + names. + Equivalent to entryList().at(index). + + Returns null if the \e index is out of range or if the entryList() + function failed. + + \sa count(), entryList() +*/ + +QString QDir::operator[]( int index ) const +{ + entryList(); + return fList && index >= 0 && index < (int)fList->count() ? + (*fList)[index] : QString::null; +} + + +/*! + This function is included to easy porting from Qt 1.x to Qt 2.0, + it is the same as entryList(), but encodes the filenames as 8-bit + strings using QFile::encodedName(). + + It is more efficient to use entryList(). +*/ +QStrList QDir::encodedEntryList( int filterSpec, int sortSpec ) const +{ + QStrList r; + QStringList l = entryList(filterSpec,sortSpec); + for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) { + r.append( QFile::encodeName(*it) ); + } + return r; +} + +/*! + This function is included to easy porting from Qt 1.x to Qt 2.0, + it is the same as entryList(), but encodes the filenames as 8-bit + strings using QFile::encodedName(). + + It is more efficient to use entryList(). +*/ +QStrList QDir::encodedEntryList( const QString &nameFilter, + int filterSpec, + int sortSpec ) const +{ + QStrList r; + QStringList l = entryList(nameFilter,filterSpec,sortSpec); + for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) { + r.append( QFile::encodeName(*it) ); + } + return r; +} + + + +/*! + Returns a list of the names of all files and directories in the directory + indicated by the setSorting(), setFilter() and setNameFilter() + specifications. + + The the filter and sorting specifications can be overridden using the + \e filterSpec and \e sortSpec arguments. + + Returns an empty list if the directory is unreadable or does not exist. + + \sa entryInfoList(), setNameFilter(), setSorting(), setFilter(), + encodedEntryList() +*/ + +QStringList QDir::entryList( int filterSpec, int sortSpec ) const +{ + if ( !dirty && filterSpec == (int)DefaultFilter && + sortSpec == (int)DefaultSort ) + return *fList; + return entryList( nameFilt, filterSpec, sortSpec ); +} + +/*! + Returns a list of the names of all files and directories in the directory + indicated by the setSorting(), setFilter() and setNameFilter() + specifications. + + The the filter and sorting specifications can be overridden using the + \e nameFilter, \e filterSpec and \e sortSpec arguments. + + Returns and empty list if the directory is unreadable or does not exist. + + \sa entryInfoList(), setNameFilter(), setSorting(), setFilter(), + encodedEntryList() +*/ + +QStringList QDir::entryList( const QString &nameFilter, + int filterSpec, int sortSpec ) const +{ + if ( filterSpec == (int)DefaultFilter ) + filterSpec = filtS; + if ( sortSpec == (int)DefaultSort ) + sortSpec = sortS; + QDir *that = (QDir*)this; // mutable function + if ( that->readDirEntries(nameFilter, filterSpec, sortSpec) ) + return *that->fList; + else + return QStringList(); +} + +/*! + Returns a list of QFileInfo objects for all files and directories in + the directory pointed to using the setSorting(), setFilter() and + setNameFilter() specifications. + + The the filter and sorting specifications can be overridden using the + \e filterSpec and \e sortSpec arguments. + + Returns 0 if the directory is unreadable or does not exist. + + The returned pointer is a const pointer to a QFileInfoList. The list is + owned by the QDir object and will be reused on the next call to + entryInfoList() for the same QDir instance. If you want to keep the + entries of the list after a subsequent call to this function you will + need to copy them. + + \sa entryList(), setNameFilter(), setSorting(), setFilter() +*/ + +const QFileInfoList *QDir::entryInfoList( int filterSpec, int sortSpec ) const +{ + if ( !dirty && filterSpec == (int)DefaultFilter && + sortSpec == (int)DefaultSort ) + return fiList; + return entryInfoList( nameFilt, filterSpec, sortSpec ); +} + +/*! + Returns a list of QFileInfo objects for all files and directories in + the directory pointed to using the setSorting(), setFilter() and + setNameFilter() specifications. + + The the filter and sorting specifications can be overridden using the + \e nameFilter, \e filterSpec and \e sortSpec arguments. + + Returns 0 if the directory is unreadable or does not exist. + + The returned pointer is a const pointer to a QFileInfoList. The list is + owned by the QDir object and will be reused on the next call to + entryInfoList() for the same QDir instance. If you want to keep the + entries of the list after a subsequent call to this function you will + need to copy them. + + \sa entryList(), setNameFilter(), setSorting(), setFilter() +*/ + +const QFileInfoList *QDir::entryInfoList( const QString &nameFilter, + int filterSpec, int sortSpec ) const +{ + if ( filterSpec == (int)DefaultFilter ) + filterSpec = filtS; + if ( sortSpec == (int)DefaultSort ) + sortSpec = sortS; + QDir *that = (QDir*)this; // mutable function + if ( that->readDirEntries(nameFilter, filterSpec, sortSpec) ) + return that->fiList; + else + return 0; +} + +/*! + Returns TRUE if the directory exists. (If a file with the same + name is found this function will of course return FALSE). + + \sa QFileInfo::exists(), QFile::exists() +*/ + +bool QDir::exists() const +{ + QFileInfo fi( dPath ); + return fi.exists() && fi.isDir(); +} + +/*! + Returns TRUE if the directory path is relative to the current directory, + FALSE if the path is absolute (e.g. under UNIX a path is relative if it + does not start with a '/'). + + According to Einstein this function should always return TRUE. + + \sa convertToAbs() +*/ + +bool QDir::isRelative() const +{ + return isRelativePath( dPath ); +} + +/*! + Converts the directory path to an absolute path. If it is already + absolute nothing is done. + + \sa isRelative() +*/ + +void QDir::convertToAbs() +{ + dPath = absPath(); +} + +/*! + Makes a copy of d and assigns it to this QDir. +*/ + +QDir &QDir::operator=( const QDir &d ) +{ + dPath = d.dPath; + delete fList; + fList = 0; + delete fiList; + fiList = 0; + nameFilt = d.nameFilt; + dirty = TRUE; + allDirs = d.allDirs; + filtS = d.filtS; + sortS = d.sortS; + return *this; +} + +/*! + Sets the directory path to be the given path. +*/ + +QDir &QDir::operator=( const QString &path ) +{ + dPath = cleanDirPath( path ); + dirty = TRUE; + return *this; +} + + +/*! + \fn bool QDir::operator!=( const QDir &d ) const + Returns TRUE if the \e d and this dir have different path or + different sort/filter settings, otherwise FALSE. +*/ + +/*! + Returns TRUE if the \e d and this dir have the same path and all sort + and filter settings are equal, otherwise FALSE. +*/ + +bool QDir::operator==( const QDir &d ) const +{ + return dPath == d.dPath && + nameFilt == d.nameFilt && + allDirs == d.allDirs && + filtS == d.filtS && + sortS == d.sortS; +} + + +/*! + Removes a file. + + If \e acceptAbsPath is TRUE a path starting with a separator ('/') + will remove the file with the absolute path, if \e acceptAbsPath is FALSE + any number of separators at the beginning of \e fileName will be removed. + + Returns TRUE if successful, otherwise FALSE. +*/ + +bool QDir::remove( const QString &fileName, bool acceptAbsPath ) +{ + if ( fileName.isEmpty() ) { +#if defined(CHECK_NULL) + qWarning( "QDir::remove: Empty or null file name" ); +#endif + return FALSE; + } + QString p = filePath( fileName, acceptAbsPath ); + return QFile::remove( p ); +} + +/*! + Checks for existence of a file. + + If \e acceptAbsPaths is TRUE a path starting with a separator ('/') + will check the file with the absolute path, if \e acceptAbsPath is FALSE + any number of separators at the beginning of \e name will be removed. + + Returns TRUE if the file exists, otherwise FALSE. + + \sa QFileInfo::exists(), QFile::exists() +*/ + +bool QDir::exists( const QString &name, bool acceptAbsPath ) +{ + if ( name.isEmpty() ) { +#if defined(CHECK_NULL) + qWarning( "QDir::exists: Empty or null file name" ); +#endif + return FALSE; + } + QString tmp = filePath( name, acceptAbsPath ); + return QFile::exists( tmp ); +} + +/*! + Returns the native directory separator; '/' under UNIX and '\' under + MS-DOS, Windows NT and OS/2. + + You do not need to use this function to build file paths. If you always + use '/', Qt will translate your paths to conform to the underlying + operating system. +*/ + +char QDir::separator() +{ +#if defined(_OS_UNIX_) + return '/'; +#elif defined (_OS_FATFS_) + return '\\'; +#elif defined (_OS_MAC_) + return ':'; +#else + return '/'; +#endif +} + +/*! + Returns the current directory. + \sa currentDirPath(), QDir::QDir() +*/ + +QDir QDir::current() +{ + return QDir( currentDirPath() ); +} + +/*! + Returns the home directory. + \sa homeDirPath() +*/ + +QDir QDir::home() +{ + return QDir( homeDirPath() ); +} + +/*! + Returns the root directory. + \sa rootDirPath() drives() +*/ + +QDir QDir::root() +{ + return QDir( rootDirPath() ); +} + +/*! + \fn QString QDir::homeDirPath() + + Returns the absolute path for the user's home directory, + \sa home() +*/ + +QStringList qt_makeFilterList( const QString &filter ) +{ + if ( filter.isEmpty() ) + return QStringList(); + + QChar sep( ';' ); + int i = filter.find( sep, 0 ); + if ( i == -1 && filter.find( ' ', 0 ) != -1 ) + sep = QChar( ' ' ); + + QStringList lst = QStringList::split( sep, filter ); + QStringList lst2; + QStringList::Iterator it = lst.begin(); + + for ( ; it != lst.end(); ++it ) { + QString s = *it; + lst2 << s.stripWhiteSpace(); + } + return lst2; +} + +/*! + Returns TRUE if the \e fileName matches one of the wildcards in the list \e filters. + \sa QRegExp +*/ + +bool QDir::match( const QStringList &filters, const QString &fileName ) +{ + QStringList::ConstIterator sit = filters.begin(); + bool matched = FALSE; + for ( ; sit != filters.end(); ++sit ) { + QRegExp regexp( (*sit).data(), FALSE, TRUE ); + if ( regexp.match( fileName.data() ) != -1 ) { + matched = TRUE; + break; + } + } + + return matched; +} + +/*! + Returns TRUE if the \e fileName matches the wildcard \e filter. + \a Filter may also contain multiple wildcards separated by spaces or + semicolons. + \sa QRegExp +*/ + +bool QDir::match( const QString &filter, const QString &fileName ) +{ + QStringList lst = qt_makeFilterList( filter ); + return match( lst, fileName ); +} + + +/*! + Removes all multiple directory separators ('/') and resolves + any "." or ".." found in the path. + + Symbolic links are kept. This function does not return the + canonical path, but rather the most simplified version of the input. + "../stuff" becomes "stuff", "stuff/../nonsense" becomes "nonsense" + and "\\stuff\\more\\..\\nonsense" becomes "\\stuff\\nonsense". + + \sa absPath() canonicalPath() +*/ + +QString QDir::cleanDirPath( const QString &filePath ) +{ + QString name = filePath; + QString newPath; + + if ( name.isEmpty() ) + return name; + + slashify( name ); + + bool addedSeparator; + if ( isRelativePath(name) ) { + addedSeparator = TRUE; + name.insert( 0, '/' ); + } else { + addedSeparator = FALSE; + } + + int ePos, pos, upLevel; + + pos = ePos = name.length(); + upLevel = 0; + int len; + + while ( pos && (pos = name.findRev('/',--pos)) != -1 ) { + len = ePos - pos - 1; + if ( len == 2 && name.at(pos + 1) == '.' + && name.at(pos + 2) == '.' ) { + upLevel++; + } else { + if ( len != 0 && (len != 1 || name.at(pos + 1) != '.') ) { + if ( !upLevel ) + newPath = QString::fromLatin1("/") + + name.mid(pos + 1, len) + newPath; + else + upLevel--; + } + } + ePos = pos; + } + if ( addedSeparator ) { + while ( upLevel-- ) + newPath.insert( 0, QString::fromLatin1("/..") ); + if ( !newPath.isEmpty() ) + newPath.remove( 0, 1 ); + else + newPath = QString::fromLatin1("."); + } else { + if ( newPath.isEmpty() ) + newPath = QString::fromLatin1("/"); +#if defined(_OS_FATFS_) || defined(_OS_OS2EMX_) + if ( name[0] == '/' ) { + if ( name[1] == '/' ) // "\\machine\x\ ..." + newPath.insert( 0, '/' ); + } else { + newPath = name.left(2) + newPath; + } +#endif + } + return newPath; +} + +int qt_cmp_si_sortSpec; + +#if defined(Q_C_CALLBACKS) +extern "C" { +#endif + +int qt_cmp_si( const void *n1, const void *n2 ) +{ + if ( !n1 || !n2 ) + return 0; + + QDirSortItem* f1 = (QDirSortItem*)n1; + QDirSortItem* f2 = (QDirSortItem*)n2; + + if ( qt_cmp_si_sortSpec & QDir::DirsFirst ) + if ( f1->item->isDir() != f2->item->isDir() ) + return f1->item->isDir() ? -1 : 1; + + int r = 0; + int sortBy = qt_cmp_si_sortSpec & QDir::SortByMask; + + switch ( sortBy ) { + case QDir::Time: + r = f1->item->lastModified().secsTo(f2->item->lastModified()); + break; + case QDir::Size: + r = f2->item->size() - f1->item->size(); + break; + default: + ; + } + + if ( r == 0 && sortBy != QDir::Unsorted ) { + // Still not sorted - sort by name + bool ic = qt_cmp_si_sortSpec & QDir::IgnoreCase; + + if ( f1->filename_cache.isNull() ) + f1->filename_cache = ic ? f1->item->fileName().lower() + : f1->item->fileName(); + if ( f2->filename_cache.isNull() ) + f2->filename_cache = ic ? f2->item->fileName().lower() + : f2->item->fileName(); + + r = f1->filename_cache.compare(f2->filename_cache); + } + + if ( r == 0 ) { + // Enforce an order - the order the items appear in the array + r = (char*)n1 - (char*)n2; + } + + if ( qt_cmp_si_sortSpec & QDir::Reversed ) + return -r; + else + return r; +} + +#if defined(Q_C_CALLBACKS) +} +#endif + +#endif // QT_NO_DIR Index: branches/xZenu/src/util/doxygen/qtools/qtools.pro =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qtools.pro (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qtools.pro (revision 1322) @@ -0,0 +1,107 @@ +# +# This file was generated from qtools.pro.in on Mon Mar 28 15:09:00 CEST 2011 +# + +TEMPLATE = lib +CONFIG = warn_on staticlib debug +HEADERS = qarray.h \ + qbuffer.h \ + qcache.h \ + qgcache.h \ + qcollection.h \ + qconfig.h \ + qcstring.h \ + scstring.h \ + qdatastream.h \ + qdatetime.h \ + qdict.h \ + qdir.h \ + qfeatures.h \ + qfile.h \ + qfiledefs_p.h \ + qfileinfo.h \ + qgarray.h \ + qfeatures.h \ + qgdict.h \ + qgeneric.h \ + qglist.h \ + qglobal.h \ + qgstring.h \ + qgvector.h \ + qintdict.h \ + qiodevice.h \ + qlist.h \ + qptrdict.h \ + qqueue.h \ + qregexp.h \ + qshared.h \ + qsortedlist.h \ + qstack.h \ + qstring.h \ + qstringlist.h \ + qstrlist.h \ + qstrvec.h \ + qtextstream.h \ + qtl.h \ + qvaluelist.h \ + qvector.h \ + qxml.h \ + qvaluestack.h \ + qmap.h \ + qmodules.h \ + qthread.h \ + qthread_p.h \ + qmutex.h \ + qmutex_p.h \ + qutfcodec.h \ + qwaitcondition.h + +SOURCES = qbuffer.cpp \ + qcollection.cpp \ + scstring.cpp \ + qdatastream.cpp \ + qdatetime.cpp \ + qdir.cpp \ + qfile.cpp \ + qfileinfo.cpp \ + qgarray.cpp \ + qgcache.cpp \ + qgdict.cpp \ + qglist.cpp \ + qglobal.cpp \ + qgstring.cpp \ + qgvector.cpp \ + qiodevice.cpp \ + qregexp.cpp \ + qstring.cpp \ + qtextstream.cpp \ + qtextcodec.cpp \ + qstringlist.cpp \ + qxml.cpp \ + qmap.cpp \ + qthread.cpp \ + qmutex.cpp \ + qutfcodec.cpp + +unix:SOURCES += qfile_unix.cpp \ + qdir_unix.cpp \ + qfileinfo_unix.cpp \ + qthread_unix.cpp \ + qmutex_unix.cpp \ + qwaitcondition_unix.cpp + +win32:SOURCES += qfile_win32.cpp \ + qdir_win32.cpp \ + qfileinfo_win32.cpp \ + qthread_win32.cpp \ + qmutex_win32.cpp \ + qwaitcondition_win32.cpp + +INCLUDEPATH = . +#TMAKE_CXXFLAGS += -DQT_NO_CODECS -DQT_LITE_UNICODE +TMAKE_CXXFLAGS += -DQT_LITE_UNICODE +win32:TMAKE_CXXFLAGS += -DQT_NODLL +win32-g++:TMAKE_CXXFLAGS += -D__CYGWIN__ -DALL_STATIC +OBJECTS_DIR = ../objects +DESTDIR = ../lib +TMAKE_MOC = /usr/bin/moc Index: branches/xZenu/src/util/doxygen/qtools/qwaitcondition_unix.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qwaitcondition_unix.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qwaitcondition_unix.cpp (revision 1322) @@ -0,0 +1,133 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qwaitcondition.h" +#include "qmutex.h" +#include + +#define MIN(a,b) ((a)<(b)?(a):(b)) + +static void report_error(int code, const char *where, const char *what) +{ + if (code != 0) + qWarning("%s: %s failure: %d", where, what, code); +} + +struct QWaitConditionPrivate +{ + pthread_mutex_t mutex; + pthread_cond_t cond; + int waiters; + int wakeups; + + void wait() + { + int code; + for (;;) + { + code = pthread_cond_wait(&cond, &mutex); + if (code == 0 && wakeups == 0) + { + // many vendors warn of spurios wakeups from + // pthread_cond_wait(), especially after signal delivery, + // even though POSIX doesn't allow for it... sigh + continue; + } + break; + } + + --waiters; + if (code == 0) + { + --wakeups; + } + else + { + report_error(code, "QWaitCondition::wait()", "cv wait"); + } + report_error(pthread_mutex_unlock(&mutex), "QWaitCondition::wait()", "mutex unlock"); + } +}; + + +QWaitCondition::QWaitCondition() +{ + d = new QWaitConditionPrivate; + report_error(pthread_mutex_init(&d->mutex, NULL), "QWaitCondition", "mutex init"); + report_error(pthread_cond_init(&d->cond, NULL), "QWaitCondition", "cv init"); + d->waiters = d->wakeups = 0; +} + + +QWaitCondition::~QWaitCondition() +{ + report_error(pthread_cond_destroy(&d->cond), "QWaitCondition", "cv destroy"); + report_error(pthread_mutex_destroy(&d->mutex), "QWaitCondition", "mutex destroy"); + delete d; +} + +void QWaitCondition::wakeOne() +{ + report_error(pthread_mutex_lock(&d->mutex), "QWaitCondition::wakeOne()", "mutex lock"); + d->wakeups = MIN(d->wakeups + 1, d->waiters); + report_error(pthread_cond_signal(&d->cond), "QWaitCondition::wakeOne()", "cv signal"); + report_error(pthread_mutex_unlock(&d->mutex), "QWaitCondition::wakeOne()", "mutex unlock"); +} + +void QWaitCondition::wakeAll() +{ + report_error(pthread_mutex_lock(&d->mutex), "QWaitCondition::wakeAll()", "mutex lock"); + d->wakeups = d->waiters; + report_error(pthread_cond_broadcast(&d->cond), "QWaitCondition::wakeAll()", "cv broadcast"); + report_error(pthread_mutex_unlock(&d->mutex), "QWaitCondition::wakeAll()", "mutex unlock"); +} + +void QWaitCondition::wait(QMutex *mutex) +{ + if (!mutex) return; + + report_error(pthread_mutex_lock(&d->mutex), "QWaitCondition::wait()", "mutex lock"); + ++d->waiters; + mutex->unlock(); + d->wait(); + mutex->lock(); +} + Index: branches/xZenu/src/util/doxygen/qtools/qtools.pro.in =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qtools.pro.in (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qtools.pro.in (revision 1322) @@ -0,0 +1,102 @@ +TEMPLATE = lib +CONFIG = warn_on staticlib $extraopts +HEADERS = qarray.h \ + qbuffer.h \ + qcache.h \ + qgcache.h \ + qcollection.h \ + qconfig.h \ + qcstring.h \ + scstring.h \ + qdatastream.h \ + qdatetime.h \ + qdict.h \ + qdir.h \ + qfeatures.h \ + qfile.h \ + qfiledefs_p.h \ + qfileinfo.h \ + qgarray.h \ + qfeatures.h \ + qgdict.h \ + qgeneric.h \ + qglist.h \ + qglobal.h \ + qgstring.h \ + qgvector.h \ + qintdict.h \ + qiodevice.h \ + qlist.h \ + qptrdict.h \ + qqueue.h \ + qregexp.h \ + qshared.h \ + qsortedlist.h \ + qstack.h \ + qstring.h \ + qstringlist.h \ + qstrlist.h \ + qstrvec.h \ + qtextstream.h \ + qtl.h \ + qvaluelist.h \ + qvector.h \ + qxml.h \ + qvaluestack.h \ + qmap.h \ + qmodules.h \ + qthread.h \ + qthread_p.h \ + qmutex.h \ + qmutex_p.h \ + qutfcodec.h \ + qwaitcondition.h + +SOURCES = qbuffer.cpp \ + qcollection.cpp \ + scstring.cpp \ + qdatastream.cpp \ + qdatetime.cpp \ + qdir.cpp \ + qfile.cpp \ + qfileinfo.cpp \ + qgarray.cpp \ + qgcache.cpp \ + qgdict.cpp \ + qglist.cpp \ + qglobal.cpp \ + qgstring.cpp \ + qgvector.cpp \ + qiodevice.cpp \ + qregexp.cpp \ + qstring.cpp \ + qtextstream.cpp \ + qtextcodec.cpp \ + qstringlist.cpp \ + qxml.cpp \ + qmap.cpp \ + qthread.cpp \ + qmutex.cpp \ + qutfcodec.cpp + +unix:SOURCES += qfile_unix.cpp \ + qdir_unix.cpp \ + qfileinfo_unix.cpp \ + qthread_unix.cpp \ + qmutex_unix.cpp \ + qwaitcondition_unix.cpp + +win32:SOURCES += qfile_win32.cpp \ + qdir_win32.cpp \ + qfileinfo_win32.cpp \ + qthread_win32.cpp \ + qmutex_win32.cpp \ + qwaitcondition_win32.cpp + +INCLUDEPATH = . +#TMAKE_CXXFLAGS += -DQT_NO_CODECS -DQT_LITE_UNICODE +TMAKE_CXXFLAGS += -DQT_LITE_UNICODE +win32:TMAKE_CXXFLAGS += -DQT_NODLL +win32-g++:TMAKE_CXXFLAGS += -D__CYGWIN__ -DALL_STATIC +OBJECTS_DIR = ../objects +DESTDIR = ../lib Index: branches/xZenu/src/util/doxygen/qtools/qtl.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qtl.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qtl.h (revision 1322) @@ -0,0 +1,223 @@ +/**************************************************************************** +** +** +** Definition of Qt template library classes +** +** Created : 990128 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ +#ifndef QTL_H +#define QTL_H + +#ifndef QT_H +#include "qtextstream.h" +#include "qstring.h" +#endif // QT_H + +#ifndef QT_NO_TEXTSTREAM +template +class QTextOStreamIterator +{ +protected: + QTextOStream& stream; + QString separator; + +public: + QTextOStreamIterator( QTextOStream& s) : stream( s ) {} + QTextOStreamIterator( QTextOStream& s, const QString& sep ) + : stream( s ), separator( sep ) {} + QTextOStreamIterator& operator= ( const T& x ) { + stream << x; + if ( !separator.isEmpty() ) + stream << separator; + return *this; + } + QTextOStreamIterator& operator*() { return *this; } + QTextOStreamIterator& operator++() { return *this; } + QTextOStreamIterator& operator++(int) { return *this; } +}; +#endif //QT_NO_TEXTSTREAM + +template +inline OutputIterator qCopy( InputIterator _begin, InputIterator _end, + OutputIterator _dest ) +{ + while( _begin != _end ) + *_dest++ = *_begin++; + return _dest; +} + + +template +inline void qSwap( T& _value1, T& _value2 ) +{ + T tmp = _value1; + _value1 = _value2; + _value2 = tmp; +} + + +template +inline void qBubbleSort( InputIterator b, InputIterator e ) +{ + // Goto last element; + InputIterator last = e; + --last; + // only one element or no elements ? + if ( last == b ) + return; + + // So we have at least two elements in here + while( b != last ) { + bool swapped = FALSE; + InputIterator swap_pos = b; + InputIterator x = e; + InputIterator y = x; + y--; + do { + --x; + --y; + if ( *x < *y ) { + swapped = TRUE; + qSwap( *x, *y ); + swap_pos = y; + } + } while( y != b ); + if ( !swapped ) + return; + b = swap_pos; + b++; + } +} + + +template +inline void qBubbleSort( Container &c ) +{ + qBubbleSort( c.begin(), c.end() ); +} + + +template +inline void qHeapSortPushDown( Value* heap, int first, int last ) +{ + int r = first; + while( r <= last/2 ) { + // Node r has only one child ? + if ( last == 2*r ) { + // Need for swapping ? + if ( heap[r] > heap[ 2*r ] ) + qSwap( heap[r], heap[ 2*r ] ); + // That's it ... + r = last; + } else { // Node has two children + if ( heap[r] > heap[ 2*r ] && heap[ 2*r ] <= heap[ 2*r+1 ] ) { + // Swap with left child + qSwap( heap[r], heap[ 2*r ] ); + r *= 2; + } else if ( heap[r] > heap[ 2*r+1 ] && + heap[ 2*r+1 ] < heap[ 2*r ] ) { + // Swap with right child + qSwap( heap[r], heap[ 2*r+1 ] ); + r = 2*r+1; + } else { + // We are done + r = last; + } + } + } +} + + +template +inline void qHeapSortHelper( InputIterator b, InputIterator e, Value, uint n ) +{ + // Create the heap + InputIterator insert = b; + Value* realheap = new Value[ n ]; + // Wow, what a fake. But I want the heap to be indexed as 1...n + Value* heap = realheap - 1; + int size = 0; + for( ; insert != e; ++insert ) { + heap[++size] = *insert; + int i = size; + while( i > 1 && heap[i] < heap[ i / 2 ] ) { + qSwap( heap[i], heap[ i / 2 ] ); + i /= 2; + } + } + + // Now do the sorting + for( uint i = n; i > 0; i-- ) { + *b++ = heap[1]; + if ( i > 1 ) { + heap[1] = heap[i]; + qHeapSortPushDown( heap, 1, (int)i - 1 ); + } + } + + delete[] realheap; +} + + +template +inline void qHeapSort( InputIterator b, InputIterator e ) +{ + // Empty ? + if ( b == e ) + return; + + // How many entries have to be sorted ? + InputIterator it = b; + uint n = 0; + while ( it != e ) { + ++n; + ++it; + } + + // The second last parameter is a hack to retrieve the value type + // Do the real sorting here + qHeapSortHelper( b, e, *b, n ); +} + + +template +inline void qHeapSort( Container &c ) +{ + if ( c.isEmpty() ) + return; + + // The second last parameter is a hack to retrieve the value type + // Do the real sorting here + qHeapSortHelper( c.begin(), c.end(), *(c.begin()), c.count() ); +} + +#endif Index: branches/xZenu/src/util/doxygen/qtools/qfile.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qfile.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qfile.h (revision 1322) @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** +** Definition of QFile class +** +** Created : 930831 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QFILE_H +#define QFILE_H + +#ifndef QT_H +#include "qiodevice.h" +#include "qstring.h" +#include +#endif // QT_H + +class QDir; + + +class Q_EXPORT QFile : public QIODevice // file I/O device class +{ +public: + QFile(); + QFile( const QString &name ); + virtual ~QFile(); + + QString name() const; + void setName( const QString &name ); + + typedef QCString (*EncoderFn)( const QString &fileName ); + typedef QString (*DecoderFn)( const QCString &localfileName ); + static QCString encodeName( const QString &fileName ); + static QString decodeName( const QCString &localFileName ); + static void setEncodingFunction( EncoderFn ); + static void setDecodingFunction( DecoderFn ); + + bool exists() const; + static bool exists( const QString &fileName ); + + bool remove(); + static bool remove( const QString &fileName ); + + bool open( int ); + bool open( int, FILE * ); + bool open( int, int ); + void close(); + void flush(); + + uint size() const; + int at() const; + bool at( int ); + bool atEnd() const; + + int readBlock( char *data, uint len ); + int writeBlock( const char *data, uint len ); + int writeBlock( const QByteArray& data ) + { return QIODevice::writeBlock(data); } + int readLine( char *data, uint maxlen ); + int readLine( QString &, uint maxlen ); + + int getch(); + int putch( int ); + int ungetch( int ); + + int handle() const; + + int64 pos() const; + int64 toEnd(); + bool seek(int64 pos); + +protected: + QString fn; + FILE *fh; + int fd; + int length; + bool ext_f; + void * d; + +private: + void init(); + QCString ungetchBuffer; + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + QFile( const QFile & ); + QFile &operator=( const QFile & ); +#endif +}; + + +inline QString QFile::name() const +{ return fn; } + +inline int QFile::at() const +{ return ioIndex; } + + +#endif // QFILE_H Index: branches/xZenu/src/util/doxygen/qtools/qglist.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qglist.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qglist.h (revision 1322) @@ -0,0 +1,257 @@ +/**************************************************************************** +** +** +** Definition of QGList and QGListIterator classes +** +** Created : 920624 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QGLIST_H +#define QGLIST_H + +#ifndef QT_H +#include "qcollection.h" +#endif // QT_H + + +/***************************************************************************** + QLNode class (internal doubly linked list node) + *****************************************************************************/ + +class Q_EXPORT QLNode +{ +friend class QGList; +friend class QGListIterator; +public: + QCollection::Item getData() { return data; } +private: + QCollection::Item data; + QLNode *prev; + QLNode *next; + QLNode( QCollection::Item d ) { data = d; } +}; + + +/***************************************************************************** + QGList class + *****************************************************************************/ + +class Q_EXPORT QGList : public QCollection // doubly linked generic list +{ +friend class QGListIterator; +friend class QGVector; // needed by QGVector::toList +public: + uint count() const; // return number of nodes + +#ifndef QT_NO_DATASTREAM + QDataStream &read( QDataStream & ); // read list from stream + QDataStream &write( QDataStream & ) const; // write list to stream +#endif +protected: + QGList(); // create empty list + QGList( const QGList & ); // make copy of other list + virtual ~QGList(); + + QGList &operator=( const QGList & ); // assign from other list + bool operator==( const QGList& ) const; + + void inSort( QCollection::Item ); // add item sorted in list + void append( QCollection::Item ); // add item at end of list + bool insertAt( uint index, QCollection::Item ); // add item at i'th position + void relinkNode( QLNode * ); // relink as first item + bool removeNode( QLNode * ); // remove node + bool remove( QCollection::Item = 0 ); // remove item (0=current) + bool removeRef( QCollection::Item = 0 ); // remove item (0=current) + bool removeFirst(); // remove first item + bool removeLast(); // remove last item + bool removeAt( uint index ); // remove item at i'th position + QCollection::Item takeNode( QLNode * ); // take out node + QCollection::Item take(); // take out current item + QCollection::Item takeAt( uint index ); // take out item at i'th pos + QCollection::Item takeFirst(); // take out first item + QCollection::Item takeLast(); // take out last item + + void sort(); // sort all items; + void clear(); // remove all items + + int findRef( QCollection::Item, bool = TRUE ); // find exact item in list + int find( QCollection::Item, bool = TRUE ); // find equal item in list + + uint containsRef( QCollection::Item ) const; // get number of exact matches + uint contains( QCollection::Item ) const; // get number of equal matches + + QCollection::Item at( uint index ); // access item at i'th pos + int at() const; // get current index + QLNode *currentNode() const; // get current node + + QCollection::Item get() const; // get current item + + QCollection::Item cfirst() const; // get ptr to first list item + QCollection::Item clast() const; // get ptr to last list item + QCollection::Item first(); // set first item in list curr + QCollection::Item last(); // set last item in list curr + QCollection::Item next(); // set next item in list curr + QCollection::Item prev(); // set prev item in list curr + + void toVector( QGVector * ) const; // put items in vector + + virtual int compareItems( QCollection::Item, QCollection::Item ); + +#ifndef QT_NO_DATASTREAM + virtual QDataStream &read( QDataStream &, QCollection::Item & ); + virtual QDataStream &write( QDataStream &, QCollection::Item ) const; +#endif +private: + void prepend( QCollection::Item ); // add item at start of list + + void heapSortPushDown( QCollection::Item* heap, int first, int last ); + + QLNode *firstNode; // first node + QLNode *lastNode; // last node + QLNode *curNode; // current node + int curIndex; // current index + uint numNodes; // number of nodes + QGList *iterators; // list of iterators + + QLNode *locate( uint ); // get node at i'th pos + QLNode *unlink(); // unlink node +}; + + +inline uint QGList::count() const +{ + return numNodes; +} + +inline bool QGList::removeFirst() +{ + first(); + return remove(); +} + +inline bool QGList::removeLast() +{ + last(); + return remove(); +} + +inline int QGList::at() const +{ + return curIndex; +} + +inline QCollection::Item QGList::at( uint index ) +{ + QLNode *n = locate( index ); + return n ? n->data : 0; +} + +inline QLNode *QGList::currentNode() const +{ + return curNode; +} + +inline QCollection::Item QGList::get() const +{ + return curNode ? curNode->data : 0; +} + +inline QCollection::Item QGList::cfirst() const +{ + return firstNode ? firstNode->data : 0; +} + +inline QCollection::Item QGList::clast() const +{ + return lastNode ? lastNode->data : 0; +} + + +/***************************************************************************** + QGList stream functions + *****************************************************************************/ + +#ifndef QT_NO_DATASTREAM +Q_EXPORT QDataStream &operator>>( QDataStream &, QGList & ); +Q_EXPORT QDataStream &operator<<( QDataStream &, const QGList & ); +#endif + +/***************************************************************************** + QGListIterator class + *****************************************************************************/ + +class Q_EXPORT QGListIterator // QGList iterator +{ +friend class QGList; +protected: + QGListIterator( const QGList & ); + QGListIterator( const QGListIterator & ); + QGListIterator &operator=( const QGListIterator & ); + ~QGListIterator(); + + bool atFirst() const; // test if at first item + bool atLast() const; // test if at last item + QCollection::Item toFirst(); // move to first item + QCollection::Item toLast(); // move to last item + + QCollection::Item get() const; // get current item + QCollection::Item operator()(); // get current and move to next + QCollection::Item operator++(); // move to next item (prefix) + QCollection::Item operator+=(uint); // move n positions forward + QCollection::Item operator--(); // move to prev item (prefix) + QCollection::Item operator-=(uint); // move n positions backward + +protected: + QGList *list; // reference to list + +private: + QLNode *curNode; // current node in list +}; + + +inline bool QGListIterator::atFirst() const +{ + return curNode == list->firstNode; +} + +inline bool QGListIterator::atLast() const +{ + return curNode == list->lastNode; +} + +inline QCollection::Item QGListIterator::get() const +{ + return curNode ? curNode->data : 0; +} + + +#endif // QGLIST_H Index: branches/xZenu/src/util/doxygen/qtools/qiodevice.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qiodevice.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qiodevice.cpp (revision 1322) @@ -0,0 +1,638 @@ +/**************************************************************************** +** +** +** Implementation of QIODevice class +** +** Created : 940913 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qiodevice.h" + +// NOT REVISED +/*! + \class QIODevice qiodevice.h + + \brief The QIODevice class is the base class of I/O devices. + + \ingroup io + + An I/O device represents a medium that one can read bytes from + and/or write bytes to. The QIODevice class is the abstract + superclass of all such devices; classes like QFile, QBuffer and + QSocket inherit QIODevice and implement virtual functions like + write() appropriately. + + While applications sometimes use QIODevice directly, mostly it is + better to go through QTextStream and QDataStream, which provide + stream operations on any QIODevice subclass. QTextStream provides + text-oriented stream functionality (for human-readable ASCII files, + for example), while QDataStream deals with binary data in a totally + platform-independent manner. + + The public member functions in QIODevice roughly fall into two + groups: The action functions and the state access functions. The + most important action functions are:
    + +
  • open() opens a device for reading and/or writing, depending on + the argument to open(). + +
  • close() closes the device and tidies up. + +
  • readBlock() reads a block of data from the device. + +
  • writeBlock() writes a block of data to the device. + +
  • readLine() reads a line (of text, usually) from the device. + +
  • flush() ensures that all buffered data are written to the real device. + +
There are also some other, less used, action functions:
    + +
  • getch() reads a single character. + +
  • ungetch() forgets the last call to getch(), if possible. + +
  • putch() writes a single character. + +
  • size() returns the size of the device, if there is one. + +
  • at() returns the current read/write pointer, if there is one + for this device, or it moves the pointer. + +
  • atEnd() says whether there is more to read, if that is a + meaningful question for this device. + +
  • reset() moves the read/write pointer to the start of the + device, if that is possible for this device. + +
The state access are all "get" functions. The QIODevice subclass + calls setState() to update the state, and simple access functions + tell the user of the device what the device's state is. Here are + the settings, and their associated access functions:
    + +
  • Access type. Some devices are direct access (it is possible to + read/write anywhere) while others are sequential. QIODevice + provides the access functions isDirectAccess(), isSequentialAccess() + and isCombinedAccess() to tell users what a given I/O device + supports. + +
  • Buffering. Some devices are accessed in raw mode while others + are buffered. Buffering usually provides greater efficiency, + particularly for small read/write operations. isBuffered() tells + the user whether a given device is buffered. (This can often be set + by the application in the call to open().) + +
  • Synchronicity. Synchronous devices work there and then, for + example files. When you read from a file, the file delivers its + data right away. Others, such as a socket connected to a HTTP + server, may not deliver the data until seconds after you ask to read + it. isSynchronous() and isAsynchronous() tells the user how this + device operates. + +
  • CR/LF translation. For simplicity, applications often like to + see just a single CR/LF style, and QIODevice subclasses can provide + that. isTranslated() returns TRUE if this object translates CR/LF + to just LF. (This can often be set by the application in the call + to open().) + +
  • Accessibility. Some files cannot be written, for example. + isReadable(), isWritable and isReadWrite() tells the application + whether it can read from and write to a given device. (This can + often be set by the application in the call to open().) + +
  • Finally, isOpen() returns TRUE if the device is open. This can + quite obviously be set using open() :) + +
+ + QIODevice provides numerous pure virtual functions you need to + implement when subclassing it. Here is a skeleton subclass with all + the members you are certain to need, and some it's likely that you + will need: + + \code + class YourDevice : public QIODevice + { + public: + YourDevice(); + ~YourDevice(); + + bool open( int mode ); + void close(); + void flush(); + + uint size() const; + int at() const; // not a pure virtual function + bool at( int ); // not a pure virtual function + bool atEnd() const; // not a pure virtual function + + int readBlock( char *data, uint maxlen ); + int writeBlock( const char *data, uint len ); + int readLine( char *data, uint maxlen ); + + int getch(); + int putch( int ); + int ungetch( int ); + }; + \endcode + + The three non-pure virtual functions can be ignored if your device + is sequential (e.g. an RS-232 port). + + \sa QDataStream, QTextStream +*/ + + +/*! + Constructs an I/O device. +*/ + +QIODevice::QIODevice() +{ + ioMode = 0; // initial mode + ioSt = IO_Ok; + ioIndex = 0; +} + +/*! + Destructs the I/O device. +*/ + +QIODevice::~QIODevice() +{ +} + + +/*! + \fn int QIODevice::flags() const + Returns the current I/O device flags setting. + + Flags consists of mode flags and state flags. + + \sa mode(), state() +*/ + +/*! + \fn int QIODevice::mode() const + Returns bits OR'ed together that specify the current operation mode. + + These are the flags that were given to the open() function. + + The flags are: \c IO_ReadOnly, \c IO_WriteOnly, \c IO_ReadWrite, + \c IO_Append, \c IO_Truncate and \c IO_Translate. +*/ + +/*! + \fn int QIODevice::state() const + Returns bits OR'ed together that specify the current state. + + The flags are: \c IO_Open. + + Subclasses may define more flags. +*/ + +/*! + \fn bool QIODevice::isDirectAccess() const + Returns TRUE if the I/O device is a direct access (not sequential) device, + otherwise FALSE. + \sa isSequentialAccess() +*/ + +/*! + \fn bool QIODevice::isSequentialAccess() const + Returns TRUE if the I/O device is a sequential access (not direct) device, + otherwise FALSE. Operations involving size() and at(int) are not valid + on sequential devices. + \sa isDirectAccess() +*/ + +/*! + \fn bool QIODevice::isCombinedAccess() const + Returns TRUE if the I/O device is a combined access (both direct and + sequential) device, otherwise FALSE. + + This access method is currently not in use. +*/ + +/*! + \fn bool QIODevice::isBuffered() const + Returns TRUE if the I/O device is a buffered (not raw) device, otherwise + FALSE. + \sa isRaw() +*/ + +/*! + \fn bool QIODevice::isRaw() const + Returns TRUE if the I/O device is a raw (not buffered) device, otherwise + FALSE. + \sa isBuffered() +*/ + +/*! + \fn bool QIODevice::isSynchronous() const + Returns TRUE if the I/O device is a synchronous device, otherwise + FALSE. + \sa isAsynchronous() +*/ + +/*! + \fn bool QIODevice::isAsynchronous() const + Returns TRUE if the I/O device is a asynchronous device, otherwise + FALSE. + + This mode is currently not in use. + + \sa isSynchronous() +*/ + +/*! + \fn bool QIODevice::isTranslated() const + Returns TRUE if the I/O device translates carriage-return and linefeed + characters. + + A QFile is translated if it is opened with the \c IO_Translate mode + flag. +*/ + +/*! + \fn bool QIODevice::isReadable() const + Returns TRUE if the I/O device was opened using \c IO_ReadOnly or + \c IO_ReadWrite mode. + \sa isWritable(), isReadWrite() +*/ + +/*! + \fn bool QIODevice::isWritable() const + Returns TRUE if the I/O device was opened using \c IO_WriteOnly or + \c IO_ReadWrite mode. + \sa isReadable(), isReadWrite() +*/ + +/*! + \fn bool QIODevice::isReadWrite() const + Returns TRUE if the I/O device was opened using \c IO_ReadWrite mode. + \sa isReadable(), isWritable() +*/ + +/*! + \fn bool QIODevice::isInactive() const + Returns TRUE if the I/O device state is 0, i.e. the device is not open. + \sa isOpen() +*/ + +/*! + \fn bool QIODevice::isOpen() const + Returns TRUE if the I/O device state has been opened, otherwise FALSE. + \sa isInactive() +*/ + + +/*! + \fn int QIODevice::status() const + Returns the I/O device status. + + The I/O device status returns an error code. If open() returns FALSE + or readBlock() or writeBlock() return -1, this function can be called to + get the reason why the operation did not succeed. + + The status codes are: +
    +
  • \c IO_Ok The operation was successful. +
  • \c IO_ReadError Could not read from the device. +
  • \c IO_WriteError Could not write to the device. +
  • \c IO_FatalError A fatal unrecoverable error occurred. +
  • \c IO_OpenError Could not open the device. +
  • \c IO_ConnectError Could not connect to the device. +
  • \c IO_AbortError The operation was unexpectedly aborted. +
  • \c IO_TimeOutError The operation timed out. +
  • \c IO_OnCloseError An unspecified error happened on close. +
+ + \sa resetStatus() +*/ + +/*! + \fn void QIODevice::resetStatus() + + Sets the I/O device status to \c IO_Ok. + + \sa status() +*/ + + +/*! + \fn void QIODevice::setFlags( int f ) + \internal + Used by subclasses to set the device flags. +*/ + +/*! + \internal + Used by subclasses to set the device type. +*/ + +void QIODevice::setType( int t ) +{ +#if defined(CHECK_RANGE) + if ( (t & IO_TypeMask) != t ) + qWarning( "QIODevice::setType: Specified type out of range" ); +#endif + ioMode &= ~IO_TypeMask; // reset type bits + ioMode |= t; +} + +/*! + \internal + Used by subclasses to set the device mode. +*/ + +void QIODevice::setMode( int m ) +{ +#if defined(CHECK_RANGE) + if ( (m & IO_ModeMask) != m ) + qWarning( "QIODevice::setMode: Specified mode out of range" ); +#endif + ioMode &= ~IO_ModeMask; // reset mode bits + ioMode |= m; +} + +/*! + \internal + Used by subclasses to set the device state. +*/ + +void QIODevice::setState( int s ) +{ +#if defined(CHECK_RANGE) + if ( ((uint)s & IO_StateMask) != (uint)s ) + qWarning( "QIODevice::setState: Specified state out of range" ); +#endif + ioMode &= ~IO_StateMask; // reset state bits + ioMode |= (uint)s; +} + +/*! + \internal + Used by subclasses to set the device status (not state). +*/ + +void QIODevice::setStatus( int s ) +{ + ioSt = s; +} + + +/*! + \fn bool QIODevice::open( int mode ) + Opens the I/O device using the specified \e mode. + Returns TRUE if successful, or FALSE if the device could not be opened. + + The mode parameter \e m must be a combination of the following flags. +
    +
  • \c IO_Raw specified raw (unbuffered) file access. +
  • \c IO_ReadOnly opens a file in read-only mode. +
  • \c IO_WriteOnly opens a file in write-only mode. +
  • \c IO_ReadWrite opens a file in read/write mode. +
  • \c IO_Append sets the file index to the end of the file. +
  • \c IO_Truncate truncates the file. +
  • \c IO_Translate enables carriage returns and linefeed translation + for text files under MS-DOS, Window, OS/2 and Macintosh. On Unix systems + this flag has no effect. Use with caution as it will also transform every linefeed + written to the file into a CRLF pair. This is likely to corrupt your file when + writing binary data to it. Cannot be combined with \c IO_Raw. +
+ + This virtual function must be reimplemented by all subclasses. + + \sa close() +*/ + +/*! + \fn void QIODevice::close() + Closes the I/O device. + + This virtual function must be reimplemented by all subclasses. + + \sa open() +*/ + +/*! + \fn void QIODevice::flush() + + Flushes an open I/O device. + + This virtual function must be reimplemented by all subclasses. +*/ + + +/*! + \fn uint QIODevice::size() const + Virtual function that returns the size of the I/O device. + \sa at() +*/ + +/*! + Virtual function that returns the current I/O device index. + + This index is the data read/write head of the I/O device. + + \sa size() +*/ + +int QIODevice::at() const +{ + return ioIndex; +} + +/*! + Virtual function that sets the I/O device index to \e pos. + \sa size() +*/ + +bool QIODevice::at( int pos ) +{ +#if defined(CHECK_RANGE) + if ( (uint)pos > size() ) { + qWarning( "QIODevice::at: Index %d out of range", pos ); + return FALSE; + } +#endif + ioIndex = pos; + return TRUE; +} + +/*! + Virtual function that returns TRUE if the I/O device index is at the + end of the input. +*/ + +bool QIODevice::atEnd() const +{ + if ( isSequentialAccess() || isTranslated() ) { + QIODevice* that = (QIODevice*)this; + int c = that->getch(); + bool result = c < 0; + that->ungetch(c); + return result; + } else { + return at() == (int)size(); + } +} + +/*! + \fn bool QIODevice::reset() + Sets the device index to 0. + \sa at() +*/ + + +/*! + \fn int QIODevice::readBlock( char *data, uint maxlen ) + Reads at most \e maxlen bytes from the I/O device into \e data and + returns the number of bytes actually read. + + This virtual function must be reimplemented by all subclasses. + + \sa writeBlock() +*/ + +/*! + This convenience function returns all of the remaining data in the + device. Note that this only works for direct access devices, such + as QFile. + + \sa isDirectAccess() +*/ +QByteArray QIODevice::readAll() +{ + int n = size()-at(); + QByteArray ba(size()-at()); + char* c = ba.data(); + while ( n ) { + int r = readBlock( c, n ); + if ( r < 0 ) + return QByteArray(); + n -= r; + c += r; + } + return ba; +} + +/*! + \fn int QIODevice::writeBlock( const char *data, uint len ) + Writes \e len bytes from \e p to the I/O device and returns the number of + bytes actually written. + + This virtual function must be reimplemented by all subclasses. + + \sa readBlock() +*/ + +/*! + This convenience function is the same as calling + writeBlock( data.data(), data.size() ). +*/ +int QIODevice::writeBlock( const QByteArray& data ) +{ + return writeBlock( data.data(), data.size() ); +} + +/*! + Reads a line of text, up to \e maxlen bytes including a terminating + \0. If there is a newline at the end if the line, it is not stripped. + + Returns the number of bytes read, or -1 in case of error. + + This virtual function can be reimplemented much more efficiently by + the most subclasses. + + \sa readBlock(), QTextStream::readLine() +*/ + +int QIODevice::readLine( char *data, uint maxlen ) +{ + if ( maxlen == 0 ) // application bug? + return 0; + int pos = at(); // get current position + int s = (int)size(); // size of I/O device + char *p = data; + if ( pos >= s ) + return 0; + while ( pos++ < s && --maxlen ) { // read one byte at a time + readBlock( p, 1 ); + if ( *p++ == '\n' ) // end of line + break; + } + *p++ = '\0'; + return (int)((long)p - (long)data); +} + + +/*! + \fn int QIODevice::getch() + + Reads a single byte/character from the I/O device. + + Returns the byte/character read, or -1 if the end of the I/O device has been + reached. + + This virtual function must be reimplemented by all subclasses. + + \sa putch(), ungetch() +*/ + +/*! + \fn int QIODevice::putch( int ch ) + + Writes the character \e ch to the I/O device. + + Returns \e ch, or -1 if some error occurred. + + This virtual function must be reimplemented by all subclasses. + + \sa getch(), ungetch() +*/ + +/*! + \fn int QIODevice::ungetch( int ch ) + + Puts the character \e ch back into the I/O device and decrements the + index if it is not zero. + + This function is normally called to "undo" a getch() operation. + + Returns \e ch, or -1 if some error occurred. + + This virtual function must be reimplemented by all subclasses. + + \sa getch(), putch() +*/ Index: branches/xZenu/src/util/doxygen/qtools/qthread_win32.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qthread_win32.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qthread_win32.cpp (revision 1322) @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qthread.h" +#include "qthread_p.h" + +/************************************************************************** + ** QThreadPrivate + *************************************************************************/ + +QThreadPrivate::QThreadPrivate() : + running(FALSE), finished(FALSE), terminated(FALSE), stackSize(0) +{ + handle = NULL; + waiters = 0; +} + +QThreadPrivate::~QThreadPrivate() +{ +} + +unsigned int __stdcall QThreadPrivate::start(void *arg) +{ + QThread *thr = reinterpret_cast(arg); + thr->started(); + thr->run(); + finish(arg); + return 0; +} + +void QThreadPrivate::finish(void *arg,bool lockAnyway) +{ + QThread *thr = reinterpret_cast(arg); + QThreadPrivate *d = thr->d; + + if (lockAnyway) d->mutex.lock(); + + d->running = FALSE; + d->finished = TRUE; + if (d->terminated) thr->terminated(); + d->terminated = FALSE; + thr->finished(); + + if (!d->waiters) + { + CloseHandle(d->handle); + d->handle = 0; + } + + if (lockAnyway) d->mutex.unlock(); +} + +/************************************************************************** + ** QThread + *************************************************************************/ + +void QThread::start() +{ + QMutexLocker locker(&d->mutex); + + if (d->running) return; + + d->running = TRUE; + d->finished = FALSE; + d->terminated = FALSE; + + d->handle = CreateThread(NULL,d->stackSize, + (LPTHREAD_START_ROUTINE)QThreadPrivate::start,this,0,NULL); + + if (!d->handle) + { + qWarning("QThread::start: Failed to create thread: errno=%d",errno); + d->running = FALSE; + d->finished = TRUE; + return; + } +} + +void QThread::terminate() +{ + QMutexLocker locker(&d->mutex); + if (!d->running) return; + TerminateThread(d->handle, 0); + d->terminated = TRUE; + QThreadPrivate::finish(this); +} + +void QThread::wait() +{ + QMutexLocker locker(&d->mutex); + if (d->finished || !d->running) return; + + ++d->waiters; + locker.mutex()->unlock(); + + WaitForSingleObject(d->handle,INFINITE); + + locker.mutex()->lock(); + --d->waiters; + if (!d->finished) // thread was terminated by someone else + { + d->terminated = TRUE; + QThreadPrivate::finish(this); + } + + if (d->finished && d->waiters) + { + CloseHandle(d->handle); + d->handle = 0; + } +} + +int QThread::idealThreadCount() +{ + SYSTEM_INFO sysinfo; + GetSystemInfo(&sysinfo); + return sysinfo.dwNumberOfProcessors; +} + + Index: branches/xZenu/src/util/doxygen/qtools/qdatastream.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qdatastream.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qdatastream.h (revision 1322) @@ -0,0 +1,173 @@ +/**************************************************************************** +** +** +** Definition of QDataStream class +** +** Created : 930831 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QDATASTREAM_H +#define QDATASTREAM_H + +#ifndef QT_H +#include "qiodevice.h" +#include "qstring.h" +#endif // QT_H + +#ifndef QT_NO_DATASTREAM +class Q_EXPORT QDataStream // data stream class +{ +public: + QDataStream(); + QDataStream( QIODevice * ); + QDataStream( QByteArray, int mode ); + virtual ~QDataStream(); + + QIODevice *device() const; + void setDevice( QIODevice * ); + void unsetDevice(); + + bool atEnd() const; + bool eof() const; + + enum ByteOrder { BigEndian, LittleEndian }; + int byteOrder() const; + void setByteOrder( int ); + + bool isPrintableData() const; + void setPrintableData( bool ); + + int version() const; + void setVersion( int ); + + QDataStream &operator>>( Q_INT8 &i ); + QDataStream &operator>>( Q_UINT8 &i ); + QDataStream &operator>>( Q_INT16 &i ); + QDataStream &operator>>( Q_UINT16 &i ); + QDataStream &operator>>( Q_INT32 &i ); + QDataStream &operator>>( Q_UINT32 &i ); + QDataStream &operator>>( Q_INT64 &i ); + QDataStream &operator>>( Q_UINT64 &i ); + + QDataStream &operator>>( float &f ); + QDataStream &operator>>( double &f ); + QDataStream &operator>>( char *&str ); + + QDataStream &operator<<( Q_INT8 i ); + QDataStream &operator<<( Q_UINT8 i ); + QDataStream &operator<<( Q_INT16 i ); + QDataStream &operator<<( Q_UINT16 i ); + QDataStream &operator<<( Q_INT32 i ); + QDataStream &operator<<( Q_UINT32 i ); + QDataStream &operator<<( Q_INT64 i ); + QDataStream &operator<<( Q_UINT64 i ); + QDataStream &operator<<( float f ); + QDataStream &operator<<( double f ); + QDataStream &operator<<( const char *str ); + + QDataStream &readBytes( char *&, uint &len ); + QDataStream &readRawBytes( char *, uint len ); + + QDataStream &writeBytes( const char *, uint len ); + QDataStream &writeRawBytes( const char *, uint len ); + +private: + QIODevice *dev; + bool owndev; + int byteorder; + bool printable; + bool noswap; + int ver; + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + QDataStream( const QDataStream & ); + QDataStream &operator=( const QDataStream & ); +#endif +}; + + +/***************************************************************************** + QDataStream inline functions + *****************************************************************************/ + +inline QIODevice *QDataStream::device() const +{ return dev; } + +inline bool QDataStream::atEnd() const +{ return dev ? dev->atEnd() : TRUE; } + +inline bool QDataStream::eof() const +{ return atEnd(); } + +inline int QDataStream::byteOrder() const +{ return byteorder; } + +inline bool QDataStream::isPrintableData() const +{ return printable; } + +inline void QDataStream::setPrintableData( bool p ) +{ printable = p; } + +inline int QDataStream::version() const +{ return ver; } + +inline void QDataStream::setVersion( int v ) +{ ver = v; } + +inline QDataStream &QDataStream::operator>>( Q_UINT8 &i ) +{ return *this >> (Q_INT8&)i; } + +inline QDataStream &QDataStream::operator>>( Q_UINT16 &i ) +{ return *this >> (Q_INT16&)i; } + +inline QDataStream &QDataStream::operator>>( Q_UINT32 &i ) +{ return *this >> (Q_INT32&)i; } + +inline QDataStream &QDataStream::operator>>( Q_UINT64 &i ) +{ return *this >> (Q_INT64&)i; } + +inline QDataStream &QDataStream::operator<<( Q_UINT8 i ) +{ return *this << (Q_INT8)i; } + +inline QDataStream &QDataStream::operator<<( Q_UINT16 i ) +{ return *this << (Q_INT16)i; } + +inline QDataStream &QDataStream::operator<<( Q_UINT32 i ) +{ return *this << (Q_INT32)i; } + +inline QDataStream &QDataStream::operator<<( Q_UINT64 i ) +{ return *this << (Q_INT64)i; } + + +#endif // QT_NO_DATASTREAM +#endif // QDATASTREAM_H Index: branches/xZenu/src/util/doxygen/qtools/qgdict.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgdict.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgdict.cpp (revision 1322) @@ -0,0 +1,1218 @@ +/**************************************************************************** +** +** +** Implementation of QGDict and QGDictIterator classes +** +** Created : 920529 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qgdict.h" +#include "qlist.h" +#include "qstring.h" +#include "qdatastream.h" +#include + +// NOT REVISED +/*! + \class QGDict qgdict.h + \brief The QGDict class is an internal class for implementing QDict template classes. + + QGDict is a strictly internal class that acts as a base class for the + \link collection.html collection classes\endlink QDict and QIntDict. + + QGDict has some virtual functions that can be reimplemented to customize + the subclasses. +
    +
  • read() reads a collection/dictionary item from a QDataStream. +
  • write() writes a collection/dictionary item to a QDataStream. +
+ Normally, you do not have to reimplement any of these functions. +*/ + +static const int op_find = 0; +static const int op_insert = 1; +static const int op_replace = 2; + + +class QGDItList : public QList +{ +public: + QGDItList() : QList() {} + QGDItList( const QGDItList &list ) : QList(list) {} + ~QGDItList() { clear(); } + QGDItList &operator=(const QGDItList &list) + { return (QGDItList&)QList::operator=(list); } +}; + + +/***************************************************************************** + Default implementation of special and virtual functions + *****************************************************************************/ + +/*! + \internal + Returns the hash key for \e key, when key is a string. +*/ + +int QGDict::hashKeyString( const QString &key ) +{ +#if defined(CHECK_NULL) + if ( key.isNull() ) + qWarning( "QGDict::hashStringKey: Invalid null key" ); +#endif + int i; + register uint h=0; + uint g; + int len = key.length(); + const QChar *p = key.unicode(); + if ( cases ) { // case sensitive + for ( i=0; i> 24; + h &= ~g; + } + } else { // case insensitive + for ( i=0; i> 24; + h &= ~g; + } + } + int index = h; + if ( index < 0 ) // adjust index to table size + index = -index; + return index; +} + +/*! + \internal + Returns the hash key for \a key, which is a C string. +*/ + +int QGDict::hashKeyAscii( const char *key ) +{ +#if defined(CHECK_NULL) + if ( key == 0 ) + { + qWarning( "QGDict::hashAsciiKey: Invalid null key" ); + return 0; + } +#endif + register const char *k = key; + register uint h=0; + uint g; + if ( cases ) { // case sensitive + while ( *k ) { + h = (h<<4) + *k++; + if ( (g = h & 0xf0000000) ) + h ^= g >> 24; + h &= ~g; + } + } else { // case insensitive + while ( *k ) { + h = (h<<4) + tolower(*k); + if ( (g = h & 0xf0000000) ) + h ^= g >> 24; + h &= ~g; + k++; + } + } + int index = h; + if ( index < 0 ) // adjust index to table size + index = -index; + return index; +} + +#ifndef QT_NO_DATASTREAM + +/*! + Reads a collection/dictionary item from the stream \e s and returns a + reference to the stream. + + The default implementation sets \e item to 0. + + \sa write() +*/ + +QDataStream& QGDict::read( QDataStream &s, QCollection::Item &item ) +{ + item = 0; + return s; +} + +/*! + Writes a collection/dictionary item to the stream \e s and returns a + reference to the stream. + + \sa read() +*/ + +QDataStream& QGDict::write( QDataStream &s, QCollection::Item ) const +{ + return s; +} +#endif //QT_NO_DATASTREAM + +/***************************************************************************** + QGDict member functions + *****************************************************************************/ + +/*! + \internal + Constructs a dictionary. +*/ + +QGDict::QGDict( uint len, KeyType kt, bool caseSensitive, bool copyKeys ) +{ + init( len, kt, caseSensitive, copyKeys ); +} + + +void QGDict::init( uint len, KeyType kt, bool caseSensitive, bool copyKeys ) +{ + vec = new QBaseBucket *[vlen = len]; // allocate hash table + CHECK_PTR( vec ); + memset( (char*)vec, 0, vlen*sizeof(QBaseBucket*) ); + numItems = 0; + iterators = 0; + // The caseSensitive and copyKey options don't make sense for + // all dict types. + switch ( (keytype = (uint)kt) ) { + case StringKey: + cases = caseSensitive; + copyk = FALSE; + break; + case AsciiKey: + cases = caseSensitive; + copyk = copyKeys; + break; + default: + cases = FALSE; + copyk = FALSE; + break; + } +} + + +/*! + \internal + Constructs a copy of \e dict. +*/ + +QGDict::QGDict( const QGDict & dict ) + : QCollection( dict ) +{ + init( dict.vlen, (KeyType)dict.keytype, dict.cases, dict.copyk ); + QGDictIterator it( dict ); + while ( it.get() ) { // copy from other dict + switch ( keytype ) { + case StringKey: + look_string( it.getKeyString(), it.get(), op_insert ); + break; + case AsciiKey: + look_ascii( it.getKeyAscii(), it.get(), op_insert ); + break; + case IntKey: + look_int( it.getKeyInt(), it.get(), op_insert ); + break; + case PtrKey: + look_ptr( it.getKeyPtr(), it.get(), op_insert ); + break; + } + ++it; + } +} + + +/*! + \internal + Removes all items from the dictionary and destroys it. +*/ + +QGDict::~QGDict() +{ + clear(); // delete everything + delete [] vec; + if ( !iterators ) // no iterators for this dict + return; + QGDictIterator *i = iterators->first(); + while ( i ) { // notify all iterators that + i->dict = 0; // this dict is deleted + i = iterators->next(); + } + delete iterators; +} + + +/*! + \internal + Assigns \e dict to this dictionary. +*/ + +QGDict &QGDict::operator=( const QGDict &dict ) +{ + clear(); + QGDictIterator it( dict ); + while ( it.get() ) { // copy from other dict + switch ( keytype ) { + case StringKey: + look_string( it.getKeyString(), it.get(), op_insert ); + break; + case AsciiKey: + look_ascii( it.getKeyAscii(), it.get(), op_insert ); + break; + case IntKey: + look_int( it.getKeyInt(), it.get(), op_insert ); + break; + case PtrKey: + look_ptr( it.getKeyPtr(), it.get(), op_insert ); + break; + } + ++it; + } + return *this; +} + + +/*! \fn QCollection::Item QGDictIterator::get() const + + \internal +*/ + + +/*! \fn QString QGDictIterator::getKeyString() const + + \internal +*/ + + +/*! \fn const char * QGDictIterator::getKeyAscii() const + + \internal +*/ + + +/*! \fn void * QGDictIterator::getKeyPtr() const + + \internal +*/ + + +/*! \fn long QGDictIterator::getKeyInt() const + + \internal +*/ + + +/*! + \fn uint QGDict::count() const + \internal + Returns the number of items in the dictionary. +*/ + +/*! + \fn uint QGDict::size() const + \internal + Returns the size of the hash array. +*/ + + +/*! + \internal + The do-it-all function; op is one of op_find, op_insert, op_replace +*/ + +QCollection::Item QGDict::look_string( const QString &key, QCollection::Item d, int op ) +{ + QStringBucket *n; + int index = hashKeyString(key) % vlen; + if ( op == op_find ) { // find + if ( cases ) { + for ( n=(QStringBucket*)vec[index]; n; + n=(QStringBucket*)n->getNext() ) { + if ( key == n->getKey() ) + return n->getData(); // item found + } + } else { + QString k = key.lower(); + for ( n=(QStringBucket*)vec[index]; n; + n=(QStringBucket*)n->getNext() ) { + if ( k == n->getKey().lower() ) + return n->getData(); // item found + } + } + return 0; // not found + } + if ( op == op_replace ) { // replace + if ( vec[index] != 0 ) // maybe something there + remove_string( key ); + } + // op_insert or op_replace + n = new QStringBucket(key,newItem(d),vec[index]); + CHECK_PTR( n ); +#if defined(CHECK_NULL) + if ( n->getData() == 0 ) + qWarning( "QDict: Cannot insert null item" ); +#endif + vec[index] = n; + numItems++; + return n->getData(); +} + + +/*! \internal */ + +QCollection::Item QGDict::look_ascii( const char *key, QCollection::Item d, int op ) +{ + QAsciiBucket *n; + int index = hashKeyAscii(key) % vlen; + if ( op == op_find ) { // find + if ( cases ) { + for ( n=(QAsciiBucket*)vec[index]; n; + n=(QAsciiBucket*)n->getNext() ) { + if ( qstrcmp(n->getKey(),key) == 0 ) + return n->getData(); // item found + } + } else { + for ( n=(QAsciiBucket*)vec[index]; n; + n=(QAsciiBucket*)n->getNext() ) { + if ( qstricmp(n->getKey(),key) == 0 ) + return n->getData(); // item found + } + } + return 0; // not found + } + if ( op == op_replace ) { // replace + if ( vec[index] != 0 ) // maybe something there + remove_ascii( key ); + } + // op_insert or op_replace + n = new QAsciiBucket(copyk ? qstrdup(key) : key,newItem(d),vec[index]); + CHECK_PTR( n ); +#if defined(CHECK_NULL) + if ( n->getData() == 0 ) + qWarning( "QAsciiDict: Cannot insert null item" ); +#endif + vec[index] = n; + numItems++; + return n->getData(); +} + + +/*! \internal */ + +QCollection::Item QGDict::look_int( long key, QCollection::Item d, int op ) +{ + QIntBucket *n; + int index = (int)((ulong)key % vlen); // simple hash + if ( op == op_find ) { // find + for ( n=(QIntBucket*)vec[index]; n; + n=(QIntBucket*)n->getNext() ) { + if ( n->getKey() == key ) + return n->getData(); // item found + } + return 0; // not found + } + if ( op == op_replace ) { // replace + if ( vec[index] != 0 ) // maybe something there + remove_int( key ); + } + // op_insert or op_replace + n = new QIntBucket(key,newItem(d),vec[index]); + CHECK_PTR( n ); +#if defined(CHECK_NULL) + if ( n->getData() == 0 ) + qWarning( "QIntDict: Cannot insert null item" ); +#endif + vec[index] = n; + numItems++; + return n->getData(); +} + + +/*! \internal */ + +QCollection::Item QGDict::look_ptr( void *key, QCollection::Item d, int op ) +{ + QPtrBucket *n; + int index = (int)((ulong)key % vlen); // simple hash + if ( op == op_find ) { // find + for ( n=(QPtrBucket*)vec[index]; n; + n=(QPtrBucket*)n->getNext() ) { + if ( n->getKey() == key ) + return n->getData(); // item found + } + return 0; // not found + } + if ( op == op_replace ) { // replace + if ( vec[index] != 0 ) // maybe something there + remove_ptr( key ); + } + // op_insert or op_replace + n = new QPtrBucket(key,newItem(d),vec[index]); + CHECK_PTR( n ); +#if defined(CHECK_NULL) + if ( n->getData() == 0 ) + qWarning( "QPtrDict: Cannot insert null item" ); +#endif + vec[index] = n; + numItems++; + return n->getData(); +} + + +/*! + \internal + Changes the size of the hashtable. + The contents of the dictionary are preserved, + but all iterators on the dictionary become invalid. +*/ +void QGDict::resize( uint newsize ) +{ + // Save old information + QBaseBucket **old_vec = vec; + uint old_vlen = vlen; + bool old_copyk = copyk; + + vec = new QBaseBucket *[vlen = newsize]; + CHECK_PTR( vec ); + memset( (char*)vec, 0, vlen*sizeof(QBaseBucket*) ); + numItems = 0; + copyk = FALSE; + + // Reinsert every item from vec, deleting vec as we go + for ( uint index = 0; index < old_vlen; index++ ) { + switch ( keytype ) { + case StringKey: + { + QStringBucket *n=(QStringBucket *)old_vec[index]; + while ( n ) { + look_string( n->getKey(), n->getData(), op_insert ); + QStringBucket *t=(QStringBucket *)n->getNext(); + delete n; + n = t; + } + } + break; + case AsciiKey: + { + QAsciiBucket *n=(QAsciiBucket *)old_vec[index]; + while ( n ) { + look_ascii( n->getKey(), n->getData(), op_insert ); + QAsciiBucket *t=(QAsciiBucket *)n->getNext(); + delete n; + n = t; + } + } + break; + case IntKey: + { + QIntBucket *n=(QIntBucket *)old_vec[index]; + while ( n ) { + look_int( n->getKey(), n->getData(), op_insert ); + QIntBucket *t=(QIntBucket *)n->getNext(); + delete n; + n = t; + } + } + break; + case PtrKey: + { + QPtrBucket *n=(QPtrBucket *)old_vec[index]; + while ( n ) { + look_ptr( n->getKey(), n->getData(), op_insert ); + QPtrBucket *t=(QPtrBucket *)n->getNext(); + delete n; + n = t; + } + } + break; + } + } + delete [] old_vec; + + // Restore state + copyk = old_copyk; + + // Invalidate all iterators, since order is lost + if ( iterators && iterators->count() ) { + QGDictIterator *i = iterators->first(); + while ( i ) { + i->toFirst(); + i = iterators->next(); + } + } +} + +/*! + \internal + Unlinks the bucket with the specified key (and specified data pointer, + if it is set). +*/ + +void QGDict::unlink_common( int index, QBaseBucket *node, QBaseBucket *prev ) +{ + if ( iterators && iterators->count() ) { // update iterators + QGDictIterator *i = iterators->first(); + while ( i ) { // invalidate all iterators + if ( i->curNode == node ) // referring to pending node + i->operator++(); + i = iterators->next(); + } + } + if ( prev ) // unlink node + prev->setNext( node->getNext() ); + else + vec[index] = node->getNext(); + numItems--; +} + +QStringBucket *QGDict::unlink_string( const QString &key, QCollection::Item d ) +{ + if ( numItems == 0 ) // nothing in dictionary + return 0; + QStringBucket *n; + QStringBucket *prev = 0; + int index = hashKeyString(key) % vlen; + if ( cases ) { + for ( n=(QStringBucket*)vec[index]; n; + n=(QStringBucket*)n->getNext() ) { + bool found = (key == n->getKey()); + if ( found && d ) + found = (n->getData() == d); + if ( found ) { + unlink_common(index,n,prev); + return n; + } + prev = n; + } + } else { + QString k = key.lower(); + for ( n=(QStringBucket*)vec[index]; n; + n=(QStringBucket*)n->getNext() ) { + bool found = (k == n->getKey().lower()); + if ( found && d ) + found = (n->getData() == d); + if ( found ) { + unlink_common(index,n,prev); + return n; + } + prev = n; + } + } + return 0; +} + +QAsciiBucket *QGDict::unlink_ascii( const char *key, QCollection::Item d ) +{ + if ( numItems == 0 ) // nothing in dictionary + return 0; + QAsciiBucket *n; + QAsciiBucket *prev = 0; + int index = hashKeyAscii(key) % vlen; + for ( n=(QAsciiBucket *)vec[index]; n; n=(QAsciiBucket *)n->getNext() ) { + bool found = (cases ? qstrcmp(n->getKey(),key) + : qstricmp(n->getKey(),key)) == 0; + if ( found && d ) + found = (n->getData() == d); + if ( found ) { + unlink_common(index,n,prev); + return n; + } + prev = n; + } + return 0; +} + +QIntBucket *QGDict::unlink_int( long key, QCollection::Item d ) +{ + if ( numItems == 0 ) // nothing in dictionary + return 0; + QIntBucket *n; + QIntBucket *prev = 0; + int index = (int)((ulong)key % vlen); + for ( n=(QIntBucket *)vec[index]; n; n=(QIntBucket *)n->getNext() ) { + bool found = (n->getKey() == key); + if ( found && d ) + found = (n->getData() == d); + if ( found ) { + unlink_common(index,n,prev); + return n; + } + prev = n; + } + return 0; +} + +QPtrBucket *QGDict::unlink_ptr( void *key, QCollection::Item d ) +{ + if ( numItems == 0 ) // nothing in dictionary + return 0; + QPtrBucket *n; + QPtrBucket *prev = 0; + int index = (int)((ulong)key % vlen); + for ( n=(QPtrBucket *)vec[index]; n; n=(QPtrBucket *)n->getNext() ) { + bool found = (n->getKey() == key); + if ( found && d ) + found = (n->getData() == d); + if ( found ) { + unlink_common(index,n,prev); + return n; + } + prev = n; + } + return 0; +} + + +/*! + \internal + Removes the item with the specified key. If item is non-null, + the remove will match the \a item as well (used to remove an + item when several items have the same key). +*/ + +bool QGDict::remove_string( const QString &key, QCollection::Item item ) +{ + QStringBucket *n = unlink_string( key, item ); + if ( n ) { + deleteItem( n->getData() ); + delete n; + return TRUE; + } else { + return FALSE; + } +} + + +/*! \internal */ + +bool QGDict::remove_ascii( const char *key, QCollection::Item item ) +{ + QAsciiBucket *n = unlink_ascii( key, item ); + if ( n ) { + if ( copyk ) + delete [] (char *)n->getKey(); + deleteItem( n->getData() ); + delete n; + } + return n != 0; +} + + +/*! \internal */ + +bool QGDict::remove_int( long key, QCollection::Item item ) +{ + QIntBucket *n = unlink_int( key, item ); + if ( n ) { + deleteItem( n->getData() ); + delete n; + } + return n != 0; +} + + +/*! \internal */ + +bool QGDict::remove_ptr( void *key, QCollection::Item item ) +{ + QPtrBucket *n = unlink_ptr( key, item ); + if ( n ) { + deleteItem( n->getData() ); + delete n; + } + return n != 0; +} + + +/*! \internal */ + +QCollection::Item QGDict::take_string( const QString &key ) +{ + QStringBucket *n = unlink_string( key ); + Item d; + if ( n ) { + d = n->getData(); + delete n; + } else { + d = 0; + } + return d; +} + + +/*! \internal */ + +QCollection::Item QGDict::take_ascii( const char *key ) +{ + QAsciiBucket *n = unlink_ascii( key ); + Item d; + if ( n ) { + if ( copyk ) + delete [] (char *)n->getKey(); + d = n->getData(); + delete n; + } else { + d = 0; + } + return d; +} + + +/*! \internal */ + +QCollection::Item QGDict::take_int( long key ) +{ + QIntBucket *n = unlink_int( key ); + Item d; + if ( n ) { + d = n->getData(); + delete n; + } else { + d = 0; + } + return d; +} + + +/*! \internal */ + +QCollection::Item QGDict::take_ptr( void *key ) +{ + QPtrBucket *n = unlink_ptr( key ); + Item d; + if ( n ) { + d = n->getData(); + delete n; + } else { + d = 0; + } + return d; +} + + +/*! + \internal + Removes all items from the dictionary. +*/ + +void QGDict::clear() +{ + if ( !numItems ) + return; + numItems = 0; // disable remove() function + for ( uint j=0; jgetNext(); + deleteItem( n->getData() ); + delete n; + n = next; + } + } + break; + case AsciiKey: + { + QAsciiBucket *n=(QAsciiBucket *)vec[j]; + while ( n ) { + QAsciiBucket *next = (QAsciiBucket*)n->getNext(); + if ( copyk ) + delete [] (char *)n->getKey(); + deleteItem( n->getData() ); + delete n; + n = next; + } + } + break; + case IntKey: + { + QIntBucket *n=(QIntBucket *)vec[j]; + while ( n ) { + QIntBucket *next = (QIntBucket*)n->getNext(); + deleteItem( n->getData() ); + delete n; + n = next; + } + } + break; + case PtrKey: + { + QPtrBucket *n=(QPtrBucket *)vec[j]; + while ( n ) { + QPtrBucket *next = (QPtrBucket*)n->getNext(); + deleteItem( n->getData() ); + delete n; + n = next; + } + } + break; + } + vec[j] = 0; // detach list of buckets + } + } + if ( iterators && iterators->count() ) { // invalidate all iterators + QGDictIterator *i = iterators->first(); + while ( i ) { + i->curNode = 0; + i = iterators->next(); + } + } +} + + +/*! + \internal + Outputs debug statistics. +*/ + +void QGDict::statistics() const +{ +#if defined(DEBUG) + QString line; + line.fill( '-', 60 ); + double real, ideal; + qDebug( "%s",line.ascii() ); + qDebug( "DICTIONARY STATISTICS:" ); + if ( count() == 0 ) { + qDebug( "Empty!" ); + qDebug( "%s", line.ascii() ); + return; + } + real = 0.0; + ideal = (float)count()/(2.0*size())*(count()+2.0*size()-1); + uint i = 0; + while ( igetNext(); + } + real = real + (double)b * ((double)b+1.0)/2.0; + char buf[80], *pbuf; + if ( b > 78 ) + b = 78; + pbuf = buf; + while ( b-- ) + *pbuf++ = '*'; + *pbuf = '\0'; + qDebug( "%s", buf ); + i++; + } + qDebug( "Array size = %d", size() ); + qDebug( "# items = %d", count() ); + qDebug( "Real dist = %g", real ); + qDebug( "Rand dist = %g", ideal ); + qDebug( "Real/Rand = %g", real/ideal ); + qDebug( "%s",line.ascii() ); +#endif // DEBUG +} + + +/***************************************************************************** + QGDict stream functions + *****************************************************************************/ +#ifndef QT_NO_DATASTREAM +QDataStream &operator>>( QDataStream &s, QGDict &dict ) +{ + return dict.read( s ); +} + +QDataStream &operator<<( QDataStream &s, const QGDict &dict ) +{ + return dict.write( s ); +} + +#if defined(_CC_DEC_) && defined(__alpha) && (__DECCXX_VER >= 50190001) +#pragma message disable narrowptr +#endif + +/*! + \internal + Reads a dictionary from the stream \e s. +*/ + +QDataStream &QGDict::read( QDataStream &s ) +{ + uint num; + s >> num; // read number of items + clear(); // clear dict + while ( num-- ) { // read all items + Item d; + switch ( keytype ) { + case StringKey: + { + QString k; + s >> k; + read( s, d ); + look_string( k, d, op_insert ); + } + break; + case AsciiKey: + { + char *k; + s >> k; + read( s, d ); + look_ascii( k, d, op_insert ); + if ( copyk ) + delete [] k; + } + break; + case IntKey: + { + Q_UINT32 k; + s >> k; + read( s, d ); + look_int( k, d, op_insert ); + } + break; + case PtrKey: + { + Q_UINT32 k; + s >> k; + read( s, d ); + // ### cannot insert 0 - this renders the thing + // useless since all pointers are written as 0, + // but hey, serializing pointers? can it be done + // at all, ever? + if ( k ) + look_ptr( (void *)k, d, op_insert ); + } + break; + } + } + return s; +} + +/*! + \internal + Writes the dictionary to the stream \e s. +*/ + +QDataStream& QGDict::write( QDataStream &s ) const +{ + s << count(); // write number of items + uint i = 0; + while ( igetKey(); + break; + case AsciiKey: + s << ((QAsciiBucket*)n)->getKey(); + break; + case IntKey: + s << (Q_UINT32)((QIntBucket*)n)->getKey(); + break; + case PtrKey: + s << (Q_UINT32)0; // ### cannot serialize a pointer + break; + } + write( s, n->getData() ); // write data + n = n->getNext(); + } + i++; + } + return s; +} +#endif //QT_NO_DATASTREAM + +/***************************************************************************** + QGDictIterator member functions + *****************************************************************************/ + +/*! + \class QGDictIterator qgdict.h + \brief An internal class for implementing QDictIterator and QIntDictIterator. + + QGDictIterator is a strictly internal class that does the heavy work for + QDictIterator and QIntDictIterator. +*/ + +/*! + \internal + Constructs an iterator that operates on the dictionary \e d. +*/ + +QGDictIterator::QGDictIterator( const QGDict &d ) +{ + dict = (QGDict *)&d; // get reference to dict + toFirst(); // set to first noe + if ( !dict->iterators ) { + dict->iterators = new QGDItList; // create iterator list + CHECK_PTR( dict->iterators ); + } + dict->iterators->append( this ); // attach iterator to dict +} + +/*! + \internal + Constructs a copy of the iterator \e it. +*/ + +QGDictIterator::QGDictIterator( const QGDictIterator &it ) +{ + dict = it.dict; + curNode = it.curNode; + curIndex = it.curIndex; + if ( dict ) + dict->iterators->append( this ); // attach iterator to dict +} + +/*! + \internal + Assigns a copy of the iterator \e it and returns a reference to this + iterator. +*/ + +QGDictIterator &QGDictIterator::operator=( const QGDictIterator &it ) +{ + if ( dict ) // detach from old dict + dict->iterators->removeRef( this ); + dict = it.dict; + curNode = it.curNode; + curIndex = it.curIndex; + if ( dict ) + dict->iterators->append( this ); // attach to new list + return *this; +} + +/*! + \internal + Destroys the iterator. +*/ + +QGDictIterator::~QGDictIterator() +{ + if ( dict ) // detach iterator from dict + dict->iterators->removeRef( this ); +} + + +/*! + \internal + Sets the iterator to point to the first item in the dictionary. +*/ + +QCollection::Item QGDictIterator::toFirst() +{ + if ( !dict ) { +#if defined(CHECK_NULL) + qWarning( "QGDictIterator::toFirst: Dictionary has been deleted" ); +#endif + return 0; + } + if ( dict->count() == 0 ) { // empty dictionary + curNode = 0; + return 0; + } + register uint i = 0; + register QBaseBucket **v = dict->vec; + while ( !(*v++) ) + i++; + curNode = dict->vec[i]; + curIndex = i; + return curNode->getData(); +} + + +/*! + \internal + Moves to the next item (postfix). +*/ + +QCollection::Item QGDictIterator::operator()() +{ + if ( !dict ) { +#if defined(CHECK_NULL) + qWarning( "QGDictIterator::operator(): Dictionary has been deleted" ); +#endif + return 0; + } + if ( !curNode ) + return 0; + QCollection::Item d = curNode->getData(); + this->operator++(); + return d; +} + +/*! + \internal + Moves to the next item (prefix). +*/ + +QCollection::Item QGDictIterator::operator++() +{ + if ( !dict ) { +#if defined(CHECK_NULL) + qWarning( "QGDictIterator::operator++: Dictionary has been deleted" ); +#endif + return 0; + } + if ( !curNode ) + return 0; + curNode = curNode->getNext(); + if ( !curNode ) { // no next bucket + register uint i = curIndex + 1; // look from next vec element + register QBaseBucket **v = &dict->vec[i]; + while ( i < dict->size() && !(*v++) ) + i++; + if ( i == dict->size() ) { // nothing found + curNode = 0; + return 0; + } + curNode = dict->vec[i]; + curIndex = i; + } + return curNode->getData(); +} + +/*! + \internal + Moves \e jumps positions forward. +*/ + +QCollection::Item QGDictIterator::operator+=( uint jumps ) +{ + while ( curNode && jumps-- ) + operator++(); + return curNode ? curNode->getData() : 0; +} Index: branches/xZenu/src/util/doxygen/qtools/qregexp.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qregexp.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qregexp.h (revision 1322) @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** +** Definition of QRegExp class +** +** Created : 950126 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QREGEXP_H +#define QREGEXP_H + +#ifndef QT_H +#include "qcstring.h" +#endif // QT_H + + +class Q_EXPORT QRegExp +{ +public: + QRegExp(); + QRegExp( const QCString &, bool caseSensitive=TRUE, bool wildcard=FALSE ); + QRegExp( const QRegExp & ); + ~QRegExp(); + QRegExp &operator=( const QRegExp & ); + QRegExp &operator=( const QCString &pattern ); + + bool operator==( const QRegExp & ) const; + bool operator!=( const QRegExp &r ) const + { return !(this->operator==(r)); } + + bool isEmpty() const { return rxdata == 0; } + bool isValid() const { return error == 0; } + + bool caseSensitive() const { return cs; } + void setCaseSensitive( bool ); + + bool wildcard() const { return wc; } + void setWildcard( bool ); + + QCString pattern() const { return rxstring; } + // ### in Qt 3.0, provide a real implementation + void setPattern( const QCString& pattern ) + { operator=( pattern ); } + + int match( const QCString &str, int index=0, int *len=0, + bool indexIsStart = TRUE ) const; + int find( const QCString& str, int index ) + { return match( str, index ); } + +protected: + void compile(); + const char *matchstr( uint *, const char *, uint, const char * ) const; + +private: + QCString rxstring; // regular expression pattern + uint *rxdata; // compiled regexp pattern + int error; // error status + bool cs; // case sensitive + bool wc; // wildcard +}; + + +#endif // QREGEXP_H Index: branches/xZenu/src/util/doxygen/qtools/qxml.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qxml.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qxml.cpp (revision 1322) @@ -0,0 +1,6046 @@ +/**************************************************************************** +** +** +** Implementation of QXmlSimpleReader and related classes. +** +** Created : 000518 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the XML module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition licenses may use this +** file in accordance with the Qt Commercial License Agreement provided +** with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#define QT_XML_CPP +#include "qxml.h" +#include "qtextcodec.h" +#include "qbuffer.h" + +#ifndef QT_NO_XML +// NOT REVISED + +// Error strings for the XML reader +#define XMLERR_OK "no error occured" +#define XMLERR_TAGMISMATCH "tag mismatch" +#define XMLERR_UNEXPECTEDEOF "unexpected end of file" +#define XMLERR_FINISHEDPARSINGWHILENOTEOF "parsing is finished but end of file is not reached" +#define XMLERR_LETTEREXPECTED "letter is expected" +#define XMLERR_ERRORPARSINGELEMENT "error while parsing element" +#define XMLERR_ERRORPARSINGPROLOG "error while parsing prolog" +#define XMLERR_ERRORPARSINGMAINELEMENT "error while parsing main element" +#define XMLERR_ERRORPARSINGCONTENT "error while parsing content" +#define XMLERR_ERRORPARSINGNAME "error while parsing name" +#define XMLERR_ERRORPARSINGNMTOKEN "error while parsing Nmtoken" +#define XMLERR_ERRORPARSINGATTRIBUTE "error while parsing attribute" +#define XMLERR_ERRORPARSINGMISC "error while parsing misc" +#define XMLERR_ERRORPARSINGCHOICE "error while parsing choice or seq" +#define XMLERR_ERRORBYCONSUMER "error triggered by consumer" +#define XMLERR_UNEXPECTEDCHARACTER "unexpected character" +#define XMLERR_EQUALSIGNEXPECTED "expected '=' but not found" +#define XMLERR_QUOTATIONEXPECTED "expected \" or ' but not found" +#define XMLERR_ERRORPARSINGREFERENCE "error while parsing reference" +#define XMLERR_ERRORPARSINGPI "error while parsing processing instruction" +#define XMLERR_ERRORPARSINGATTLISTDECL "error while parsing attribute list declaration" +#define XMLERR_ERRORPARSINGATTTYPE "error while parsing attribute type declaration" +#define XMLERR_ERRORPARSINGATTVALUE "error while parsing attribute value declaration" +#define XMLERR_ERRORPARSINGELEMENTDECL "error while parsing element declaration" +#define XMLERR_ERRORPARSINGENTITYDECL "error while parsing entity declaration" +#define XMLERR_ERRORPARSINGNOTATIONDECL "error while parsing notation declaration" +#define XMLERR_ERRORPARSINGEXTERNALID "error while parsing external id" +#define XMLERR_ERRORPARSINGCOMMENT "error while parsing comment" +#define XMLERR_ERRORPARSINGENTITYVALUE "error while parsing entity value declaration" +#define XMLERR_CDSECTHEADEREXPECTED "expected the header for a cdata section" +#define XMLERR_MORETHANONEDOCTYPE "more than one document type definition" +#define XMLERR_ERRORPARSINGDOCTYPE "error while parsing document type definition" +#define XMLERR_INVALIDNAMEFORPI "invalid name for processing instruction" +#define XMLERR_VERSIONEXPECTED "version expected while reading the XML declaration" +#define XMLERR_EDECLORSDDECLEXPECTED "EDecl or SDDecl expected while reading the XML declaration" +#define XMLERR_SDDECLEXPECTED "SDDecl expected while reading the XML declaration" +#define XMLERR_WRONGVALUEFORSDECL "wrong value for standalone declaration" +#define XMLERR_UNPARSEDENTITYREFERENCE "unparsed entity reference in wrong context" +#define XMLERR_INTERNALGENERALENTITYINDTD "internal general entity reference not allowed in DTD" +#define XMLERR_EXTERNALGENERALENTITYINDTD "external parsed general entity reference not allowed in DTD" +#define XMLERR_EXTERNALGENERALENTITYINAV "external parsed general entity reference not allowed in attribute value" + + +// the constants for the lookup table +static const signed char cltWS = 0; // white space +static const signed char cltPer = 1; // % +static const signed char cltAmp = 2; // & +static const signed char cltGt = 3; // > +static const signed char cltLt = 4; // < +static const signed char cltSlash = 5; // / +static const signed char cltQm = 6; // ? +static const signed char cltEm = 7; // ! +static const signed char cltDash = 8; // - +static const signed char cltCB = 9; // ] +static const signed char cltOB = 10; // [ +static const signed char cltEq = 11; // = +static const signed char cltDq = 12; // " +static const signed char cltSq = 13; // ' +static const signed char cltUnknown = 14; + +// character lookup table +static const signed char charLookupTable[256]={ + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x00 - 0x07 + cltUnknown, // 0x08 + cltWS, // 0x09 \t + cltWS, // 0x0A \n + cltUnknown, // 0x0B + cltUnknown, // 0x0C + cltWS, // 0x0D \r + cltUnknown, // 0x0E + cltUnknown, // 0x0F + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x17 - 0x16 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x18 - 0x1F + cltWS, // 0x20 Space + cltEm, // 0x21 ! + cltDq, // 0x22 " + cltUnknown, // 0x23 + cltUnknown, // 0x24 + cltPer, // 0x25 % + cltAmp, // 0x26 & + cltSq, // 0x27 ' + cltUnknown, // 0x28 + cltUnknown, // 0x29 + cltUnknown, // 0x2A + cltUnknown, // 0x2B + cltUnknown, // 0x2C + cltDash, // 0x2D - + cltUnknown, // 0x2E + cltSlash, // 0x2F / + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x30 - 0x37 + cltUnknown, // 0x38 + cltUnknown, // 0x39 + cltUnknown, // 0x3A + cltUnknown, // 0x3B + cltLt, // 0x3C < + cltEq, // 0x3D = + cltGt, // 0x3E > + cltQm, // 0x3F ? + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x40 - 0x47 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x48 - 0x4F + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x50 - 0x57 + cltUnknown, // 0x58 + cltUnknown, // 0x59 + cltUnknown, // 0x5A + cltOB, // 0x5B [ + cltUnknown, // 0x5C + cltCB, // 0x5D ] + cltUnknown, // 0x5E + cltUnknown, // 0x5F + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x60 - 0x67 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x68 - 0x6F + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x70 - 0x77 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x78 - 0x7F + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x80 - 0x87 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x88 - 0x8F + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x90 - 0x97 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0x98 - 0x9F + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xA0 - 0xA7 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xA8 - 0xAF + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xB0 - 0xB7 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xB8 - 0xBF + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xC0 - 0xC7 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xC8 - 0xCF + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xD0 - 0xD7 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xD8 - 0xDF + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xE0 - 0xE7 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xE8 - 0xEF + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, // 0xF0 - 0xF7 + cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown, cltUnknown // 0xF8 - 0xFF +}; + + +class QXmlNamespaceSupportPrivate +{ +}; +class QXmlAttributesPrivate +{ +}; +class QXmlInputSourcePrivate +{ +}; +class QXmlParseExceptionPrivate +{ +}; +class QXmlLocatorPrivate +{ +}; +class QXmlDefaultHandlerPrivate +{ +}; + +#if defined(Q_FULL_TEMPLATE_INSTANTIATION) +bool operator==( const QMap, const QMap ) +{ + return FALSE; +} +#endif + +/*! + \class QXmlParseException qxml.h + \brief The QXmlParseException class is used to report errors with the + QXmlErrorHandler interface. + + \module XML + + \sa QXmlErrorHandler +*/ +/*! + \fn QXmlParseException::QXmlParseException( const QString& name, int c, int l, const QString& p, const QString& s ) + + Constructs a parse exception with the error string \a name in the column + \a c and line \a l for the public identifier \a p and the system identifier + \a s. +*/ +/*! + Returns the error message. +*/ +QString QXmlParseException::message() const +{ + return msg; +} +/*! + Returns the column number the error occured. +*/ +int QXmlParseException::columnNumber() const +{ + return column; +} +/*! + Returns the line number the error occured. +*/ +int QXmlParseException::lineNumber() const +{ + return line; +} +/*! + Returns the public identifier the error occured. +*/ +QString QXmlParseException::publicId() const +{ + return pub; +} +/*! + Returns the system identifier the error occured. +*/ +QString QXmlParseException::systemId() const +{ + return sys; +} + + +/*! + \class QXmlLocator qxml.h + \brief The QXmlLocator class provides the XML handler classes with + information about the actual parsing position. + + \module XML + + The reader reports a QXmlLocator to the content handler before he starts to + parse the document. This is done with the + QXmlContentHandler::setDocumentLocator() function. The handler classes can + now use this locator to get the actual position the reader is at. +*/ +/*! + \fn QXmlLocator::QXmlLocator( QXmlSimpleReader* parent ) + + Constructor. +*/ +/*! + \fn QXmlLocator::~QXmlLocator() + + Destructor. +*/ +/*! + Gets the column number (starting with 1) or -1 if there is no column number + available. +*/ +int QXmlLocator::columnNumber() +{ + return ( reader->columnNr == -1 ? -1 : reader->columnNr + 1 ); +} +/*! + Gets the line number (starting with 1) or -1 if there is no line number + available. +*/ +int QXmlLocator::lineNumber() +{ + return ( reader->lineNr == -1 ? -1 : reader->lineNr + 1 ); +} + + +/********************************************* + * + * QXmlNamespaceSupport + * + *********************************************/ + +/*! + \class QXmlNamespaceSupport qxml.h + \brief The QXmlNamespaceSupport class is a helper class for XML readers which + want to include namespace support. + + \module XML + + It provides some functions that makes it easy to handle namespaces. Its main + use is for subclasses of QXmlReader which want to provide namespace + support. + + See also the namespace description. +*/ + +/*! + Constructs a QXmlNamespaceSupport. +*/ +QXmlNamespaceSupport::QXmlNamespaceSupport() +{ + reset(); +} + +/*! + Destructs a QXmlNamespaceSupport. +*/ +QXmlNamespaceSupport::~QXmlNamespaceSupport() +{ +} + +/*! + This function declares a prefix in the current namespace context; the prefix + will remain in force until this context is popped, unless it is shadowed in a + descendant context. + + Note that there is an asymmetry in this library: while prefix() will not + return the default "" prefix, even if you have declared one; to check for a + default prefix, you have to look it up explicitly using uri(). This + asymmetry exists to make it easier to look up prefixes for attribute names, + where the default prefix is not allowed. +*/ +void QXmlNamespaceSupport::setPrefix( const QString& pre, const QString& uri ) +{ + if( pre.isNull() ) { + ns.insert( "", uri ); + } else { + ns.insert( pre, uri ); + } +} + +/*! + Returns one of the prefixes mapped to a namespace URI. + + If more than one prefix is currently mapped to the same URI, this function + will make an arbitrary selection; if you want all of the prefixes, use the + prefixes() function instead. + + Note: this will never return the empty (default) prefix; to check for a + default prefix, use the uri() function with an argument of "". +*/ +QString QXmlNamespaceSupport::prefix( const QString& uri ) const +{ + QMap::ConstIterator itc, it = ns.begin(); + while ( (itc=it) != ns.end() ) { + ++it; + if ( itc.data() == uri && !itc.key().isEmpty() ) + return itc.key(); + } + return ""; +} + +/*! + Looks up a prefix in the current context and returns the currently-mapped + namespace URI. Use the empty string ("") for the default namespace. +*/ +QString QXmlNamespaceSupport::uri( const QString& prefix ) const +{ + const QString& returi = ns[ prefix ]; + return returi; +} + +/*! + Splits the name at the ':' and returns the prefix and the local name. +*/ +void QXmlNamespaceSupport::splitName( const QString& qname, + QString& prefix, QString& localname ) const +{ + uint pos; + // search the ':' + for( pos=0; pos +
  • The namespace URI, or an empty string if none is in use. +
  • The local name (without prefix). + + + If the raw name has a prefix that has not been declared, then the return + value will be empty. + + Note that attribute names are processed differently than element names: an + unprefixed element name will received the default namespace (if any), while + an unprefixed element name will not +*/ +void QXmlNamespaceSupport::processName( const QString& qname, + bool isAttribute, + QString& nsuri, QString& localname ) const +{ + uint pos; + // search the ':' + for( pos=0; pos::ConstIterator itc, it = ns.begin(); + while ( (itc=it) != ns.end() ) { + ++it; + if ( !itc.key().isEmpty() ) + list.append( itc.key() ); + } + return list; +} + +/*! + Returns a list of all prefixes currently declared for a URI. + + The xml: prefix will be included. If you want only one prefix that's + mapped to the namespace URI, and you don't care which one you get, use the + prefix() function instead. + + Note: the empty (default) prefix is never included in this enumeration; to + check for the presence of a default namespace, use uri() with an + argument of "". +*/ +QStringList QXmlNamespaceSupport::prefixes( const QString& uri ) const +{ + QStringList list; + + QMap::ConstIterator itc, it = ns.begin(); + while ( (itc=it) != ns.end() ) { + ++it; + if ( itc.data() == uri && !itc.key().isEmpty() ) + list.append( itc.key() ); + } + return list; +} + +/*! + Starts a new namespace context. + + Normally, you should push a new context at the beginning of each XML element: + the new context will automatically inherit the declarations of its parent + context, but it will also keep track of which declarations were made within + this context. +*/ +void QXmlNamespaceSupport::pushContext() +{ + nsStack.push( ns ); +} + +/*! + Reverts to the previous namespace context. + + Normally, you should pop the context at the end of each XML element. After + popping the context, all namespace prefix mappings that were previously in + force are restored. +*/ +void QXmlNamespaceSupport::popContext() +{ + if( !nsStack.isEmpty() ) + ns = nsStack.pop(); +} + +/*! + Resets this namespace support object for reuse. +*/ +void QXmlNamespaceSupport::reset() +{ + nsStack.clear(); + ns.clear(); + ns.insert( "xml", "http://www.w3.org/XML/1998/namespace" ); // the XML namespace +} + + + +/********************************************* + * + * QXmlAttributes + * + *********************************************/ + +/*! + \class QXmlAttributes qxml.h + \brief The QXmlAttributes class provides XML attributes. + + \module XML + + If attributes are reported by QXmlContentHandler::startElement() this + class is used to pass the attribute values. It provides you with different + functions to access the attribute names and values. +*/ +/*! + \fn QXmlAttributes::QXmlAttributes() + + Constructs an empty attribute list. +*/ +/*! + \fn QXmlAttributes::~QXmlAttributes() + + Destructs attributes. +*/ + +/*! + Look up the index of an attribute by an XML 1.0 qualified name. + + Returns the index of the attribute (starting with 0) or -1 if it wasn't + found. + + See also the namespace description. +*/ +int QXmlAttributes::index( const QString& qName ) const +{ + return qnameList.findIndex( qName ); +} + +/*! + Looks up the index of an attribute by a namespace name. + + \a uri specifies the namespace URI, or the empty string if the name has no + namespace URI. \a localPart specifies the attribute's local name. + + Returns the index of the attribute (starting with 0) or -1 if it wasn't + found. + + See also the namespace description. +*/ +int QXmlAttributes::index( const QString& uri, const QString& localPart ) const +{ + uint count = uriList.count(); + for ( uint i=0; inamespace description. +*/ +QString QXmlAttributes::localName( int index ) const +{ + return localnameList[index]; +} + +/*! + Looks up an attribute's XML 1.0 qualified name by index (starting with 0). + + See also the namespace description. +*/ +QString QXmlAttributes::qName( int index ) const +{ + return qnameList[index]; +} + +/*! + Looks up an attribute's namespace URI by index (starting with 0). + + See also the namespace description. +*/ +QString QXmlAttributes::uri( int index ) const +{ + return uriList[index]; +} + +/*! + Looks up an attribute's type by index (starting with 0). + + At the moment only 'CDATA' is returned. +*/ +QString QXmlAttributes::type( int ) const +{ + return "CDATA"; +} + +/*! + Looks up an attribute's type by XML 1.0 qualified name. + + At the moment only 'CDATA' is returned. +*/ +QString QXmlAttributes::type( const QString& ) const +{ + return "CDATA"; +} + +/*! + Looks up an attribute's type by namespace name. + + The first parameter specifies the namespace URI, or the empty string if + the name has no namespace URI. The second parameter specifies the + attribute's local name. + + At the moment only 'CDATA' is returned. +*/ +QString QXmlAttributes::type( const QString&, const QString& ) const +{ + return "CDATA"; +} + +/*! + Looks up an attribute's value by index (starting with 0). +*/ +QString QXmlAttributes::value( int index ) const +{ + return valueList[index]; +} + +/*! + Looks up an attribute's value by XML 1.0 qualified name. + + See also the namespace description. +*/ +QString QXmlAttributes::value( const QString& qName ) const +{ + int i = index( qName ); + if ( i == -1 ) + return QString::null; + return valueList[ i ]; +} + +/*! + Looks up an attribute's value by namespace name. + + \a uri specifies the namespace URI, or the empty string if the name has no + namespace URI. \a localName specifies the attribute's local name. + + See also the namespace description. +*/ +QString QXmlAttributes::value( const QString& uri, const QString& localName ) const +{ + int i = index( uri, localName ); + if ( i == -1 ) + return QString::null; + return valueList[ i ]; +} + + +/********************************************* + * + * QXmlInputSource + * + *********************************************/ + +/*! + \class QXmlInputSource qxml.h + \brief The QXmlInputSource class is the source where XML data is read from. + + \module XML + + All subclasses of QXmlReader read the input from this class. +*/ + +/*! + Returns all the data this input source contains. +*/ +const QString& QXmlInputSource::data() const +{ + return input; +} + +/*! + Constructs a input source which contains no data. +*/ +QXmlInputSource::QXmlInputSource( ) +{ + input = ""; +} + +/*! + Constructs a input source and get the data from the text stream. +*/ +QXmlInputSource::QXmlInputSource( QTextStream& stream ) +{ + QByteArray rawData; + if ( stream.device()->isDirectAccess() ) { + rawData = stream.device()->readAll(); + } else { + int nread = 0; + const int bufsize = 512; + while ( !stream.device()->atEnd() ) { + rawData.resize( nread + bufsize ); + nread += stream.device()->readBlock( rawData.data()+nread, bufsize ); + } + rawData.resize( nread ); + } + readInput( rawData ); +} + +/*! + Constructs a input source and get the data from a file. If the file cannot be + read the input source is empty. +*/ +QXmlInputSource::QXmlInputSource( QFile& file ) +{ + if ( !file.open(IO_ReadOnly) ) { + input = ""; + return; + } + QByteArray rawData = file.readAll(); + readInput( rawData ); + file.close(); +} + +/*! + Destructor. +*/ +QXmlInputSource::~QXmlInputSource() +{ +} + +/*! + Sets the data of the input source to \a dat. +*/ +void QXmlInputSource::setData( const QString& dat ) +{ + input = dat; +} + +/*! + Read the XML file from the byte array; try to recoginize the encoding. +*/ +// ### The input source should not do the encoding detection! +void QXmlInputSource::readInput( QByteArray& rawData ) +{ + QBuffer buf( rawData ); + buf.open( IO_ReadOnly ); + QTextStream *stream = new QTextStream( &buf ); + QChar tmp; + // assume UTF8 or UTF16 at first + stream->setEncoding( QTextStream::UnicodeUTF8 ); + input = ""; + // read the first 5 characters + for ( int i=0; i<5; i++ ) { + *stream >> tmp; + input += tmp; + } + // starts the document with an XML declaration? + if ( input == "> tmp; + input += tmp; + } while( tmp != '>' ); + // and try to find out if there is an encoding + int pos = input.find( "encoding" ); + if ( pos != -1 ) { + QString encoding; + do { + pos++; + if ( pos > (int)input.length() ) + goto finished; + } while( input[pos] != '"' && input[pos] != '\'' ); + pos++; + while( input[pos] != '"' && input[pos] != '\'' ) { + encoding += input[pos]; + pos++; + if ( pos > (int)input.length() ) + goto finished; + } + delete stream; + stream = new QTextStream( &buf ); + stream->setCodec( QTextCodec::codecForName( encoding ) ); + buf.reset(); + input = ""; + } + } +finished: + input += stream->read(); + delete stream; + buf.close(); +} + + +/********************************************* + * + * QXmlDefaultHandler + * + *********************************************/ + +/*! + \class QXmlContentHandler qxml.h + \brief The QXmlContentHandler class provides an interface to report logical + content of XML data. + + \module XML + + If the application needs to be informed of basic parsing events, it + implements this interface and sets it with QXmlReader::setContentHandler(). + The reader reports basic document-related events like the start and end of + elements and character data through this interface. + + The order of events in this interface is very important, and mirrors the + order of information in the document itself. For example, all of an element's + content (character data, processing instructions, and/or subelements) will + appear, in order, between the startElement() event and the corresponding + endElement() event. + + The class QXmlDefaultHandler gives a default implementation for this + interface; subclassing from this class is very convenient if you want only be + informed of some parsing events. + + See also the Introduction to SAX2. + + \sa QXmlDTDHandler QXmlDeclHandler QXmlEntityResolver QXmlErrorHandler + QXmlLexicalHandler +*/ +/*! + \fn void QXmlContentHandler::setDocumentLocator( QXmlLocator* locator ) + + The reader calls this function before he starts parsing the document. The + argument \a locator is a pointer to a QXmlLocator which allows the + application to get the actual position of the parsing in the document. + + Do not destroy the \a locator; it is destroyed when the reader is destroyed + (do not use the \a locator after the reader got destroyed). +*/ +/*! + \fn bool QXmlContentHandler::startDocument() + + The reader calls this function when he starts parsing the document. + The reader will call this function only once before any other functions in + this class or in the QXmlDTDHandler class are called (except + QXmlContentHandler::setDocumentLocator()). + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. + + \sa endDocument() +*/ +/*! + \fn bool QXmlContentHandler::endDocument() + + The reader calls this function after he has finished the parsing. It + is only called once. It is the last function of all handler functions that is + called. It is called after the reader has read all input or has abandoned + parsing because of a fatal error. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. + + \sa startDocument() +*/ +/*! + \fn bool QXmlContentHandler::startPrefixMapping( const QString& prefix, const QString& uri ) + + The reader calls this function to signal the begin of a prefix-URI + namespace mapping scope. This information is not necessary for normal + namespace processing since the reader automatically replaces prefixes for + element and attribute names. + + Note that startPrefixMapping and endPrefixMapping calls are not guaranteed to + be properly nested relative to each-other: all startPrefixMapping events will + occur before the corresponding startElement event, and all endPrefixMapping + events will occur after the corresponding endElement event, but their order + is not otherwise guaranteed. + + The argument \a prefix is the namespace prefix being declared and the + argument \a uri is the namespace URI the prefix is mapped to. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. + + See also the namespace description. + + \sa endPrefixMapping() +*/ +/*! + \fn bool QXmlContentHandler::endPrefixMapping( const QString& prefix ) + + The reader calls this function to signal the end of a prefix mapping. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. + + See also the namespace description. + + \sa startPrefixMapping() +*/ +/*! + \fn bool QXmlContentHandler::startElement( const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts ) + + The reader calls this function when he has parsed a start element tag. + + There will be a corresponding endElement() call when the corresponding end + element tag was read. The startElement() and endElement() calls are always + nested correctly. Empty element tags (e.g. <a/>) are reported by + startElement() directly followed by a call to endElement(). + + The attribute list provided will contain only attributes with explicit + values. The attribute list will contain attributes used for namespace + declaration (i.e. attributes starting with xmlns) only if the + namespace-prefix property of the reader is TRUE. + + The argument \a uri is the namespace URI, or the empty string if the element + has no namespace URI or if namespace processing is not being performed, \a + localName is the local name (without prefix), or the empty string if + namespace processing is not being performed, \a qName is the qualified name + (with prefix), or the empty string if qualified names are not available and + \a atts are the attributes attached to the element. If there are no + attributes, \a atts is an empty attributes object + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. + + See also the namespace description. + + \sa endElement() +*/ +/*! + \fn bool QXmlContentHandler::endElement( const QString& namespaceURI, const QString& localName, const QString& qName ) + + The reader calls this function when he has parsed an end element tag. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. + + See also the namespace description. + + \sa startElement() +*/ +/*! + \fn bool QXmlContentHandler::characters( const QString& ch ) + + The reader calls this function when he has parsed a chunk of character + data (either normal character data or character data inside a CDATA section; + if you have to distinguish between those two types you have to use + QXmlLexicalHandler::startCDATA() and QXmlLexicalHandler::endCDATA() in + addition). + + Some readers will report whitespace in element content using the + ignorableWhitespace() function rather than this one (QXmlSimpleReader will + do it not though). + + A reader is allowed to report the character data of an element in more than + one chunk; e.g. a reader might want to report "a &lt; b" in three + characters() events ("a ", "<" and " b"). + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn bool QXmlContentHandler::ignorableWhitespace( const QString& ch ) + + Some readers may use this function to report each chunk of whitespace in + element content (QXmlSimpleReader does not though). + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn bool QXmlContentHandler::processingInstruction( const QString& target, const QString& data ) + + The reader calls this function when he has parsed a processing + instruction. + + \a target is the target name of the processing instruction and \a data is the + data of the processing instruction. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn bool QXmlContentHandler::skippedEntity( const QString& name ) + + Some readers may skip entities if they have not seen the declarations (e.g. + because they are in an external DTD). If they do so they will report it by + calling this function. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn QString QXmlContentHandler::errorString() + + The reader calls this function to get an error string if any of the handler + functions returns FALSE to him. +*/ + + +/*! + \class QXmlErrorHandler qxml.h + \brief The QXmlErrorHandler class provides an interface to report errors in + XML data. + + \module XML + + If the application is interested in reporting errors to the user or any other + customized error handling, you should subclass this class. + + You can set the error handler with QXmlReader::setErrorHandler(). + + See also the Introduction to SAX2. + + \sa QXmlDTDHandler QXmlDeclHandler QXmlContentHandler QXmlEntityResolver + QXmlLexicalHandler +*/ +/*! + \fn bool QXmlErrorHandler::warning( const QXmlParseException& exception ) + + A reader might use this function to report a warning. Warnings are conditions + that are not errors or fatal errors as defined by the XML 1.0 specification. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn bool QXmlErrorHandler::error( const QXmlParseException& exception ) + + A reader might use this function to report a recoverable error. A recoverable + error corresponds to the definiton of "error" in section 1.2 of the XML 1.0 + specification. + + The reader must continue to provide normal parsing events after invoking this + function. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn bool QXmlErrorHandler::fatalError( const QXmlParseException& exception ) + + A reader must use this function to report a non-recoverable error. + + If this function returns TRUE the reader might try to go on parsing and + reporting further errors; but no regular parsing events are reported. +*/ +/*! + \fn QString QXmlErrorHandler::errorString() + + The reader calls this function to get an error string if any of the handler + functions returns FALSE to him. +*/ + + +/*! + \class QXmlDTDHandler qxml.h + \brief The QXmlDTDHandler class provides an interface to report DTD content + of XML data. + + \module XML + + If an application needs information about notations and unparsed entities, + then the application implements this interface and registers an instance with + QXmlReader::setDTDHandler(). + + Note that this interface includes only those DTD events that the XML + recommendation requires processors to report: notation and unparsed entity + declarations. + + See also the Introduction to SAX2. + + \sa QXmlDeclHandler QXmlContentHandler QXmlEntityResolver QXmlErrorHandler + QXmlLexicalHandler +*/ +/*! + \fn bool QXmlDTDHandler::notationDecl( const QString& name, const QString& publicId, const QString& systemId ) + + The reader calls this function when he has parsed a notation + declaration. + + The argument \a name is the notation name, \a publicId is the notations's + public identifier and \a systemId is the notations's system identifier. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn bool QXmlDTDHandler::unparsedEntityDecl( const QString& name, const QString& publicId, const QString& systemId, const QString& notationName ) + + The reader calls this function when he finds an unparsed entity declaration. + + The argument \a name is the unparsed entity's name, \a publicId is the + entity's public identifier, \a systemId is the entity's system identifier and + \a notation is the name of the associated notation. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn QString QXmlDTDHandler::errorString() + + The reader calls this function to get an error string if any of the handler + functions returns FALSE to him. +*/ + + +/*! + \class QXmlEntityResolver qxml.h + \brief The QXmlEntityResolver class provides an interface to resolve extern + entities contained in XML data. + + \module XML + + If an application needs to implement customized handling for external + entities, it must implement this interface and register it with + QXmlReader::setEntityResolver(). + + See also the Introduction to SAX2. + + \sa QXmlDTDHandler QXmlDeclHandler QXmlContentHandler QXmlErrorHandler + QXmlLexicalHandler +*/ +/*! + \fn bool QXmlEntityResolver::resolveEntity( const QString& publicId, const QString& systemId, QXmlInputSource* ret ) + + The reader will call this function before he opens any external entity, + except the top-level document entity. The application may request the reader + to resolve the entity itself (\a ret is 0) or to use an entirely different + input source (\a ret points to the input source). + + The reader will delete the input source \a ret when he no longer needs it. So + you should allocate it on the heap with \c new. + + The argument \a publicId is the public identifier of the external entity, \a + systemId is the system identifier of the external entity and \a ret is the + return value of this function: if it is 0 the reader should resolve the + entity itself, if it is non-zero it must point to an input source which the + reader will use instead. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn QString QXmlEntityResolver::errorString() + + The reader calls this function to get an error string if any of the handler + functions returns FALSE to him. +*/ + + +/*! + \class QXmlLexicalHandler qxml.h + \brief The QXmlLexicalHandler class provides an interface to report lexical + content of XML data. + + \module XML + + The events in the lexical handler apply to the entire document, not just to + the document element, and all lexical handler events appear between the + content handler's startDocument and endDocument events. + + You can set the lexical handler with QXmlReader::setLexicalHandler(). + + This interface is designed after the SAX2 extension LexicalHandler. The + functions startEntity() and endEntity() are not included though. + + See also the Introduction to SAX2. + + \sa QXmlDTDHandler QXmlDeclHandler QXmlContentHandler QXmlEntityResolver + QXmlErrorHandler +*/ +/*! + \fn bool QXmlLexicalHandler::startDTD( const QString& name, const QString& publicId, const QString& systemId ) + + The reader calls this function to report the start of a DTD declaration, if + any. + + All declarations reported through QXmlDTDHandler or QXmlDeclHandler appear + between the startDTD() and endDTD() calls. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. + + \sa endDTD() +*/ +/*! + \fn bool QXmlLexicalHandler::endDTD() + + The reader calls this function to report the end of a DTD declaration, if + any. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. + + \sa startDTD() +*/ +/*! + \fn bool QXmlLexicalHandler::startCDATA() + + The reader calls this function to report the start of a CDATA section. The + content of the CDATA section will be reported through the regular + QXmlContentHandler::characters(). This function is intended only to report + the boundary. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. + + \sa endCDATA() +*/ +/*! + \fn bool QXmlLexicalHandler::endCDATA() + + The reader calls this function to report the end of a CDATA section. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. + + \sa startCDATA() +*/ +/*! + \fn bool QXmlLexicalHandler::comment( const QString& ch ) + + The reader calls this function to report an XML comment anywhere in the + document. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn QString QXmlLexicalHandler::errorString() + + The reader calls this function to get an error string if any of the handler + functions returns FALSE to him. +*/ + + +/*! + \class QXmlDeclHandler qxml.h + \brief The QXmlDeclHandler class provides an interface to report declaration + content of XML data. + + \module XML + + You can set the declaration handler with QXmlReader::setDeclHandler(). + + This interface is designed after the SAX2 extension DeclHandler. + + See also the Introduction to SAX2. + + \sa QXmlDTDHandler QXmlContentHandler QXmlEntityResolver QXmlErrorHandler + QXmlLexicalHandler +*/ +/*! + \fn bool QXmlDeclHandler::attributeDecl( const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value ) + + The reader calls this function to report an attribute type declaration. Only + the effective (first) declaration for an attribute will be reported. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn bool QXmlDeclHandler::internalEntityDecl( const QString& name, const QString& value ) + + The reader calls this function to report an internal entity declaration. Only + the effective (first) declaration will be reported. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn bool QXmlDeclHandler::externalEntityDecl( const QString& name, const QString& publicId, const QString& systemId ) + + The reader calls this function to report a parsed external entity + declaration. Only the effective (first) declaration for each entity will be + reported. + + If this function returns FALSE the reader will stop parsing and will report + an error. The reader will use the function errorString() to get the error + message that will be used for reporting the error. +*/ +/*! + \fn QString QXmlDeclHandler::errorString() + + The reader calls this function to get an error string if any of the handler + functions returns FALSE to him. +*/ + + +/*! + \class QXmlDefaultHandler qxml.h + \brief The QXmlDefaultHandler class provides a default implementation of all + XML handler classes. + + \module XML + + Very often you are only interested in parts of the things that that the + reader reports to you. This class simply implements a default behaviour of + the handler classes (most of the time: do nothing). Normally this is the + class you subclass for implementing your customized handler. + + See also the Introduction to SAX2. + + \sa QXmlDTDHandler QXmlDeclHandler QXmlContentHandler QXmlEntityResolver + QXmlErrorHandler QXmlLexicalHandler +*/ +/*! + \fn QXmlDefaultHandler::QXmlDefaultHandler() + + Constructor. +*/ +/*! + \fn QXmlDefaultHandler::~QXmlDefaultHandler() + + Destructor. +*/ + +/*! + Does nothing. +*/ +void QXmlDefaultHandler::setDocumentLocator( QXmlLocator* ) +{ +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::startDocument() +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::endDocument() +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::startPrefixMapping( const QString&, const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::endPrefixMapping( const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::startElement( const QString&, const QString&, + const QString&, const QXmlAttributes& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::endElement( const QString&, const QString&, + const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::characters( const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::ignorableWhitespace( const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::processingInstruction( const QString&, + const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::skippedEntity( const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::warning( const QXmlParseException& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::error( const QXmlParseException& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::fatalError( const QXmlParseException& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::notationDecl( const QString&, const QString&, + const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::unparsedEntityDecl( const QString&, const QString&, + const QString&, const QString& ) +{ + return TRUE; +} + +/*! + Always sets \a ret to 0, so that the reader will use the system identifier + provided in the XML document. +*/ +bool QXmlDefaultHandler::resolveEntity( const QString&, const QString&, + QXmlInputSource* ret ) +{ + ret = 0; + return TRUE; +} + +/*! + Returns the default error string. +*/ +QString QXmlDefaultHandler::errorString() +{ + return QString( XMLERR_ERRORBYCONSUMER ); +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::startDTD( const QString&, const QString&, const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::endDTD() +{ + return TRUE; +} + +#if 0 +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::startEntity( const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::endEntity( const QString& ) +{ + return TRUE; +} +#endif + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::startCDATA() +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::endCDATA() +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::comment( const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::attributeDecl( const QString&, const QString&, const QString&, const QString&, const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::internalEntityDecl( const QString&, const QString& ) +{ + return TRUE; +} + +/*! + Does nothing. +*/ +bool QXmlDefaultHandler::externalEntityDecl( const QString&, const QString&, const QString& ) +{ + return TRUE; +} + + +/********************************************* + * + * QXmlSimpleReaderPrivate + * + *********************************************/ + +class QXmlSimpleReaderPrivate +{ +private: + // constructor + QXmlSimpleReaderPrivate() + { } + + + // used for entity declarations + struct ExternParameterEntity + { + ExternParameterEntity( ) {} + ExternParameterEntity( const QString &p, const QString &s ) + : publicId(p), systemId(s) {} + QString publicId; + QString systemId; + }; + struct ExternEntity + { + ExternEntity( ) {} + ExternEntity( const QString &p, const QString &s, const QString &n ) + : publicId(p), systemId(s), notation(n) {} + QString publicId; + QString systemId; + QString notation; + }; + QMap externParameterEntities; + QMap parameterEntities; + QMap externEntities; + QMap entities; + + // used for standalone declaration + enum Standalone { Yes, No, Unknown }; + + QString doctype; // only used for the doctype + QString xmlVersion; // only used to store the version information + QString encoding; // only used to store the encoding + Standalone standalone; // used to store the value of the standalone declaration + + QString publicId; // used by parseExternalID() to store the public ID + QString systemId; // used by parseExternalID() to store the system ID + QString attDeclEName; // use by parseAttlistDecl() + QString attDeclAName; // use by parseAttlistDecl() + + // flags for some features support + bool useNamespaces; + bool useNamespacePrefixes; + bool reportWhitespaceCharData; + + // used to build the attribute list + QXmlAttributes attList; + + // helper classes + QXmlLocator *locator; + QXmlNamespaceSupport namespaceSupport; + + // error string + QString error; + + // friend declarations + friend class QXmlSimpleReader; +}; + + +/********************************************* + * + * QXmlSimpleReader + * + *********************************************/ + +/*! + \class QXmlReader qxml.h + \brief The QXmlReader class provides an interface for XML readers (i.e. + parsers). + + \module XML + + This abstract class describes an interface for all XML readers in Qt. At the + moment there is only one implementation of a reader included in the XML + module of Qt (QXmlSimpleReader). In future releases there might be more + readers with different properties available (e.g. a validating parser). + + The design of the XML classes follow the + SAX2 java interface. + It was adopted to fit into the Qt naming conventions; so it should be very + easy for anybody who has worked with SAX2 to get started with the Qt XML + classes. + + All readers use the class QXmlInputSource to read the input document from. + Since you are normally interested in certain contents of the XML document, + the reader reports those contents through special handler classes + (QXmlDTDHandler, QXmlDeclHandler, QXmlContentHandler, QXmlEntityResolver, + QXmlErrorHandler and QXmlLexicalHandler). + + You have to subclass these classes. Since the handler classes describe only + interfaces you must implement all functions; there is a class + (QXmlDefaultHandler) to make this easier; it implements a default behaviour + (do nothing) for all functions. + + For getting started see also the + Quick start. + + \sa QXmlSimpleReader +*/ +/*! + \fn bool QXmlReader::feature( const QString& name, bool *ok ) const + + If the reader has the feature \a name, this function returns the value of the + feature. + + If the reader has not the feature \a name, the return value may be anything. + + If \a ok is not 0, then \a ok is set to TRUE if the reader has the feature + \a name, otherwise \a ok is set to FALSE. + + \sa setFeature() hasFeature() +*/ +/*! + \fn void QXmlReader::setFeature( const QString& name, bool value ) + + Sets the feature \a name to \a value. If the reader has not the feature \a + name, this value is ignored. + + \sa feature() hasFeature() +*/ +/*! + \fn bool QXmlReader::hasFeature( const QString& name ) const + + Returns \c TRUE if the reader has the feature \a name, otherwise FALSE. + + \sa feature() setFeature() +*/ +/*! + \fn void* QXmlReader::property( const QString& name, bool *ok ) const + + If the reader has the property \a name, this function returns the value of + the property. + + If the reader has not the property \a name, the return value is 0. + + If \a ok is not 0, then \a ok is set to TRUE if the reader has the property + \a name, otherwise \a ok is set to FALSE. + + \sa setProperty() hasProperty() +*/ +/*! + \fn void QXmlReader::setProperty( const QString& name, void* value ) + + Sets the property \a name to \a value. If the reader has not the property \a + name, this value is ignored. + + \sa property() hasProperty() +*/ +/*! + \fn bool QXmlReader::hasProperty( const QString& name ) const + + Returns TRUE if the reader has the property \a name, otherwise FALSE. + + \sa property() setProperty() +*/ +/*! + \fn void QXmlReader::setEntityResolver( QXmlEntityResolver* handler ) + + Sets the entity resolver to \a handler. + + \sa entityResolver() +*/ +/*! + \fn QXmlEntityResolver* QXmlReader::entityResolver() const + + Returns the entity resolver or 0 if none was set. + + \sa setEntityResolver() +*/ +/*! + \fn void QXmlReader::setDTDHandler( QXmlDTDHandler* handler ) + + Sets the DTD handler to \a handler. + + \sa DTDHandler() +*/ +/*! + \fn QXmlDTDHandler* QXmlReader::DTDHandler() const + + Returns the DTD handler or 0 if none was set. + + \sa setDTDHandler() +*/ +/*! + \fn void QXmlReader::setContentHandler( QXmlContentHandler* handler ) + + Sets the content handler to \a handler. + + \sa contentHandler() +*/ +/*! + \fn QXmlContentHandler* QXmlReader::contentHandler() const + + Returns the content handler or 0 if none was set. + + \sa setContentHandler() +*/ +/*! + \fn void QXmlReader::setErrorHandler( QXmlErrorHandler* handler ) + + Sets the error handler to \a handler. + + \sa errorHandler() +*/ +/*! + \fn QXmlErrorHandler* QXmlReader::errorHandler() const + + Returns the error handler or 0 if none was set + + \sa setErrorHandler() +*/ +/*! + \fn void QXmlReader::setLexicalHandler( QXmlLexicalHandler* handler ) + + Sets the lexical handler to \a handler. + + \sa lexicalHandler() +*/ +/*! + \fn QXmlLexicalHandler* QXmlReader::lexicalHandler() const + + Returns the lexical handler or 0 if none was set. + + \sa setLexicalHandler() +*/ +/*! + \fn void QXmlReader::setDeclHandler( QXmlDeclHandler* handler ) + + Sets the declaration handler to \a handler. + + \sa declHandler() +*/ +/*! + \fn QXmlDeclHandler* QXmlReader::declHandler() const + + Returns the declaration handler or 0 if none was set. + + \sa setDeclHandler() +*/ +/*! + \fn bool QXmlReader::parse( const QXmlInputSource& input ) + + Parses the XML document \a input. Returns TRUE if the parsing was successful, + otherwise FALSE. +*/ +/*! + \fn bool QXmlReader::parse( const QString& systemId ) + + Parses the XML document at the location \a systemId. Returns TRUE if the + parsing was successful, otherwise FALSE. +*/ + + +/*! + \class QXmlSimpleReader qxml.h + \brief The QXmlSimpleReader class provides an implementation of a simple XML + reader (i.e. parser). + + \module XML + + This XML reader is sufficient for simple parsing tasks. Here is a short list + of the properties of this reader: +
      +
    • well-formed parser +
    • does not parse any external entities +
    • can do namespace processing +
    + + For getting started see also the + Quick start. +*/ + +//guaranteed not to be a characater +const QChar QXmlSimpleReader::QEOF = QChar((ushort)0xffff); + +/*! + Constructs a simple XML reader. +*/ +QXmlSimpleReader::QXmlSimpleReader() +{ + d = new QXmlSimpleReaderPrivate(); + d->locator = new QXmlLocator( this ); + + entityRes = 0; + dtdHnd = 0; + contentHnd = 0; + errorHnd = 0; + lexicalHnd = 0; + declHnd = 0; + + // default feature settings + d->useNamespaces = TRUE; + d->useNamespacePrefixes = FALSE; + d->reportWhitespaceCharData = TRUE; +} + +/*! + Destroys a simple XML reader. +*/ +QXmlSimpleReader::~QXmlSimpleReader() +{ + delete d->locator; + delete d; +} + +/*! + Gets the state of a feature. + + \sa setFeature() hasFeature() +*/ +bool QXmlSimpleReader::feature( const QString& name, bool *ok ) const +{ + if ( ok != 0 ) + *ok = TRUE; + if ( name == "http://xml.org/sax/features/namespaces" ) { + return d->useNamespaces; + } else if ( name == "http://xml.org/sax/features/namespace-prefixes" ) { + return d->useNamespacePrefixes; + } else if ( name == "http://trolltech.com/xml/features/report-whitespace-only-CharData" ) { + return d->reportWhitespaceCharData; + } else { + qWarning( "Unknown feature %s", name.ascii() ); + if ( ok != 0 ) + *ok = FALSE; + } + return FALSE; +} + +/*! + Sets the state of a feature. + + Supported features are: +
      +
    • http://xml.org/sax/features/namespaces: + if this feature is TRUE, namespace processing is performed +
    • http://xml.org/sax/features/namespace-prefixes: + if this feature is TRUE, the the original prefixed names and attributes + used for namespace declarations are reported +
    • http://trolltech.com/xml/features/report-whitespace-only-CharData: + if this feature is TRUE, CharData that consists only of whitespace (and + no other characters) is not reported via + QXmlContentHandler::characters() +
    + + \sa feature() hasFeature() +*/ +void QXmlSimpleReader::setFeature( const QString& name, bool value ) +{ + if ( name == "http://xml.org/sax/features/namespaces" ) { + d->useNamespaces = value; + } else if ( name == "http://xml.org/sax/features/namespace-prefixes" ) { + d->useNamespacePrefixes = value; + } else if ( name == "http://trolltech.com/xml/features/report-whitespace-only-CharData" ) { + d->reportWhitespaceCharData = value; + } else { + qWarning( "Unknown feature %s", name.ascii() ); + } +} + +/*! + Returns TRUE if the class has a feature named \a feature, otherwise FALSE. + + \sa setFeature() feature() +*/ +bool QXmlSimpleReader::hasFeature( const QString& name ) const +{ + if ( name == "http://xml.org/sax/features/namespaces" || + name == "http://xml.org/sax/features/namespace-prefixes" || + name == "http://trolltech.com/xml/features/report-whitespace-only-CharData" ) { + return TRUE; + } else { + return FALSE; + } +} + +/*! + Returns 0 since this class does not support any properties. +*/ +void* QXmlSimpleReader::property( const QString&, bool *ok ) const +{ + if ( ok != 0 ) + *ok = FALSE; + return 0; +} + +/*! + Does nothing since this class does not support any properties. +*/ +void QXmlSimpleReader::setProperty( const QString&, void* ) +{ +} + +/*! + Returns FALSE since this class does not support any properties. +*/ +bool QXmlSimpleReader::hasProperty( const QString& ) const +{ + return FALSE; +} + +/*! \reimp */ +void QXmlSimpleReader::setEntityResolver( QXmlEntityResolver* handler ) +{ entityRes = handler; } + +/*! \reimp */ +QXmlEntityResolver* QXmlSimpleReader::entityResolver() const +{ return entityRes; } + +/*! \reimp */ +void QXmlSimpleReader::setDTDHandler( QXmlDTDHandler* handler ) +{ dtdHnd = handler; } + +/*! \reimp */ +QXmlDTDHandler* QXmlSimpleReader::DTDHandler() const +{ return dtdHnd; } + +/*! \reimp */ +void QXmlSimpleReader::setContentHandler( QXmlContentHandler* handler ) +{ contentHnd = handler; } + +/*! \reimp */ +QXmlContentHandler* QXmlSimpleReader::contentHandler() const +{ return contentHnd; } + +/*! \reimp */ +void QXmlSimpleReader::setErrorHandler( QXmlErrorHandler* handler ) +{ errorHnd = handler; } + +/*! \reimp */ +QXmlErrorHandler* QXmlSimpleReader::errorHandler() const +{ return errorHnd; } + +/*! \reimp */ +void QXmlSimpleReader::setLexicalHandler( QXmlLexicalHandler* handler ) +{ lexicalHnd = handler; } + +/*! \reimp */ +QXmlLexicalHandler* QXmlSimpleReader::lexicalHandler() const +{ return lexicalHnd; } + +/*! \reimp */ +void QXmlSimpleReader::setDeclHandler( QXmlDeclHandler* handler ) +{ declHnd = handler; } + +/*! \reimp */ +QXmlDeclHandler* QXmlSimpleReader::declHandler() const +{ return declHnd; } + + + +/*! \reimp */ +bool QXmlSimpleReader::parse( const QXmlInputSource& input ) +{ + init( input ); + // call the handler + if ( contentHnd ) { + contentHnd->setDocumentLocator( d->locator ); + if ( !contentHnd->startDocument() ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + // parse prolog + if ( !parseProlog() ) { + d->error = XMLERR_ERRORPARSINGPROLOG; + goto parseError; + } + // parse element + if ( !parseElement() ) { + d->error = XMLERR_ERRORPARSINGMAINELEMENT; + goto parseError; + } + // parse Misc* + while ( !atEnd() ) { + if ( !parseMisc() ) { + d->error = XMLERR_ERRORPARSINGMISC; + goto parseError; + } + } + // is stack empty? + if ( !tags.isEmpty() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + // call the handler + if ( contentHnd ) { + if ( !contentHnd->endDocument() ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + + return TRUE; + + // error handling + +parseError: + reportParseError(); + tags.clear(); + return FALSE; +} + +/*! + Parses the prolog [22]. +*/ +bool QXmlSimpleReader::parseProlog() +{ + bool xmldecl_possible = TRUE; + bool doctype_read = FALSE; + + const signed char Init = 0; + const signed char EatWS = 1; // eat white spaces + const signed char Lt = 2; // '<' read + const signed char Em = 3; // '!' read + const signed char DocType = 4; // read doctype + const signed char Comment = 5; // read comment + const signed char PI = 6; // read PI + const signed char Done = 7; + + const signed char InpWs = 0; + const signed char InpLt = 1; // < + const signed char InpQm = 2; // ? + const signed char InpEm = 3; // ! + const signed char InpD = 4; // D + const signed char InpDash = 5; // - + const signed char InpUnknown = 6; + + // use some kind of state machine for parsing + static signed char table[7][7] = { + /* InpWs InpLt InpQm InpEm InpD InpDash InpUnknown */ + { EatWS, Lt, -1, -1, -1, -1, -1 }, // Init + { -1, Lt, -1, -1, -1, -1, -1 }, // EatWS + { -1, -1, PI, Em, Done, -1, Done }, // Lt + { -1, -1, -1, -1, DocType, Comment, -1 }, // Em + { EatWS, Lt, -1, -1, -1, -1, -1 }, // DocType + { EatWS, Lt, -1, -1, -1, -1, -1 }, // Comment + { EatWS, Lt, -1, -1, -1, -1, -1 } // PI + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // read input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( c == '<' ) { + input = InpLt; + } else if ( c == '?' ) { + input = InpQm; + } else if ( c == '!' ) { + input = InpEm; + } else if ( c == 'D' ) { + input = InpD; + } else if ( c == '-' ) { + input = InpDash; + } else { + input = InpUnknown; + } + // get new state + state = table[state][input]; + + // in some cases do special actions depending on state + switch ( state ) { + case EatWS: + // XML declaration only on first position possible + xmldecl_possible = FALSE; + // eat white spaces + eat_ws(); + break; + case Lt: + // next character + next(); + break; + case Em: + // XML declaration only on first position possible + xmldecl_possible = FALSE; + // next character + next(); + break; + case DocType: + parseOk = parseDoctype(); + break; + case Comment: + parseOk = parseComment(); + break; + case PI: + parseOk = parsePI( xmldecl_possible ); + break; + } + // no input is read after this + switch ( state ) { + case DocType: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGPROLOG; + goto parseError; + } + if ( doctype_read ) { + d->error = XMLERR_MORETHANONEDOCTYPE; + goto parseError; + } else { + doctype_read = FALSE; + } + break; + case Comment: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGPROLOG; + goto parseError; + } + if ( lexicalHnd ) { + if ( !lexicalHnd->comment( string() ) ) { + d->error = lexicalHnd->errorString(); + goto parseError; + } + } + break; + case PI: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGPROLOG; + goto parseError; + } + // call the handler + if ( contentHnd ) { + if ( xmldecl_possible && !d->xmlVersion.isEmpty() ) { + QString value( "version = '" ); + value += d->xmlVersion; + value += "'"; + if ( !d->encoding.isEmpty() ) { + value += " encoding = '"; + value += d->encoding; + value += "'"; + } + if ( d->standalone == QXmlSimpleReaderPrivate::Yes ) { + value += " standalone = 'yes'"; + } else if ( d->standalone == QXmlSimpleReaderPrivate::No ) { + value += " standalone = 'no'"; + } + if ( !contentHnd->processingInstruction( "xml", value ) ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } else { + if ( !contentHnd->processingInstruction( name(), string() ) ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + } + // XML declaration only on first position possible + xmldecl_possible = FALSE; + break; + case Done: + return TRUE; + case -1: + d->error = XMLERR_ERRORPARSINGELEMENT; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse an element [39]. + + Precondition: the opening '<' is already read. +*/ +bool QXmlSimpleReader::parseElement() +{ + static QString uri, lname, prefix; + static bool t; + + const signed char Init = 0; + const signed char ReadName = 1; + const signed char Ws1 = 2; + const signed char STagEnd = 3; + const signed char STagEnd2 = 4; + const signed char ETagBegin = 5; + const signed char ETagBegin2 = 6; + const signed char Ws2 = 7; + const signed char EmptyTag = 8; + const signed char Attribute = 9; + const signed char Ws3 = 10; + const signed char Done = 11; + + const signed char InpWs = 0; // whitespace + const signed char InpNameBe = 1; // is_NameBeginning() + const signed char InpGt = 2; // > + const signed char InpSlash = 3; // / + const signed char InpUnknown = 4; + + // use some kind of state machine for parsing + static signed char table[11][5] = { + /* InpWs InpNameBe InpGt InpSlash InpUnknown */ + { -1, ReadName, -1, -1, -1 }, // Init + { Ws1, Attribute, STagEnd, EmptyTag, -1 }, // ReadName + { -1, Attribute, STagEnd, EmptyTag, -1 }, // Ws1 + { STagEnd2, STagEnd2, STagEnd2, STagEnd2, STagEnd2 }, // STagEnd + { -1, -1, -1, ETagBegin, -1 }, // STagEnd2 + { -1, ETagBegin2, -1, -1, -1 }, // ETagBegin + { Ws2, -1, Done, -1, -1 }, // ETagBegin2 + { -1, -1, Done, -1, -1 }, // Ws2 + { -1, -1, Done, -1, -1 }, // EmptyTag + { Ws3, Attribute, STagEnd, EmptyTag, -1 }, // Attribute + { -1, Attribute, STagEnd, EmptyTag, -1 } // Ws3 + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // read input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( is_NameBeginning(c) ) { + input = InpNameBe; + } else if ( c == '>' ) { + input = InpGt; + } else if ( c == '/' ) { + input = InpSlash; + } else { + input = InpUnknown; + } + // get new state +//qDebug( "%d -%d(%c)-> %d", state, input, c.latin1(), table[state][input] ); + state = table[state][input]; + + // in some cases do special actions depending on state + switch ( state ) { + case ReadName: + parseOk = parseName(); + break; + case Ws1: + case Ws2: + case Ws3: + eat_ws(); + break; + case STagEnd: + // call the handler + if ( contentHnd ) { + if ( d->useNamespaces ) { + d->namespaceSupport.processName( tags.top(), FALSE, uri, lname ); + t = contentHnd->startElement( uri, lname, tags.top(), d->attList ); + } else { + t = contentHnd->startElement( "", "", tags.top(), d->attList ); + } + if ( !t ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + next(); + break; + case STagEnd2: + parseOk = parseContent(); + break; + case ETagBegin: + next(); + break; + case ETagBegin2: + // get the name of the tag + parseOk = parseName(); + break; + case EmptyTag: + if ( tags.isEmpty() ) { + d->error = XMLERR_TAGMISMATCH; + goto parseError; + } + if ( !parseElementEmptyTag( t, uri, lname ) ) + goto parseError; + // next character + next(); + break; + case Attribute: + // get name and value of attribute + parseOk = parseAttribute(); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case ReadName: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + // store it on the stack + tags.push( name() ); + // empty the attributes + d->attList.qnameList.clear(); + d->attList.uriList.clear(); + d->attList.localnameList.clear(); + d->attList.valueList.clear(); + // namespace support? + if ( d->useNamespaces ) { + d->namespaceSupport.pushContext(); + } + break; + case STagEnd2: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGCONTENT; + goto parseError; + } + break; + case ETagBegin2: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + if ( !parseElementETagBegin2() ) + goto parseError; + break; + case Attribute: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGATTRIBUTE; + goto parseError; + } + if ( !parseElementAttribute( prefix, uri, lname ) ) + goto parseError; + break; + case Done: + return TRUE; + case -1: + d->error = XMLERR_ERRORPARSINGELEMENT; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} +/*! + Helper to break down the size of the code in the case statement. + Return FALSE on error, otherwise TRUE. +*/ +bool QXmlSimpleReader::parseElementEmptyTag( bool &t, QString &uri, QString &lname ) +{ + // pop the stack and call the handler + if ( contentHnd ) { + // report startElement first... + if ( d->useNamespaces ) { + d->namespaceSupport.processName( tags.top(), FALSE, uri, lname ); + t = contentHnd->startElement( uri, lname, tags.top(), d->attList ); + } else { + t = contentHnd->startElement( "", "", tags.top(), d->attList ); + } + if ( !t ) { + d->error = contentHnd->errorString(); + return FALSE; + } + // ... followed by endElement + // ### missing namespace support! + if ( !contentHnd->endElement( "","",tags.pop() ) ) { + d->error = contentHnd->errorString(); + return FALSE; + } + // namespace support? + if ( d->useNamespaces ) { + QStringList prefixesBefore, prefixesAfter; + if ( contentHnd ) { + prefixesBefore = d->namespaceSupport.prefixes(); + } + d->namespaceSupport.popContext(); + // call the handler for prefix mapping + if ( contentHnd ) { + prefixesAfter = d->namespaceSupport.prefixes(); + for ( QStringList::Iterator it = prefixesBefore.begin(); it != prefixesBefore.end(); ++it ) { + if ( prefixesAfter.contains(*it) == 0 ) { + if ( !contentHnd->endPrefixMapping( *it ) ) { + d->error = contentHnd->errorString(); + return FALSE; + } + } + } + } + } + } else { + tags.pop(); + } + return TRUE; +} +/*! + Helper to break down the size of the code in the case statement. + Return FALSE on error, otherwise TRUE. +*/ +bool QXmlSimpleReader::parseElementETagBegin2() +{ + + // pop the stack and compare it with the name + if ( tags.pop() != name() ) { + d->error = XMLERR_TAGMISMATCH; + return FALSE; + } + // call the handler + // ### missing namespace support! + if ( contentHnd ) { + if ( !contentHnd->endElement("","",name()) ) { + d->error = contentHnd->errorString(); + return FALSE; + } + } + // namespace support? + if ( d->useNamespaces ) { + QStringList prefixesBefore, prefixesAfter; + if ( contentHnd ) { + prefixesBefore = d->namespaceSupport.prefixes(); + } + d->namespaceSupport.popContext(); + // call the handler for prefix mapping + if ( contentHnd ) { + prefixesAfter = d->namespaceSupport.prefixes(); + for ( QStringList::Iterator it = prefixesBefore.begin(); it != prefixesBefore.end(); ++it ) { + if ( prefixesAfter.contains(*it) == 0 ) { + if ( !contentHnd->endPrefixMapping( *it ) ) { + d->error = contentHnd->errorString(); + return FALSE; + } + } + } + } + } + return TRUE; +} +/*! + Helper to break down the size of the code in the case statement. + Return FALSE on error, otherwise TRUE. +*/ +bool QXmlSimpleReader::parseElementAttribute( QString &prefix, QString &uri, QString &lname ) +{ + // add the attribute to the list + if ( d->useNamespaces ) { + // is it a namespace declaration? + d->namespaceSupport.splitName( name(), prefix, lname ); + if ( prefix == "xmlns" ) { + // namespace declaration + d->namespaceSupport.setPrefix( lname, string() ); + if ( d->useNamespacePrefixes ) { + d->attList.qnameList.append( name() ); + d->attList.uriList.append( "" ); + d->attList.localnameList.append( "" ); + d->attList.valueList.append( string() ); + } + // call the handler for prefix mapping + if ( contentHnd ) { + if ( !contentHnd->startPrefixMapping( lname, string() ) ) { + d->error = contentHnd->errorString(); + return FALSE; + } + } + } else { + // no namespace delcaration + d->namespaceSupport.processName( name(), TRUE, uri, lname ); + d->attList.qnameList.append( name() ); + d->attList.uriList.append( uri ); + d->attList.localnameList.append( lname ); + d->attList.valueList.append( string() ); + } + } else { + // no namespace support + d->attList.qnameList.append( name() ); + d->attList.uriList.append( "" ); + d->attList.localnameList.append( "" ); + d->attList.valueList.append( string() ); + } + return TRUE; +} + +/*! + Parse a content [43]. + + A content is only used between tags. If a end tag is found the < is already + read and the head stand on the '/' of the end tag ''. +*/ +bool QXmlSimpleReader::parseContent() +{ + bool charDataRead = FALSE; + + const signed char Init = 0; + const signed char ChD = 1; // CharData + const signed char ChD1 = 2; // CharData help state + const signed char ChD2 = 3; // CharData help state + const signed char Ref = 4; // Reference + const signed char Lt = 5; // '<' read + const signed char PI = 6; // PI + const signed char Elem = 7; // Element + const signed char Em = 8; // '!' read + const signed char Com = 9; // Comment + const signed char CDS = 10; // CDSect + const signed char CDS1 = 11; // read a CDSect + const signed char CDS2 = 12; // read a CDSect (help state) + const signed char CDS3 = 13; // read a CDSect (help state) + const signed char Done = 14; // finished reading content + + const signed char InpLt = 0; // < + const signed char InpGt = 1; // > + const signed char InpSlash = 2; // / + const signed char InpQMark = 3; // ? + const signed char InpEMark = 4; // ! + const signed char InpAmp = 5; // & + const signed char InpDash = 6; // - + const signed char InpOpenB = 7; // [ + const signed char InpCloseB = 8; // ] + const signed char InpUnknown = 9; + + static signed char mapCLT2FSMChar[] = { + InpUnknown, // white space + InpUnknown, // % + InpAmp, // & + InpGt, // > + InpLt, // < + InpSlash, // / + InpQMark, // ? + InpEMark, // ! + InpDash, // - + InpCloseB, // ] + InpOpenB, // [ + InpUnknown, // = + InpUnknown, // " + InpUnknown, // ' + InpUnknown // unknown + }; + + // use some kind of state machine for parsing + static signed char const table[14][10] = { + /* InpLt InpGt InpSlash InpQMark InpEMark InpAmp InpDash InpOpenB InpCloseB InpUnknown */ + { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD1, ChD }, // Init + { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD1, ChD }, // ChD + { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD2, ChD }, // ChD1 + { Lt, -1, ChD, ChD, ChD, Ref, ChD, ChD, ChD2, ChD }, // ChD2 + { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD, ChD }, // Ref (same as Init) + { -1, -1, Done, PI, Em, -1, -1, -1, -1, Elem }, // Lt + { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD, ChD }, // PI (same as Init) + { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD, ChD }, // Elem (same as Init) + { -1, -1, -1, -1, -1, -1, Com, CDS, -1, -1 }, // Em + { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD, ChD }, // Com (same as Init) + { CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS2, CDS1 }, // CDS + { CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS2, CDS1 }, // CDS1 + { CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS3, CDS1 }, // CDS2 + { CDS1, Init, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS3, CDS1 } // CDS3 + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input (use lookup-table instead of nested ifs for performance + // reasons) + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( c.row() ) { + input = InpUnknown; + } else { + input = mapCLT2FSMChar[ charLookupTable[ c.cell() ] ]; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Init: + // next character + next(); + break; + case ChD: + // on first call: clear string + if ( !charDataRead ) { + charDataRead = TRUE; + stringClear(); + } + stringAddC(); + next(); + break; + case ChD1: + // on first call: clear string + if ( !charDataRead ) { + charDataRead = TRUE; + stringClear(); + } + stringAddC(); + next(); + break; + case ChD2: + stringAddC(); + next(); + break; + case Ref: + if ( !charDataRead) { + // reference may be CharData; so clear string to be safe + stringClear(); + parseOk = parseReference( charDataRead, InContent ); + } else { + bool tmp; + parseOk = parseReference( tmp, InContent ); + } + break; + case Lt: + // call the handler for CharData + if ( contentHnd ) { + if ( charDataRead ) { + if ( d->reportWhitespaceCharData || !string().simplifyWhiteSpace().isEmpty() ) { + if ( !contentHnd->characters( string() ) ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + } + } + charDataRead = FALSE; + // next character + next(); + break; + case PI: + parseOk = parsePI(); + break; + case Elem: + parseOk = parseElement(); + break; + case Em: + // next character + next(); + break; + case Com: + parseOk = parseComment(); + break; + case CDS: + parseOk = parseString( "[CDATA[" ); + break; + case CDS1: + // read one character and add it + stringAddC(); + next(); + break; + case CDS2: + // skip ']' + next(); + break; + case CDS3: + // skip ']'... + next(); + break; + } + // no input is read after this + switch ( state ) { + case Ref: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGREFERENCE; + goto parseError; + } + break; + case PI: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGPI; + goto parseError; + } + // call the handler + if ( contentHnd ) { + if ( !contentHnd->processingInstruction(name(),string()) ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + break; + case Elem: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGELEMENT; + goto parseError; + } + break; + case Com: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGCOMMENT; + goto parseError; + } + if ( lexicalHnd ) { + if ( !lexicalHnd->comment( string() ) ) { + d->error = lexicalHnd->errorString(); + goto parseError; + } + } + break; + case CDS: + if( !parseOk ) { + d->error = XMLERR_CDSECTHEADEREXPECTED; + goto parseError; + } + // empty string + stringClear(); + break; + case CDS2: + if (c != ']') { + stringAddC( ']' ); + } + break; + case CDS3: + // test if this skipping was legal + if ( c == '>' ) { + // the end of the CDSect + if ( lexicalHnd ) { + if ( !lexicalHnd->startCDATA() ) { + d->error = lexicalHnd->errorString(); + goto parseError; + } + } + if ( contentHnd ) { + if ( !contentHnd->characters( string() ) ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + if ( lexicalHnd ) { + if ( !lexicalHnd->endCDATA() ) { + d->error = lexicalHnd->errorString(); + goto parseError; + } + } + } else if (c == ']') { + // three or more ']' + stringAddC( ']' ); + } else { + // after ']]' comes another character + stringAddC( ']' ); + stringAddC( ']' ); + } + break; + case Done: + // call the handler for CharData + if ( contentHnd ) { + if ( charDataRead ) { + if ( d->reportWhitespaceCharData || !string().simplifyWhiteSpace().isEmpty() ) { + if ( !contentHnd->characters( string() ) ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + } + } + // Done + return TRUE; + case -1: + // Error + d->error = XMLERR_ERRORPARSINGCONTENT; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse Misc [27]. +*/ +bool QXmlSimpleReader::parseMisc() +{ + const signed char Init = 0; + const signed char Lt = 1; // '<' was read + const signed char Comment = 2; // read comment + const signed char eatWS = 3; // eat whitespaces + const signed char PI = 4; // read PI + const signed char Comment2 = 5; // read comment + + const signed char InpWs = 0; // S + const signed char InpLt = 1; // < + const signed char InpQm = 2; // ? + const signed char InpEm = 3; // ! + const signed char InpUnknown = 4; + + // use some kind of state machine for parsing + static signed char table[3][5] = { + /* InpWs InpLt InpQm InpEm InpUnknown */ + { eatWS, Lt, -1, -1, -1 }, // Init + { -1, -1, PI, Comment, -1 }, // Lt + { -1, -1, -1, -1, Comment2 } // Comment + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( c == '<' ) { + input = InpLt; + } else if ( c == '?' ) { + input = InpQm; + } else if ( c == '!' ) { + input = InpEm; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case eatWS: + eat_ws(); + break; + case Lt: + next(); + break; + case PI: + parseOk = parsePI(); + break; + case Comment: + next(); + break; + case Comment2: + parseOk = parseComment(); + break; + } + // no input is read after this + switch ( state ) { + case eatWS: + return TRUE; + case PI: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGPI; + goto parseError; + } + if ( contentHnd ) { + if ( !contentHnd->processingInstruction(name(),string()) ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + return TRUE; + case Comment2: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGCOMMENT; + goto parseError; + } + if ( lexicalHnd ) { + if ( !lexicalHnd->comment( string() ) ) { + d->error = lexicalHnd->errorString(); + goto parseError; + } + } + return TRUE; + case -1: + // Error + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a processing instruction [16]. + + If xmldec is TRUE, it tries to parse a PI or a XML declaration [23]. + + Precondition: the beginning '<' of the PI is already read and the head stand + on the '?' of ' + const signed char InpQm = 3; // ? + const signed char InpUnknown = 4; + + // use some kind of state machine for parsing + static signed char table[16][5] = { + /* InpWs, InpNameBe InpGt InpQm InpUnknown */ + { -1, -1, -1, QmI, -1 }, // Init + { -1, Name, -1, -1, -1 }, // QmI + { -1, -1, -1, -1, -1 }, // Name (this state is left not through input) + { Ws1, -1, -1, -1, -1 }, // XMLDecl + { -1, Version, -1, -1, -1 }, // Ws1 + { Ws2, -1, -1, Qm, -1 }, // PI + { Char, Char, Char, Qm, Char }, // Ws2 + { Ws3, -1, -1, ADone, -1 }, // Version + { -1, EorSD, -1, ADone, -1 }, // Ws3 + { Ws4, -1, -1, ADone, -1 }, // EorSD + { -1, SD, -1, ADone, -1 }, // Ws4 + { Ws5, -1, -1, ADone, -1 }, // SD + { -1, -1, -1, ADone, -1 }, // Ws5 + { -1, -1, Done, -1, -1 }, // ADone + { Char, Char, Char, Qm, Char }, // Char + { Char, Char, Done, Qm, Char }, // Qm + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( is_NameBeginning(c) ) { + input = InpNameBe; + } else if ( c == '>' ) { + input = InpGt; + } else if ( c == '?' ) { + input = InpQm; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case QmI: + next(); + break; + case Name: + parseOk = parseName(); + break; + case Ws1: + case Ws2: + case Ws3: + case Ws4: + case Ws5: + eat_ws(); + break; + case Version: + parseOk = parseAttribute(); + break; + case EorSD: + parseOk = parseAttribute(); + break; + case SD: + // get the SDDecl (syntax like an attribute) + if ( d->standalone != QXmlSimpleReaderPrivate::Unknown ) { + // already parsed the standalone declaration + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + parseOk = parseAttribute(); + break; + case ADone: + next(); + break; + case Char: + stringAddC(); + next(); + break; + case Qm: + // skip the '?' + next(); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case Name: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + // test what name was read and determine the next state + // (not very beautiful, I admit) + if ( name().lower() == "xml" ) { + if ( xmldecl && name()=="xml" ) { + state = XMLDecl; + } else { + d->error = XMLERR_INVALIDNAMEFORPI; + goto parseError; + } + } else { + state = PI; + stringClear(); + } + break; + case Version: + // get version (syntax like an attribute) + if ( !parseOk ) { + d->error = XMLERR_VERSIONEXPECTED; + goto parseError; + } + if ( name() != "version" ) { + d->error = XMLERR_VERSIONEXPECTED; + goto parseError; + } + d->xmlVersion = string(); + break; + case EorSD: + // get the EDecl or SDDecl (syntax like an attribute) + if ( !parseOk ) { + d->error = XMLERR_EDECLORSDDECLEXPECTED; + goto parseError; + } + if ( name() == "standalone" ) { + if ( string()=="yes" ) { + d->standalone = QXmlSimpleReaderPrivate::Yes; + } else if ( string()=="no" ) { + d->standalone = QXmlSimpleReaderPrivate::No; + } else { + d->error = XMLERR_WRONGVALUEFORSDECL; + goto parseError; + } + } else if ( name() == "encoding" ) { + d->encoding = string(); + } else { + d->error = XMLERR_EDECLORSDDECLEXPECTED; + goto parseError; + } + break; + case SD: + if ( !parseOk ) { + d->error = XMLERR_SDDECLEXPECTED; + goto parseError; + } + if ( name() != "standalone" ) { + d->error = XMLERR_SDDECLEXPECTED; + goto parseError; + } + if ( string()=="yes" ) { + d->standalone = QXmlSimpleReaderPrivate::Yes; + } else if ( string()=="no" ) { + d->standalone = QXmlSimpleReaderPrivate::No; + } else { + d->error = XMLERR_WRONGVALUEFORSDECL; + goto parseError; + } + break; + case Qm: + // test if the skipping was legal + if ( c != '>' ) { + stringAddC( '?' ); + } + break; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a document type definition (doctypedecl [28]). + + Precondition: the beginning 'systemId = QString::null; + d->publicId = QString::null; + + const signed char Init = 0; + const signed char Doctype = 1; // read the doctype + const signed char Ws1 = 2; // eat_ws + const signed char Doctype2 = 3; // read the doctype, part 2 + const signed char Ws2 = 4; // eat_ws + const signed char Sys = 5; // read SYSTEM + const signed char Ws3 = 6; // eat_ws + const signed char MP = 7; // markupdecl or PEReference + const signed char PER = 8; // PERReference + const signed char Mup = 9; // markupdecl + const signed char Ws4 = 10; // eat_ws + const signed char MPE = 11; // end of markupdecl or PEReference + const signed char Done = 12; + + const signed char InpWs = 0; + const signed char InpD = 1; // 'D' + const signed char InpS = 2; // 'S' or 'P' + const signed char InpOB = 3; // [ + const signed char InpCB = 4; // ] + const signed char InpPer = 5; // % + const signed char InpGt = 6; // > + const signed char InpUnknown = 7; + + // use some kind of state machine for parsing + static signed char table[12][8] = { + /* InpWs, InpD InpS InpOB InpCB InpPer InpGt InpUnknown */ + { -1, Doctype, -1, -1, -1, -1, -1, -1 }, // Init + { Ws1, Doctype2, Doctype2, -1, -1, -1, -1, Doctype2 }, // Doctype + { -1, Doctype2, Doctype2, -1, -1, -1, -1, Doctype2 }, // Ws1 + { Ws2, -1, Sys, MP, -1, -1, Done, -1 }, // Doctype2 + { -1, -1, Sys, MP, -1, -1, Done, -1 }, // Ws2 + { Ws3, -1, -1, MP, -1, -1, Done, -1 }, // Sys + { -1, -1, -1, MP, -1, -1, Done, -1 }, // Ws3 + { -1, -1, -1, -1, MPE, PER, -1, Mup }, // MP + { Ws4, -1, -1, -1, MPE, PER, -1, Mup }, // PER + { Ws4, -1, -1, -1, MPE, PER, -1, Mup }, // Mup + { -1, -1, -1, -1, MPE, PER, -1, Mup }, // Ws4 + { -1, -1, -1, -1, -1, -1, Done, -1 } // MPE + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( c == 'D' ) { + input = InpD; + } else if ( c == 'S' ) { + input = InpS; + } else if ( c == 'P' ) { + input = InpS; + } else if ( c == '[' ) { + input = InpOB; + } else if ( c == ']' ) { + input = InpCB; + } else if ( c == '%' ) { + input = InpPer; + } else if ( c == '>' ) { + input = InpGt; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Doctype: + parseOk = parseString( "DOCTYPE" ); + break; + case Ws1: + case Ws2: + case Ws3: + case Ws4: + eat_ws(); + break; + case Doctype2: + parseName(); + break; + case Sys: + parseOk = parseExternalID(); + break; + case MP: + next_eat_ws(); + break; + case PER: + parseOk = parsePEReference( InDTD ); + break; + case Mup: + parseOk = parseMarkupdecl(); + break; + case MPE: + next_eat_ws(); + break; + case Done: + if ( lexicalHnd ) { + if ( !lexicalHnd->endDTD() ) { + d->error = lexicalHnd->errorString(); + goto parseError; + } + } + next(); + break; + } + // no input is read after this + switch ( state ) { + case Doctype: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGDOCTYPE; + goto parseError; + } + if ( !is_S(c) ) { + d->error = XMLERR_ERRORPARSINGDOCTYPE; + goto parseError; + } + break; + case Doctype2: + d->doctype = name(); + if ( lexicalHnd ) { + if ( !lexicalHnd->startDTD( d->doctype, d->publicId, d->systemId ) ) { + d->error = lexicalHnd->errorString(); + goto parseError; + } + } + break; + case Sys: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGDOCTYPE; + goto parseError; + } + break; + case PER: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGDOCTYPE; + goto parseError; + } + break; + case Mup: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGDOCTYPE; + goto parseError; + } + break; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_ERRORPARSINGDOCTYPE; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a ExternalID [75]. + + If allowPublicID is TRUE parse ExternalID [75] or PublicID [83]. +*/ +bool QXmlSimpleReader::parseExternalID( bool allowPublicID ) +{ + // some init-stuff + d->systemId = QString::null; + d->publicId = QString::null; + + const signed char Init = 0; + const signed char Sys = 1; // parse 'SYSTEM' + const signed char SysWS = 2; // parse the whitespace after 'SYSTEM' + const signed char SysSQ = 3; // parse SystemLiteral with ' + const signed char SysSQ2 = 4; // parse SystemLiteral with ' + const signed char SysDQ = 5; // parse SystemLiteral with " + const signed char SysDQ2 = 6; // parse SystemLiteral with " + const signed char Pub = 7; // parse 'PUBLIC' + const signed char PubWS = 8; // parse the whitespace after 'PUBLIC' + const signed char PubSQ = 9; // parse PubidLiteral with ' + const signed char PubSQ2 = 10; // parse PubidLiteral with ' + const signed char PubDQ = 11; // parse PubidLiteral with " + const signed char PubDQ2 = 12; // parse PubidLiteral with " + const signed char PubE = 13; // finished parsing the PubidLiteral + const signed char PubWS2 = 14; // parse the whitespace after the PubidLiteral + const signed char PDone = 15; // done if allowPublicID is TRUE + const signed char Done = 16; + + const signed char InpSQ = 0; // ' + const signed char InpDQ = 1; // " + const signed char InpS = 2; // S + const signed char InpP = 3; // P + const signed char InpWs = 4; // white space + const signed char InpUnknown = 5; + + // use some kind of state machine for parsing + static signed char table[15][6] = { + /* InpSQ InpDQ InpS InpP InpWs InpUnknown */ + { -1, -1, Sys, Pub, -1, -1 }, // Init + { -1, -1, -1, -1, SysWS, -1 }, // Sys + { SysSQ, SysDQ, -1, -1, -1, -1 }, // SysWS + { Done, SysSQ2, SysSQ2, SysSQ2, SysSQ2, SysSQ2 }, // SysSQ + { Done, SysSQ2, SysSQ2, SysSQ2, SysSQ2, SysSQ2 }, // SysSQ2 + { SysDQ2, Done, SysDQ2, SysDQ2, SysDQ2, SysDQ2 }, // SysDQ + { SysDQ2, Done, SysDQ2, SysDQ2, SysDQ2, SysDQ2 }, // SysDQ2 + { -1, -1, -1, -1, PubWS, -1 }, // Pub + { PubSQ, PubDQ, -1, -1, -1, -1 }, // PubWS + { PubE, -1, PubSQ2, PubSQ2, PubSQ2, PubSQ2 }, // PubSQ + { PubE, -1, PubSQ2, PubSQ2, PubSQ2, PubSQ2 }, // PubSQ2 + { -1, PubE, PubDQ2, PubDQ2, PubDQ2, PubDQ2 }, // PubDQ + { -1, PubE, PubDQ2, PubDQ2, PubDQ2, PubDQ2 }, // PubDQ2 + { PDone, PDone, PDone, PDone, PubWS2, PDone }, // PubE + { SysSQ, SysDQ, PDone, PDone, PDone, PDone } // PubWS2 + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( c == '\'' ) { + input = InpSQ; + } else if ( c == '"' ) { + input = InpDQ; + } else if ( c == 'S' ) { + input = InpS; + } else if ( c == 'P' ) { + input = InpP; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Sys: + parseOk = parseString( "SYSTEM" ); + break; + case SysWS: + eat_ws(); + break; + case SysSQ: + case SysDQ: + stringClear(); + next(); + break; + case SysSQ2: + case SysDQ2: + stringAddC(); + next(); + break; + case Pub: + parseOk = parseString( "PUBLIC" ); + break; + case PubWS: + eat_ws(); + break; + case PubSQ: + case PubDQ: + stringClear(); + next(); + break; + case PubSQ2: + case PubDQ2: + stringAddC(); + next(); + break; + case PubE: + next(); + break; + case PubWS2: + d->publicId = string(); + eat_ws(); + break; + case Done: + d->systemId = string(); + next(); + break; + } + // no input is read after this + switch ( state ) { + case Sys: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case Pub: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case PDone: + if ( allowPublicID ) { + d->publicId = string(); + return TRUE; + } else { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a markupdecl [29]. +*/ +bool QXmlSimpleReader::parseMarkupdecl() +{ + const signed char Init = 0; + const signed char Lt = 1; // < was read + const signed char Em = 2; // ! was read + const signed char CE = 3; // E was read + const signed char Qm = 4; // ? was read + const signed char Dash = 5; // - was read + const signed char CA = 6; // A was read + const signed char CEL = 7; // EL was read + const signed char CEN = 8; // EN was read + const signed char CN = 9; // N was read + const signed char Done = 10; + + const signed char InpLt = 0; // < + const signed char InpQm = 1; // ? + const signed char InpEm = 2; // ! + const signed char InpDash = 3; // - + const signed char InpA = 4; // A + const signed char InpE = 5; // E + const signed char InpL = 6; // L + const signed char InpN = 7; // N + const signed char InpUnknown = 8; + + // use some kind of state machine for parsing + static signed char table[4][9] = { + /* InpLt InpQm InpEm InpDash InpA InpE InpL InpN InpUnknown */ + { Lt, -1, -1, -1, -1, -1, -1, -1, -1 }, // Init + { -1, Qm, Em, -1, -1, -1, -1, -1, -1 }, // Lt + { -1, -1, -1, Dash, CA, CE, -1, CN, -1 }, // Em + { -1, -1, -1, -1, -1, -1, CEL, CEN, -1 } // CE + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( c == '<' ) { + input = InpLt; + } else if ( c == '?' ) { + input = InpQm; + } else if ( c == '!' ) { + input = InpEm; + } else if ( c == '-' ) { + input = InpDash; + } else if ( c == 'A' ) { + input = InpA; + } else if ( c == 'E' ) { + input = InpE; + } else if ( c == 'L' ) { + input = InpL; + } else if ( c == 'N' ) { + input = InpN; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Lt: + next(); + break; + case Em: + next(); + break; + case CE: + next(); + break; + case Qm: + parseOk = parsePI(); + break; + case Dash: + parseOk = parseComment(); + break; + case CA: + parseOk = parseAttlistDecl(); + break; + case CEL: + parseOk = parseElementDecl(); + break; + case CEN: + parseOk = parseEntityDecl(); + break; + case CN: + parseOk = parseNotationDecl(); + break; + } + // no input is read after this + switch ( state ) { + case Qm: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGPI; + goto parseError; + } + if ( contentHnd ) { + if ( !contentHnd->processingInstruction(name(),string()) ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + return TRUE; + case Dash: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGCOMMENT; + goto parseError; + } + if ( lexicalHnd ) { + if ( !lexicalHnd->comment( string() ) ) { + d->error = lexicalHnd->errorString(); + goto parseError; + } + } + return TRUE; + case CA: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGATTLISTDECL; + goto parseError; + } + return TRUE; + case CEL: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGELEMENTDECL; + goto parseError; + } + return TRUE; + case CEN: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGENTITYDECL; + goto parseError; + } + return TRUE; + case CN: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNOTATIONDECL; + goto parseError; + } + return TRUE; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_LETTEREXPECTED; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a PEReference [69] +*/ +bool QXmlSimpleReader::parsePEReference( EntityRecognitionContext context ) +{ + const signed char Init = 0; + const signed char Next = 1; + const signed char Name = 2; + const signed char Done = 3; + + const signed char InpSemi = 0; // ; + const signed char InpPer = 1; // % + const signed char InpUnknown = 2; + + // use some kind of state machine for parsing + static signed char table[3][3] = { + /* InpSemi InpPer InpUnknown */ + { -1, Next, -1 }, // Init + { -1, -1, Name }, // Next + { Done, -1, -1 } // Name + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( c == ';' ) { + input = InpSemi; + } else if ( c == '%' ) { + input = InpPer; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Next: + next(); + break; + case Name: + parseOk = parseName( TRUE ); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case Name: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + if ( d->parameterEntities.find( ref() ) == d->parameterEntities.end() ) { + // ### skip it??? + if ( contentHnd ) { + if ( !contentHnd->skippedEntity( QString("%") + ref() ) ) { + d->error = contentHnd->errorString(); + goto parseError; + } + } + } else { + if ( context == InEntityValue ) { + // Included in literal + xmlRef = d->parameterEntities.find( ref() ) + .data().replace( QRegExp("\""), """ ).replace( QRegExp("'"), "'" ) + + xmlRef; + } else if ( context == InDTD ) { + // Included as PE + xmlRef = QString(" ") + + d->parameterEntities.find( ref() ).data() + + QString(" ") + xmlRef; + } + } + break; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_LETTEREXPECTED; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a AttlistDecl [52]. + + Precondition: the beginning ' + const signed char InpHash = 2; // # + const signed char InpA = 3; // A + const signed char InpI = 4; // I + const signed char InpF = 5; // F + const signed char InpR = 6; // R + const signed char InpUnknown = 7; + + // use some kind of state machine for parsing + static signed char table[15][8] = { + /* InpWs InpGt InpHash InpA InpI InpF InpR InpUnknown */ + { -1, -1, -1, Attlist, -1, -1, -1, -1 }, // Init + { Ws, -1, -1, -1, -1, -1, -1, -1 }, // Attlist + { -1, -1, -1, Name, Name, Name, Name, Name }, // Ws + { Ws1, Done, Attdef, Attdef, Attdef, Attdef, Attdef, Attdef }, // Name + { -1, Done, Attdef, Attdef, Attdef, Attdef, Attdef, Attdef }, // Ws1 + { Ws2, -1, -1, -1, -1, -1, -1, -1 }, // Attdef + { -1, Atttype, Atttype, Atttype, Atttype, Atttype, Atttype, Atttype }, // Ws2 + { Ws3, -1, -1, -1, -1, -1, -1, -1 }, // Attype + { -1, Attval, DDecH, Attval, Attval, Attval, Attval, Attval }, // Ws3 + { -1, -1, -1, -1, DefImp, DefFix, DefReq, -1 }, // DDecH + { Ws4, Ws4, -1, -1, -1, -1, -1, -1 }, // DefReq + { Ws4, Ws4, -1, -1, -1, -1, -1, -1 }, // DefImp + { Ws3, -1, -1, -1, -1, -1, -1, -1 }, // DefFix + { Ws4, Ws4, -1, -1, -1, -1, -1, -1 }, // Attval + { -1, Done, Attdef, Attdef, Attdef, Attdef, Attdef, Attdef } // Ws4 + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( c == '>' ) { + input = InpGt; + } else if ( c == '#' ) { + input = InpHash; + } else if ( c == 'A' ) { + input = InpA; + } else if ( c == 'I' ) { + input = InpI; + } else if ( c == 'F' ) { + input = InpF; + } else if ( c == 'R' ) { + input = InpR; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Attlist: + parseOk = parseString( "ATTLIST" ); + break; + case Ws: + case Ws1: + case Ws2: + case Ws3: + eat_ws(); + break; + case Name: + parseOk = parseName(); + break; + case Attdef: + parseOk = parseName(); + break; + case Atttype: + parseOk = parseAttType(); + break; + case DDecH: + next(); + break; + case DefReq: + parseOk = parseString( "REQUIRED" ); + break; + case DefImp: + parseOk = parseString( "IMPLIED" ); + break; + case DefFix: + parseOk = parseString( "FIXED" ); + break; + case Attval: + parseOk = parseAttValue(); + break; + case Ws4: + if ( declHnd ) { + // TODO: not all values are computed yet... + if ( !declHnd->attributeDecl( d->attDeclEName, d->attDeclAName, "", "", "" ) ) { + d->error = declHnd->errorString(); + goto parseError; + } + } + eat_ws(); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case Attlist: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case Name: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + d->attDeclEName = name(); + break; + case Attdef: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + d->attDeclAName = name(); + break; + case Atttype: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGATTTYPE; + goto parseError; + } + break; + case DefReq: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case DefImp: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case DefFix: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case Attval: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGATTVALUE; + goto parseError; + } + break; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_LETTEREXPECTED; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a AttType [54] +*/ +bool QXmlSimpleReader::parseAttType() +{ + const signed char Init = 0; + const signed char ST = 1; // StringType + const signed char TTI = 2; // TokenizedType starting with 'I' + const signed char TTI2 = 3; // TokenizedType helpstate + const signed char TTI3 = 4; // TokenizedType helpstate + const signed char TTE = 5; // TokenizedType starting with 'E' + const signed char TTEY = 6; // TokenizedType starting with 'ENTITY' + const signed char TTEI = 7; // TokenizedType starting with 'ENTITI' + const signed char N = 8; // N read (TokenizedType or Notation) + const signed char TTNM = 9; // TokenizedType starting with 'NM' + const signed char TTNM2 = 10; // TokenizedType helpstate + const signed char NO = 11; // Notation + const signed char NO2 = 12; // Notation helpstate + const signed char NO3 = 13; // Notation helpstate + const signed char NOName = 14; // Notation, read name + const signed char NO4 = 15; // Notation helpstate + const signed char EN = 16; // Enumeration + const signed char ENNmt = 17; // Enumeration, read Nmtoken + const signed char EN2 = 18; // Enumeration helpstate + const signed char ADone = 19; // almost done (make next and accept) + const signed char Done = 20; + + const signed char InpWs = 0; // whitespace + const signed char InpOp = 1; // ( + const signed char InpCp = 2; // ) + const signed char InpPipe = 3; // | + const signed char InpC = 4; // C + const signed char InpE = 5; // E + const signed char InpI = 6; // I + const signed char InpM = 7; // M + const signed char InpN = 8; // N + const signed char InpO = 9; // O + const signed char InpR = 10; // R + const signed char InpS = 11; // S + const signed char InpY = 12; // Y + const signed char InpUnknown = 13; + + // use some kind of state machine for parsing + static signed char table[19][14] = { + /* InpWs InpOp InpCp InpPipe InpC InpE InpI InpM InpN InpO InpR InpS InpY InpUnknown */ + { -1, EN, -1, -1, ST, TTE, TTI, -1, N, -1, -1, -1, -1, -1 }, // Init + { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done }, // ST + { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, TTI2, Done, Done, Done }, // TTI + { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, TTI3, Done, Done }, // TTI2 + { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done }, // TTI3 + { -1, -1, -1, -1, -1, -1, TTEI, -1, -1, -1, -1, -1, TTEY, -1 }, // TTE + { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done }, // TTEY + { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done }, // TTEI + { -1, -1, -1, -1, -1, -1, -1, TTNM, -1, NO, -1, -1, -1, -1 }, // N + { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, TTNM2, Done, Done }, // TTNM + { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done }, // TTNM2 + { NO2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // NO + { -1, NO3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // NO2 + { NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName }, // NO3 + { NO4, -1, ADone, NO3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // NOName + { -1, -1, ADone, NO3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // NO4 + { -1, -1, ENNmt, -1, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt }, // EN + { EN2, -1, ADone, EN, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // ENNmt + { -1, -1, ADone, EN, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 } // EN2 + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( c == '(' ) { + input = InpOp; + } else if ( c == ')' ) { + input = InpCp; + } else if ( c == '|' ) { + input = InpPipe; + } else if ( c == 'C' ) { + input = InpC; + } else if ( c == 'E' ) { + input = InpE; + } else if ( c == 'I' ) { + input = InpI; + } else if ( c == 'M' ) { + input = InpM; + } else if ( c == 'N' ) { + input = InpN; + } else if ( c == 'O' ) { + input = InpO; + } else if ( c == 'R' ) { + input = InpR; + } else if ( c == 'S' ) { + input = InpS; + } else if ( c == 'Y' ) { + input = InpY; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case ST: + parseOk = parseString( "CDATA" ); + break; + case TTI: + parseOk = parseString( "ID" ); + break; + case TTI2: + parseOk = parseString( "REF" ); + break; + case TTI3: + next(); // S + break; + case TTE: + parseOk = parseString( "ENTIT" ); + break; + case TTEY: + next(); // Y + break; + case TTEI: + parseOk = parseString( "IES" ); + break; + case N: + next(); // N + break; + case TTNM: + parseOk = parseString( "MTOKEN" ); + break; + case TTNM2: + next(); // S + break; + case NO: + parseOk = parseString( "OTATION" ); + break; + case NO2: + eat_ws(); + break; + case NO3: + next_eat_ws(); + break; + case NOName: + parseOk = parseName(); + break; + case NO4: + eat_ws(); + break; + case EN: + next_eat_ws(); + break; + case ENNmt: + parseOk = parseNmtoken(); + break; + case EN2: + eat_ws(); + break; + case ADone: + next(); + break; + } + // no input is read after this + switch ( state ) { + case ST: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case TTI: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case TTI2: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case TTE: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case TTEI: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case TTNM: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case NO: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case NOName: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + break; + case ENNmt: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNMTOKEN; + goto parseError; + } + break; + case ADone: + return TRUE; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_LETTEREXPECTED; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a AttValue [10] + + Precondition: the head stands on the beginning " or ' + + If this function was successful, the head stands on the first + character after the closing " or ' and the value of the attribute + is in string(). +*/ +bool QXmlSimpleReader::parseAttValue() +{ + bool tmp; + + const signed char Init = 0; + const signed char Dq = 1; // double quotes were read + const signed char DqRef = 2; // read references in double quotes + const signed char DqC = 3; // signed character read in double quotes + const signed char Sq = 4; // single quotes were read + const signed char SqRef = 5; // read references in single quotes + const signed char SqC = 6; // signed character read in single quotes + const signed char Done = 7; + + const signed char InpDq = 0; // " + const signed char InpSq = 1; // ' + const signed char InpAmp = 2; // & + const signed char InpLt = 3; // < + const signed char InpUnknown = 4; + + // use some kind of state machine for parsing + static signed char table[7][5] = { + /* InpDq InpSq InpAmp InpLt InpUnknown */ + { Dq, Sq, -1, -1, -1 }, // Init + { Done, DqC, DqRef, -1, DqC }, // Dq + { Done, DqC, DqRef, -1, DqC }, // DqRef + { Done, DqC, DqRef, -1, DqC }, // DqC + { SqC, Done, SqRef, -1, SqC }, // Sq + { SqC, Done, SqRef, -1, SqC }, // SqRef + { SqC, Done, SqRef, -1, SqC } // SqRef + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( c == '"' ) { + input = InpDq; + } else if ( c == '\'' ) { + input = InpSq; + } else if ( c == '&' ) { + input = InpAmp; + } else if ( c == '<' ) { + input = InpLt; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Dq: + case Sq: + stringClear(); + next(); + break; + case DqRef: + case SqRef: + parseOk = parseReference( tmp, InAttributeValue ); + break; + case DqC: + case SqC: + stringAddC(); + next(); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case DqRef: + case SqRef: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGREFERENCE; + goto parseError; + } + break; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a elementdecl [45]. + + Precondition: the beginning ' + const signed char InpPipe = 2; // | + const signed char InpOp = 3; // ( + const signed char InpCp = 4; // ) + const signed char InpHash = 5; // # + const signed char InpQm = 6; // ? + const signed char InpAst = 7; // * + const signed char InpPlus = 8; // + + const signed char InpA = 9; // A + const signed char InpE = 10; // E + const signed char InpL = 11; // L + const signed char InpUnknown = 12; + + // use some kind of state machine for parsing + static signed char table[18][13] = { + /* InpWs InpGt InpPipe InpOp InpCp InpHash InpQm InpAst InpPlus InpA InpE InpL InpUnknown */ + { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, Elem, -1 }, // Init + { Ws1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // Elem + { -1, -1, -1, -1, -1, -1, -1, -1, -1, Nam, Nam, Nam, Nam }, // Ws1 + { Ws2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // Nam + { -1, -1, -1, Cont, -1, -1, -1, -1, -1, Any, Empty, -1, -1 }, // Ws2 + { WsD, Done, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // Empty + { WsD, Done, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // Any + { -1, -1, -1, Cp, Cp, Mix, -1, -1, -1, Cp, Cp, Cp, Cp }, // Cont + { Mix2, -1, MixN1, -1, Mix3, -1, -1, -1, -1, -1, -1, -1, -1 }, // Mix + { -1, -1, MixN1, -1, Mix3, -1, -1, -1, -1, -1, -1, -1, -1 }, // Mix2 + { WsD, Done, -1, -1, -1, -1, -1, WsD, -1, -1, -1, -1, -1 }, // Mix3 + { -1, -1, -1, -1, -1, -1, -1, -1, -1, MixN2, MixN2, MixN2, MixN2 }, // MixN1 + { MixN3, -1, MixN1, -1, MixN4, -1, -1, -1, -1, -1, -1, -1, -1 }, // MixN2 + { -1, -1, MixN1, -1, MixN4, -1, -1, -1, -1, -1, -1, -1, -1 }, // MixN3 + { -1, -1, -1, -1, -1, -1, -1, WsD, -1, -1, -1, -1, -1 }, // MixN4 + { WsD, Done, -1, -1, -1, -1, Cp2, Cp2, Cp2, -1, -1, -1, -1 }, // Cp + { WsD, Done, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, // Cp2 + { -1, Done, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 } // WsD + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // read input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( c == '>' ) { + input = InpGt; + } else if ( c == '|' ) { + input = InpPipe; + } else if ( c == '(' ) { + input = InpOp; + } else if ( c == ')' ) { + input = InpCp; + } else if ( c == '#' ) { + input = InpHash; + } else if ( c == '?' ) { + input = InpQm; + } else if ( c == '*' ) { + input = InpAst; + } else if ( c == '+' ) { + input = InpPlus; + } else if ( c == 'A' ) { + input = InpA; + } else if ( c == 'E' ) { + input = InpE; + } else if ( c == 'L' ) { + input = InpL; + } else { + input = InpUnknown; + } + // get new state +//qDebug( "%d -%d(%c)-> %d", state, input, c.latin1(), table[state][input] ); + state = table[state][input]; + + // in some cases do special actions depending on state + switch ( state ) { + case Elem: + parseOk = parseString( "LEMENT" ); + break; + case Ws1: + eat_ws(); + break; + case Nam: + parseOk = parseName(); + break; + case Ws2: + eat_ws(); + break; + case Empty: + parseOk = parseString( "EMPTY" ); + break; + case Any: + parseOk = parseString( "ANY" ); + break; + case Cont: + next_eat_ws(); + break; + case Mix: + parseOk = parseString( "#PCDATA" ); + break; + case Mix2: + eat_ws(); + break; + case Mix3: + next(); + break; + case MixN1: + next_eat_ws(); + break; + case MixN2: + parseOk = parseName(); + break; + case MixN3: + eat_ws(); + break; + case MixN4: + next(); + break; + case Cp: + parseOk = parseChoiceSeq(); + break; + case Cp2: + next(); + break; + case WsD: + next_eat_ws(); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case Elem: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case Nam: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + break; + case Empty: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case Any: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case Mix: + if( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case MixN2: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + break; + case Cp: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGCHOICE; + goto parseError; + } + break; + case Done: + return TRUE; + case -1: + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a NotationDecl [82]. + + Precondition: the beginning ' + const signed char InpN = 2; // N + const signed char InpUnknown = 3; + + // use some kind of state machine for parsing + static signed char table[7][4] = { + /* InpWs InpGt InpN InpUnknown */ + { -1, -1, Not, -1 }, // Init + { Ws1, -1, -1, -1 }, // Not + { -1, -1, Nam, Nam }, // Ws1 + { Ws2, Done, -1, -1 }, // Nam + { -1, Done, ExtID, ExtID }, // Ws2 + { Ws3, Done, -1, -1 }, // ExtID + { -1, Done, -1, -1 } // Ws3 + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( c == '>' ) { + input = InpGt; + } else if ( c == 'N' ) { + input = InpN; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Not: + parseOk = parseString( "NOTATION" ); + break; + case Ws1: + eat_ws(); + break; + case Nam: + parseOk = parseName(); + break; + case Ws2: + eat_ws(); + break; + case ExtID: + parseOk = parseExternalID( TRUE ); + break; + case Ws3: + eat_ws(); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case Not: + if ( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case Nam: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + break; + case ExtID: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGEXTERNALID; + goto parseError; + } + // call the handler + if ( dtdHnd ) { + if ( !dtdHnd->notationDecl( name(), d->publicId, d->systemId ) ) { + d->error = dtdHnd->errorString(); + goto parseError; + } + } + break; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse choice [49] or seq [50]. + + Precondition: the beginning '('S? is already read and the head + stands on the first non-whitespace character after it. +*/ +bool QXmlSimpleReader::parseChoiceSeq() +{ + const signed char Init = 0; + const signed char Ws1 = 1; // eat whitespace + const signed char CS_ = 2; // choice or set + const signed char Ws2 = 3; // eat whitespace + const signed char More = 4; // more cp to read + const signed char Name = 5; // read name + const signed char Done = 6; // + + const signed char InpWs = 0; // S + const signed char InpOp = 1; // ( + const signed char InpCp = 2; // ) + const signed char InpQm = 3; // ? + const signed char InpAst = 4; // * + const signed char InpPlus = 5; // + + const signed char InpPipe = 6; // | + const signed char InpComm = 7; // , + const signed char InpUnknown = 8; + + // use some kind of state machine for parsing + static signed char table[6][9] = { + /* InpWs InpOp InpCp InpQm InpAst InpPlus InpPipe InpComm InpUnknown */ + { -1, Ws1, -1, -1, -1, -1, -1, -1, Name }, // Init + { -1, CS_, -1, -1, -1, -1, -1, -1, CS_ }, // Ws1 + { Ws2, -1, Done, Ws2, Ws2, Ws2, More, More, -1 }, // CS_ + { -1, -1, Done, -1, -1, -1, More, More, -1 }, // Ws2 + { -1, Ws1, -1, -1, -1, -1, -1, -1, Name }, // More (same as Init) + { Ws2, -1, Done, Ws2, Ws2, Ws2, More, More, -1 } // Name (same as CS_) + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( c == '(' ) { + input = InpOp; + } else if ( c == ')' ) { + input = InpCp; + } else if ( c == '?' ) { + input = InpQm; + } else if ( c == '*' ) { + input = InpAst; + } else if ( c == '+' ) { + input = InpPlus; + } else if ( c == '|' ) { + input = InpPipe; + } else if ( c == ',' ) { + input = InpComm; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Ws1: + next_eat_ws(); + break; + case CS_: + parseOk = parseChoiceSeq(); + break; + case Ws2: + next_eat_ws(); + break; + case More: + next_eat_ws(); + break; + case Name: + parseOk = parseName(); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case CS_: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGCHOICE; + goto parseError; + } + break; + case Name: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + break; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a EntityDecl [70]. + + Precondition: the beginning ' + const signed char InpN = 4; // N + const signed char InpUnknown = 5; + + // use some kind of state machine for parsing + static signed char table[18][6] = { + /* InpWs InpPer InpQuot InpGt InpN InpUnknown */ + { -1, -1, -1, -1, Ent, -1 }, // Init + { Ws1, -1, -1, -1, -1, -1 }, // Ent + { -1, PEDec, -1, -1, Name, Name }, // Ws1 + { Ws2, -1, -1, -1, -1, -1 }, // Name + { -1, -1, EValue, -1, -1, ExtID }, // Ws2 + { WsE, -1, -1, Done, -1, -1 }, // EValue + { Ws3, -1, -1, EDDone,-1, -1 }, // ExtID + { -1, -1, -1, EDDone,Ndata, -1 }, // Ws3 + { Ws4, -1, -1, -1, -1, -1 }, // Ndata + { -1, -1, -1, -1, NNam, NNam }, // Ws4 + { WsE, -1, -1, Done, -1, -1 }, // NNam + { Ws6, -1, -1, -1, -1, -1 }, // PEDec + { -1, -1, -1, -1, PENam, PENam }, // Ws6 + { Ws7, -1, -1, -1, -1, -1 }, // PENam + { -1, -1, PEVal, -1, -1, PEEID }, // Ws7 + { WsE, -1, -1, Done, -1, -1 }, // PEVal + { WsE, -1, -1, Done, -1, -1 }, // PEEID + { -1, -1, -1, Done, -1, -1 } // WsE + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_S(c) ) { + input = InpWs; + } else if ( c == '%' ) { + input = InpPer; + } else if ( c == '"' || c == '\'' ) { + input = InpQuot; + } else if ( c == '>' ) { + input = InpGt; + } else if ( c == 'N' ) { + input = InpN; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Ent: + parseOk = parseString( "NTITY" ); + break; + case Ws1: + eat_ws(); + break; + case Name: + parseOk = parseName(); + break; + case Ws2: + eat_ws(); + break; + case EValue: + parseOk = parseEntityValue(); + break; + case ExtID: + parseOk = parseExternalID(); + break; + case Ws3: + eat_ws(); + break; + case Ndata: + parseOk = parseString( "NDATA" ); + break; + case Ws4: + eat_ws(); + break; + case NNam: + parseOk = parseName( TRUE ); + break; + case PEDec: + next(); + break; + case Ws6: + eat_ws(); + break; + case PENam: + parseOk = parseName(); + break; + case Ws7: + eat_ws(); + break; + case PEVal: + parseOk = parseEntityValue(); + break; + case PEEID: + parseOk = parseExternalID(); + break; + case WsE: + eat_ws(); + break; + case EDDone: + next(); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case Ent: + if ( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case Name: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + break; + case EValue: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGENTITYVALUE; + goto parseError; + } + if ( !entityExist( name() ) ) { + d->entities.insert( name(), string() ); + if ( declHnd ) { + if ( !declHnd->internalEntityDecl( name(), string() ) ) { + d->error = declHnd->errorString(); + goto parseError; + } + } + } + break; + case ExtID: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGEXTERNALID; + goto parseError; + } + break; + case Ndata: + if ( !parseOk ) { + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + break; + case NNam: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + if ( !entityExist( name() ) ) { + d->externEntities.insert( name(), QXmlSimpleReaderPrivate::ExternEntity( d->publicId, d->systemId, ref() ) ); + if ( dtdHnd ) { + if ( !dtdHnd->unparsedEntityDecl( name(), d->publicId, d->systemId, ref() ) ) { + d->error = declHnd->errorString(); + goto parseError; + } + } + } + break; + case PENam: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + break; + case PEVal: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGENTITYVALUE; + goto parseError; + } + if ( !entityExist( name() ) ) { + d->parameterEntities.insert( name(), string() ); + if ( declHnd ) { + if ( !declHnd->internalEntityDecl( QString("%")+name(), string() ) ) { + d->error = declHnd->errorString(); + goto parseError; + } + } + } + break; + case PEEID: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGEXTERNALID; + goto parseError; + } + if ( !entityExist( name() ) ) { + d->externParameterEntities.insert( name(), QXmlSimpleReaderPrivate::ExternParameterEntity( d->publicId, d->systemId ) ); + if ( declHnd ) { + if ( !declHnd->externalEntityDecl( QString("%")+name(), d->publicId, d->systemId ) ) { + d->error = declHnd->errorString(); + goto parseError; + } + } + } + break; + case EDDone: + if ( !entityExist( name() ) ) { + d->externEntities.insert( name(), QXmlSimpleReaderPrivate::ExternEntity( d->publicId, d->systemId, QString::null ) ); + if ( declHnd ) { + if ( !declHnd->externalEntityDecl( name(), d->publicId, d->systemId ) ) { + d->error = declHnd->errorString(); + goto parseError; + } + } + } + return TRUE; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_LETTEREXPECTED; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a EntityValue [9] +*/ +bool QXmlSimpleReader::parseEntityValue() +{ + bool tmp; + + const signed char Init = 0; + const signed char Dq = 1; // EntityValue is double quoted + const signed char DqC = 2; // signed character + const signed char DqPER = 3; // PERefence + const signed char DqRef = 4; // Reference + const signed char Sq = 5; // EntityValue is double quoted + const signed char SqC = 6; // signed character + const signed char SqPER = 7; // PERefence + const signed char SqRef = 8; // Reference + const signed char Done = 9; + + const signed char InpDq = 0; // " + const signed char InpSq = 1; // ' + const signed char InpAmp = 2; // & + const signed char InpPer = 3; // % + const signed char InpUnknown = 4; + + // use some kind of state machine for parsing + static signed char table[9][5] = { + /* InpDq InpSq InpAmp InpPer InpUnknown */ + { Dq, Sq, -1, -1, -1 }, // Init + { Done, DqC, DqRef, DqPER, DqC }, // Dq + { Done, DqC, DqRef, DqPER, DqC }, // DqC + { Done, DqC, DqRef, DqPER, DqC }, // DqPER + { Done, DqC, DqRef, DqPER, DqC }, // DqRef + { SqC, Done, SqRef, SqPER, SqC }, // Sq + { SqC, Done, SqRef, SqPER, SqC }, // SqC + { SqC, Done, SqRef, SqPER, SqC }, // SqPER + { SqC, Done, SqRef, SqPER, SqC } // SqRef + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( c == '"' ) { + input = InpDq; + } else if ( c == '\'' ) { + input = InpSq; + } else if ( c == '&' ) { + input = InpAmp; + } else if ( c == '%' ) { + input = InpPer; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Dq: + case Sq: + stringClear(); + next(); + break; + case DqC: + case SqC: + stringAddC(); + next(); + break; + case DqPER: + case SqPER: + parseOk = parsePEReference( InEntityValue ); + break; + case DqRef: + case SqRef: + parseOk = parseReference( tmp, InEntityValue ); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case DqPER: + case SqPER: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGDOCTYPE; + goto parseError; + } + break; + case DqRef: + case SqRef: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGREFERENCE; + goto parseError; + } + break; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_LETTEREXPECTED; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a comment [15]. + + Precondition: the beginning ' + const signed char InpUnknown = 2; + + // use some kind of state machine for parsing + static signed char table[6][3] = { + /* InpDash InpGt InpUnknown */ + { Dash1, -1, -1 }, // Init + { Dash2, -1, -1 }, // Dash1 + { Com2, Com, Com }, // Dash2 + { Com2, Com, Com }, // Com + { ComE, Com, Com }, // Com2 + { -1, Done, -1 } // ComE + }; + signed char state = Init; + signed char input; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( c == '-' ) { + input = InpDash; + } else if ( c == '>' ) { + input = InpGt; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Dash1: + next(); + break; + case Dash2: + next(); + break; + case Com: + stringAddC(); + next(); + break; + case Com2: + next(); + break; + case ComE: + next(); + break; + case Done: + next(); + break; + } + // no input is read after this + switch ( state ) { + case Dash2: + stringClear(); + break; + case Com2: + // if next character is not a dash than don't skip it + if ( c != '-' ) { + stringAddC( '-' ); + } + break; + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_ERRORPARSINGCOMMENT; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a Attribute [41]. + + Precondition: the head stands on the first character of the name of the + attribute (i.e. all whitespaces are already parsed). + + The head stand on the next character after the end quotes. The variable name + contains the name of the attribute and the variable string contains the value + of the attribute. +*/ +bool QXmlSimpleReader::parseAttribute() +{ + const signed char Init = 0; + const signed char PName = 1; // parse name + const signed char Ws = 2; // eat ws + const signed char Eq = 3; // the '=' was read + const signed char Quotes = 4; // " or ' were read + + const signed char InpNameBe = 0; + const signed char InpEq = 1; // = + const signed char InpDq = 2; // " + const signed char InpSq = 3; // ' + const signed char InpUnknown = 4; + + // use some kind of state machine for parsing + static signed char table[4][5] = { + /* InpNameBe InpEq InpDq InpSq InpUnknown */ + { PName, -1, -1, -1, -1 }, // Init + { -1, Eq, -1, -1, Ws }, // PName + { -1, Eq, -1, -1, -1 }, // Ws + { -1, -1, Quotes, Quotes, -1 } // Eq + }; + signed char state = Init; + signed char input; + bool parseOk = TRUE; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_NameBeginning(c) ) { + input = InpNameBe; + } else if ( c == '=' ) { + input = InpEq; + } else if ( c == '"' ) { + input = InpDq; + } else if ( c == '\'' ) { + input = InpSq; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case PName: + parseOk = parseName(); + break; + case Ws: + eat_ws(); + break; + case Eq: + next_eat_ws(); + break; + case Quotes: + parseOk = parseAttValue(); + break; + } + // no input is read after this + switch ( state ) { + case PName: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGNAME; + goto parseError; + } + break; + case Quotes: + if ( !parseOk ) { + d->error = XMLERR_ERRORPARSINGATTVALUE; + goto parseError; + } + // Done + return TRUE; + case -1: + // Error + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a Name [5] and store the name in name or ref (if useRef is TRUE). +*/ +bool QXmlSimpleReader::parseName( bool useRef ) +{ + const signed char Init = 0; + const signed char Name1 = 1; // parse first signed character of the name + const signed char Name = 2; // parse name + const signed char Done = 3; + + const signed char InpNameBe = 0; // name beginning signed characters + const signed char InpNameCh = 1; // NameChar without InpNameBe + const signed char InpUnknown = 2; + + // use some kind of state machine for parsing + static signed char table[3][3] = { + /* InpNameBe InpNameCh InpUnknown */ + { Name1, -1, -1 }, // Init + { Name, Name, Done }, // Name1 + { Name, Name, Done } // Name + }; + signed char state = Init; + signed char input; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_NameBeginning(c) ) { + input = InpNameBe; + } else if ( is_NameChar(c) ) { + input = InpNameCh; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case Name1: + if ( useRef ) { + refClear(); + refAddC(); + } else { + nameClear(); + nameAddC(); + } + next(); + break; + case Name: + if ( useRef ) { + refAddC(); + } else { + nameAddC(); + } + next(); + break; + } + // no input is read after this + switch ( state ) { + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_LETTEREXPECTED; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a Nmtoken [7] and store the name in name. +*/ +bool QXmlSimpleReader::parseNmtoken() +{ + const signed char Init = 0; + const signed char NameF = 1; + const signed char Name = 2; + const signed char Done = 3; + + const signed char InpNameCh = 0; // NameChar without InpNameBe + const signed char InpUnknown = 1; + + // use some kind of state machine for parsing + static signed char table[3][2] = { + /* InpNameCh InpUnknown */ + { NameF, -1 }, // Init + { Name, Done }, // NameF + { Name, Done } // Name + }; + signed char state = Init; + signed char input; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( is_NameChar(c) ) { + input = InpNameCh; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case NameF: + nameClear(); + nameAddC(); + next(); + break; + case Name: + nameAddC(); + next(); + break; + } + // no input is read after this + switch ( state ) { + case Done: + return TRUE; + case -1: + // Error + d->error = XMLERR_LETTEREXPECTED; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Parse a Reference [67]. + + charDataRead is set to TRUE if the reference must not be parsed. The + character(s) which the reference mapped to are appended to string. The + head stands on the first character after the reference. + + charDataRead is set to FALSE if the reference must be parsed. The + charachter(s) which the reference mapped to are inserted at the reference + position. The head stands on the first character of the replacement). +*/ +bool QXmlSimpleReader::parseReference( bool &charDataRead, EntityRecognitionContext context ) +{ + // temporary variables + uint tmp; + bool ok; + + const signed char Init = 0; + const signed char SRef = 1; // start of a reference + const signed char ChRef = 2; // parse CharRef + const signed char ChDec = 3; // parse CharRef decimal + const signed char ChHexS = 4; // start CharRef hexadecimal + const signed char ChHex = 5; // parse CharRef hexadecimal + const signed char Name = 6; // parse name + const signed char DoneD = 7; // done CharRef decimal + const signed char DoneH = 8; // done CharRef hexadecimal + const signed char DoneN = 9; // done EntityRef + + const signed char InpAmp = 0; // & + const signed char InpSemi = 1; // ; + const signed char InpHash = 2; // # + const signed char InpX = 3; // x + const signed char InpNum = 4; // 0-9 + const signed char InpHex = 5; // a-f A-F + const signed char InpUnknown = 6; + + // use some kind of state machine for parsing + static signed char table[8][7] = { + /* InpAmp InpSemi InpHash InpX InpNum InpHex InpUnknown */ + { SRef, -1, -1, -1, -1, -1, -1 }, // Init + { -1, -1, ChRef, Name, Name, Name, Name }, // SRef + { -1, -1, -1, ChHexS, ChDec, -1, -1 }, // ChRef + { -1, DoneD, -1, -1, ChDec, -1, -1 }, // ChDec + { -1, -1, -1, -1, ChHex, ChHex, -1 }, // ChHexS + { -1, DoneH, -1, -1, ChHex, ChHex, -1 }, // ChHex + { -1, DoneN, -1, -1, -1, -1, -1 } // Name + }; + signed char state = Init; + signed char input; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( c.row() ) { + input = InpUnknown; + } else if ( c.cell() == '&' ) { + input = InpAmp; + } else if ( c.cell() == ';' ) { + input = InpSemi; + } else if ( c.cell() == '#' ) { + input = InpHash; + } else if ( c.cell() == 'x' ) { + input = InpX; + } else if ( '0' <= c.cell() && c.cell() <= '9' ) { + input = InpNum; + } else if ( 'a' <= c.cell() && c.cell() <= 'f' ) { + input = InpHex; + } else if ( 'A' <= c.cell() && c.cell() <= 'F' ) { + input = InpHex; + } else { + input = InpUnknown; + } + + // set state according to input + state = table[state][input]; + + // do some actions according to state + switch ( state ) { + case SRef: + refClear(); + next(); + break; + case ChRef: + next(); + break; + case ChDec: + refAddC(); + next(); + break; + case ChHexS: + next(); + break; + case ChHex: + refAddC(); + next(); + break; + case Name: + // read the name into the ref + parseName( TRUE ); + break; + case DoneD: + tmp = ref().toUInt( &ok, 10 ); + if ( ok ) { + stringAddC( QChar(tmp) ); + } else { + d->error = XMLERR_ERRORPARSINGREFERENCE; + goto parseError; + } + charDataRead = TRUE; + next(); + break; + case DoneH: + tmp = ref().toUInt( &ok, 16 ); + if ( ok ) { + stringAddC( QChar(tmp) ); + } else { + d->error = XMLERR_ERRORPARSINGREFERENCE; + goto parseError; + } + charDataRead = TRUE; + next(); + break; + case DoneN: + if ( !processReference( charDataRead, context ) ) + goto parseError; + next(); + break; + } + // no input is read after this + switch ( state ) { + case DoneD: + return TRUE; + case DoneH: + return TRUE; + case DoneN: + return TRUE; + case -1: + // Error + d->error = XMLERR_ERRORPARSINGREFERENCE; + goto parseError; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + +/*! + Helper function for parseReference() +*/ +bool QXmlSimpleReader::processReference( bool &charDataRead, EntityRecognitionContext context ) +{ + QString reference = ref(); + if ( reference == "amp" ) { + if ( context == InEntityValue ) { + // Bypassed + stringAddC( '&' ); stringAddC( 'a' ); stringAddC( 'm' ); stringAddC( 'p' ); stringAddC( ';' ); + } else { + // Included or Included in literal + stringAddC( '&' ); + } + charDataRead = TRUE; + } else if ( reference == "lt" ) { + if ( context == InEntityValue ) { + // Bypassed + stringAddC( '&' ); stringAddC( 'l' ); stringAddC( 't' ); stringAddC( ';' ); + } else { + // Included or Included in literal + stringAddC( '<' ); + } + charDataRead = TRUE; + } else if ( reference == "gt" ) { + if ( context == InEntityValue ) { + // Bypassed + stringAddC( '&' ); stringAddC( 'g' ); stringAddC( 't' ); stringAddC( ';' ); + } else { + // Included or Included in literal + stringAddC( '>' ); + } + charDataRead = TRUE; + } else if ( reference == "apos" ) { + if ( context == InEntityValue ) { + // Bypassed + stringAddC( '&' ); stringAddC( 'a' ); stringAddC( 'p' ); stringAddC( 'o' ); stringAddC( 's' ); stringAddC( ';' ); + } else { + // Included or Included in literal + stringAddC( '\'' ); + } + charDataRead = TRUE; + } else if ( reference == "quot" ) { + if ( context == InEntityValue ) { + // Bypassed + stringAddC( '&' ); stringAddC( 'q' ); stringAddC( 'u' ); stringAddC( 'o' ); stringAddC( 't' ); stringAddC( ';' ); + } else { + // Included or Included in literal + stringAddC( '"' ); + } + charDataRead = TRUE; + } else { + QMap::Iterator it; + it = d->entities.find( reference ); + if ( it != d->entities.end() ) { + // "Internal General" + switch ( context ) { + case InContent: + // Included + xmlRef = it.data() + xmlRef; + charDataRead = FALSE; + break; + case InAttributeValue: + // Included in literal + xmlRef = it.data().replace( QRegExp("\""), """ ).replace( QRegExp("'"), "'" ) + + xmlRef; + charDataRead = FALSE; + break; + case InEntityValue: + { + // Bypassed + stringAddC( '&' ); + for ( int i=0; i<(int)reference.length(); i++ ) { + stringAddC( reference[i] ); + } + stringAddC( ';'); + charDataRead = TRUE; + } + break; + case InDTD: + // Forbidden + d->error = XMLERR_INTERNALGENERALENTITYINDTD; + charDataRead = FALSE; + break; + } + } else { + QMap::Iterator itExtern; + itExtern = d->externEntities.find( reference ); + if ( itExtern == d->externEntities.end() ) { + // entity not declared + // ### check this case for conformance + if ( context == InEntityValue ) { + // Bypassed + stringAddC( '&' ); + for ( int i=0; i<(int)reference.length(); i++ ) { + stringAddC( reference[i] ); + } + stringAddC( ';'); + charDataRead = TRUE; + } else { + if ( contentHnd ) { + if ( !contentHnd->skippedEntity( reference ) ) { + d->error = contentHnd->errorString(); + return FALSE; // error + } + } + } + } else if ( (*itExtern).notation.isNull() ) { + // "External Parsed General" + switch ( context ) { + case InContent: + // Included if validating + if ( contentHnd ) { + if ( !contentHnd->skippedEntity( reference ) ) { + d->error = contentHnd->errorString(); + return FALSE; // error + } + } + charDataRead = FALSE; + break; + case InAttributeValue: + // Forbidden + d->error = XMLERR_EXTERNALGENERALENTITYINAV; + charDataRead = FALSE; + break; + case InEntityValue: + { + // Bypassed + stringAddC( '&' ); + for ( int i=0; i<(int)reference.length(); i++ ) { + stringAddC( reference[i] ); + } + stringAddC( ';'); + charDataRead = TRUE; + } + break; + case InDTD: + // Forbidden + d->error = XMLERR_EXTERNALGENERALENTITYINDTD; + charDataRead = FALSE; + break; + } + } else { + // "Unparsed" + // ### notify for "Occurs as Attribute Value" missing (but this is no refence, anyway) + // Forbidden + d->error = XMLERR_UNPARSEDENTITYREFERENCE; + charDataRead = FALSE; + return FALSE; // error + } + } + } + return TRUE; // no error +} + + +/*! + Parse over a simple string. + + After the string was successfully parsed, the head is on the first + character after the string. +*/ +bool QXmlSimpleReader::parseString( const QString& s ) +{ + signed char Done = s.length(); + + const signed char InpCharExpected = 0; // the character that was expected + const signed char InpUnknown = 1; + + signed char state = 0; // state in this function is the position in the string s + signed char input; + + while ( TRUE ) { + + // get input + if ( atEnd() ) { + d->error = XMLERR_UNEXPECTEDEOF; + goto parseError; + } + if ( c == s[(int)state] ) { + input = InpCharExpected; + } else { + input = InpUnknown; + } + + // set state according to input + if ( input == InpCharExpected ) { + state++; + } else { + // Error + d->error = XMLERR_UNEXPECTEDCHARACTER; + goto parseError; + } + + // do some actions according to state + next(); + // no input is read after this + if ( state == Done ) { + return TRUE; + } + + } + + return TRUE; + +parseError: + reportParseError(); + return FALSE; +} + + +/*! + Inits the data values. +*/ +void QXmlSimpleReader::init( const QXmlInputSource& i ) +{ + xml = i.data(); + xmlLength = xml.length(); + xmlRef = ""; + + d->externParameterEntities.clear(); + d->parameterEntities.clear(); + d->externEntities.clear(); + d->entities.clear(); + + tags.clear(); + + d->doctype = ""; + d->xmlVersion = ""; + d->encoding = ""; + d->standalone = QXmlSimpleReaderPrivate::Unknown; + + lineNr = 0; + columnNr = -1; + pos = 0; + next(); + d->error = XMLERR_OK; +} + +/*! + Returns TRUE if a entity with the name \a e exists, + otherwise returns FALSE. +*/ +bool QXmlSimpleReader::entityExist( const QString& e ) const +{ + if ( d->parameterEntities.find(e) == d->parameterEntities.end() && + d->externParameterEntities.find(e) == d->externParameterEntities.end() ) { + return FALSE; + } else { + return TRUE; + } +} + +void QXmlSimpleReader::reportParseError() +{ + if ( errorHnd ) + errorHnd->fatalError( QXmlParseException( d->error, columnNr+1, lineNr+1 ) ); +} + +#endif //QT_NO_XML Index: branches/xZenu/src/util/doxygen/qtools/qglobal.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qglobal.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qglobal.cpp (revision 1322) @@ -0,0 +1,685 @@ +/**************************************************************************** +** +** +** Global functions +** +** Created : 920604 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qglobal.h" +#include "qasciidict.h" +#include "qstring.h" +#include +#include +#include + +// NOT REVISED + +/*! + \relates QApplication + Returns the Qt version number for the library, typically "1.30" + or "2.1.0". +*/ + +const char *qVersion() +{ + return QT_VERSION_STR; +} + + +/***************************************************************************** + System detection routines + *****************************************************************************/ + +static bool si_alreadyDone = FALSE; +static int si_wordSize; +static bool si_bigEndian; + +/*! + \relates QApplication + Obtains information about the system. + + The system's word size in bits (typically 32) is returned in \e *wordSize. + The \e *bigEndian is set to TRUE if this is a big-endian machine, + or to FALSE if this is a little-endian machine. + + This function calls qFatal() with a message if the computer is truly weird + (i.e. different endianness for 16 bit and 32 bit integers). +*/ + +bool qSysInfo( int *wordSize, bool *bigEndian ) +{ +#if defined(CHECK_NULL) + ASSERT( wordSize != 0 ); + ASSERT( bigEndian != 0 ); +#endif + + if ( si_alreadyDone ) { // run it only once + *wordSize = si_wordSize; + *bigEndian = si_bigEndian; + return TRUE; + } + si_alreadyDone = TRUE; + + si_wordSize = 0; + uint n = (uint)(~0); + while ( n ) { // detect word size + si_wordSize++; + n /= 2; + } + *wordSize = si_wordSize; + + if ( *wordSize != 64 && + *wordSize != 32 && + *wordSize != 16 ) { // word size: 16, 32 or 64 +#if defined(CHECK_RANGE) + qFatal( "qSysInfo: Unsupported system word size %d", *wordSize ); +#endif + return FALSE; + } + if ( sizeof(Q_INT8) != 1 || sizeof(Q_INT16) != 2 || sizeof(Q_INT32) != 4 || + sizeof(float) != 4 || sizeof(double) != 8 ) { +#if defined(CHECK_RANGE) + qFatal( "qSysInfo: Unsupported system data type size" ); +#endif + return FALSE; + } + + bool be16, be32; // determine byte ordering + short ns = 0x1234; + int nl = 0x12345678; + + unsigned char *p = (unsigned char *)(&ns); // 16-bit integer + be16 = *p == 0x12; + + p = (unsigned char *)(&nl); // 32-bit integer + if ( p[0] == 0x12 && p[1] == 0x34 && p[2] == 0x56 && p[3] == 0x78 ) + be32 = TRUE; + else + if ( p[0] == 0x78 && p[1] == 0x56 && p[2] == 0x34 && p[3] == 0x12 ) + be32 = FALSE; + else + be32 = !be16; + + if ( be16 != be32 ) { // strange machine! +#if defined(CHECK_RANGE) + qFatal( "qSysInfo: Inconsistent system byte order" ); +#endif + return FALSE; + } + + *bigEndian = si_bigEndian = be32; + return TRUE; +} + + +/***************************************************************************** + Debug output routines + *****************************************************************************/ + +/*! + \fn void qDebug( const char *msg, ... ) + + \relates QApplication + Prints a debug message, or calls the message handler (if it has been + installed). + + This function takes a format string and a list of arguments, similar to + the C printf() function. + + Example: + \code + qDebug( "my window handle = %x", myWidget->id() ); + \endcode + + Under X11, the text is printed to stderr. Under Windows, the text is + sent to the debugger. + + \warning The internal buffer is limited to 8196 bytes (including the + 0-terminator). + + \sa qWarning(), qFatal(), qInstallMsgHandler(), + \link debug.html Debugging\endlink +*/ + +/*! + \fn void qWarning( const char *msg, ... ) + + \relates QApplication + Prints a warning message, or calls the message handler (if it has been + installed). + + This function takes a format string and a list of arguments, similar to + the C printf() function. + + Example: + \code + void f( int c ) + { + if ( c > 200 ) + qWarning( "f: bad argument, c == %d", c ); + } + \endcode + + Under X11, the text is printed to stderr. Under Windows, the text is + sent to the debugger. + + \warning The internal buffer is limited to 8196 bytes (including the + 0-terminator). + + \sa qDebug(), qFatal(), qInstallMsgHandler(), + \link debug.html Debugging\endlink +*/ + +/*! + \fn void qFatal( const char *msg, ... ) + + \relates QApplication + Prints a fatal error message and exits, or calls the message handler (if it + has been installed). + + This function takes a format string and a list of arguments, similar to + the C printf() function. + + Example: + \code + int divide( int a, int b ) + { + if ( b == 0 ) // program error + qFatal( "divide: cannot divide by zero" ); + return a/b; + } + \endcode + + Under X11, the text is printed to stderr. Under Windows, the text is + sent to the debugger. + + \warning The internal buffer is limited to 8196 bytes (including the + 0-terminator). + + \sa qDebug(), qWarning(), qInstallMsgHandler(), + \link debug.html Debugging\endlink +*/ + + +static msg_handler handler = 0; // pointer to debug handler + + +#ifdef _OS_MAC_ + +static FILE * mac_debug=0; + +void qDebug( const char *msg, ... ) +{ + mac_debug=fopen( "debug.txt", "a+" ); + if(mac_debug) { + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtDebugMsg, buf ); + } else { + vfprintf( mac_debug, msg, ap ); + va_end( ap ); + fprintf( mac_debug, "\n" ); // add newline + fflush( mac_debug ); + } + fclose(mac_debug); + } else { + exit(0); + } +} + +// copied... this looks really bad. +void debug( const char *msg, ... ) +{ + mac_debug=fopen( "debug.txt", "a+" ); + if(mac_debug) { + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtDebugMsg, buf ); + } else { + vfprintf( mac_debug, msg, ap ); + va_end( ap ); + fprintf( mac_debug, "\n" ); // add newline + fflush( mac_debug ); + } + fclose(mac_debug); + } +} + +void qWarning( const char *msg, ... ) +{ + mac_debug=fopen( "debug.txt", "a+" ); + if(mac_debug) { + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtDebugMsg, buf ); + } else { + vfprintf( mac_debug, msg, ap ); + va_end( ap ); + fprintf( mac_debug, "\n" ); // add newline + fflush( mac_debug ); + } + fclose(mac_debug); + } +} + +// copied... this looks really bad. +void warning( const char *msg, ... ) +{ + mac_debug=fopen( "debug.txt", "a+" ); + if(mac_debug) { + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtDebugMsg, buf ); + } else { + vfprintf( mac_debug, msg, ap ); + va_end( ap ); + fprintf( mac_debug, "\n" ); // add newline + fflush( mac_debug ); + } + fclose(mac_debug); + } +} + +void qFatal( const char *msg, ... ) +{ + mac_debug=fopen( "debug.txt", "a+"); + if(mac_debug) { + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtDebugMsg, buf ); + } else { + vfprintf( mac_debug, msg, ap ); + va_end( ap ); + fprintf( mac_debug, "\n" ); // add newline + fflush( mac_debug ); + } + fclose(mac_debug); + } + exit(0); +} + +// copied... this looks really bad. +void fatal( const char *msg, ... ) +{ + mac_debug=fopen( "debug.txt", "a+" ); + if(mac_debug) { + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtDebugMsg, buf ); + } else { + vfprintf( mac_debug, msg, ap ); + va_end( ap ); + fprintf( mac_debug, "\n" ); // add newline + fflush( mac_debug ); + } + fclose(mac_debug); + } + exit(0); +} + +#else + +void qDebug( const char *msg, ... ) +{ + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); // ### vsnprintf would be great here + va_end( ap ); + (*handler)( QtDebugMsg, buf ); + } else { + vfprintf( stderr, msg, ap ); + va_end( ap ); + fprintf( stderr, "\n" ); // add newline + } +} + +// copied... this looks really bad. +void debug( const char *msg, ... ) +{ + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtDebugMsg, buf ); + } else { + vfprintf( stderr, msg, ap ); + va_end( ap ); + fprintf( stderr, "\n" ); // add newline + } +} + +void qWarning( const char *msg, ... ) +{ + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtWarningMsg, buf ); + } else { + vfprintf( stderr, msg, ap ); + va_end( ap ); + fprintf( stderr, "\n" ); // add newline + } +} + + +// again, copied +void warning( const char *msg, ... ) +{ + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtWarningMsg, buf ); + } else { + vfprintf( stderr, msg, ap ); + va_end( ap ); + fprintf( stderr, "\n" ); // add newline + } +} + +void qFatal( const char *msg, ... ) +{ + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtFatalMsg, buf ); + } else { + vfprintf( stderr, msg, ap ); + va_end( ap ); + fprintf( stderr, "\n" ); // add newline +#if defined(_OS_UNIX_) && defined(DEBUG) + abort(); // trap; generates core dump +#else + exit( 1 ); // goodbye cruel world +#endif + } +} + +// yet again, copied +void fatal( const char *msg, ... ) +{ + char buf[8196]; + va_list ap; + va_start( ap, msg ); // use variable arg list + if ( handler ) { + vsprintf( buf, msg, ap ); + va_end( ap ); + (*handler)( QtFatalMsg, buf ); + } else { + vfprintf( stderr, msg, ap ); + va_end( ap ); + fprintf( stderr, "\n" ); // add newline +#if defined(_OS_UNIX_) && defined(DEBUG) + abort(); // trap; generates core dump +#else + exit( 1 ); // goodbye cruel world +#endif + } +} + +#endif + + +/*! + \fn void ASSERT( bool test ) + \relates QApplication + Prints a warning message containing the source code file name and line number + if \e test is FALSE. + + This is really a macro defined in qglobal.h. + + ASSERT is useful for testing required conditions in your program. + + Example: + \code + // + // File: div.cpp + // + + #include + + int divide( int a, int b ) + { + ASSERT( b != 0 ); // this is line 9 + return a/b; + } + \endcode + + If \c b is zero, the ASSERT statement will output the following message + using the qWarning() function: + \code + ASSERT: "b == 0" in div.cpp (9) + \endcode + + \sa qWarning(), \link debug.html Debugging\endlink +*/ + + +/*! + \fn void CHECK_PTR( void *p ) + \relates QApplication + If \e p is null, a fatal messages says that the program ran out of memory + and exits. If \e p is not null, nothing happens. + + This is really a macro defined in qglobal.h. + + Example: + \code + int *a; + CHECK_PTR( a = new int[80] ); // never do this! + // do this instead: + a = new int[80]; + CHECK_PTR( a ); // this is fine + \endcode + + \sa qFatal(), \link debug.html Debugging\endlink +*/ + + +// +// The CHECK_PTR macro calls this function to check if an allocation went ok. +// + +bool qt_check_pointer( bool c, const char *n, int l ) +{ + if ( c ) + qFatal( "In file %s, line %d: Out of memory", n, l ); + return TRUE; +} + + +static bool firstObsoleteWarning(const char *obj, const char *oldfunc ) +{ + static QAsciiDict *obsoleteDict = 0; + if ( !obsoleteDict ) { // first time func is called + obsoleteDict = new QAsciiDict; +#if defined(DEBUG) + qDebug( + "You are using obsolete functions in the Qt library. Call the function\n" + "qSuppressObsoleteWarnings() to suppress obsolete warnings.\n" + ); +#endif + } + QCString s( obj ); + s += "::"; + s += oldfunc; + if ( obsoleteDict->find(s.data()) == 0 ) { + obsoleteDict->insert( s.data(), (int*)1 ); // anything different from 0 + return TRUE; + } + return FALSE; +} + +static bool suppressObsolete = FALSE; + +void qSuppressObsoleteWarnings( bool suppress ) +{ + suppressObsolete = suppress; +} + +void qObsolete( const char *obj, const char *oldfunc, const char *newfunc ) +{ + if ( suppressObsolete ) + return; + if ( !firstObsoleteWarning(obj, oldfunc) ) + return; + if ( obj ) + qDebug( "%s::%s: This function is obsolete, use %s instead.", + obj, oldfunc, newfunc ); + else + qDebug( "%s: This function is obsolete, use %s instead.", + oldfunc, newfunc ); +} + +void qObsolete( const char *obj, const char *oldfunc ) +{ + if ( suppressObsolete ) + return; + if ( !firstObsoleteWarning(obj, oldfunc) ) + return; + if ( obj ) + qDebug( "%s::%s: This function is obsolete.", obj, oldfunc ); + else + qDebug( "%s: This function is obsolete.", oldfunc ); +} + +void qObsolete( const char *message ) +{ + if ( suppressObsolete ) + return; + if ( !firstObsoleteWarning( "Qt", message) ) + return; + qDebug( "%s", message ); +} + + +/*! + \relates QApplication + Installs a Qt message handler. Returns a pointer to the message handler + previously defined. + + The message handler is a function that prints out debug messages, + warnings and fatal error messages. The Qt library (debug version) + contains hundreds of warning messages that are printed when internal + errors (usually invalid function arguments) occur. If you implement + your own message handler, you get total control of these messages. + + The default message handler prints the message to the standard output + under X11 or to the debugger under Windows. If it is a fatal message, + the application aborts immediately. + + Only one message handler can be defined, since this is usually done on + an application-wide basis to control debug output. + + To restore the message handler, call \c qInstallMsgHandler(0). + + Example: + \code + #include + #include + #include + + void myMessageOutput( QtMsgType type, const char *msg ) + { + switch ( type ) { + case QtDebugMsg: + fprintf( stderr, "Debug: %s\n", msg ); + break; + case QtWarningMsg: + fprintf( stderr, "Warning: %s\n", msg ); + break; + case QtFatalMsg: + fprintf( stderr, "Fatal: %s\n", msg ); + abort(); // dump core on purpose + } + } + + int main( int argc, char **argv ) + { + qInstallMsgHandler( myMessageOutput ); + QApplication a( argc, argv ); + ... + return a.exec(); + } + \endcode + + \sa qDebug(), qWarning(), qFatal(), \link debug.html Debugging\endlink +*/ + +msg_handler qInstallMsgHandler( msg_handler h ) +{ + msg_handler old = handler; + handler = h; + return old; +} + + +#ifdef _WS_WIN_ +bool qt_winunicode=FALSE; +#endif Index: branches/xZenu/src/util/doxygen/qtools/qsortedlist.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qsortedlist.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qsortedlist.h (revision 1322) @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** +** Definition of QList template/macro class +** +** Created : 920701 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QSORTEDLIST_H +#define QSORTEDLIST_H + +#ifndef QT_H +#include "qlist.h" +#endif // QT_H + + +template class Q_EXPORT QSortedList : public QList +{ +public: + QSortedList() {} + QSortedList( const QSortedList &l ) : QList(l) {} + ~QSortedList() { clear(); } + QSortedList &operator=(const QSortedList &l) + { return (QSortedList&)QList::operator=(l); } + + virtual int compareItems( QCollection::Item s1, QCollection::Item s2 ) + { if ( *((type*)s1) == *((type*)s2) ) return 0; return ( *((type*)s1) < *((type*)s2) ? -1 : 1 ); } +}; + +#endif Index: branches/xZenu/src/util/doxygen/qtools/qdatetime.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qdatetime.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qdatetime.h (revision 1322) @@ -0,0 +1,216 @@ +/**************************************************************************** +** +** +** Definition of date and time classes +** +** Created : 940124 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QDATETIME_H +#define QDATETIME_H + +#ifndef QT_H +#include "qstring.h" +#endif // QT_H + + +/***************************************************************************** + QDate class + *****************************************************************************/ + +class Q_EXPORT QDate +{ +public: + QDate() { jd=0; } // set null date + QDate( int y, int m, int d ); // set date + virtual ~QDate() {} + + bool isNull() const { return jd == 0; } + bool isValid() const; // valid date + + int year() const; // 1752.. + int month() const; // 1..12 + int day() const; // 1..31 + int dayOfWeek() const; // 1..7 (monday==1) + int dayOfYear() const; // 1..365 + int daysInMonth() const; // 28..31 + int daysInYear() const; // 365 or 366 + + virtual QString monthName( int month ) const; + virtual QString dayName( int weekday ) const; + + QString toString() const; + + bool setYMD( int y, int m, int d ); + + QDate addDays( int days ) const; + int daysTo( const QDate & ) const; + + bool operator==( const QDate &d ) const { return jd == d.jd; } + bool operator!=( const QDate &d ) const { return jd != d.jd; } + bool operator<( const QDate &d ) const { return jd < d.jd; } + bool operator<=( const QDate &d ) const { return jd <= d.jd; } + bool operator>( const QDate &d ) const { return jd > d.jd; } + bool operator>=( const QDate &d ) const { return jd >= d.jd; } + + static QDate currentDate(); + static bool isValid( int y, int m, int d ); + static bool leapYear( int year ); + +protected: + static uint greg2jul( int y, int m, int d ); + static void jul2greg( uint jd, int &y, int &m, int &d ); +private: + static const char * const monthNames[]; + static const char * const weekdayNames[]; + uint jd; + friend class QDateTime; +#ifndef QT_NO_DATASTREAM + friend Q_EXPORT QDataStream &operator<<( QDataStream &, const QDate & ); + friend Q_EXPORT QDataStream &operator>>( QDataStream &, QDate & ); +#endif +}; + + +/***************************************************************************** + QTime class + *****************************************************************************/ + +class Q_EXPORT QTime +{ +public: + QTime() { ds=0; } // set null time + QTime( int h, int m, int s=0, int ms=0 ); // set time + + bool isNull() const { return ds == 0; } + bool isValid() const; // valid time + + int hour() const; // 0..23 + int minute() const; // 0..59 + int second() const; // 0..59 + int msec() const; // 0..999 + + 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; +#ifndef QT_NO_DATASTREAM + friend Q_EXPORT QDataStream &operator<<( QDataStream &, const QTime & ); + friend Q_EXPORT QDataStream &operator>>( QDataStream &, QTime & ); +#endif +}; + + +/***************************************************************************** + QDateTime class + *****************************************************************************/ + +class Q_EXPORT QDateTime +{ +public: + QDateTime() {} // set null date and null time + 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; +#ifndef QT_NO_DATASTREAM + friend Q_EXPORT QDataStream &operator<<( QDataStream &, const QDateTime &); + friend Q_EXPORT QDataStream &operator>>( QDataStream &, QDateTime & ); +#endif +}; + + +/***************************************************************************** + Date and time stream functions + *****************************************************************************/ + +#ifndef QT_NO_DATASTREAM +Q_EXPORT QDataStream &operator<<( QDataStream &, const QDate & ); +Q_EXPORT QDataStream &operator>>( QDataStream &, QDate & ); +Q_EXPORT QDataStream &operator<<( QDataStream &, const QTime & ); +Q_EXPORT QDataStream &operator>>( QDataStream &, QTime & ); +Q_EXPORT QDataStream &operator<<( QDataStream &, const QDateTime & ); +Q_EXPORT QDataStream &operator>>( QDataStream &, QDateTime & ); +#endif // QT_NO_DATASTREAM + +#endif // QDATETIME_H Index: branches/xZenu/src/util/doxygen/qtools/qasciidict.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qasciidict.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qasciidict.h (revision 1322) @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** +** Definition of QAsciiDict template class +** +** Created : 920821 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QASCIIDICT_H +#define QASCIIDICT_H + +#ifndef QT_H +#include "qgdict.h" +#endif // QT_H + + +template class Q_EXPORT QAsciiDict : public QGDict +{ +public: + QAsciiDict(int size=17, bool caseSensitive=TRUE, bool copyKeys=TRUE ) + : QGDict(size,AsciiKey,caseSensitive,copyKeys) {} + QAsciiDict( const QAsciiDict &d ) : QGDict(d) {} + ~QAsciiDict() { clear(); } + QAsciiDict &operator=(const QAsciiDict &d) + { return (QAsciiDict&)QGDict::operator=(d); } + uint count() const { return QGDict::count(); } + uint size() const { return QGDict::size(); } + bool isEmpty() const { return QGDict::count() == 0; } + + void insert( const char *k, const type *d ) + { QGDict::look_ascii(k,(Item)d,1); } + void replace( const char *k, const type *d ) + { QGDict::look_ascii(k,(Item)d,2); } + bool remove( const char *k ) { return QGDict::remove_ascii(k); } + type *take( const char *k ) { return (type *)QGDict::take_ascii(k); } + type *find( const char *k ) const + { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); } + type *operator[]( const char *k ) const + { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); } + + void clear() { QGDict::clear(); } + void resize( uint n ) { QGDict::resize(n); } + void statistics() const { QGDict::statistics(); } +private: + void deleteItem( Item d ); +}; + +#if defined(Q_DELETING_VOID_UNDEFINED) +template<> inline void QAsciiDict::deleteItem( Item ) +{ +} +#endif + +template inline void QAsciiDict::deleteItem( QCollection::Item d ) +{ + if ( del_item ) delete (type *)d; +} + + +template class Q_EXPORT QAsciiDictIterator : public QGDictIterator +{ +public: + QAsciiDictIterator(const QAsciiDict &d) + : QGDictIterator((QGDict &)d) {} + ~QAsciiDictIterator() {} + uint count() const { return dict->count(); } + bool isEmpty() const { return dict->count() == 0; } + type *toFirst() { return (type *)QGDictIterator::toFirst(); } + operator type *() const { return (type *)QGDictIterator::get(); } + type *current() const { return (type *)QGDictIterator::get(); } + const char *currentKey() const { return QGDictIterator::getKeyAscii(); } + type *operator()() { return (type *)QGDictIterator::operator()(); } + type *operator++() { return (type *)QGDictIterator::operator++(); } + type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);} +}; + + +#endif // QASCIIDICT_H Index: branches/xZenu/src/util/doxygen/qtools/qstringlist.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qstringlist.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qstringlist.cpp (revision 1322) @@ -0,0 +1,307 @@ +/**************************************************************************** +** +** +** Implementation of QStringList +** +** Created : 990406 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qstringlist.h" + +#ifndef QT_NO_STRINGLIST +#include "qstrlist.h" +#include "qdatastream.h" +#include "qtl.h" + +// NOT REVISED +/*! + \class QStringList qstringlist.h + \brief A list of strings. + + \ingroup qtl + \ingroup tools + \ingroup shared + + QStringList is basically a QValueList of QString objects. As opposed + to QStrList, that stores pointers to characters, QStringList deals + with real QString objects. It is the class of choice whenever you + work with unicode strings. + + Like QString itself, QStringList objects are implicit shared. + Passing them around as value-parameters is both fast and safe. + + Example: + \code + QStringList list; + + // three different ways of appending values: + list.append( "Torben"); + list += "Warwick"; + list << "Matthias" << "Arnt" << "Paul"; + + // sort the list, Arnt's now first + list.sort(); + + // print it out + for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + printf( "%s \n", (*it).latin1() ); + } + \endcode + + Convenience methods such as sort(), split(), join() and grep() make + working with QStringList easy. +*/ + +/*! + \fn QStringList::QStringList() + Creates an empty list. +*/ + +/*! \fn QStringList::QStringList( const QStringList& l ) + Creates a copy of the list. This function is very fast since + QStringList is implicit shared. However, for the programmer this + is the same as a deep copy. If this list or the original one or some + other list referencing the same shared data is modified, then the + modifying list makes a copy first. +*/ + +/*! + \fn QStringList::QStringList (const QString & i) + Constructs a string list consisting of the single string \a i. + To make longer lists easily, use: + \code + QString s1,s2,s3; + ... + QStringList mylist = QStringList() << s1 << s2 << s3; + \endcode +*/ + +/*! + \fn QStringList::QStringList (const char* i) + Constructs a string list consisting of the single latin-1 string \a i. +*/ + +/*! \fn QStringList::QStringList( const QValueList& l ) + + Constructs a new string list that is a copy of \a l. +*/ + +/*! + Sorts the list of strings in ascending order. + + Sorting is very fast. It uses the Qt Template Library's + efficient HeapSort implementation that operates in O(n*log n). +*/ +void QStringList::sort() +{ + qHeapSort(*this); +} + +/*! + Splits the string \a str using \a sep as separator. Returns the + list of strings. If \a allowEmptyEntries is TRUE, also empty + entries are inserted into the list, else not. So if you have + a string 'abc..d.e.', a list which contains 'abc', 'd', and 'e' + would be returned if \a allowEmptyEntries is FALSE, but + a list containing 'abc', '', 'd', 'e' and '' would be returned if + \a allowEmptyEntries is TRUE. + If \a str doesn't contain \a sep, a stringlist + with one item, which is the same as \a str, is returned. + + \sa join() +*/ + +QStringList QStringList::split( const QChar &sep, const QString &str, bool allowEmptyEntries ) +{ + return split( QString( sep ), str, allowEmptyEntries ); +} + +/*! + Splits the string \a str using \a sep as separator. Returns the + list of strings. If \a allowEmptyEntries is TRUE, also empty + entries are inserted into the list, else not. So if you have + a string 'abc..d.e.', a list which contains 'abc', 'd', and 'e' + would be returned if \a allowEmptyEntries is FALSE, but + a list containing 'abc', '', 'd', 'e' and '' would be returned if + \a allowEmptyEntries is TRUE. + If \a str doesn't contain \a sep, a stringlist + with one item, which is the same as \a str, is returned. + + \sa join() +*/ + +QStringList QStringList::split( const QString &sep, const QString &str, bool allowEmptyEntries ) +{ + QStringList lst; + + int j = 0; + int i = str.find( sep, j ); + + while ( i != -1 ) { + if ( str.mid( j, i - j ).length() > 0 ) + lst << str.mid( j, i - j ); + else if ( allowEmptyEntries ) + lst << QString::null; + j = i + sep.length(); + i = str.find( sep, j ); + } + + int l = str.length() - 1; + if ( str.mid( j, l - j + 1 ).length() > 0 ) + lst << str.mid( j, l - j + 1 ); + else if ( allowEmptyEntries ) + lst << QString::null; + + return lst; +} + +QStringList QStringList::split( const QCString &sep, const QCString &str, bool allowEmptyEntries ) +{ + return split(QString(sep.data()),QString(str.data()),allowEmptyEntries); +} + +/*! + Splits the string \a str using the regular expression \a sep as separator. Returns the + list of strings. If \a allowEmptyEntries is TRUE, also empty + entries are inserted into the list, else not. So if you have + a string 'abc..d.e.', a list which contains 'abc', 'd', and 'e' + would be returned if \a allowEmptyEntries is FALSE, but + a list containing 'abc', '', 'd', 'e' and '' would be returned if + \a allowEmptyEntries is TRUE. + If \a str doesn't contain \a sep, a stringlist + with one item, which is the same as \a str, is returned. + + \sa join() +*/ + +QStringList QStringList::split( const QRegExp &sep, const QString &str, bool allowEmptyEntries ) +{ + QStringList lst; + + int j = 0; + int len = 0; + int i = sep.match( str.data(), j, &len ); + + while ( i != -1 ) { + if ( str.mid( j, i - j ).length() > 0 ) + lst << str.mid( j, i - j ); + else if ( allowEmptyEntries ) + lst << QString::null; + j = i + len; + i = sep.match( str.data(), j, &len ); + } + + int l = str.length() - 1; + if ( str.mid( j, l - j + 1 ).length() > 0 ) + lst << str.mid( j, l - j + 1 ); + else if ( allowEmptyEntries ) + lst << QString::null; + + return lst; +} + +/*! + Returns a list of all strings containing the substring \a str. + + If \a cs is TRUE, the grep is done case sensitively, else not. +*/ + +QStringList QStringList::grep( const QString &str, bool cs ) const +{ + QStringList res; + for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) + if ( (*it).contains( str, cs ) ) + res << *it; + + return res; +} + +/*! + Returns a list of all strings containing a substring that matches + the regular expression \a expr. +*/ + +QStringList QStringList::grep( const QRegExp &expr ) const +{ + QStringList res; + for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) + if ( (*it).contains( expr ) ) + res << *it; + + return res; +} + +/*! + Joins the stringlist into a single string with each element + separated by \a sep. + + \sa split() +*/ +QString QStringList::join( const QString &sep ) const +{ + QString res; + bool alredy = FALSE; + for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { + if ( alredy ) + res += sep; + alredy = TRUE; + res += *it; + } + + return res; +} + +#ifndef QT_NO_DATASTREAM +Q_EXPORT QDataStream &operator>>( QDataStream & s, QStringList& l ) +{ + return s >> (QValueList&)l; +} + +Q_EXPORT QDataStream &operator<<( QDataStream & s, const QStringList& l ) +{ + return s << (const QValueList&)l; +} +#endif + +/*! + Converts from a QStrList (ASCII) to a QStringList (Unicode). +*/ +QStringList QStringList::fromStrList(const QStrList& ascii) +{ + QStringList res; + const char * s; + for ( QStrListIterator it(ascii); (s=it.current()); ++it ) + res << s; + return res; +} + +#endif //QT_NO_STRINGLIST Index: branches/xZenu/src/util/doxygen/qtools/qmutex.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qmutex.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qmutex.cpp (revision 1322) @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "qglobal.h" + +#include "qmutex.h" +#include "qmutex_p.h" + +QMutex::QMutex() : d(new QMutexPrivate()) +{ +} + +QMutex::~QMutex() +{ + delete d; +} + +void QMutex::lock() +{ + //printf("%p: QMutex::lock(): enter\n",this); + bool isLocked; + isLocked = d->contenders == 0 && d->contenders.testAndSet(0, 1); + if (!isLocked) + { + isLocked = d->contenders.fetchAndAdd(1)==0; + if (!isLocked) + { + // didn't get the lock, wait for it + //printf("%p: QMutex::lock(): wait() %d\n",this,(int)d->contenders); + d->wait(); + + // release lock + d->contenders.fetchAndAdd(-1); + } + } + //printf("%p: QMutex::lock(): leave\n",this); +} + +bool QMutex::tryLock() +{ + bool isLocked = d->contenders == 0 && + d->contenders.testAndSet(0, 1); + return isLocked; +} + +void QMutex::unlock() +{ + //printf("%p: QMutex::unlock(): enter %d\n",this,(int)d->contenders); + if (!d->contenders.testAndSet(1, 0)) + { + //printf("%p: QMutex::unlock(): wakeUp()\n",this); + d->wakeUp(); + } + //printf("%p: QMutex::unlock(): leave\n",this); +} + Index: branches/xZenu/src/util/doxygen/qtools/qintdict.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qintdict.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qintdict.h (revision 1322) @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** +** Definition of QIntDict template class +** +** Created : 940624 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QINTDICT_H +#define QINTDICT_H + +#ifndef QT_H +#include "qgdict.h" +#endif // QT_H + + +template class Q_EXPORT QIntDict : public QGDict +{ +public: + QIntDict(int size=17) : QGDict(size,IntKey,0,0) {} + QIntDict( const QIntDict &d ) : QGDict(d) {} + ~QIntDict() { clear(); } + QIntDict &operator=(const QIntDict &d) + { return (QIntDict&)QGDict::operator=(d); } + uint count() const { return QGDict::count(); } + uint size() const { return QGDict::size(); } + bool isEmpty() const { return QGDict::count() == 0; } + void insert( long k, const type *d ) + { QGDict::look_int(k,(Item)d,1); } + void replace( long k, const type *d ) + { QGDict::look_int(k,(Item)d,2); } + bool remove( long k ) { return QGDict::remove_int(k); } + type *take( long k ) { return (type*)QGDict::take_int(k); } + type *find( long k ) const + { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); } + type *operator[]( long k ) const + { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); } + void clear() { QGDict::clear(); } + void resize( uint n ) { QGDict::resize(n); } + void statistics() const { QGDict::statistics(); } +private: + void deleteItem( Item d ); +}; + +#if defined(Q_DELETING_VOID_UNDEFINED) +template<> inline void QIntDict::deleteItem( QCollection::Item ) +{ +} +#endif + +template inline void QIntDict::deleteItem( QCollection::Item d ) +{ + if ( del_item ) delete (type *)d; +} + +template class Q_EXPORT QIntDictIterator : public QGDictIterator +{ +public: + QIntDictIterator(const QIntDict &d) :QGDictIterator((QGDict &)d) {} + ~QIntDictIterator() {} + uint count() const { return dict->count(); } + bool isEmpty() const { return dict->count() == 0; } + type *toFirst() { return (type *)QGDictIterator::toFirst(); } + operator type *() const { return (type *)QGDictIterator::get(); } + type *current() const { return (type *)QGDictIterator::get(); } + long currentKey() const { return QGDictIterator::getKeyInt(); } + type *operator()() { return (type *)QGDictIterator::operator()(); } + type *operator++() { return (type *)QGDictIterator::operator++(); } + type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);} +}; + + +#endif // QINTDICT_H Index: branches/xZenu/src/util/doxygen/qtools/qdict.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qdict.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qdict.doc (revision 1322) @@ -0,0 +1,492 @@ +/**************************************************************************** +** +** +** QDict and QDictIterator class documentation +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + + +/***************************************************************************** + QDict documentation + *****************************************************************************/ + +/*! + \class QDict qdict.h + \brief The QDict class is a template class that provides a dictionary based on \c QString keys. + + \ingroup collection + \ingroup tools + + QDict is implemented as a template class. Define a template instance + QDict\ to create a dictionary that operates on pointers to X, or X*. + + A dictionary is a collection that associates an item with a key. + The key is used for inserting and looking up an item. QDict has + \l QString keys, which are Unicode strings. If you want to use + non-Unicode, plain 8-bit \c char* keys, use the QAsciiDict template. + A QDict has the same performace as a QAsciiDict. + + The dictionary has very fast insertion and lookup. + + Example: + \code + #include + #include + + void main() + { + // Creates a dictionary that maps QString ==> char* (case insensitive) + QDict dict( 17, FALSE ); + + dict.insert( "France", "Paris" ); + dict.insert( "Russia", "Moscow" ); + dict.insert( "Norway", "Oslo" ); + + printf( "%s\n", dict["Norway"] ); + printf( "%s\n", dict["FRANCE"] ); + printf( "%s\n", dict["russia"] ); + + if ( !dict["Italy"] ) + printf( "Italy not defined\n" ); + } + \endcode + + Program output: + \code + Oslo + Paris + Moscow + Italy not defined + \endcode + + The dictionary in our example maps \c QString keys to \c char* items. + Note that the mapping is case insensitive (specified in the + \link QDict::QDict() constructor\endlink). + QDict implements the \link operator[] [] operator\endlink to lookup an item. + + QDict is implemented by QGDict as a hash array with a fixed number of + entries. Each array entry points to a singly linked list of buckets, in + which the dictionary items are stored. + + When an item is inserted with a key, the key is converted (hashed) to + an integer index into the hash array. The item is inserted before the + first bucket in the list of buckets. + + Looking up an item is normally very fast. The key is again hashed to an + array index. Then QDict scans the list of buckets and returns the item + found or null if the item was not found. You cannot insert null pointers + into a dictionary. + + The size of the hash array is very important. In order to get good + performance, you should use a suitably large \link primes.html prime + number\endlink. Suitable means equal to or larger than the maximum + expected number of dictionary items. + + Items with equal keys are allowed. When inserting two items with the + same key, only the last inserted item will be visible (last in, first out) + until it is removed. + + Example: + \code + #include + #include + + void main() + { + // Creates a dictionary that maps QString ==> char* (case sensitive) + QDict dict; + + dict.insert( "Germany", "Berlin" ); + dict.insert( "Germany", "Bonn" ); + + printf( "%s\n", dict["Germany"] ); + dict.remove( "Germany" ); // Oct 3rd 1990 + printf( "%s\n", dict["Germany"] ); + } + \endcode + + Program output: + \code + Bonn + Berlin + \endcode + + The QDictIterator class can traverse the dictionary contents, but only + in an arbitrary order. Multiple iterators may independently traverse the + same dictionary. + + Calling setAutoDelete(TRUE) for a dictionary tells it to delete items + that are removed . The default is to not delete items when they are + removed. + + When inserting an item into a dictionary, only the pointer is copied, not + the item itself. This is called a shallow copy. It is possible to make the + dictionary copy all of the item's data (known as a deep copy) when an + item is inserted. insert() calls the virtual function + QCollection::newItem() for the item to be inserted. + Inherit a dictionary and reimplement it if you want deep copies. + + When removing a dictionary item, the virtual function + QCollection::deleteItem() is called. QDict's default implementation + is to delete the item if auto-deletion is enabled. + + \sa QDictIterator, QAsciiDict, QIntDict, QPtrDict, + \link collection.html Collection Classes\endlink +*/ + + +/*! + \fn QDict::QDict( int size, bool caseSensitive ) + Constructs a dictionary with the following properties: + \arg \e size is the size of the internal hash array. + \arg \e caseSensitive specifies whether to use case sensitive lookup or not. + + Setting \e size to a suitably large \link primes.html prime + number\endlink (equal to or greater than the expected number of entries) + makes the hash distribution better and hence the loopup faster. + + Setting \e caseSensitive to TRUE will treat "abc" and "Abc" as different + keys. Setting it to FALSE will make the dictionary ignore case. + Case insensitive comparison includes the whole Unicode alphabeth. +*/ + +/*! + \fn QDict::QDict( const QDict &dict ) + Constructs a copy of \e dict. + + Each item in \e dict are inserted into this dictionary. + Only the pointers are copied (shallow copy). +*/ + +/*! + \fn QDict::~QDict() + Removes all items from the dictionary and destroys it. + All iterators that access this dictionary will be reset. + + \sa setAutoDelete() +*/ + +/*! + \fn QDict &QDict::operator=(const QDict &dict) + Assigns \e dict to this dictionary and returns a reference to this + dictionary. + + This dictionary is first cleared, then each item in \e dict is inserted + into this dictionary. + Only the pointers are copied (shallow copy), unless newItem() has been + reimplemented(). +*/ + +/*! + \fn uint QDict::count() const + Returns the number of items in the dictionary. + \sa isEmpty() +*/ + +/*! + \fn uint QDict::size() const + Returns the size of the internal hash array (as specified in the + constructor). + \sa count() +*/ + +/*! + \fn void QDict::resize( uint newsize ) + Changes the size of the hashtable the \a newsize. + The contents of the dictionary are preserved, + but all iterators on the dictionary become invalid. +*/ + +/*! + \fn bool QDict::isEmpty() const + Returns TRUE if the dictionary is empty, i.e. count() == 0. Returns FALSE + otherwise. + \sa count() +*/ + +/*! + \fn void QDict::insert( const QString &key, const type *item ) + + Inserts the \e key with the \e item into the dictionary. + + The key does not have to be a unique dictionary key. If multiple items + are inserted with the same key, only the last item will be visible. + + Null items are not allowed. + + \sa replace() +*/ + +/*! + \fn void QDict::replace( const QString &key, const type *item ) + + Replaces an item which has a key equal to \e key with \e item. + + If the item does not already exist, it will be inserted. + + Null items are not allowed. + + Equivalent to: + \code + QDict dict; + ... + if ( dict.find(key) ) + dict.remove( key ); + dict.insert( key, item ); + \endcode + + If there are two or more items with equal keys, then the last inserted + of these will be replaced. + + \sa insert() +*/ + +/*! + \fn bool QDict::remove( const QString &key ) + + Removes the item associated with \e key from the dictionary. + Returns TRUE if successful, or FALSE if the key does not exist in the + dictionary. + + If there are two or more items with equal keys, then the last inserted + of these will be removed. + + The removed item is deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + All dictionary iterators that refer to the removed item will be set to + point to the next item in the dictionary traversing order. + + \sa take(), clear(), setAutoDelete() +*/ + +/*! + \fn type *QDict::take( const QString &key ) + + Takes the item associated with \e key out of the dictionary without + deleting it (even if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled). + + If there are two or more items with equal keys, then the last inserted + of these will be taken. + + Returns a pointer to the item taken out, or null if the key does not + exist in the dictionary. + + All dictionary iterators that refer to the taken item will be set to + point to the next item in the dictionary traversal order. + + \sa remove(), clear(), setAutoDelete() +*/ + +/*! + \fn void QDict::clear() + + Removes all items from the dictionary. + + The removed items are deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + All dictionary iterators that operate on dictionary are reset. + + \sa remove(), take(), setAutoDelete() +*/ + +/*! + \fn type *QDict::find( const QString &key ) const + + Returns the item associated with \e key, or null if the key does not + exist in the dictionary. + + This function uses an internal hashing algorithm to optimize lookup. + + If there are two or more items with equal keys, then the last inserted + of these will be found. + + Equivalent to the [] operator. + + \sa operator[]() +*/ + +/*! + \fn type *QDict::operator[]( const QString &key ) const + + Returns the item associated with \e key, or null if the key does not + exist in the dictionary. + + This function uses an internal hashing algorithm to optimize lookup. + + If there are two or more items with equal keys, then the last inserted + of these will be found. + + Equivalent to the find() function. + + \sa find() +*/ + +/*! + \fn void QDict::statistics() const + Debugging-only function that prints out the dictionary distribution + using qDebug(). +*/ + + +/***************************************************************************** + QDictIterator documentation + *****************************************************************************/ + +/*! + \class QDictIterator qdict.h + \brief The QDictIterator class provides an iterator for QDict collections. + + \ingroup collection + \ingroup tools + + QDictIterator is implemented as a template class. + Define a template instance QDictIterator\ to create a + dictionary iterator that operates on QDict\ (dictionary of X*). + + Example: + \code + #include + #include + + void main() + { + // Creates a dictionary that maps QString ==> char* (case insensitive) + QDict dict( 17, FALSE ); + + dict.insert( "France", "Paris" ); + dict.insert( "Russia", "Moscow" ); + dict.insert( "Norway", "Oslo" ); + + QDictIterator it( dict ); // iterator for dict + + while ( it.current() ) { + printf( "%s -> %s\n", it.currentKey().latin1(), it.current() ); + ++it; + } + } + \endcode + + Program output: + \code + Russia -> Moscow + Norway -> Oslo + France -> Paris + \endcode + + Note that the traversal order is arbitrary, you are not guaranteed the + order above. + + Multiple iterators may independently traverse the same dictionary. + A QDict knows about all iterators that are operating on the dictionary. + When an item is removed from the dictionary, QDict update all iterators + that are referring the removed item to point to the next item in the + traversing order. + + \sa QDict, \link collection.html Collection Classes\endlink +*/ + +/*! + \fn QDictIterator::QDictIterator( const QDict &dict ) + Constructs an iterator for \e dict. The current iterator item is + set to point on the first item in the \e dict. +*/ + +/*! + \fn QDictIterator::~QDictIterator() + Destroys the iterator. +*/ + +/*! + \fn uint QDictIterator::count() const + Returns the number of items in the dictionary this iterator operates on. + \sa isEmpty() +*/ + +/*! + \fn bool QDictIterator::isEmpty() const + Returns TRUE if the dictionary is empty, i.e. count() == 0, otherwise FALSE. + \sa count() +*/ + +/*! + \fn type *QDictIterator::toFirst() + Sets the current iterator item to point to the first item in the + dictionary and returns a pointer to the item. + If the dictionary is empty it sets the current item to null and + returns null. +*/ + +/*! + \fn QDictIterator::operator type *() const + Cast operator. Returns a pointer to the current iterator item. + Same as current(). +*/ + +/*! + \fn type *QDictIterator::current() const + Returns a pointer to the current iterator item. +*/ + +/*! + \fn QString QDictIterator::currentKey() const + Returns a pointer to the key for the current iterator item. +*/ + +/*! + \fn type *QDictIterator::operator()() + Makes the succeeding item current and returns the original current item. + + If the current iterator item was the last item in the dictionary or if it + was null, null is returned. +*/ + +/*! + \fn type *QDictIterator::operator++() + Prefix ++ makes the succeeding item current and returns the new current + item. + + If the current iterator item was the last item in the dictionary or if it + was null, null is returned. +*/ + +/*! + \fn type *QDictIterator::operator+=( uint jump ) + Sets the current item to the item \e jump positions after the current item, + and returns a pointer to that item. + + If that item is beyond the last item or if the dictionary is empty, + it sets the current item to null and returns null. +*/ + + Index: branches/xZenu/src/util/doxygen/qtools/qthread.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qthread.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qthread.cpp (revision 1322) @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qthread.h" +#include "qthread_p.h" + +QThread::QThread() + : d(new QThreadPrivate) +{ +} + +QThread::~QThread() +{ + QMutexLocker locker(&d->mutex); + if (d->running && !d->finished) + qWarning("QThread: Destroyed while thread is still running"); +} + +bool QThread::isFinished() const +{ + QMutexLocker locker(&d->mutex); + return d->finished; +} + +bool QThread::isRunning() const +{ + QMutexLocker locker(&d->mutex); + return d->running; +} + +void QThread::setStackSize(unsigned int stackSize) +{ + QMutexLocker locker(&d->mutex); + if (d->running) + { + qWarning("QThread: Cannot change stack size while thread is running!"); + return; + } + d->stackSize = stackSize; +} + +unsigned int QThread::stackSize() const +{ + QMutexLocker locker(&d->mutex); + return d->stackSize; +} + Index: branches/xZenu/src/util/doxygen/qtools/qcache.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qcache.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qcache.h (revision 1322) @@ -0,0 +1,148 @@ +/**************************************************************************** +** +** +** Definition of QCache template class +** +** Created : 950209 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QCACHE_H +#define QCACHE_H + +#ifndef QT_H +#include "qgcache.h" +#endif // QT_H + +#define USE_ASCII_STRING + +#ifndef USE_ASCII_STRING + +template class Q_EXPORT QCache : public QGCache +{ +public: + QCache( const QCache &c ) : QGCache(c) {} + QCache( int maxCost=100, int size=17, bool caseSensitive=TRUE ) + : QGCache( maxCost, size, StringKey, caseSensitive, FALSE ) {} + ~QCache() { clear(); } + QCache &operator=( const QCache &c ) + { return (QCache&)QGCache::operator=(c); } + int maxCost() const { return QGCache::maxCost(); } + int totalCost() const { return QGCache::totalCost(); } + void setMaxCost( int m ) { QGCache::setMaxCost(m); } + uint count() const { return QGCache::count(); } + uint size() const { return QGCache::size(); } + bool isEmpty() const { return QGCache::count() == 0; } + void clear() { QGCache::clear(); } + bool insert( const QString &k, const type *d, int c=1, int p=0 ) + { return QGCache::insert_string(k,(Item)d,c,p);} + bool remove( const QString &k ) + { return QGCache::remove_string(k); } + type *take( const QString &k ) + { return (type *)QGCache::take_string(k); } + type *find( const QString &k, bool ref=TRUE ) const + { return (type *)QGCache::find_string(k,ref);} + type *operator[]( const QString &k ) const + { return (type *)QGCache::find_string(k);} + void statistics() const { QGCache::statistics(); } +private: + void deleteItem( Item d ) { if ( del_item ) delete (type *)d; } +}; + +#else + + +template class Q_EXPORT QCache : public QGCache +{ +public: + QCache( const QCache &c ) : QGCache(c) {} + QCache( int maxCost=100, int size=17, bool caseSensitive=TRUE ) + : QGCache( maxCost, size, AsciiKey, caseSensitive, TRUE ) {} + ~QCache() { clear(); } + QCache &operator=( const QCache &c ) + { return (QCache&)QGCache::operator=(c); } + int maxCost() const { return QGCache::maxCost(); } + int totalCost() const { return QGCache::totalCost(); } + void setMaxCost( int m ) { QGCache::setMaxCost(m); } + uint count() const { return QGCache::count(); } + uint size() const { return QGCache::size(); } + bool isEmpty() const { return QGCache::count() == 0; } + void clear() { QGCache::clear(); } + bool insert( const char *k, const type *d, int c=1, int p=0 ) + { return QGCache::insert_other(k,(Item)d,c,p);} + bool remove( const char *k ) + { return QGCache::remove_other(k); } + type *take( const char *k ) + { return (type *)QGCache::take_other(k); } + type *find( const char *k, bool ref=TRUE ) const + { return (type *)QGCache::find_other(k,ref);} + type *operator[]( const char *k ) const + { return (type *)QGCache::find_other(k);} + void statistics() const { QGCache::statistics(); } +private: + void deleteItem( Item d ) { if ( del_item ) delete (type *)d; } +}; + + +#endif + + + +template class Q_EXPORT QCacheIterator : public QGCacheIterator +{ +public: + QCacheIterator( const QCache &c ):QGCacheIterator((QGCache &)c) {} + QCacheIterator( const QCacheIterator &ci) + : QGCacheIterator( (QGCacheIterator &)ci ) {} + QCacheIterator &operator=(const QCacheIterator&ci) + { return ( QCacheIterator&)QGCacheIterator::operator=( ci ); } + uint count() const { return QGCacheIterator::count(); } + bool isEmpty() const { return QGCacheIterator::count() == 0; } + bool atFirst() const { return QGCacheIterator::atFirst(); } + bool atLast() const { return QGCacheIterator::atLast(); } + type *toFirst() { return (type *)QGCacheIterator::toFirst(); } + type *toLast() { return (type *)QGCacheIterator::toLast(); } + operator type *() const { return (type *)QGCacheIterator::get(); } + type *current() const { return (type *)QGCacheIterator::get(); } +#ifndef USE_ASCII_STRING + QString currentKey() const{ return QGCacheIterator::getKeyString(); } +#else + const char *currentKey() const{ return QGCacheIterator::getKeyAscii(); } +#endif + type *operator()() { return (type *)QGCacheIterator::operator()();} + type *operator++() { return (type *)QGCacheIterator::operator++(); } + type *operator+=(uint j) { return (type *)QGCacheIterator::operator+=(j);} + type *operator--() { return (type *)QGCacheIterator::operator--(); } + type *operator-=(uint j) { return (type *)QGCacheIterator::operator-=(j);} +}; + + +#endif // QCACHE_H Index: branches/xZenu/src/util/doxygen/qtools/qbuffer.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qbuffer.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qbuffer.cpp (revision 1322) @@ -0,0 +1,465 @@ +/**************************************************************************** +** +** +** Implementation of QBuffer class +** +** Created : 930812 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qbuffer.h" +#include + +// REVISED: paul +/*! + \class QBuffer qbuffer.h + \brief The QBuffer class is an I/O device that operates on a QByteArray + + \ingroup io + + QBuffer allows reading and writing a memory buffer. It is normally + used together with a QTextStream or a QDataStream. QBuffer has an + associated QByteArray which holds the buffer data. The size() of the + buffer is automatically adjusted as data is written. + + The constructor \c QBuffer(QByteArray) creates a QBuffer with an + existing byte array. The byte array can also be set with setBuffer(). + Writing to the QBuffer will modify the original byte array, since + QByteArray is \link shclass.html explicitly shared.\endlink + + Use open() to open the buffer before use, and to set the mode + (read-only,write-only, etc.). close() closes the buffer. The buffer + must be closed before reopening or calling setBuffer(). + + The common way to use QBuffer is through \l QDataStream or \l QTextStream + which have constructors that take a QBuffer parameter. For + convenience, there are also QDataStream and QTextStream constructors + that take a QByteArray parameter. These constructors create and open + an internal QBuffer. + + Note that QTextStream can also operate on a QString (a Unicode + string); a QBuffer cannot. + + You can also use QBuffer directly through the standard QIODevice + functions readBlock(), writeBlock() readLine(), at(), getch(), putch() and + ungetch(). + + \sa QFile, QDataStream, QTextStream, QByteArray, \link shclass.html Shared Classes\endlink +*/ + + +/*! + Constructs an empty buffer. +*/ + +QBuffer::QBuffer() +{ + setFlags( IO_Direct ); + a_inc = 16; // initial increment + a_len = 0; + ioIndex = 0; +} + + +/*! + Constructs a buffer that operates on \a buf. + If you open the buffer in write mode (\c IO_WriteOnly or + \c IO_ReadWrite) and write something into the buffer, \a buf + will be modified. + + + Example: + \code + QCString str = "abc"; + QBuffer b( str ); + b.open( IO_WriteOnly ); + b.at( 3 ); // position at \0 + b.writeBlock( "def", 4 ); // write including \0 + b.close(); + // Now, str == "abcdef" + \endcode + + + \sa setBuffer() +*/ + +QBuffer::QBuffer( QByteArray buf ) : a(buf) +{ + setFlags( IO_Direct ); + a_len = a.size(); + a_inc = (a_len > 512) ? 512 : a_len; // initial increment + if ( a_inc < 16 ) + a_inc = 16; + ioIndex = 0; +} + +/*! + Destructs the buffer. +*/ + +QBuffer::~QBuffer() +{ +} + + +/*! + Replaces the buffer's contents with \a buf. + + This may not be done when isOpen() is TRUE. + + Note that if you open the buffer in write mode (\c IO_WriteOnly or + IO_ReadWrite) and write something into the buffer, \a buf is also + modified because QByteArray is an explicitly shared class. + + \sa buffer(), open(), close() +*/ + +bool QBuffer::setBuffer( QByteArray buf ) +{ + if ( isOpen() ) { +#if defined(CHECK_STATE) + qWarning( "QBuffer::setBuffer: Buffer is open"); +#endif + return FALSE; + } + a = buf; + a_len = a.size(); + a_inc = (a_len > 512) ? 512 : a_len; // initial increment + if ( a_inc < 16 ) + a_inc = 16; + ioIndex = 0; + return TRUE; +} + +/*! + \fn QByteArray QBuffer::buffer() const + + Returns this buffer's byte array. + + \sa setBuffer() +*/ + +/*! + \reimp + Opens the buffer in the mode \a m. Returns TRUE if successful, + otherwise FALSE. The buffer must be opened before use. + + The mode parameter \a m must be a combination of the following flags. +
      +
    • \c IO_ReadOnly opens a buffer in read-only mode. +
    • \c IO_WriteOnly opens a buffer in write-only mode. +
    • \c IO_ReadWrite opens a buffer in read/write mode. +
    • \c IO_Append sets the buffer index to the end of the buffer. +
    • \c IO_Truncate truncates the buffer. +
    + + \sa close(), isOpen() +*/ + +bool QBuffer::open( int m ) +{ + if ( isOpen() ) { // buffer already open +#if defined(CHECK_STATE) + qWarning( "QBuffer::open: Buffer already open" ); +#endif + return FALSE; + } + setMode( m ); + if ( m & IO_Truncate ) { // truncate buffer + a.resize( 0 ); + a_len = 0; + } + if ( m & IO_Append ) { // append to end of buffer + ioIndex = a.size(); + } else { + ioIndex = 0; + } + a_inc = 16; + setState( IO_Open ); + setStatus( 0 ); + return TRUE; +} + +/*! + \reimp + Closes an open buffer. + \sa open() +*/ + +void QBuffer::close() +{ + if ( isOpen() ) { + setFlags( IO_Direct ); + ioIndex = 0; + a_inc = 16; + } +} + +/*! + \reimp + The flush function does nothing for a QBuffer. +*/ + +void QBuffer::flush() +{ + return; +} + + +/*! + \fn int QBuffer::at() const + \reimp +*/ + +/*! + \fn uint QBuffer::size() const + \reimp +*/ + +/*! + \reimp +*/ + +bool QBuffer::at( int pos ) +{ +#if defined(CHECK_STATE) + if ( !isOpen() ) { + qWarning( "QBuffer::at: Buffer is not open" ); + return FALSE; + } +#endif + if ( (uint)pos > a_len ) { +#if defined(CHECK_RANGE) + qWarning( "QBuffer::at: Index %d out of range", pos ); +#endif + return FALSE; + } + ioIndex = pos; + return TRUE; +} + + +/*! + \reimp +*/ + +int QBuffer::readBlock( char *p, uint len ) +{ +#if defined(CHECK_STATE) + CHECK_PTR( p ); + if ( !isOpen() ) { // buffer not open + qWarning( "QBuffer::readBlock: Buffer not open" ); + return -1; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QBuffer::readBlock: Read operation not permitted" ); + return -1; + } +#endif + if ( (uint)ioIndex + len > a.size() ) { // overflow + if ( (uint)ioIndex >= a.size() ) { + setStatus( IO_ReadError ); + return -1; + } else { + len = a.size() - (uint)ioIndex; + } + } + memcpy( p, a.data()+ioIndex, len ); + ioIndex += len; + return len; +} + +/*! + \reimp + + Writes \a len bytes from \a p into the buffer at the current index, + overwriting any characters there and extending the buffer if necessary. + Returns the number of bytes actually written. + + Returns -1 if a serious error occurred. + + \sa readBlock() +*/ + +int QBuffer::writeBlock( const char *p, uint len ) +{ +#if defined(CHECK_NULL) + if ( p == 0 && len != 0 ) + qWarning( "QBuffer::writeBlock: Null pointer error" ); +#endif +#if defined(CHECK_STATE) + if ( !isOpen() ) { // buffer not open + qWarning( "QBuffer::writeBlock: Buffer not open" ); + return -1; + } + if ( !isWritable() ) { // writing not permitted + qWarning( "QBuffer::writeBlock: Write operation not permitted" ); + return -1; + } +#endif + if ( (uint)ioIndex + len >= a_len ) { // overflow + uint new_len = a_len + a_inc*(((uint)ioIndex+len-a_len)/a_inc+1); + if ( !a.resize( new_len ) ) { // could not resize +#if defined(CHECK_NULL) + qWarning( "QBuffer::writeBlock: Memory allocation error" ); +#endif + setStatus( IO_ResourceError ); + return -1; + } + a_inc *= 2; // double increment + a_len = new_len; + a.shd->len = (uint)ioIndex + len; + } + memcpy( a.data()+ioIndex, p, len ); + ioIndex += len; + if ( a.shd->len < (uint)ioIndex ) + a.shd->len = (uint)ioIndex; // fake (not alloc'd) length + return len; +} + + +/*! + \reimp +*/ + +int QBuffer::readLine( char *p, uint maxlen ) +{ +#if defined(CHECK_STATE) + CHECK_PTR( p ); + if ( !isOpen() ) { // buffer not open + qWarning( "QBuffer::readLine: Buffer not open" ); + return -1; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QBuffer::readLine: Read operation not permitted" ); + return -1; + } +#endif + if ( maxlen == 0 ) + return 0; + uint start = (uint)ioIndex; + char *d = a.data() + ioIndex; + maxlen--; // make room for 0-terminator + if ( a.size() - (uint)ioIndex < maxlen ) + maxlen = a.size() - (uint)ioIndex; + while ( maxlen-- ) { + if ( (*p++ = *d++) == '\n' ) + break; + } + *p = '\0'; + ioIndex = d - a.data(); + return (uint)ioIndex - start; +} + + +/*! + \reimp +*/ + +int QBuffer::getch() +{ +#if defined(CHECK_STATE) + if ( !isOpen() ) { // buffer not open + qWarning( "QBuffer::getch: Buffer not open" ); + return -1; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QBuffer::getch: Read operation not permitted" ); + return -1; + } +#endif + if ( (uint)ioIndex+1 > a.size() ) { // overflow + setStatus( IO_ReadError ); + return -1; + } + return uchar(*(a.data()+ioIndex++)); +} + +/*! + \reimp + Writes the character \a ch into the buffer, overwriting + the character at the current index, extending the buffer + if necessary. + + Returns \a ch, or -1 if some error occurred. + + \sa getch(), ungetch() +*/ + +int QBuffer::putch( int ch ) +{ +#if defined(CHECK_STATE) + if ( !isOpen() ) { // buffer not open + qWarning( "QBuffer::putch: Buffer not open" ); + return -1; + } + if ( !isWritable() ) { // writing not permitted + qWarning( "QBuffer::putch: Write operation not permitted" ); + return -1; + } +#endif + if ( (uint)ioIndex + 1 >= a_len ) { // overflow + char buf[1]; + buf[0] = (char)ch; + if ( writeBlock(buf,1) != 1 ) + return -1; // write error + } else { + *(a.data() + ioIndex++) = (char)ch; + if ( a.shd->len < (uint)ioIndex ) + a.shd->len = (uint)ioIndex; + } + return ch; +} + +/*! + \reimp +*/ + +int QBuffer::ungetch( int ch ) +{ +#if defined(CHECK_STATE) + if ( !isOpen() ) { // buffer not open + qWarning( "QBuffer::ungetch: Buffer not open" ); + return -1; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QBuffer::ungetch: Read operation not permitted" ); + return -1; + } +#endif + if ( ch != -1 ) { + if ( ioIndex ) + ioIndex--; + else + ch = -1; + } + return ch; +} Index: branches/xZenu/src/util/doxygen/qtools/qgvector.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgvector.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgvector.cpp (revision 1322) @@ -0,0 +1,638 @@ +/**************************************************************************** +** +** +** Implementation of QGVector class +** +** Created : 930907 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#define QGVECTOR_CPP +#include "qgvector.h" +#include "qglist.h" +#include "qstring.h" +#include "qdatastream.h" +#include + +#define USE_MALLOC // comment to use new/delete + +#undef NEW +#undef DELETE + +#if defined(USE_MALLOC) +#define NEW(type,size) ((type*)malloc(size*sizeof(type))) +#define DELETE(array) (free((char*)array)) +#else +#define NEW(type,size) (new type[size]) +#define DELETE(array) (delete[] array) +#define DONT_USE_REALLOC // comment to use realloc() +#endif + +// NOT REVISED + +/*! + \class QGVector qgvector.h + + \brief The QGVector class is an internal class for implementing Qt + collection classes. + + QGVector is a strictly internal class that acts as a base class for + the QVector collection class. + + QGVector has some virtual functions that may be reimplemented in + subclasses to to customize behavior. + +
      +
    • compareItems() compares two collection/vector items. +
    • read() reads a collection/vector item from a QDataStream. +
    • write() writes a collection/vector item to a QDataStream. +
    +*/ + +/***************************************************************************** + Default implementation of virtual functions + *****************************************************************************/ + +/*! + This virtual function compares two list items. + + Returns: +
      +
    • 0 if \a item1 == \a item2 +
    • non-zero if \a item1 != \a item2 +
    + + This function returns \e int rather than \e bool so that + reimplementations can return one of three values and use it to sort + by: + +
      +
    • 0 if \e item1 == \e item2 +
    • \> 0 (positive integer) if \a item1 \> \a item2 +
    • \< 0 (negative integer) if \a item1 \< \a item2 +
    + + The QVector::sort() and QVector::bsearch() functions require that + compareItems() is implemented as described here. + + This function should not modify the vector because some const + functions call compareItems(). +*/ + +int QGVector::compareItems( Item d1, Item d2 ) +{ + return d1 != d2; // compare pointers +} + +#ifndef QT_NO_DATASTREAM +/*! + Reads a collection/vector item from the stream \a s and returns a reference + to the stream. + + The default implementation sets \e item to 0. + + \sa write() +*/ + +QDataStream &QGVector::read( QDataStream &s, Item &d ) +{ // read item from stream + d = 0; + return s; +} + +/*! + Writes a collection/vector item to the stream \a s and returns a reference + to the stream. + + The default implementation does nothing. + + \sa read() +*/ + +QDataStream &QGVector::write( QDataStream &s, Item ) const +{ // write item to stream + return s; +} +#endif // QT_NO_DATASTREAM + +/***************************************************************************** + QGVector member functions + *****************************************************************************/ + +/*! + \internal +*/ + +QGVector::QGVector() // create empty vector +{ + vec = 0; + len = numItems = 0; +} + +/*! + \internal +*/ +QGVector::QGVector( uint size ) // create vectors with nullptrs +{ + len = size; + numItems = 0; + if ( len == 0 ) { // zero length + vec = 0; + return; + } + vec = NEW(Item,len); + CHECK_PTR( vec ); + memset( (void*)vec, 0, len*sizeof(Item) ); // fill with nulls +} + +/*! + \internal +*/ + +QGVector::QGVector( const QGVector &a ) // make copy of other vector + : QCollection( a ) +{ + len = a.len; + numItems = a.numItems; + vec = NEW(Item,len); + CHECK_PTR( vec ); + for ( uint i=0; i= len ) { // range error + qWarning( "QGVector::insert: Index %d out of range", index ); + return FALSE; + } +#endif + if ( vec[index] ) { // remove old item + deleteItem( vec[index] ); + numItems--; + } + if ( d ) { + vec[index] = newItem( d ); + CHECK_PTR( vec[index] ); + numItems++; + return vec[index] != 0; + } else { + vec[index] = 0; // reset item + } + return TRUE; +} + +/*! + \internal +*/ + +bool QGVector::remove( uint index ) // remove item at index +{ +#if defined(CHECK_RANGE) + if ( index >= len ) { // range error + qWarning( "QGVector::remove: Index %d out of range", index ); + return FALSE; + } +#endif + if ( vec[index] ) { // valid item + deleteItem( vec[index] ); // delete it + vec[index] = 0; // reset pointer + numItems--; + } + return TRUE; +} + +/*! + \internal +*/ + +QCollection::Item QGVector::take( uint index ) // take out item +{ +#if defined(CHECK_RANGE) + if ( index >= len ) { // range error + qWarning( "QGVector::take: Index %d out of range", index ); + return 0; + } +#endif + Item d = vec[index]; // don't delete item + if ( d ) + numItems--; + vec[index] = 0; + return d; +} + + +/*! + \internal +*/ + +void QGVector::clear() // clear vector +{ + if ( vec ) { + for ( uint i=0; i len ) // init extra space added + memset( (void*)&vec[len], 0, (newsize-len)*sizeof(Item) ); + len = newsize; + return TRUE; +} + + +/*! + \internal +*/ + +bool QGVector::fill( Item d, int flen ) // resize and fill vector +{ + if ( flen < 0 ) + flen = len; // default: use vector length + else if ( !resize( flen ) ) + return FALSE; + for ( uint i=0; i<(uint)flen; i++ ) // insert d at every index + insert( i, d ); + return TRUE; +} + + +static QGVector *sort_vec=0; // current sort vector + + +#if defined(Q_C_CALLBACKS) +extern "C" { +#endif + +static int cmp_vec( const void *n1, const void *n2 ) +{ + return sort_vec->compareItems( *((QCollection::Item*)n1), *((QCollection::Item*)n2) ); +} + +#if defined(Q_C_CALLBACKS) +} +#endif + + +/*! + \internal +*/ + +void QGVector::sort() // sort vector +{ + if ( count() == 0 ) // no elements + return; + register Item *start = &vec[0]; + register Item *end = &vec[len-1]; + Item tmp; + while ( TRUE ) { // put all zero elements behind + while ( start < end && *start != 0 ) + start++; + while ( end > start && *end == 0 ) + end--; + if ( start < end ) { + tmp = *start; + *start = *end; + *end = tmp; + } else { + break; + } + } + sort_vec = (QGVector*)this; + qsort( vec, count(), sizeof(Item), cmp_vec ); + sort_vec = 0; +} + +/*! + \internal +*/ + +int QGVector::bsearch( Item d ) const // binary search; when sorted +{ + if ( !len ) + return -1; + if ( !d ) { +#if defined(CHECK_NULL) + qWarning( "QGVector::bsearch: Cannot search for null object" ); +#endif + return -1; + } + int n1 = 0; + int n2 = len - 1; + int mid = 0; + bool found = FALSE; + while ( n1 <= n2 ) { + int res; + mid = (n1 + n2)/2; + if ( vec[mid] == 0 ) // null item greater + res = -1; + else + res = ((QGVector*)this)->compareItems( d, vec[mid] ); + if ( res < 0 ) + n2 = mid - 1; + else if ( res > 0 ) + n1 = mid + 1; + else { // found it + found = TRUE; + break; + } + } + if ( !found ) + return -1; + // search to first of equal items + while ( (mid - 1 >= 0) && !((QGVector*)this)->compareItems(d, vec[mid-1]) ) + mid--; + return mid; +} + + +/*! + \internal +*/ + +int QGVector::findRef( Item d, uint index) const // find exact item in vector +{ +#if defined(CHECK_RANGE) + if ( index >= len ) { // range error + qWarning( "QGVector::findRef: Index %d out of range", index ); + return -1; + } +#endif + for ( uint i=index; i= len ) { // range error + qWarning( "QGVector::find: Index %d out of range", index ); + return -1; + } +#endif + for ( uint i=index; icompareItems( vec[i], d ) == 0 ) + return i; + } + return -1; +} + +/*! + \internal +*/ + +uint QGVector::containsRef( Item d ) const // get number of exact matches +{ + uint count = 0; + for ( uint i=0; icompareItems( vec[i], d ) == 0 ) + count++; + } + return count; +} + + +/*! + \internal +*/ + +bool QGVector::insertExpand( uint index, Item d )// insert and grow if necessary +{ + if ( index >= len ) { + if ( !resize( index+1 ) ) // no memory + return FALSE; + } + insert( index, d ); + return TRUE; +} + + +/*! + \internal +*/ + +void QGVector::toList( QGList *list ) const // store items in list +{ + list->clear(); + for ( uint i=0; iappend( vec[i] ); + } +} + + +void QGVector::warningIndexRange( uint i ) +{ +#if defined(CHECK_RANGE) + qWarning( "QGVector::operator[]: Index %d out of range", i ); +#else + Q_UNUSED( i ) +#endif +} + + +/***************************************************************************** + QGVector stream functions + *****************************************************************************/ +#ifndef QT_NO_DATASTREAM +QDataStream &operator>>( QDataStream &s, QGVector &vec ) +{ // read vector + return vec.read( s ); +} + +QDataStream &operator<<( QDataStream &s, const QGVector &vec ) +{ // write vector + return vec.write( s ); +} + +/*! + \internal +*/ + +QDataStream &QGVector::read( QDataStream &s ) // read vector from stream +{ + uint num; + s >> num; // read number of items + clear(); // clear vector + resize( num ); + for (uint i=0; i>8)&0xff); cl = (uchar)(rc&0xff); +#ifdef QT_QSTRING_UCS_4 + grp = 0; +#endif +} +inline QChar::QChar( short rc ) +{ + rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff); +#ifdef QT_QSTRING_UCS_4 + grp = 0; +#endif +} +inline QChar::QChar( uint rc ) +{ + rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff); +#ifdef QT_QSTRING_UCS_4 + grp = 0; +#endif +} +inline QChar::QChar( int rc ) +{ + rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff); +#ifdef QT_QSTRING_UCS_4 + grp = 0; +#endif +} + + +inline int operator==( char ch, QChar c ) +{ + return ch == c.cl && !c.rw; +} + +inline int operator==( QChar c, char ch ) +{ + return ch == c.cl && !c.rw; +} + +inline int operator==( QChar c1, QChar c2 ) +{ + return c1.cl == c2.cl + && c1.rw == c2.rw; +} + +inline int operator!=( QChar c1, QChar c2 ) +{ + return c1.cl != c2.cl + || c1.rw != c2.rw; +} + +inline int operator!=( char ch, QChar c ) +{ + return ch != c.cl || c.rw; +} + +inline int operator!=( QChar c, char ch ) +{ + return ch != c.cl || c.rw; +} + +inline int operator<=( QChar c, char ch ) +{ + return !(ch < c.cl || c.rw); +} + +inline int operator<=( char ch, QChar c ) +{ + return ch <= c.cl || c.rw; +} + +inline int operator<=( QChar c1, QChar c2 ) +{ + return c1.rw > c2.rw + ? FALSE + : c1.rw < c2.rw + ? TRUE + : c1.cl <= c2.cl; +} + +inline int operator>=( QChar c, char ch ) { return ch <= c; } +inline int operator>=( char ch, QChar c ) { return c <= ch; } +inline int operator>=( QChar c1, QChar c2 ) { return c2 <= c1; } +inline int operator<( QChar c, char ch ) { return !(ch<=c); } +inline int operator<( char ch, QChar c ) { return !(c<=ch); } +inline int operator<( QChar c1, QChar c2 ) { return !(c2<=c1); } +inline int operator>( QChar c, char ch ) { return !(ch>=c); } +inline int operator>( char ch, QChar c ) { return !(c>=ch); } +inline int operator>( QChar c1, QChar c2 ) { return !(c2>=c1); } + +// internal +struct Q_EXPORT 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 Q_EXPORT QString +{ +public: + QString(); // make null string + QString( QChar ); // one-char string + QString( const QString & ); // impl-shared copy + QString( const QByteArray& ); // deep copy + QString( const QCString& ); // deep copy + QString( const QChar* unicode, uint length ); // deep copy +#ifndef QT_NO_CAST_ASCII + QString( const char *str ); // deep copy +#endif + ~QString(); + + QString &operator=( const QString & ); // impl-shared copy +#ifndef QT_NO_CAST_ASCII + QString &operator=( const char * ); // deep copy +#endif + QString &operator=( const QCString& ); // deep copy + QString &operator=( QChar c ); + QString &operator=( char c ); + + //QT_STATIC_CONST QString null; + //bool isNull() const; + + struct Null { }; + static const Null null; + inline QString(const Null &): d(shared_null) { d->ref(); } + inline QString &operator=(const Null &) { *this = QString(); return *this; } + inline bool isNull() const { return d == shared_null; } + + bool isEmpty() const; + uint length() const; + void truncate( uint pos ); + +#if QT_VERSION >= 300 +#error "fill() Should return *this, or QChar constructor should take count=1" +#endif + 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, ... ) +#if defined(_CC_GNU_) && !defined(__INSURE__) + __attribute__ ((format (printf, 2, 3))) +#endif + ; + + int find( QChar c, int index=0, bool cs=TRUE ) const; + int find( char c, int index=0, bool cs=TRUE ) const; + int find( const QString &str, int index=0, bool cs=TRUE ) const; + int find( const QRegExp &, int index=0 ) const; +#ifndef QT_NO_CAST_ASCII + int find( const char* str, int index=0 ) const; +#endif + int findRev( QChar c, int index=-1, bool cs=TRUE) const; + int findRev( char c, int index=-1, bool cs=TRUE) const; + int findRev( const QString &str, int index=-1, bool cs=TRUE) const; + int findRev( const QRegExp &, int index=-1 ) const; +#ifndef QT_NO_CAST_ASCII + int findRev( const char* str, int index=-1 ) const; +#endif + int contains( QChar c, bool cs=TRUE ) const; + int contains( char c, bool cs=TRUE ) const + { return contains(QChar(c), cs); } +#ifndef QT_NO_CAST_ASCII + int contains( const char* str, bool cs=TRUE ) const; +#endif + int contains( const QString &str, bool cs=TRUE ) const; + int contains( const QRegExp & ) const; + + QString left( uint len ) const; + QString right( uint len ) const; + QString mid( uint index, uint len=0xffffffff) const; + + QString leftJustify( uint width, QChar fill=' ', bool trunc=FALSE)const; + QString rightJustify( uint width, QChar fill=' ',bool trunc=FALSE)const; + + QString lower() const; + QString upper() const; + + QString stripWhiteSpace() const; + QString simplifyWhiteSpace() const; + + QString &insert( uint index, const QString & ); + QString &insert( uint index, const QChar*, uint len ); + QString &insert( uint index, QChar ); + QString &insert( uint index, char c ) { return insert(index,QChar(c)); } + QString &append( char ); + QString &append( QChar ); + QString &append( const QString & ); + QString &prepend( char ); + QString &prepend( QChar ); + QString &prepend( const QString & ); + QString &remove( uint index, uint len ); + QString &replace( uint index, uint len, const QString & ); + QString &replace( uint index, uint len, const QChar*, uint clen ); + QString &replace( const QRegExp &, const QString & ); + + short toShort( bool *ok=0, int base=10 ) const; + ushort toUShort( bool *ok=0, int base=10 ) const; + int toInt( bool *ok=0, int base=10 ) const; + uint toUInt( bool *ok=0, int base=10 ) const; + long toLong( bool *ok=0, int base=10 ) const; + ulong toULong( bool *ok=0, int base=10 ) const; + float toFloat( bool *ok=0 ) const; + double toDouble( bool *ok=0 ) const; + + QString &setNum( short, int base=10 ); + QString &setNum( ushort, int base=10 ); + QString &setNum( int, int base=10 ); + QString &setNum( uint, int base=10 ); + QString &setNum( long, int base=10 ); + QString &setNum( ulong, int base=10 ); + QString &setNum( float, char f='g', int prec=6 ); + QString &setNum( double, char f='g', int prec=6 ); + + static QString number( long, int base=10 ); + static QString number( ulong, int base=10); + static QString number( int, int base=10 ); + static QString number( uint, int base=10); + static QString number( double, char f='g', int prec=6 ); + + void setExpand( uint index, QChar c ); + + QString &operator+=( const QString &str ); + QString &operator+=( QChar c ); + QString &operator+=( char c ); + + // Your compiler is smart enough to use the const one if it can. + QChar at( uint i ) const + { return ilen ? 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) + { // Optimized for easy-inlining by simple compilers. + 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); + const unsigned short *ucs2() const; + static QString fromUcs2( const unsigned short *ucs2 ); +#ifndef QT_NO_TEXTCODEC + QCString utf8() const; + static QString fromUtf8(const char*, int len=-1); +#endif + QCString local8Bit() const; + static QString fromLocal8Bit(const char*, int len=-1); + bool operator!() const; +#ifndef QT_NO_ASCII_CAST + operator const char *() const { return latin1(); } +#endif + + QString &setUnicode( const QChar* unicode, uint len ); + QString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len ); + QString &setLatin1( const char*, int len=-1 ); + + int compare( const QString& s ) const; + static int compare( const QString& s1, const QString& s2 ) + { return s1.compare(s2); } + +#ifndef QT_NO_DATASTREAM + friend Q_EXPORT QDataStream &operator>>( QDataStream &, QString & ); +#endif + // new functions for BiDi + void compose(); + QChar::Direction basicDirection(); + QString visual(int index = 0, int len = -1); + +#ifndef QT_NO_COMPAT + const char* data() const { return latin1(); } +#endif + + bool startsWith( const QString& ) const; + +private: + QString( int size, bool dummy ); // allocate size incl. \0 + + 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 /*dummy*/) : d(dd) { } +}; + +class Q_EXPORT QCharRef { + friend class QString; + QString& s; + uint p; + QCharRef(QString* str, uint pos) : s(*str), p(pos) { } + +public: + // Most QChar operations repeated here... + + // all this is not documented: We just say "like QChar" and let it be. +#if 1 + ushort unicode() const { return s.constref(p).unicode(); } + char latin1() const { return s.constref(p).latin1(); } + + // An operator= for each QChar cast constructor... + 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); } + + // each function... + bool isNull() const { return unicode()==0; } + bool isPrint() const { return s.constref(p).isPrint(); } + bool isPunct() const { return s.constref(p).isPunct(); } + bool isSpace() const { return s.constref(p).isSpace(); } + bool isMark() const { return s.constref(p).isMark(); } + bool isLetter() const { return s.constref(p).isLetter(); } + bool isNumber() const { return s.constref(p).isNumber(); } + bool isLetterOrNumber() { return s.constref(p).isLetterOrNumber(); } + bool isDigit() const { return s.constref(p).isDigit(); } + + int digitValue() const { return s.constref(p).digitValue(); } + QChar lower() { return s.constref(p).lower(); } + QChar upper() { return s.constref(p).upper(); } + + QChar::Category category() const { return s.constref(p).category(); } + QChar::Direction direction() const { return s.constref(p).direction(); } + QChar::Joining joining() const { return s.constref(p).joining(); } + bool mirrored() const { return s.constref(p).mirrored(); } + QChar mirroredChar() const { return s.constref(p).mirroredChar(); } + QString decomposition() const { return s.constref(p).decomposition(); } + QChar::Decomposition decompositionTag() const { return s.constref(p).decompositionTag(); } + + // Not the non-const ones of these. + uchar cell() const { return s.constref(p).cell(); } + uchar row() const { return s.constref(p).row(); } +#endif +}; + +inline QCharRef QString::at( uint i ) { return QCharRef(this,i); } +inline QCharRef QString::operator[]( int i ) { return at((uint)i); } + + +class Q_EXPORT QConstString : private QString { +public: + QConstString( QChar* unicode, uint length ); + ~QConstString(); + const QString& string() const { return *this; } +}; + + +/***************************************************************************** + QString stream functions + *****************************************************************************/ +#ifndef QT_NO_DATASTREAM +Q_EXPORT QDataStream &operator<<( QDataStream &, const QString & ); +Q_EXPORT QDataStream &operator>>( QDataStream &, QString & ); +#endif + +/***************************************************************************** + QString inline functions + *****************************************************************************/ + +// These two move code into makeSharedNull() and deletesData() +// to improve cache-coherence (and reduce code bloat), while +// keeping the common cases fast. +// +// No safe way to pre-init shared_null on ALL compilers/linkers. +inline QString::QString() : + d(shared_null ? shared_null : makeSharedNull()) +{ + d->ref(); +} +// +inline QString::~QString() +{ + if ( d->deref() ) { + if ( d == shared_null ) + shared_null = 0; + d->deleteSelf(); + } +} + +inline QString &QString::operator=( QChar c ) +{ return *this = QString(c); } + +inline QString &QString::operator=( char c ) +{ return *this = QString(QChar(c)); } + +//inline bool QString::isNull() const +//{ return unicode() == 0; } + +inline bool QString::operator!() const +{ return isNull(); } + +inline uint QString::length() const +{ return d->len; } + +inline bool QString::isEmpty() const +{ return length() == 0; } + +inline QString QString::copy() const +{ return QString( *this ); } + +inline QString &QString::prepend( const QString & s ) +{ return insert(0,s); } + +inline QString &QString::prepend( QChar c ) +{ return insert(0,c); } + +inline QString &QString::prepend( char c ) +{ return insert(0,c); } + +inline QString &QString::append( const QString & s ) +{ return operator+=(s); } + +inline QString &QString::append( QChar c ) +{ return operator+=(c); } + +inline QString &QString::append( char c ) +{ return operator+=(c); } + +inline QString &QString::setNum( short n, int base ) +{ return setNum((long)n, base); } + +inline QString &QString::setNum( ushort n, int base ) +{ return setNum((ulong)n, base); } + +inline QString &QString::setNum( int n, int base ) +{ return setNum((long)n, base); } + +inline QString &QString::setNum( uint n, int base ) +{ return setNum((ulong)n, base); } + +inline QString &QString::setNum( float n, char f, int prec ) +{ return setNum((double)n,f,prec); } + +inline QString QString::arg(int a, int fieldwidth, int base) const +{ return arg((long)a, fieldwidth, base); } + +inline QString QString::arg(uint a, int fieldwidth, int base) const +{ return arg((ulong)a, fieldwidth, base); } + +inline QString QString::arg(short a, int fieldwidth, int base) const +{ return arg((long)a, fieldwidth, base); } + +inline QString QString::arg(ushort a, int fieldwidth, int base) const +{ return arg((ulong)a, fieldwidth, base); } + +inline int QString::find( char c, int index, bool cs ) const +{ return find(QChar(c), index, cs); } + +inline int QString::findRev( char c, int index, bool cs) const +{ return findRev( QChar(c), index, cs ); } + + +#ifndef QT_NO_CAST_ASCII +inline int QString::find( const char* str, int index ) const +{ return find(QString::fromLatin1(str), index); } + +inline int QString::findRev( const char* str, int index ) const +{ return findRev(QString::fromLatin1(str), index); } +#endif + + +/***************************************************************************** + QString non-member operators + *****************************************************************************/ + +Q_EXPORT bool operator!=( const QString &s1, const QString &s2 ); +Q_EXPORT bool operator<( const QString &s1, const QString &s2 ); +Q_EXPORT bool operator<=( const QString &s1, const QString &s2 ); +Q_EXPORT bool operator==( const QString &s1, const QString &s2 ); +Q_EXPORT bool operator>( const QString &s1, const QString &s2 ); +Q_EXPORT bool operator>=( const QString &s1, const QString &s2 ); +#ifndef QT_NO_CAST_ASCII +Q_EXPORT bool operator!=( const QString &s1, const char *s2 ); +Q_EXPORT bool operator<( const QString &s1, const char *s2 ); +Q_EXPORT bool operator<=( const QString &s1, const char *s2 ); +Q_EXPORT bool operator==( const QString &s1, const char *s2 ); +Q_EXPORT bool operator>( const QString &s1, const char *s2 ); +Q_EXPORT bool operator>=( const QString &s1, const char *s2 ); +Q_EXPORT bool operator!=( const char *s1, const QString &s2 ); +Q_EXPORT bool operator<( const char *s1, const QString &s2 ); +Q_EXPORT bool operator<=( const char *s1, const QString &s2 ); +Q_EXPORT bool operator==( const char *s1, const QString &s2 ); +//Q_EXPORT bool operator>( const char *s1, const QString &s2 ); // MSVC++ +Q_EXPORT bool operator>=( const char *s1, const QString &s2 ); +#endif + +Q_EXPORT inline QString operator+( const QString &s1, const QString &s2 ) +{ + QString tmp( s1 ); + tmp += s2; + return tmp; +} + +#ifndef QT_NO_CAST_ASCII +Q_EXPORT inline QString operator+( const QString &s1, const char *s2 ) +{ + QString tmp( s1 ); + tmp += QString::fromLatin1(s2); + return tmp; +} + +Q_EXPORT inline QString operator+( const char *s1, const QString &s2 ) +{ + QString tmp = QString::fromLatin1( s1 ); + tmp += s2; + return tmp; +} +#endif + +Q_EXPORT inline QString operator+( const QString &s1, QChar c2 ) +{ + QString tmp( s1 ); + tmp += c2; + return tmp; +} + +Q_EXPORT inline QString operator+( const QString &s1, char c2 ) +{ + QString tmp( s1 ); + tmp += c2; + return tmp; +} + +Q_EXPORT inline QString operator+( QChar c1, const QString &s2 ) +{ + QString tmp; + tmp += c1; + tmp += s2; + return tmp; +} + +Q_EXPORT inline QString operator+( char c1, const QString &s2 ) +{ + QString tmp; + tmp += c1; + tmp += s2; + return tmp; +} + +#if defined(_OS_WIN32_) +extern Q_EXPORT QString qt_winQString(void*); +extern Q_EXPORT const void* qt_winTchar(const QString& str, bool addnul); +extern Q_EXPORT void* qt_winTchar_new(const QString& str); +extern Q_EXPORT QCString qt_winQString2MB( const QString& s, int len=-1 ); +extern Q_EXPORT QString qt_winMB2QString( const char* mb, int len=-1 ); +#endif + +#endif // QSTRING_H Index: branches/xZenu/src/util/doxygen/qtools/qfileinfo_win32.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qfileinfo_win32.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qfileinfo_win32.cpp (revision 1322) @@ -0,0 +1,356 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2001 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + * Based on qfileinfo_unix.cpp + * + * Copyright (C) 1992-2000 Trolltech AS. + */ + +#include "qglobal.h" + +#include "qfileinfo.h" +#include "qfiledefs_p.h" +#include "qdatetime.h" +#include "qdir.h" + +static void reslashify( QString& n ) +{ + for ( int i=0; i<(int)n.length(); i++ ) + { + if ( n[i] == '/' ) + n[i] = '\\'; + } +} + +void QFileInfo::slashify( QString& n ) +{ + for ( int i=0; i<(int)n.length(); i++ ) + { + if ( n[i] == '\\' ) + n[i] = '/'; + } +} + +void QFileInfo::makeAbs( QString & ) +{ + // TODO: what to do here? + return; +} + +extern bool qt_file_access( const QString& fn, int t ); + +/*! + Returns TRUE if we are pointing to a real file. + \sa isDir(), isSymLink() +*/ +bool QFileInfo::isFile() const +{ + if ( !fic || !cache ) + doStat(); + return fic ? (fic->st.st_mode & STAT_MASK) == STAT_REG : FALSE; +} + +/*! + Returns TRUE if we are pointing to a directory or a symbolic link to + a directory. + \sa isFile(), isSymLink() +*/ + +bool QFileInfo::isDir() const +{ + if ( !fic || !cache ) + doStat(); + return fic ? (fic->st.st_mode & STAT_MASK) == STAT_DIR : FALSE; +} + +/*! + Returns TRUE if we are pointing to a symbolic link. + \sa isFile(), isDir(), readLink() +*/ + +bool QFileInfo::isSymLink() const +{ + if ( !fic || !cache ) + doStat(); + return fic ? fic->isSymLink : FALSE; +} + + +/*! + Returns the name a symlink points to, or a null QString if the + object does not refer to a symbolic link. + + This name may not represent an existing file; it is only a string. + QFileInfo::exists() returns TRUE if the symlink points to an + existing file. + + \sa exists(), isSymLink(), isDir(), isFile() +*/ + +QString QFileInfo::readLink() const +{ + QString r; + return r; +} + +static const uint nobodyID = (uint) -2; + +/*! + Returns the owner of the file. + + On systems where files do not have owners this function returns + a null string. + + Note that this function can be time-consuming under UNIX. (in the order + of milliseconds on a 486 DX2/66 running Linux). + + \sa ownerId(), group(), groupId() +*/ + +QString QFileInfo::owner() const +{ + return QString::null; +} + +/*! + Returns the id of the owner of the file. + + On systems where files do not have owners this function returns ((uint) -2). + + \sa owner(), group(), groupId() +*/ + +uint QFileInfo::ownerId() const +{ + return (uint)-2; +} + +/*! + Returns the group the file belongs to. + + On systems where files do not have groups this function always + returns 0. + + Note that this function can be time-consuming under UNIX (in the order of + milliseconds on a 486 DX2/66 running Linux). + + \sa groupId(), owner(), ownerId() +*/ + +QString QFileInfo::group() const +{ + return QString::null; +} + +/*! + Returns the id of the group the file belongs to. + + On systems where files do not have groups this function always + returns ((uind) -2). + + \sa group(), owner(), ownerId() +*/ + +uint QFileInfo::groupId() const +{ + return (uint)-2; +} + + +/*! + \fn bool QFileInfo::permission( int permissionSpec ) const + + Tests for file permissions. The \e permissionSpec argument can be several + flags of type PermissionSpec or'ed together to check for permission + combinations. + + On systems where files do not have permissions this function always + returns TRUE. + + Example: + \code + QFileInfo fi( "/tmp/tonsils" ); + if ( fi.permission( QFileInfo::WriteUser | QFileInfo::ReadGroup ) ) + qWarning( "Tonsils can be changed by me, and the group can read them."); + if ( fi.permission( QFileInfo::WriteGroup | QFileInfo::WriteOther ) ) + qWarning( "Danger! Tonsils can be changed by the group or others!" ); + \endcode + + \sa isReadable(), isWritable(), isExecutable() +*/ + +bool QFileInfo::permission( int permissionSpec ) const +{ + return TRUE; +} + +/*! + Returns the file size in bytes, or 0 if the file does not exist if the size + cannot be fetched. +*/ + +uint QFileInfo::size() const +{ + if ( !fic || !cache ) + doStat(); + if ( fic ) + return (uint)fic->st.st_size; + else + return 0; +} + + +/*! + Returns the date and time when the file was last modified. + \sa lastRead() +*/ + +QDateTime QFileInfo::lastModified() const +{ + QDateTime dt; + if ( !fic || !cache ) + doStat(); + if ( fic ) + dt.setTime_t( fic->st.st_mtime ); + return dt; +} + +/*! + Returns the date and time when the file was last read (accessed). + + On systems that do not support last read times, the modification time is + returned. + + \sa lastModified() +*/ + +QDateTime QFileInfo::lastRead() const +{ + QDateTime dt; + if ( !fic || !cache ) + doStat(); + if ( fic ) + dt.setTime_t( fic->st.st_atime ); + return dt; +} + + +void QFileInfo::doStat() const +{ + QFileInfo *that = ((QFileInfo*)this); // mutable function + if ( !that->fic ) + that->fic = new QFileInfoCache; + STATBUF *b = &that->fic->st; + that->fic->isSymLink = FALSE; + +#if defined(__CYGWIN32_) + int r; + + r = STAT( QFile::encodeName(fn), b ); + + if ( r != 0 ) { + delete that->fic; + that->fic = 0; + } +#else + QString file = fn; + reslashify(file); +#ifdef QT_LARGEFILE_SUPPORT + if ( _wstati64( (wchar_t*) file.ucs2(), b ) == -1 ) { +#else + if ( _wstat( (wchar_t*) file.ucs2(), b ) == -1 ) { +#endif + delete that->fic; + that->fic = 0; + } +#endif +} + +/*! + Returns the directory path of the file. + + If \e absPath is TRUE an absolute path is always returned. + + \sa dir(), filePath(), fileName(), isRelative() +*/ +#ifndef QT_NO_DIR +QString QFileInfo::dirPath( bool absPath ) const +{ + QString s; + if ( absPath ) + s = absFilePath(); + else + s = fn; + int pos = s.findRev( '/' ); + if ( pos == -1 ) { + return QString::fromLatin1("."); + } else { + if ( pos == 0 ) + return QString::fromLatin1( "/" ); + return s.left( pos ); + } +} +#endif +/*! + Returns the name of the file, the file path is not included. + + Example: + \code + QFileInfo fi( "/tmp/abdomen.lower" ); + QString name = fi.fileName(); // name = "abdomen.lower" + \endcode + + \sa isRelative(), filePath(), baseName(), extension() +*/ + +QString QFileInfo::fileName() const +{ + int p = fn.findRev( '/' ); + if ( p == -1 ) { + return fn; + } else { + return fn.mid(p+1); + } +} + +/*! + Returns the absolute path name. + + The absolute path name is the file name including the absolute path. If + the QFileInfo is absolute (i.e. not relative) this function will return + the same string as filePath(). + + Note that this function can be time-consuming under UNIX. (in the order + of milliseconds on a 486 DX2/66 running Linux). + + \sa isRelative(), filePath() +*/ +#ifndef QT_NO_DIR +QString QFileInfo::absFilePath() const +{ + if ( QDir::isRelativePath(fn) ) { + QString tmp = QDir::currentDirPath(); + tmp += '/'; + tmp += fn; + makeAbs( tmp ); + return QDir::cleanDirPath( tmp ); + } else { + QString tmp = fn; + makeAbs( tmp ); + return QDir::cleanDirPath( tmp ); + } + +} +#endif Index: branches/xZenu/src/util/doxygen/qtools/qmodules.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qmodules.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qmodules.h (revision 1322) @@ -0,0 +1,11 @@ +// These modules are licensed to you +#define QT_MODULE_TOOLS +#define QT_MODULE_KERNEL +#define QT_MODULE_WIDGETS +#define QT_MODULE_DIALOGS +#define QT_MODULE_ICONVIEW +#define QT_MODULE_WORKSPACE +#define QT_MODULE_NETWORK +#define QT_MODULE_CANVAS +#define QT_MODULE_TABLE +#define QT_MODULE_XML Index: branches/xZenu/src/util/doxygen/qtools/qcstring.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qcstring.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qcstring.h (revision 1322) @@ -0,0 +1,464 @@ +/**************************************************************************** +** +** +** Definition of the extended char array operations, +** and QByteArray and QCString classes +** +** Created : 920609 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QCSTRING_H +#define QCSTRING_H + +#ifndef QT_H +#include "qarray.h" +#endif // QT_H + +#include +#include + +#if defined(_OS_SUN_) && defined(_CC_GNU_) +#include +#endif + + +class QGString; + +/***************************************************************************** + Fixes and workarounds for some platforms + *****************************************************************************/ + +#if defined(_OS_HPUX_) +// HP-UX has badly defined strstr() etc. +// ### fix in 3.0: change hack_* to qt_hack_* +// by the way HP-UX is probably right, the standard has evolved and +// we'll have to adapt to it +inline char *hack_strstr( const char *s1, const char *s2 ) +{ return (char *)strstr(s1, s2); } +inline char *hack_strchr( const char *s, int c ) +{ return (char *)strchr(s, c); } +inline char *hack_strrchr( const char *s, int c ) +{ return (char *)strrchr(s, c); } +#define strstr(s1,s2) hack_strstr((s1),(s2)) +#define strchr(s,c) hack_strchr((s),(c)) +#define strrchr(s,c) hack_strrchr((s),(c)) +#endif + + +/***************************************************************************** + Safe and portable C string functions; extensions to standard string.h + *****************************************************************************/ + +Q_EXPORT void *qmemmove( void *dst, const void *src, uint len ); + +#if defined(_OS_SUN_) || defined(_CC_OC_) +#define memmove(s1,s2,n) qmemmove((s1),(s2),(n)) +#endif + +Q_EXPORT char *qstrdup( const char * ); + +Q_EXPORT inline uint cstrlen( const char *str ) +{ return strlen(str); } + +Q_EXPORT inline uint qstrlen( const char *str ) +{ return str ? strlen(str) : 0; } + +Q_EXPORT inline char *cstrcpy( char *dst, const char *src ) +{ return strcpy(dst,src); } + +Q_EXPORT inline char *qstrcpy( char *dst, const char *src ) +{ return src ? strcpy(dst, src) : 0; } + +Q_EXPORT char *qstrncpy( char *dst, const char *src, uint len ); + +Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 ) +{ return strcmp(str1,str2); } + +Q_EXPORT inline int qstrcmp( const char *str1, const char *str2 ) +{ return (str1 && str2) ? strcmp(str1,str2) : (int)((long)str2 - (long)str1); } + +Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len ) +{ return strncmp(str1,str2,len); } + +Q_EXPORT inline int qstrncmp( const char *str1, const char *str2, uint len ) +{ return (str1 && str2) ? strncmp(str1,str2,len) : + (int)((long)str2 - (long)str1); } + +Q_EXPORT int qstricmp( const char *, const char * ); + +Q_EXPORT int qstrnicmp( const char *, const char *, uint len ); + +// ### TODO for 3.0: these and the cstr* functions should be used if +// !defined(QT_CLEAN_NAMESPACE) +// We want to keep source compatibility for 2.x +// ### TODO for 4.0: completely remove these and the cstr* functions + +#if !defined(QT_GENUINE_STR) + +#undef strlen +#define strlen qstrlen + +#undef strcpy +#define strcpy qstrcpy + +#undef strcmp +#define strcmp qstrcmp + +#undef strncmp +#define strncmp qstrncmp + +#undef stricmp +#define stricmp qstricmp + +#undef strnicmp +#define strnicmp qstrnicmp + +#endif + +// qChecksum: Internet checksum + +Q_EXPORT Q_UINT16 qChecksum( const char *s, uint len ); + +/***************************************************************************** + QByteArray class + *****************************************************************************/ + +#if defined(Q_TEMPLATEDLL) +template class Q_EXPORT QArray; +#endif +typedef QArray QByteArray; + + +/***************************************************************************** + QByteArray stream functions + *****************************************************************************/ +#ifndef QT_NO_DATASTREAM +Q_EXPORT QDataStream &operator<<( QDataStream &, const QByteArray & ); +Q_EXPORT QDataStream &operator>>( QDataStream &, QByteArray & ); +#endif + +class QRegExp; + +/** This is an alternative implementation of QCString. It provides basically + * the same functions but uses less memory for administration. This class + * is just a wrapper around a plain C string requiring only 4 bytes "overhead". + * QCString features sharing of data and stores the string length, but + * requires 4 + 12 bytes for this (even for the empty string). As doxygen + * uses a LOT of string during a run it saves a lot of memory to use a + * more memory efficient implementation at the cost of relatively low + * runtime overhead. + */ +class QCString +{ +public: + QCString() : m_data(0) {} // make null string + QCString( const QCString &s ); + QCString( int size ); + QCString( const char *str ); + QCString( const char *str, uint maxlen ); + ~QCString(); + + QCString &operator=( const QCString &s );// deep copy + QCString &operator=( const char *str ); // deep copy + + bool isNull() const; + bool isEmpty() const; + uint length() const; + uint size() const { return m_data ? length()+1 : 0; } + char * data() const { return m_data; } + 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 QCString &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; + bool stripPrefix(const char *prefix); + + QCString left( uint len ) const; + QCString right( uint len ) const; + QCString mid( uint index, uint len=0xffffffff) const; + + QCString lower() const; + QCString upper() const; + + QCString stripWhiteSpace() const; + QCString simplifyWhiteSpace() const; + + QCString &assign( const char *str ); + QCString &insert( uint index, const char * ); + QCString &insert( uint index, char ); + QCString &append( const char *s ); + QCString &prepend( const char *s ); + 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; + + 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 ); + + operator const char *() const; + QCString &operator+=( const char *str ); + QCString &operator+=( char c ); + char &at( uint index ) const; + char &operator[]( int i ) const { return at(i); } + + private: + static void msg_index( uint ); + void duplicate( const QCString &s ); + void duplicate( const char *str); + QCString &duplicate( const char *str, int); + + char * m_data; +}; + +inline char &QCString::at( uint index ) const +{ + return m_data[index]; +} + +inline void QCString::duplicate( const QCString &s ) +{ + if (!s.isEmpty()) + { + uint l = strlen(s.data()); + m_data = (char *)malloc(l+1); + if (m_data) memcpy(m_data,s.data(),l+1); + } + else + m_data=0; +} + +inline void QCString::duplicate( const char *str) +{ + if (str && str[0]!='\0') + { + uint l = strlen(str); + m_data = (char *)malloc(l+1); + if (m_data) memcpy(m_data,str,l+1); + } + else + m_data=0; +} + +inline QCString &QCString::duplicate( const char *str, int) +{ + if (m_data==str) return *this; + if (m_data) free(m_data); + duplicate(str); + return *this; +} + +/***************************************************************************** + QCString stream functions + *****************************************************************************/ +#ifndef QT_NO_DATASTREAM +Q_EXPORT QDataStream &operator<<( QDataStream &, const QCString & ); +Q_EXPORT QDataStream &operator>>( QDataStream &, QCString & ); +#endif + +/***************************************************************************** + QCString inline functions + *****************************************************************************/ + +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(); } + + +/***************************************************************************** + QCString non-member operators + *****************************************************************************/ + +Q_EXPORT inline bool operator==( const QCString &s1, const QCString &s2 ) +{ return qstrcmp(s1.data(),s2.data()) == 0; } + +Q_EXPORT inline bool operator==( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) == 0; } + +Q_EXPORT inline bool operator==( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) == 0; } + +Q_EXPORT inline bool operator!=( const QCString &s1, const QCString &s2 ) +{ return qstrcmp(s1.data(),s2.data()) != 0; } + +Q_EXPORT inline bool operator!=( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) != 0; } + +Q_EXPORT inline bool operator!=( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) != 0; } + +Q_EXPORT inline bool operator<( const QCString &s1, const QCString& s2 ) +{ return qstrcmp(s1.data(),s2.data()) < 0; } + +Q_EXPORT inline bool operator<( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) < 0; } + +Q_EXPORT inline bool operator<( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) < 0; } + +Q_EXPORT inline bool operator<=( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) <= 0; } + +Q_EXPORT inline bool operator<=( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) <= 0; } + +Q_EXPORT inline bool operator>( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) > 0; } + +Q_EXPORT inline bool operator>( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) > 0; } + +Q_EXPORT inline bool operator>=( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) >= 0; } + +Q_EXPORT inline bool operator>=( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) >= 0; } + +Q_EXPORT inline QCString operator+( const QCString &s1, const QCString &s2 ) +{ + QCString tmp(s1); + tmp += s2; + return tmp; +} + + +inline QCString operator+( const QCString &s1, const QGString &s2 ); +inline QCString operator+( const QGString &s1, const QCString &s2 ); + + +Q_EXPORT inline QCString operator+( const QCString &s1, const char *s2 ) +{ + QCString tmp(s1); + tmp += s2; + return tmp; +} + +Q_EXPORT inline QCString operator+( const char *s1, const QCString &s2 ) +{ + QCString tmp(s1); + tmp += s2; + return tmp; +} + +Q_EXPORT inline QCString operator+( const QCString &s1, char c2 ) +{ + QCString tmp( s1.data() ); + tmp += c2; + return tmp; +} + +Q_EXPORT inline QCString operator+( char c1, const QCString &s2 ) +{ + QCString tmp; + tmp += c1; + tmp += s2; + return tmp; +} + +inline const char *qPrint(const char *s) +{ + if (s) return s; else return ""; +} + +inline const char *qPrint(const QCString &s) +{ + if (!s.isEmpty()) return s.data(); else return ""; +} + + +#endif // QCSTRING_H Index: branches/xZenu/src/util/doxygen/qtools/qdir_unix.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qdir_unix.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qdir_unix.cpp (revision 1322) @@ -0,0 +1,288 @@ +/**************************************************************************** +** +** +** Implementation of QDirclass +** +** Created : 950628 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses for Unix/X11 or for Qt/Embedded may use this file in accordance +** with the Qt Commercial License Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qglobal.h" + +#include "qdir.h" +#ifndef QT_NO_DIR + +#include "qfileinfo.h" +#include "qfiledefs_p.h" +#include "qregexp.h" +#include "qstringlist.h" +#include +#include + +extern QStringList qt_makeFilterList( const QString &filter ); + +extern int qt_cmp_si_sortSpec; + +#if defined(Q_C_CALLBACKS) +extern "C" { +#endif + +extern int qt_cmp_si( const void *, const void * ); + +#if defined(Q_C_CALLBACKS) +} +#endif + + +void QDir::slashify( QString& ) +{ +} + +QString QDir::homeDirPath() +{ + QString d; + d = QFile::decodeName(getenv("HOME")); + slashify( d ); + if ( d.isNull() ) + d = rootDirPath(); + return d; +} + +QString QDir::canonicalPath() const +{ + QString r; + + char cur[PATH_MAX]; + char tmp[PATH_MAX]; + GETCWD( cur, PATH_MAX ); + if ( CHDIR(QFile::encodeName(dPath)) >= 0 ) { + GETCWD( tmp, PATH_MAX ); + r = QFile::decodeName(tmp); + } + CHDIR( cur ); + + slashify( r ); + return r; +} + +bool QDir::mkdir( const QString &dirName, bool acceptAbsPath ) const +{ + return MKDIR( QFile::encodeName(filePath(dirName,acceptAbsPath)), 0777 ) + == 0; +} + +bool QDir::rmdir( const QString &dirName, bool acceptAbsPath ) const +{ + return RMDIR( QFile::encodeName(filePath(dirName,acceptAbsPath)) ) == 0; +} + +bool QDir::isReadable() const +{ + return ACCESS( QFile::encodeName(dPath), R_OK | X_OK ) == 0; +} + +bool QDir::isRoot() const +{ + return dPath == QString::fromLatin1("/"); +} + +bool QDir::rename( const QString &name, const QString &newName, + bool acceptAbsPaths ) +{ + if ( name.isEmpty() || newName.isEmpty() ) { +#if defined(CHECK_NULL) + qWarning( "QDir::rename: Empty or null file name(s)" ); +#endif + return FALSE; + } + QString fn1 = filePath( name, acceptAbsPaths ); + QString fn2 = filePath( newName, acceptAbsPaths ); + return ::rename( QFile::encodeName(fn1), + QFile::encodeName(fn2) ) == 0; +} + +bool QDir::setCurrent( const QString &path ) +{ + int r; + r = CHDIR( QFile::encodeName(path) ); + return r >= 0; +} + +QString QDir::currentDirPath() +{ + QString result; + + STATBUF st; + if ( STAT( ".", &st ) == 0 ) { + char currentName[PATH_MAX]; + if ( GETCWD( currentName, PATH_MAX ) != 0 ) + result = QFile::decodeName(currentName); +#if defined(DEBUG) + if ( result.isNull() ) + qWarning( "QDir::currentDirPath: getcwd() failed" ); +#endif + } else { +#if defined(DEBUG) + qWarning( "QDir::currentDirPath: stat(\".\") failed" ); +#endif + } + slashify( result ); + return result; +} + +QString QDir::rootDirPath() +{ + QString d = QString::fromLatin1( "/" ); + return d; +} + +bool QDir::isRelativePath( const QString &path ) +{ + int len = path.length(); + if ( len == 0 ) + return TRUE; + return path[0] != '/'; +} + +bool QDir::readDirEntries( const QString &nameFilter, + int filterSpec, int sortSpec ) +{ + int i; + if ( !fList ) { + fList = new QStringList; + CHECK_PTR( fList ); + fiList = new QFileInfoList; + CHECK_PTR( fiList ); + fiList->setAutoDelete( TRUE ); + } else { + fList->clear(); + fiList->clear(); + } + + QStringList filters = qt_makeFilterList( nameFilter ); + + bool doDirs = (filterSpec & Dirs) != 0; + bool doFiles = (filterSpec & Files) != 0; + bool noSymLinks = (filterSpec & NoSymLinks) != 0; + bool doReadable = (filterSpec & Readable) != 0; + bool doWritable = (filterSpec & Writable) != 0; + bool doExecable = (filterSpec & Executable) != 0; + bool doHidden = (filterSpec & Hidden) != 0; + +#if defined(_OS_OS2EMX_) + //QRegExp wc( nameFilter, FALSE, TRUE ); // wild card, case insensitive +#else + //QRegExp wc( nameFilter, TRUE, TRUE ); // wild card, case sensitive +#endif + QFileInfo fi; + DIR *dir; + dirent *file; + + dir = opendir( QFile::encodeName(dPath) ); + if ( !dir ) { +#if defined(CHECK_NULL) + qWarning( "QDir::readDirEntries: Cannot read the directory: %s", + QFile::encodeName(dPath).data() ); +#endif + return FALSE; + } + + while ( (file = readdir(dir)) ) { + QString fn = QFile::decodeName(file->d_name); + fi.setFile( *this, fn ); + if ( !match( filters, fn ) && !(allDirs && fi.isDir()) ) + continue; + if ( (doDirs && fi.isDir()) || (doFiles && fi.isFile()) ) { + if ( noSymLinks && fi.isSymLink() ) + continue; + if ( (filterSpec & RWEMask) != 0 ) + if ( (doReadable && !fi.isReadable()) || + (doWritable && !fi.isWritable()) || + (doExecable && !fi.isExecutable()) ) + continue; + if ( !doHidden && fn[0] == '.' && + fn != QString::fromLatin1(".") + && fn != QString::fromLatin1("..") ) + continue; + fiList->append( new QFileInfo( fi ) ); + } + } + if ( closedir(dir) != 0 ) { +#if defined(CHECK_NULL) + qWarning( "QDir::readDirEntries: Cannot close the directory: %s", + dPath.local8Bit().data() ); +#endif + } + + // Sort... + if(fiList->count()) { + QDirSortItem* si= new QDirSortItem[fiList->count()]; + QFileInfo* itm; + i=0; + for (itm = fiList->first(); itm; itm = fiList->next()) + si[i++].item = itm; + qt_cmp_si_sortSpec = sortSpec; + qsort( si, i, sizeof(si[0]), qt_cmp_si ); + // put them back in the list + fiList->setAutoDelete( FALSE ); + fiList->clear(); + int j; + for ( j=0; jappend( si[j].item ); + fList->append( si[j].item->fileName() ); + } + delete [] si; + fiList->setAutoDelete( TRUE ); + } + + if ( filterSpec == (FilterSpec)filtS && sortSpec == (SortSpec)sortS && + nameFilter == nameFilt ) + dirty = FALSE; + else + dirty = TRUE; + return TRUE; +} + +const QFileInfoList * QDir::drives() +{ + // at most one instance of QFileInfoList is leaked, and this variable + // points to that list + static QFileInfoList * knownMemoryLeak = 0; + + if ( !knownMemoryLeak ) { + knownMemoryLeak = new QFileInfoList; + // non-win32 versions both use just one root directory + knownMemoryLeak->append( new QFileInfo( rootDirPath() ) ); + } + + return knownMemoryLeak; +} +#endif //QT_NO_DIR Index: branches/xZenu/src/util/doxygen/qtools/qfile_unix.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qfile_unix.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qfile_unix.cpp (revision 1322) @@ -0,0 +1,668 @@ +/**************************************************************************** +** +** +** Implementation of QFileInfo class +** +** Created : 950628 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses for Unix/X11 or for Qt/Embedded may use this file in accordance +** with the Qt Commercial License Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qglobal.h" + +#include "qfile.h" +#include "qfiledefs_p.h" + +#if (defined(_OS_MAC_) && (!defined(_OS_UNIX_))) || defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_) || defined(_OS_CYGWIN_) +# define HAS_TEXT_FILEMODE // has translate/text filemode +#endif +#if defined(O_NONBLOCK) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NONBLOCK +#elif defined(O_NDELAY) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NDELAY +#endif + +bool qt_file_access( const QString& fn, int t ) +{ + if ( fn.isEmpty() ) + return FALSE; + return ACCESS( QFile::encodeName(fn), t ) == 0; +} + +/*! + Removes the file \a fileName. + Returns TRUE if successful, otherwise FALSE. +*/ + +bool QFile::remove( const QString &fileName ) +{ + if ( fileName.isEmpty() ) { +#if defined(CHECK_NULL) + qWarning( "QFile::remove: Empty or null file name" ); +#endif + return FALSE; + } + return unlink( QFile::encodeName(fileName) ) == 0; + // unlink more common in UNIX +} + +#if defined(O_NONBLOCK) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NONBLOCK +#elif defined(O_NDELAY) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NDELAY +#endif + +/*! + Opens the file specified by the file name currently set, using the mode \e m. + Returns TRUE if successful, otherwise FALSE. + + The mode parameter \e m must be a combination of the following flags: +
      +
    • \c IO_Raw specified raw (non-buffered) file access. +
    • \c IO_ReadOnly opens the file in read-only mode. +
    • \c IO_WriteOnly opens the file in write-only mode (and truncates). +
    • \c IO_ReadWrite opens the file in read/write mode, equivalent to + \c (IO_ReadOnly|IO_WriteOnly). +
    • \c IO_Append opens the file in append mode. This mode is very useful + when you want to write something to a log file. The file index is set to + the end of the file. Note that the result is undefined if you position the + file index manually using at() in append mode. +
    • \c IO_Truncate truncates the file. +
    • \c IO_Translate enables carriage returns and linefeed translation + for text files under MS-DOS, Windows and OS/2. +
    + + The raw access mode is best when I/O is block-operated using 4kB block size + or greater. Buffered access works better when reading small portions of + data at a time. + + Important: When working with buffered files, data may + not be written to the file at once. Call \link flush() flush\endlink + to make sure the data is really written. + + \warning We have experienced problems with some C libraries when a buffered + file is opened for both reading and writing. If a read operation takes place + immediately after a write operation, the read buffer contains garbage data. + Worse, the same garbage is written to the file. Calling flush() before + readBlock() solved this problem. + + If the file does not exist and \c IO_WriteOnly or \c IO_ReadWrite is + specified, it is created. + + Example: + \code + QFile f1( "/tmp/data.bin" ); + QFile f2( "readme.txt" ); + f1.open( IO_Raw | IO_ReadWrite | IO_Append ); + f2.open( IO_ReadOnly | IO_Translate ); + \endcode + + \sa name(), close(), isOpen(), flush() +*/ + +bool QFile::open( int m ) +{ + if ( isOpen() ) { // file already open +#if defined(CHECK_STATE) + qWarning( "QFile::open: File already open" ); +#endif + return FALSE; + } + if ( fn.isNull() ) { // no file name defined +#if defined(CHECK_NULL) + qWarning( "QFile::open: No file name specified" ); +#endif + return FALSE; + } + init(); // reset params + setMode( m ); + if ( !(isReadable() || isWritable()) ) { +#if defined(CHECK_RANGE) + qWarning( "QFile::open: File access not specified" ); +#endif + return FALSE; + } + bool ok = TRUE; + STATBUF st; + if ( isRaw() ) { // raw file I/O + int oflags = OPEN_RDONLY; + if ( isReadable() && isWritable() ) + oflags = OPEN_RDWR; + else if ( isWritable() ) + oflags = OPEN_WRONLY; + if ( flags() & IO_Append ) { // append to end of file? + if ( flags() & IO_Truncate ) + oflags |= (OPEN_CREAT | OPEN_TRUNC); + else + oflags |= (OPEN_APPEND | OPEN_CREAT); + setFlags( flags() | IO_WriteOnly ); // append implies write + } else if ( isWritable() ) { // create/trunc if writable + if ( flags() & IO_Truncate ) + oflags |= (OPEN_CREAT | OPEN_TRUNC); + else + oflags |= OPEN_CREAT; + } +#if defined(HAS_TEXT_FILEMODE) + if ( isTranslated() ) +#ifdef __CYGWIN__ + /* Do nothing, allowing the Cygwin mount mode to take effect. */; +#else + oflags |= OPEN_TEXT; +#endif + else + oflags |= OPEN_BINARY; +#endif +#if defined(HAS_ASYNC_FILEMODE) + if ( isAsynchronous() ) + oflags |= OPEN_ASYNC; +#endif + fd = OPEN( QFile::encodeName(fn), oflags, 0666 ); + + if ( fd != -1 ) { // open successful + FSTAT( fd, &st ); // get the stat for later usage + } else { + ok = FALSE; + } + } else { // buffered file I/O + QCString perm; + char perm2[4]; + bool try_create = FALSE; + if ( flags() & IO_Append ) { // append to end of file? + setFlags( flags() | IO_WriteOnly ); // append implies write + perm = isReadable() ? "a+" : "a"; + } else { + if ( isReadWrite() ) { + if ( flags() & IO_Truncate ) { + perm = "w+"; + } else { + perm = "r+"; + try_create = TRUE; // try to create if not exists + } + } else if ( isReadable() ) { + perm = "r"; + } else if ( isWritable() ) { + perm = "w"; + } + } + qstrcpy( perm2, perm ); +#if defined(HAS_TEXT_FILEMODE) + if ( isTranslated() ) +#ifdef __CYGWIN__ + /* Do nothing, allowing the Cygwin mount mode to take effect. */; +#else + strcat( perm2, "t" ); +#endif + else + strcat( perm2, "b" ); +#endif + while (1) { // At most twice + + fh = fopen( QFile::encodeName(fn), perm2 ); + + if ( !fh && try_create ) { + perm2[0] = 'w'; // try "w+" instead of "r+" + try_create = FALSE; + } else { + break; + } + } + if ( fh ) { + FSTAT( FILENO(fh), &st ); // get the stat for later usage + } else { + ok = FALSE; + } + } + if ( ok ) { + setState( IO_Open ); + // on successful open the file stat was got; now test what type + // of file we have + if ( (st.st_mode & STAT_MASK) != STAT_REG ) { + // non-seekable + setType( IO_Sequential ); + length = INT_MAX; + ioIndex = (flags() & IO_Append) == 0 ? 0 : length; + } else { + length = (int)st.st_size; + ioIndex = (flags() & IO_Append) == 0 ? 0 : length; + if ( !(flags()&IO_Truncate) && length == 0 && isReadable() ) { + // try if you can read from it (if you can, it's a sequential + // device; e.g. a file in the /proc filesystem) + int c = getch(); + if ( c != -1 ) { + ungetch(c); + setType( IO_Sequential ); + length = INT_MAX; + } + } + } + } else { + init(); + if ( errno == EMFILE ) // no more file handles/descrs + setStatus( IO_ResourceError ); + else + setStatus( IO_OpenError ); + } + return ok; +} + +/*! + Opens a file in the mode \e m using an existing file handle \e f. + Returns TRUE if successful, otherwise FALSE. + + Example: + \code + #include + + void printError( const char* msg ) + { + QFile f; + f.open( IO_WriteOnly, stderr ); + f.writeBlock( msg, qstrlen(msg) ); // write to stderr + f.close(); + } + \endcode + + When a QFile is opened using this function, close() does not actually + close the file, only flushes it. + + \warning If \e f is \c stdin, \c stdout, \c stderr, you may not + be able to seek. See QIODevice::isSequentialAccess() for more + information. + + \sa close() +*/ + +bool QFile::open( int m, FILE *f ) +{ + if ( isOpen() ) { +#if defined(CHECK_RANGE) + qWarning( "QFile::open: File already open" ); +#endif + return FALSE; + } + init(); + setMode( m &~IO_Raw ); + setState( IO_Open ); + fh = f; + ext_f = TRUE; + STATBUF st; + FSTAT( FILENO(fh), &st ); + ioIndex = (int)ftell( fh ); + if ( (st.st_mode & STAT_MASK) != STAT_REG || f == stdin ) { //stdin is non seekable + // non-seekable + setType( IO_Sequential ); + length = INT_MAX; + } else { + length = (int)st.st_size; + if ( !(flags()&IO_Truncate) && length == 0 && isReadable() ) { + // try if you can read from it (if you can, it's a sequential + // device; e.g. a file in the /proc filesystem) + int c = getch(); + if ( c != -1 ) { + ungetch(c); + setType( IO_Sequential ); + length = INT_MAX; + } + } + } + return TRUE; +} + +/*! + Opens a file in the mode \e m using an existing file descriptor \e f. + Returns TRUE if successful, otherwise FALSE. + + When a QFile is opened using this function, close() does not actually + close the file. + + \warning If \e f is one of 0 (stdin), 1 (stdout) or 2 (stderr), you may not + be able to seek. size() is set to \c INT_MAX (in limits.h). + + \sa close() +*/ + + +bool QFile::open( int m, int f ) +{ + if ( isOpen() ) { +#if defined(CHECK_RANGE) + qWarning( "QFile::open: File already open" ); +#endif + return FALSE; + } + init(); + setMode( m |IO_Raw ); + setState( IO_Open ); + fd = f; + ext_f = TRUE; + STATBUF st; + FSTAT( fd, &st ); + ioIndex = (int)LSEEK(fd, 0, SEEK_CUR); + if ( (st.st_mode & STAT_MASK) != STAT_REG || f == 0 ) { // stdin is not seekable... + // non-seekable + setType( IO_Sequential ); + length = INT_MAX; + } else { + length = (int)st.st_size; + if ( length == 0 && isReadable() ) { + // try if you can read from it (if you can, it's a sequential + // device; e.g. a file in the /proc filesystem) + int c = getch(); + if ( c != -1 ) { + ungetch(c); + setType( IO_Sequential ); + length = INT_MAX; + } + resetStatus(); + } + } + return TRUE; +} + +/*! + Returns the file size. + \sa at() +*/ + +uint QFile::size() const +{ + STATBUF st; + if ( isOpen() ) { + FSTAT( fh ? FILENO(fh) : fd, &st ); + } else { + STAT( QFile::encodeName(fn), &st ); + } + return st.st_size; +} + +/*! + \fn int QFile::at() const + Returns the file index. + \sa size() +*/ + +/*! + Sets the file index to \e pos. Returns TRUE if successful, otherwise FALSE. + + Example: + \code + QFile f( "data.bin" ); + f.open( IO_ReadOnly ); // index set to 0 + f.at( 100 ); // set index to 100 + f.at( f.at()+50 ); // set index to 150 + f.at( f.size()-80 ); // set index to 80 before EOF + f.close(); + \endcode + + \warning The result is undefined if the file was \link open() opened\endlink + using the \c IO_Append specifier. + + \sa size(), open() +*/ + +bool QFile::at( int pos ) +{ + if ( !isOpen() ) { +#if defined(CHECK_STATE) + qWarning( "QFile::at: File is not open" ); +#endif + return FALSE; + } + bool ok; + if ( isRaw() ) { // raw file + pos = (int)LSEEK(fd, pos, SEEK_SET); + ok = pos != -1; + } else { // buffered file + ok = fseek(fh, pos, SEEK_SET) == 0; + } + if ( ok ) + ioIndex = pos; +#if defined(CHECK_RANGE) + else + qWarning( "QFile::at: Cannot set file position %d", pos ); +#endif + return ok; +} + +/*! + Reads at most \e len bytes from the file into \e p and returns the + number of bytes actually read. + + Returns -1 if a serious error occurred. + + \warning We have experienced problems with some C libraries when a buffered + file is opened for both reading and writing. If a read operation takes place + immediately after a write operation, the read buffer contains garbage data. + Worse, the same garbage is written to the file. Calling flush() before + readBlock() solved this problem. + + \sa writeBlock() +*/ + +int QFile::readBlock( char *p, uint len ) +{ +#if defined(CHECK_NULL) + if ( !p ) + qWarning( "QFile::readBlock: Null pointer error" ); +#endif +#if defined(CHECK_STATE) + if ( !isOpen() ) { // file not open + qWarning( "QFile::readBlock: File not open" ); + return -1; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QFile::readBlock: Read operation not permitted" ); + return -1; + } +#endif + int nread = 0; // number of bytes read + if ( !ungetchBuffer.isEmpty() ) { + // need to add these to the returned string. + int l = ungetchBuffer.length(); + while( nread < l ) { + *p = ungetchBuffer[ l - nread - 1 ]; + p++; + nread++; + } + ungetchBuffer.truncate( l - nread ); + } + + if ( nread < (int)len ) { + if ( isRaw() ) { // raw file + nread += READ( fd, p, len-nread ); + if ( len && nread <= 0 ) { + nread = 0; + setStatus(IO_ReadError); + } + } else { // buffered file + nread += fread( p, 1, len-nread, fh ); + if ( (uint)nread != len ) { + if ( ferror( fh ) || nread==0 ) + setStatus(IO_ReadError); + } + } + } + ioIndex += nread; + return nread; +} + +/*! \overload int writeBlock( const QByteArray& data ) +*/ + +/*! \reimp + + Writes \e len bytes from \e p to the file and returns the number of + bytes actually written. + + Returns -1 if a serious error occurred. + + \warning When working with buffered files, data may not be written + to the file at once. Call flush() to make sure the data is really + written. + + \sa readBlock() +*/ + +int QFile::writeBlock( const char *p, uint len ) +{ +#if defined(CHECK_NULL) + if ( p == 0 && len != 0 ) + qWarning( "QFile::writeBlock: Null pointer error" ); +#endif +#if defined(CHECK_STATE) + if ( !isOpen() ) { // file not open + qWarning( "QFile::writeBlock: File not open" ); + return -1; + } + if ( !isWritable() ) { // writing not permitted + qWarning( "QFile::writeBlock: Write operation not permitted" ); + return -1; + } +#endif + int nwritten; // number of bytes written + if ( isRaw() ) // raw file + nwritten = WRITE( fd, p, len ); + else // buffered file + nwritten = fwrite( p, 1, len, fh ); + if ( nwritten != (int)len ) { // write error + if ( errno == ENOSPC ) // disk is full + setStatus( IO_ResourceError ); + else + setStatus( IO_WriteError ); + if ( isRaw() ) // recalc file position + ioIndex = (int)LSEEK( fd, 0, SEEK_CUR ); + else + ioIndex = fseek( fh, 0, SEEK_CUR ); + } else { + ioIndex += nwritten; + } + if ( ioIndex > length ) // update file length + length = ioIndex; + return nwritten; +} + +/*! + Returns the file handle of the file. + + This is a small positive integer, suitable for use with C library + functions such as fdopen() and fcntl(), as well as with QSocketNotifier. + + If the file is not open or there is an error, handle() returns -1. + + \sa QSocketNotifier +*/ + +int QFile::handle() const +{ + if ( !isOpen() ) + return -1; + else if ( fh ) + return FILENO( fh ); + else + return fd; +} + +/*! + Closes an open file. + + The file is not closed if it was opened with an existing file handle. + If the existing file handle is a \c FILE*, the file is flushed. + If the existing file handle is an \c int file descriptor, nothing + is done to the file. + + Some "write-behind" filesystems may report an unspecified error on + closing the file. These errors only indicate that something may + have gone wrong since the previous open(). In such a case status() + reports IO_UnspecifiedError after close(), otherwise IO_Ok. + + \sa open(), flush() +*/ + + +void QFile::close() +{ + bool ok = FALSE; + if ( isOpen() ) { // file is not open + if ( fh ) { // buffered file + if ( ext_f ) + ok = fflush( fh ) != -1; // flush instead of closing + else + ok = fclose( fh ) != -1; + } else { // raw file + if ( ext_f ) + ok = TRUE; // cannot close + else + ok = CLOSE( fd ) != -1; + } + init(); // restore internal state + } + if (!ok) + setStatus (IO_UnspecifiedError); + + return; +} + +int64 QFile::pos() const +{ + if (isOpen()) + { + // TODO: support 64 bit size + return ftell( fh ); + } + return -1; +} + +int64 QFile::toEnd() +{ + if (isOpen()) + { + // TODO: support 64 bit size + if (fseek( fh, 0, SEEK_END )!=-1) + { + return ftell( fh ); + } + } + return -1; +} + +bool QFile::seek( int64 pos ) +{ + if (isOpen()) + { + // TODO: support 64 bit size + return fseek( fh, pos, SEEK_SET )!=-1; + } + return FALSE; +} + Index: branches/xZenu/src/util/doxygen/qtools/qglist.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qglist.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qglist.cpp (revision 1322) @@ -0,0 +1,1223 @@ +/**************************************************************************** +** +** +** Implementation of QGList and QGListIterator classes +** +** Created : 920624 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qglist.h" +#include "qgvector.h" +#include "qdatastream.h" + + +// NOT REVISED +/*! + \class QLNode qglist.h + \brief The QLNode class is an internal class for the QList template collection. + + QLNode is a doubly linked list node; it has three pointers: +
      +
    1. Pointer to the previous node. +
    2. Pointer to the next node. +
    3. Pointer to the actual data. +
    + + Sometimes it might be practical to have direct access to the list nodes + in a QList, but it is seldom required. + + \warning Be very careful if you want to access the list nodes. The heap + can easily get corrupted if you make a mistake. + + \sa QList::currentNode(), QList::removeNode(), QList::takeNode() +*/ + +/*! + \fn QCollection::Item QLNode::getData() + Returns a pointer (\c void*) to the actual data in the list node. +*/ + + +/*! + \class QGList qglist.h + \brief The QGList class is an internal class for implementing Qt collection classes. + + QGList is a strictly internal class that acts as a base class for several + \link collection.html collection classes\endlink; QList, QQueue and + QStack. + + QGList has some virtual functions that can be reimplemented to customize + the subclasses. +
      +
    • compareItems() compares two collection/list items. +
    • read() reads a collection/list item from a QDataStream. +
    • write() writes a collection/list item to a QDataStream. +
    + Normally, you do not have to reimplement any of these functions. + If you still want to reimplement them, see the QStrList class (qstrlist.h), + which is a good example. +*/ + + +/***************************************************************************** + Default implementation of virtual functions + *****************************************************************************/ + +/*! + This virtual function compares two list items. + + Returns: +
      +
    • 0 if \e item1 == \e item2 +
    • non-zero if \e item1 != \e item2 +
    + + This function returns \e int rather than \e bool so that + reimplementations can return three values and use it to sort by: + +
      +
    • 0 if \e item1 == \e item2 +
    • \> 0 (positive integer) if \e item1 \> \e item2 +
    • \< 0 (negative integer) if \e item1 \< \e item2 +
    + + The QList::inSort() function requires that compareItems() is implemented + as described here. + + This function should not modify the list because some const functions + call compareItems(). + + The default implementation compares the pointers: + \code + + \endcode +*/ + +int QGList::compareItems( QCollection::Item item1, QCollection::Item item2 ) +{ + return item1 != item2; // compare pointers +} + +#ifndef QT_NO_DATASTREAM +/*! + Reads a collection/list item from the stream \a s and returns a reference + to the stream. + + The default implementation sets \a item to 0. + + \sa write() +*/ + +QDataStream &QGList::read( QDataStream &s, QCollection::Item &item ) +{ + item = 0; + return s; +} + +/*! + Writes a collection/list item to the stream \a s and returns a reference + to the stream. + + The default implementation does nothing. + + \sa read() +*/ + +QDataStream &QGList::write( QDataStream &s, QCollection::Item ) const +{ + return s; +} +#endif // QT_NO_DATASTREAM + +/***************************************************************************** + QGList member functions + *****************************************************************************/ + +/*! + \internal + Constructs an empty list. +*/ + +QGList::QGList() +{ + firstNode = lastNode = curNode = 0; // initialize list + numNodes = 0; + curIndex = -1; + iterators = 0; // initialize iterator list +} + +/*! + \internal + Constructs a copy of \e list. +*/ + +QGList::QGList( const QGList & list ) + : QCollection( list ) +{ + firstNode = lastNode = curNode = 0; // initialize list + numNodes = 0; + curIndex = -1; + iterators = 0; // initialize iterator list + QLNode *n = list.firstNode; + while ( n ) { // copy all items from list + append( n->data ); + n = n->next; + } +} + +/*! + \internal + Removes all items from the list and destroys the list. +*/ + +QGList::~QGList() +{ + clear(); + if ( !iterators ) // no iterators for this list + return; + QGListIterator *i = (QGListIterator*)iterators->first(); + while ( i ) { // notify all iterators that + i->list = 0; // this list is deleted + i->curNode = 0; + i = (QGListIterator*)iterators->next(); + } + delete iterators; +} + + +/*! + \internal + Assigns \e list to this list. +*/ + +QGList& QGList::operator=( const QGList &list ) +{ + clear(); + if ( list.count() > 0 ) { + QLNode *n = list.firstNode; + while ( n ) { // copy all items from list + append( n->data ); + n = n->next; + } + curNode = firstNode; + curIndex = 0; + } + return *this; +} + +/*! + Compares this list with \a list. Retruns TRUE if the lists + contain the same data, else FALSE. +*/ + +bool QGList::operator==( const QGList &list ) const +{ + if ( count() != list.count() ) + return FALSE; + + if ( count() == 0 ) + return TRUE; + + QLNode *n1 = firstNode; + QLNode *n2 = list.firstNode; + while ( n1 && n2 ) { + // should be mutable + if ( ( (QGList*)this )->compareItems( n1->data, n2->data ) != 0 ) + return FALSE; + n1 = n1->next; + n2 = n2->next; + } + + return TRUE; +} + +/*! + \fn uint QGList::count() const + \internal + Returns the number of items in the list. +*/ + + +/*! + \internal + Returns the node at position \e index. Sets this node to current. +*/ + +QLNode *QGList::locate( uint index ) +{ + if ( index == (uint)curIndex ) // current node ? + return curNode; + if ( !curNode && firstNode ) { // set current node + curNode = firstNode; + curIndex = 0; + } + register QLNode *node; + int distance = index - curIndex; // node distance to cur node + bool forward; // direction to traverse + + if ( index >= numNodes ) { +#if defined(CHECK_RANGE) + qWarning( "QGList::locate: Index %d out of range", index ); +#endif + return 0; + } + + if ( distance < 0 ) + distance = -distance; + if ( (uint)distance < index && (uint)distance < numNodes - index ) { + node = curNode; // start from current node + forward = index > (uint)curIndex; + } else if ( index < numNodes - index ) { // start from first node + node = firstNode; + distance = index; + forward = TRUE; + } else { // start from last node + node = lastNode; + distance = numNodes - index - 1; + if ( distance < 0 ) + distance = 0; + forward = FALSE; + } + if ( forward ) { // now run through nodes + while ( distance-- ) + node = node->next; + } else { + while ( distance-- ) + node = node->prev; + } + curIndex = index; // must update index + return curNode = node; +} + + +/*! + \internal + Inserts an item at its sorted position in the list. +*/ + +void QGList::inSort( QCollection::Item d ) +{ + int index = 0; + register QLNode *n = firstNode; + while ( n && compareItems(n->data,d) < 0 ){ // find position in list + n = n->next; + index++; + } + insertAt( index, d ); +} + + +/*! + \internal + Inserts an item at the start of the list. +*/ + +void QGList::prepend( QCollection::Item d ) +{ + register QLNode *n = new QLNode( newItem(d) ); + CHECK_PTR( n ); + n->prev = 0; + if ( (n->next = firstNode) ) // list is not empty + firstNode->prev = n; + else // initialize list + lastNode = n; + firstNode = curNode = n; // curNode affected + numNodes++; + curIndex = 0; +} + + +/*! + \internal + Inserts an item at the end of the list. +*/ + +void QGList::append( QCollection::Item d ) +{ + register QLNode *n = new QLNode( newItem(d) ); + CHECK_PTR( n ); + n->next = 0; + if ( (n->prev = lastNode) ) // list is not empty + lastNode->next = n; + else // initialize list + firstNode = n; + lastNode = curNode = n; // curNode affected + curIndex = numNodes; + numNodes++; +} + + +/*! + \internal + Inserts an item at position \e index in the list. +*/ + +bool QGList::insertAt( uint index, QCollection::Item d ) +{ + if ( index == 0 ) { // insert at head of list + prepend( d ); + return TRUE; + } else if ( index == numNodes ) { // append at tail of list + append( d ); + return TRUE; + } + QLNode *nextNode = locate( index ); + if ( !nextNode ) // illegal position + return FALSE; + QLNode *prevNode = nextNode->prev; + register QLNode *n = new QLNode( newItem(d) ); + CHECK_PTR( n ); + nextNode->prev = n; + prevNode->next = n; + n->prev = prevNode; // link new node into list + n->next = nextNode; + curNode = n; // curIndex set by locate() + numNodes++; + return TRUE; +} + + +/*! + \internal + Relinks node \e n and makes it the first node in the list. +*/ + +void QGList::relinkNode( QLNode *n ) +{ + if ( n == firstNode ) // already first + return; + curNode = n; + unlink(); + n->prev = 0; + if ( (n->next = firstNode) ) // list is not empty + firstNode->prev = n; + else // initialize list + lastNode = n; + firstNode = curNode = n; // curNode affected + numNodes++; + curIndex = 0; +} + + +/*! + \internal + Unlinks the current list node and returns a pointer to this node. +*/ + +QLNode *QGList::unlink() +{ + if ( curNode == 0 ) // null current node + return 0; + register QLNode *n = curNode; // unlink this node + if ( n == firstNode ) { // removing first node ? + if ( (firstNode = n->next) ) { + firstNode->prev = 0; + } else { + lastNode = curNode = 0; // list becomes empty + curIndex = -1; + } + } else { + if ( n == lastNode ) { // removing last node ? + lastNode = n->prev; + lastNode->next = 0; + } else { // neither last nor first node + n->prev->next = n->next; + n->next->prev = n->prev; + } + } + if ( n->next ) { // change current node + curNode = n->next; + } else if ( n->prev ) { + curNode = n->prev; + curIndex--; + } + if ( iterators && iterators->count() ) { // update iterators + QGListIterator *i = (QGListIterator*)iterators->first(); + while ( i ) { // fix all iterators that + if ( i->curNode == n ) // refers to pending node + i->curNode = curNode; + i = (QGListIterator*)iterators->next(); + } + } + numNodes--; + return n; +} + + +/*! + \internal + Removes the node \e n from the list. +*/ + +bool QGList::removeNode( QLNode *n ) +{ +#if defined(CHECK_NULL) + if ( n == 0 || (n->prev && n->prev->next != n) || + (n->next && n->next->prev != n) ) { + qWarning( "QGList::removeNode: Corrupted node" ); + return FALSE; + } +#endif + curNode = n; + unlink(); // unlink node + deleteItem( n->data ); // deallocate this node + delete n; + curNode = firstNode; + curIndex = curNode ? 0 : -1; + return TRUE; +} + +/*! + \internal + Removes the item \e d from the list. Uses compareItems() to find the item. +*/ + +bool QGList::remove( QCollection::Item d ) +{ + if ( d ) { // find the item + if ( find(d) == -1 ) + return FALSE; + } + QLNode *n = unlink(); // unlink node + if ( !n ) + return FALSE; + deleteItem( n->data ); // deallocate this node + delete n; + return TRUE; +} + +/*! + \internal + Removes the item \e d from the list. +*/ + +bool QGList::removeRef( QCollection::Item d ) +{ + if ( d ) { // find the item + if ( findRef(d) == -1 ) + return FALSE; + } + QLNode *n = unlink(); // unlink node + if ( !n ) + return FALSE; + deleteItem( n->data ); // deallocate this node + delete n; + return TRUE; +} + +/*! + \fn bool QGList::removeFirst() + \internal + Removes the first item in the list. +*/ + +/*! + \fn bool QGList::removeLast() + \internal + Removes the last item in the list. +*/ + +/*! + \internal + Removes the item at position \e index from the list. +*/ + +bool QGList::removeAt( uint index ) +{ + if ( !locate(index) ) + return FALSE; + QLNode *n = unlink(); // unlink node + if ( !n ) + return FALSE; + deleteItem( n->data ); // deallocate this node + delete n; + return TRUE; +} + + +/*! + \internal + Takes the node \e n out of the list. +*/ + +QCollection::Item QGList::takeNode( QLNode *n ) +{ +#if defined(CHECK_NULL) + if ( n == 0 || (n->prev && n->prev->next != n) || + (n->next && n->next->prev != n) ) { + qWarning( "QGList::takeNode: Corrupted node" ); + return 0; + } +#endif + curNode = n; + unlink(); // unlink node + Item d = n->data; + delete n; // delete the node, not data + curNode = firstNode; + curIndex = curNode ? 0 : -1; + return d; +} + +/*! + \internal + Takes the current item out of the list. +*/ + +QCollection::Item QGList::take() +{ + QLNode *n = unlink(); // unlink node + Item d = n ? n->data : 0; + delete n; // delete node, keep contents + return d; +} + +/*! + \internal + Takes the item at position \e index out of the list. +*/ + +QCollection::Item QGList::takeAt( uint index ) +{ + if ( !locate(index) ) + return 0; + QLNode *n = unlink(); // unlink node + Item d = n ? n->data : 0; + delete n; // delete node, keep contents + return d; +} + +/*! + \internal + Takes the first item out of the list. +*/ + +QCollection::Item QGList::takeFirst() +{ + first(); + QLNode *n = unlink(); // unlink node + Item d = n ? n->data : 0; + delete n; + return d; +} + +/*! + \internal + Takes the last item out of the list. +*/ + +QCollection::Item QGList::takeLast() +{ + last(); + QLNode *n = unlink(); // unlink node + Item d = n ? n->data : 0; + delete n; + return d; +} + + +/*! + \internal + Removes all items from the list. +*/ + +void QGList::clear() +{ + register QLNode *n = firstNode; + + firstNode = lastNode = curNode = 0; // initialize list + numNodes = 0; + curIndex = -1; + + if ( iterators && iterators->count() ) { + QGListIterator *i = (QGListIterator*)iterators->first(); + while ( i ) { // notify all iterators that + i->curNode = 0; // this list is empty + i = (QGListIterator*)iterators->next(); + } + } + + QLNode *prevNode; + while ( n ) { // for all nodes ... + deleteItem( n->data ); // deallocate data + prevNode = n; + n = n->next; + delete prevNode; // deallocate node + } +} + + +/*! + \internal + Finds an item in the list. +*/ + +int QGList::findRef( QCollection::Item d, bool fromStart ) +{ + register QLNode *n; + int index; + if ( fromStart ) { // start from first node + n = firstNode; + index = 0; + } else { // start from current node + n = curNode; + index = curIndex; + } + while ( n && n->data != d ) { // find exact match + n = n->next; + index++; + } + curNode = n; + curIndex = n ? index : -1; + return curIndex; // return position of item +} + +/*! + \internal + Finds an item in the list. Uses compareItems(). +*/ + +int QGList::find( QCollection::Item d, bool fromStart ) +{ + register QLNode *n; + int index; + if ( fromStart ) { // start from first node + n = firstNode; + index = 0; + } else { // start from current node + n = curNode; + index = curIndex; + } + while ( n && compareItems(n->data,d) ){ // find equal match + n = n->next; + index++; + } + curNode = n; + curIndex = n ? index : -1; + return curIndex; // return position of item +} + + +/*! + \internal + Counts the number an item occurs in the list. +*/ + +uint QGList::containsRef( QCollection::Item d ) const +{ + register QLNode *n = firstNode; + uint count = 0; + while ( n ) { // for all nodes... + if ( n->data == d ) // count # exact matches + count++; + n = n->next; + } + return count; +} + +/*! + \internal + Counts the number an item occurs in the list. Uses compareItems(). +*/ + +uint QGList::contains( QCollection::Item d ) const +{ + register QLNode *n = firstNode; + uint count = 0; + QGList *that = (QGList*)this; // mutable for compareItems() + while ( n ) { // for all nodes... + if ( !that->compareItems(n->data,d) ) // count # equal matches + count++; + n = n->next; + } + return count; +} + + +/*! + \fn QCollection::Item QGList::at( uint index ) + \internal + Sets the item at position \e index to the current item. +*/ + +/*! + \fn int QGList::at() const + \internal + Returns the current index. +*/ + +/*! + \fn QLNode *QGList::currentNode() const + \internal + Returns the current node. +*/ + +/*! + \fn QCollection::Item QGList::get() const + \internal + Returns the current item. +*/ + +/*! + \fn QCollection::Item QGList::cfirst() const + \internal + Returns the first item in the list. +*/ + +/*! + \fn QCollection::Item QGList::clast() const + \internal + Returns the last item in the list. +*/ + + +/*! + \internal + Returns the first list item. Sets this to current. +*/ + +QCollection::Item QGList::first() +{ + if ( firstNode ) { + curIndex = 0; + return (curNode=firstNode)->data; + } + return 0; +} + +/*! + \internal + Returns the last list item. Sets this to current. +*/ + +QCollection::Item QGList::last() +{ + if ( lastNode ) { + curIndex = numNodes-1; + return (curNode=lastNode)->data; + } + return 0; +} + +/*! + \internal + Returns the next list item (after current). Sets this to current. +*/ + +QCollection::Item QGList::next() +{ + if ( curNode ) { + if ( curNode->next ) { + curIndex++; + curNode = curNode->next; + return curNode->data; + } + curIndex = -1; + curNode = 0; + } + return 0; +} + +/*! + \internal + Returns the previous list item (before current). Sets this to current. +*/ + +QCollection::Item QGList::prev() +{ + if ( curNode ) { + if ( curNode->prev ) { + curIndex--; + curNode = curNode->prev; + return curNode->data; + } + curIndex = -1; + curNode = 0; + } + return 0; +} + + +/*! + \internal + Converts the list to a vector. +*/ + +void QGList::toVector( QGVector *vector ) const +{ + vector->clear(); + if ( !vector->resize( count() ) ) + return; + register QLNode *n = firstNode; + uint i = 0; + while ( n ) { + vector->insert( i, n->data ); + n = n->next; + i++; + } +} + +void QGList::heapSortPushDown( QCollection::Item* heap, int first, int last ) +{ + int r = first; + while( r <= last/2 ) { + // Node r has only one child ? + if ( last == 2*r ) { + // Need for swapping ? + if ( compareItems( heap[r], heap[ 2*r ] ) > 0 ) { + QCollection::Item tmp = heap[r]; + heap[ r ] = heap[ 2*r ]; + heap[ 2*r ] = tmp; + } + // That's it ... + r = last; + } else { + // Node has two children + if ( compareItems( heap[r], heap[ 2*r ] ) > 0 && + compareItems( heap[ 2*r ], heap[ 2*r+1 ] ) <= 0 ) { + // Swap with left child + QCollection::Item tmp = heap[r]; + heap[ r ] = heap[ 2*r ]; + heap[ 2*r ] = tmp; + r *= 2; + } else if ( compareItems( heap[r], heap[ 2*r+1 ] ) > 0 && + compareItems( heap[ 2*r+1 ], heap[ 2*r ] ) < 0 ) { + // Swap with right child + QCollection::Item tmp = heap[r]; + heap[ r ] = heap[ 2*r+1 ]; + heap[ 2*r+1 ] = tmp; + r = 2*r+1; + } else { + // We are done + r = last; + } + } + } +} + + +/*! Sorts the list by the result of the virtual compareItems() function. + + The Heap-Sort algorithm is used for sorting. It sorts n items with + O(n*log n) compares. This is the asymptotic optimal solution of the + sorting problem. +*/ + +void QGList::sort() +{ + uint n = count(); + if ( n < 2 ) + return; + + // Create the heap + QCollection::Item* realheap = new QCollection::Item[ n ]; + // Wow, what a fake. But I want the heap to be indexed as 1...n + QCollection::Item* heap = realheap - 1; + int size = 0; + QLNode* insert = firstNode; + for( ; insert != 0; insert = insert->next ) { + heap[++size] = insert->data; + int i = size; + while( i > 1 && compareItems( heap[i], heap[ i / 2 ] ) < 0 ) { + QCollection::Item tmp = heap[ i ]; + heap[ i ] = heap[ i/2 ]; + heap[ i/2 ] = tmp; + i /= 2; + } + } + + insert = firstNode; + // Now do the sorting + for ( int i = n; i > 0; i-- ) { + insert->data = heap[1]; + insert = insert->next; + if ( i > 1 ) { + heap[1] = heap[i]; + heapSortPushDown( heap, 1, i - 1 ); + } + } + + delete [] realheap; +} + + +/***************************************************************************** + QGList stream functions + *****************************************************************************/ + +#ifndef QT_NO_DATASTREAM +QDataStream &operator>>( QDataStream &s, QGList &list ) +{ // read list + return list.read( s ); +} + +QDataStream &operator<<( QDataStream &s, const QGList &list ) +{ // write list + return list.write( s ); +} + +/*! + \internal + Reads a list from the stream \e s. +*/ + +QDataStream &QGList::read( QDataStream &s ) +{ + uint num; + s >> num; // read number of items + clear(); // clear list + while ( num-- ) { // read all items + Item d; + read( s, d ); + CHECK_PTR( d ); + if ( !d ) // no memory + break; + QLNode *n = new QLNode( d ); + CHECK_PTR( n ); + if ( !n ) // no memory + break; + n->next = 0; + if ( (n->prev = lastNode) ) // list is not empty + lastNode->next = n; + else // initialize list + firstNode = n; + lastNode = n; + numNodes++; + } + curNode = firstNode; + curIndex = curNode ? 0 : -1; + return s; +} + +/*! + \internal + Writes the list to the stream \e s. +*/ + +QDataStream &QGList::write( QDataStream &s ) const +{ + s << count(); // write number of items + QLNode *n = firstNode; + while ( n ) { // write all items + write( s, n->data ); + n = n->next; + } + return s; +} + +#endif // QT_NO_DATASTREAM + +/***************************************************************************** + QGListIterator member functions + *****************************************************************************/ + +/*! + \class QGListIterator qglist.h + \brief The QGListIterator class is an internal class for implementing QListIterator. + + QGListIterator is a strictly internal class that does the heavy work for + QListIterator. +*/ + +/*! + \internal + Constructs an iterator that operates on the list \e l. +*/ + +QGListIterator::QGListIterator( const QGList &l ) +{ + list = (QGList *)&l; // get reference to list + curNode = list->firstNode; // set to first node + if ( !list->iterators ) { + list->iterators = new QGList; // create iterator list + CHECK_PTR( list->iterators ); + } + list->iterators->append( this ); // attach iterator to list +} + +/*! + \internal + Constructs a copy of the iterator \e it. +*/ + +QGListIterator::QGListIterator( const QGListIterator &it ) +{ + list = it.list; + curNode = it.curNode; + if ( list ) + list->iterators->append( this ); // attach iterator to list +} + +/*! + \internal + Assigns a copy of the iterator \e it and returns a reference to this + iterator. +*/ + +QGListIterator &QGListIterator::operator=( const QGListIterator &it ) +{ + if ( list ) // detach from old list + list->iterators->removeRef( this ); + list = it.list; + curNode = it.curNode; + if ( list ) + list->iterators->append( this ); // attach to new list + return *this; +} + +/*! + \internal + Destroys the iterator. +*/ + +QGListIterator::~QGListIterator() +{ + if ( list ) // detach iterator from list + list->iterators->removeRef(this); +} + + +/*! + \fn bool QGListIterator::atFirst() const + \internal + Returns TRUE if the iterator points to the first item, otherwise FALSE. +*/ + +/*! + \fn bool QGListIterator::atLast() const + \internal + Returns TRUE if the iterator points to the last item, otherwise FALSE. +*/ + + +/*! + \internal + Sets the list iterator to point to the first item in the list. +*/ + +QCollection::Item QGListIterator::toFirst() +{ + if ( !list ) { +#if defined(CHECK_NULL) + qWarning( "QGListIterator::toFirst: List has been deleted" ); +#endif + return 0; + } + return list->firstNode ? (curNode = list->firstNode)->getData() : 0; +} + +/*! + \internal + Sets the list iterator to point to the last item in the list. +*/ + +QCollection::Item QGListIterator::toLast() +{ + if ( !list ) { +#if defined(CHECK_NULL) + qWarning( "QGListIterator::toLast: List has been deleted" ); +#endif + return 0; + } + return list->lastNode ? (curNode = list->lastNode)->getData() : 0; +} + + +/*! + \fn QCollection::Item QGListIterator::get() const + \internal + Returns the iterator item. +*/ + + +/*! + \internal + Moves to the next item (postfix). +*/ + +QCollection::Item QGListIterator::operator()() +{ + if ( !curNode ) + return 0; + QCollection::Item d = curNode->getData(); + curNode = curNode->next; + return d; +} + +/*! + \internal + Moves to the next item (prefix). +*/ + +QCollection::Item QGListIterator::operator++() +{ + if ( !curNode ) + return 0; + curNode = curNode->next; + return curNode ? curNode->getData() : 0; +} + +/*! + \internal + Moves \e jumps positions forward. +*/ + +QCollection::Item QGListIterator::operator+=( uint jumps ) +{ + while ( curNode && jumps-- ) + curNode = curNode->next; + return curNode ? curNode->getData() : 0; +} + +/*! + \internal + Moves to the previous item (prefix). +*/ + +QCollection::Item QGListIterator::operator--() +{ + if ( !curNode ) + return 0; + curNode = curNode->prev; + return curNode ? curNode->getData() : 0; +} + +/*! + \internal + Moves \e jumps positions backward. +*/ + +QCollection::Item QGListIterator::operator-=( uint jumps ) +{ + while ( curNode && jumps-- ) + curNode = curNode->prev; + return curNode ? curNode->getData() : 0; +} Index: branches/xZenu/src/util/doxygen/qtools/qgstring.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgstring.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgstring.h (revision 1322) @@ -0,0 +1,139 @@ +#ifndef QGSTRING_H +#define QGSTRING_H + +#include +#include + +#if defined(_OS_SUN_) && defined(_CC_GNU_) +#include +#endif + +#include "qcstring.h" + +/***************************************************************************** + Fixes and workarounds for some platforms + *****************************************************************************/ + +/** This is an alternative implementation of QCString. + */ +class QGString +{ + public: + QGString(); // make null string + QGString(uint size); + QGString( const QGString &s ); + QGString( const char *str ); + ~QGString() ; + + bool resize( uint newlen ); + bool enlarge( uint newlen ); + void setLen( uint newlen ); + + QGString &operator=( const QGString &s ); + QGString &operator=( const char *str ); + QGString &operator+=( const QGString &s ); + QGString &operator+=( const char *str ); + QGString &operator+=( char c ); + + bool isNull() const { return m_data==0; } + bool isEmpty() const { return m_len==0; } + uint length() const { return m_len; } + uint size() const { return m_memSize; } + char * data() const { return m_data; } + bool truncate( uint pos ) { return resize(pos+1); } + operator const char *() const { return (const char *)data(); } + char &at( uint index ) const { return m_data[index]; } + char &operator[]( int i ) const { return at(i); } + + private: + char * m_data; + uint m_len; + uint m_memSize; +}; + +/***************************************************************************** + QGString non-member operators + *****************************************************************************/ + +Q_EXPORT inline bool operator==( const QGString &s1, const QGString &s2 ) +{ return qstrcmp(s1.data(),s2.data()) == 0; } + +Q_EXPORT inline bool operator==( const QGString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) == 0; } + +Q_EXPORT inline bool operator==( const char *s1, const QGString &s2 ) +{ return qstrcmp(s1,s2.data()) == 0; } + +Q_EXPORT inline bool operator!=( const QGString &s1, const QGString &s2 ) +{ return qstrcmp(s1.data(),s2.data()) != 0; } + +Q_EXPORT inline bool operator!=( const QGString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) != 0; } + +Q_EXPORT inline bool operator!=( const char *s1, const QGString &s2 ) +{ return qstrcmp(s1,s2.data()) != 0; } + +Q_EXPORT inline bool operator<( const QGString &s1, const QGString& s2 ) +{ return qstrcmp(s1.data(),s2.data()) < 0; } + +Q_EXPORT inline bool operator<( const QGString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) < 0; } + +Q_EXPORT inline bool operator<( const char *s1, const QGString &s2 ) +{ return qstrcmp(s1,s2.data()) < 0; } + +Q_EXPORT inline bool operator<=( const QGString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) <= 0; } + +Q_EXPORT inline bool operator<=( const char *s1, const QGString &s2 ) +{ return qstrcmp(s1,s2.data()) <= 0; } + +Q_EXPORT inline bool operator>( const QGString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) > 0; } + +Q_EXPORT inline bool operator>( const char *s1, const QGString &s2 ) +{ return qstrcmp(s1,s2.data()) > 0; } + +Q_EXPORT inline bool operator>=( const QGString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) >= 0; } + +Q_EXPORT inline bool operator>=( const char *s1, const QGString &s2 ) +{ return qstrcmp(s1,s2.data()) >= 0; } + +Q_EXPORT inline QGString operator+( const QGString &s1, const QGString &s2 ) +{ + QGString tmp( s1.data() ); + tmp += s2; + return tmp; +} + +Q_EXPORT inline QGString operator+( const QGString &s1, const char *s2 ) +{ + QGString tmp( s1.data() ); + tmp += s2; + return tmp; +} + +Q_EXPORT inline QGString operator+( const char *s1, const QGString &s2 ) +{ + QGString tmp( s1 ); + tmp += s2; + return tmp; +} + +Q_EXPORT inline QGString operator+( const QGString &s1, char c2 ) +{ + QGString tmp( s1.data() ); + tmp += c2; + return tmp; +} + +Q_EXPORT inline QGString operator+( char c1, const QGString &s2 ) +{ + QGString tmp; + tmp += c1; + tmp += s2; + return tmp; +} + +#endif // QGSTRING_H Index: branches/xZenu/src/util/doxygen/qtools/qfeatures.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qfeatures.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qfeatures.h (revision 1322) @@ -0,0 +1,978 @@ +/**************************************************************************** +** +** +** Global feature selection +** +** Created : 000417 +** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QFEATURES_H +#define QFEATURES_H + +/*! \page features....html + ... +*/ + +// Qt ships with a number of pre-defined configurations. If none suit +// your needs, define QCONFIG_LOCAL and create a "qconfig-local.h" file. +// +// Note that disabling some features will produce a libqt that is not +// compatible with other libqt builds. Such modifications are only +// supported on Qt/Embedded where reducing the library size is important +// and where the application-suite is often a fixed set. +// +#if defined(QCONFIG_LOCAL) +#include +#elif defined(QCONFIG_MINIMAL) +#include +#elif defined(QCONFIG_SMALL) +#include +#elif defined(QCONFIG_MEDIUM) +#include +#elif defined(QCONFIG_LARGE) +#include +#else // everything... +#include +#endif + + +// Data structures +/*! + QStringList +*/ +//#define QT_NO_STRINGLIST + +#if defined(QT_NO_IMAGE_SMOOTHSCALE) +/*! + QIconSet +*/ +# define QT_NO_ICONSET +#endif + +// File I/O +#if defined(QT_NO_STRINGLIST) + /*! + QDir + */ +# define QT_NO_DIR +#endif + +/*! + Palettes +*/ +//#define QT_NO_PALETTE + +/*! + QTextStream +*/ +//#define QT_NO_TEXTSTREAM +/*! + QDataStream +*/ +//#define QT_NO_DATASTREAM + +/*! + Dynamic module linking +*/ +//#define QT_NO_PLUGIN + + +// Images +/*! + BMP image I/O +

    The Windows Bitmap (BMP) image format is common on MS-Windows. +

    This is an uncompressed image format + offering few advantages over PNG or JPEG. +*/ +#if defined(QT_NO_DATASTREAM) +# define QT_NO_IMAGEIO_BMP +#endif +/*! + PPM image I/O +

    The Portable PixMap (PPM) image format is common on Unix. +

    This is an uncompressed image format + offering few advantages over PNG or JPEG. +*/ +//#define QT_NO_IMAGEIO_PPM +/*! + XBM image I/O +

    The X11 BitMap (XBM) image format is common on X11. +

    This is an uncompressed monochrome image format. + Qt uses this format for some internal images (eg. mouse cursors). +*/ +//#define QT_NO_IMAGEIO_XBM +/*! + XPM image I/O +

    The X11 PixMap (XPM) image format is common on X11. +

    This is an uncompressed image format. + XPM images have the small advantage that they can be trivially + included in source files as they are C code. + Qt uses this format for some internal images (eg. QMessageBox icons). +*/ +#if defined(QT_NO_TEXTSTREAM) +# define QT_NO_IMAGEIO_XPM +#endif +/*! + PNG image I/O +

    The Portable Network Graphics (PNG) is a compressed image format. +

    See The PNG Home Site for + details of the format. +*/ +//#define QT_NO_IMAGEIO_PNG +/*! + MNG image I/O +

    The Multiple-image Network Graphics (MNG) is a compressed animation format. +

    See The MNG Home Site for + details of the format. +*/ +//#define QT_NO_IMAGEIO_MNG +/*! + JPEG image I/O +

    The Joint Photographic Experts Group (JPEG) is a compressed lossy image format that gives high compression + for real-world and photo-realistic images. +*/ +//#define QT_NO_IMAGEIO_JPEG + +/*! + Asynchronous I/O +

    Allows push-driven data processing. +*/ +//#define QT_NO_ASYNC_IO +/*! + Asynchronous image I/O +

    Allows push-driven images. +*/ +//#define QT_NO_ASYNC_IMAGE_IO +#if defined(QT_NO_ASYNC_IO) || defined(QT_NO_ASYNC_IMAGE_IO) + /*! + Animated images +

    This includes animated GIFs. +

    Note: this currently also requires QT_BUILTIN_GIF_READER to + be defined when building Qt. + */ +# define QT_NO_MOVIE +#endif + +// Fonts +/*! + TrueType font files +

    Scalable font format common on MS-Windows and becoming common on Unix. +

    Only supported on Qt/Embedded. +*/ +//#define QT_NO_TRUETYPE +/*! + BDF font files +

    The Bitmap Distribution Format (BDF) font file format, common + on Unix. +

    Only supported on Qt/Embedded. +*/ +#if defined(QT_NO_TEXTSTREAM) || defined(QT_NO_STRINGLIST) +# define QT_NO_BDF +#endif +/*! + QFontDatabase +*/ +#if defined(QT_NO_STRINGLIST) +# define QT_NO_FONTDATABASE +#endif + +// Internationalization + +/*! + QObject::tr() +*/ +#if defined(QT_NO_DATASTREAM) +# define QT_NO_TRANSLATION +#endif + +/*! + QTextCodec class and subclasses +*/ +//#define QT_NO_TEXTCODEC + +#if defined(QT_NO_TEXTCODEC) + /*! + QTextCodec classes +

    This includes some large conversion tables. + */ +# define QT_NO_CODECS +#endif +#if defined(QT_LITE_UNICODE) + /*! + Unicode property tables +

    These include some large tables. + */ +# define QT_NO_UNICODETABLES +#endif + +/*! + MIME +*/ +#if defined(QT_NO_DIR) +# define QT_NO_MIME +#endif +#if defined(QT_NO_MIME) || defined(QT_NO_TEXTSTREAM) || defined(QT_NO_DRAWUTIL) || defined(QT_NO_IMAGE_SMOOTHSCALE) + /*! + RichText (HTML) display + */ +# define QT_NO_RICHTEXT +#endif + +/*! + XML +*/ +#if defined(QT_NO_STRINGLIST) || defined(QT_NO_TEXTSTREAM) || defined(QT_NO_TEXTCODEC) +# define QT_NO_XML +#endif + +/*! + Document Object Model +*/ +#if defined(QT_NO_XML) || defined(QT_NO_MIME) +# define QT_NO_DOM +#endif + +// Sound +/*! + Playing sounds +*/ +//#define QT_NO_SOUND + +/*! + Properties +*/ +#if defined(QT_NO_STRINGLIST) || defined(QT_NO_ICONSET) +# define QT_NO_PROPERTIES +#endif + + + +// Networking + +/*! + Network support +*/ +//#define QT_NO_NETWORK + +#if defined(QT_NO_NETWORK) || defined(QT_NO_STRINGLIST) || defined(QT_NO_TEXTSTREAM) + /*! + DNS + */ +# define QT_NO_DNS +#endif +/*! + Network file access +*/ +#if defined(QT_NO_NETWORK) || defined(QT_NO_DIR) || defined(QT_NO_STRINGLIST) +# define QT_NO_NETWORKPROTOCOL +#endif +#if defined(QT_NO_NETWORKPROTOCOL) || defined(QT_NO_DNS) + /*! + FTP file access + */ +# define QT_NO_NETWORKPROTOCOL_FTP + /*! + HTTP file access + */ +# define QT_NO_NETWORKPROTOCOL_HTTP +#endif + +/*! + External process invocation. +*/ +//#define QT_NO_PROCESS + + +// Qt/Embedded-specific + +#if defined(QT_NO_NETWORK) + /*! + Multi-process support. + */ +# define QT_NO_QWS_MULTIPROCESS +#endif + +#if defined(QT_NO_QWS_MULTIPROCESS) || defined(QT_NO_DATASTREAM) + /*! + Palmtop Communication Protocol + */ +# define QT_NO_COP +#endif + +/*! + Console keyboard support +*/ +//#define QT_NO_QWS_KEYBOARD + +/*! + Visible cursor +*/ +#if defined(QT_NO_CURSOR) +# define QT_NO_QWS_CURSOR +#endif + +/*! + Alpha-blended cursor +*/ +//#define QT_NO_QWS_ALPHA_CURSOR +/*! + Mach64 acceleration +*/ +//#define QT_NO_QWS_MACH64 +/*! + Voodoo3 acceleration +*/ +//#define QT_NO_QWS_VOODOO3 +/*! + Matrox MGA acceleration (Millennium/Millennium II/Mystique/G200/G400) +*/ +//#define QT_NO_QWS_MATROX +/*! + Virtual frame buffer +*/ + +//#define QT_NO_QWS_VFB +/*! + Transformed frame buffer +*/ +//#define QT_NO_QWS_TRANSFORMED +#if defined(QT_NO_NETWORK) +/*! + Remote frame buffer (VNC) +*/ +# ifndef QT_NO_QWS_VNC +# define QT_NO_QWS_VNC +# endif +#endif +/*! + 1-bit monochrome +*/ +//#define QT_NO_QWS_DEPTH_1 +/*! + 4-bit greyscale +*/ +//#define QT_NO_QWS_DEPTH_4 +/*! + 4-bit VGA +*/ +//#define QT_NO_QWS_VGA_16 +/*! + SVGALib Support + Not implemented yet +*/ +#define QT_NO_QWS_SVGALIB +/*! + 8-bit grayscale +*/ +#define QT_NO_QWS_DEPTH_8GRAYSCALE +/*! + 8-bit color +*/ +//#define QT_NO_QWS_DEPTH_8 +/*! + 15 or 16-bit color (define QT_QWS_DEPTH16_RGB as 555 for 15-bit) +*/ +//#define QT_NO_QWS_DEPTH_16 +/*! + 24-bit color +*/ +//#define QT_NO_QWS_DEPTH_24 +/*! + 32-bit color +*/ +//#define QT_NO_QWS_DEPTH_32 + +/*! + Window Manager +*/ +//#define QT_NO_QWS_MANAGER + +/*! + Window Manager Styles +*/ +#define QT_NO_QWS_KDE2_WM_STYLE +#if defined( QT_NO_QWS_MANAGER ) || defined( QT_NO_IMAGEIO_XPM ) +# define QT_NO_QWS_AQUA_WM_STYLE +# define QT_NO_QWS_BEOS_WM_STYLE +# define QT_NO_QWS_KDE_WM_STYLE +# define QT_NO_QWS_QPE_WM_STYLE +# define QT_NO_QWS_WINDOWS_WM_STYLE +#endif + +/*! + Saving of fonts +*/ +//#define QT_NO_QWS_SAVEFONTS + +/*! + Favour code size over graphics speed +

    Smaller, slower code will be used for drawing operations. +

    Only supported on Qt/Embedded. +*/ +//#define QT_NO_QWS_GFX_SPEED + +/*! + Qt/Embedded window system properties. +*/ +//#define QT_NO_QWS_PROPERTIES + +#if defined(QT_NO_QWS_PROPERTIES) || defined(QT_NO_MIME) + /*! + Cut and paste + */ +# define QT_NO_CLIPBOARD +#endif + +#if defined(QT_NO_MIME) || defined(QT_NO_QWS_PROPERTIES) + /*! + Drag and drop + */ +# define QT_NO_DRAGANDDROP +#endif + +#if defined(QT_NO_PROPERTIES) + /*! + SQL + */ +# define QT_NO_SQL +#endif + +#if defined(QT_NO_CLIPBOARD) || defined(QT_NO_MIME) || defined(_WS_QWS_) + /*! + Cut and paste of complex data types (non-text) + Not yet implemented for QWS. + */ +# define QT_NO_MIMECLIPBOARD +#endif + + +/*! + Drawing utility functions +*/ +//#define QT_NO_DRAWUTIL +/*! + TrueColor QImage +*/ +//#define QT_NO_IMAGE_TRUECOLOR +/*! + Smooth QImage scaling +*/ +//#define QT_NO_IMAGE_SMOOTHSCALE +/*! + Image file text strings +*/ +#if defined(QT_NO_STRINGLIST) +# define QT_NO_IMAGE_TEXT +#endif + +#if defined(QT_NO_IMAGE_TRUECOLOR) + /*! + 16-bit QImage + */ +# define QT_NO_IMAGE_16_BIT +#endif +/*! + Cursors +*/ +//#define QT_NO_CURSOR + +// Painting +/*! + Named colors +*/ +//#define QT_NO_COLORNAMES +/*! + Scaling and rotation +*/ +//#define QT_NO_TRANSFORMATIONS + +/*! + Printing +*/ +#if defined(QT_NO_TEXTSTREAM) +# define QT_NO_PRINTER +#endif + +/*! + QPicture +*/ +#if defined(QT_NO_DATASTREAM) +# define QT_NO_PICTURE +#endif + +// Layout +/*! + Automatic widget layout +*/ +//#define QT_NO_LAYOUT + +// Widgets +#if defined(QT_NO_DRAWUTIL) || defined(QT_NO_PALETTE) +/*! + QStyle +*/ +# define QT_NO_STYLE +#endif + + +/*! + Dialogs +*/ +//#define QT_NO_DIALOG +/*! + Semi-modal dialogs +*/ +//#define QT_NO_SEMIMODAL +/*! + Framed widgets +*/ +//#define QT_NO_FRAME + +/*! + Special widget effects (fading, scrolling) +*/ +//#define QT_NO_EFFECTS + + +/*! + QLabel +*/ +#ifdef QT_NO_FRAME +# define QT_NO_LABEL +#endif + +/*! + Toolbars +*/ +#ifdef QT_NO_LAYOUT +# define QT_NO_TOOLBAR +#endif + +/*! + Buttons +*/ +#if defined(QT_NO_BUTTON) || defined(QT_NO_STYLE) +/*! + Check-boxes +*/ +# define QT_NO_CHECKBOX +/*! + Radio-buttons +*/ +# define QT_NO_RADIOBUTTON +#endif +#if defined(QT_NO_BUTTON) || defined(QT_NO_TOOLBAR) || defined(QT_NO_ICONSET) +/*! + Tool-buttons +*/ +# define QT_NO_TOOLBUTTON +#endif +/*! + Grid layout widgets +*/ +#ifdef QT_NO_FRAME +# define QT_NO_GRID +#endif +/*! + Group boxes +*/ +#ifdef QT_NO_FRAME +# define QT_NO_GROUPBOX +#endif +#if defined(QT_NO_GROUPBOX) +/*! + Button groups +*/ +# define QT_NO_BUTTONGROUP +/*! + Horizontal group boxes +*/ +# define QT_NO_HGROUPBOX +#endif +#if defined(QT_NO_HGROUPBOX) +/*! + Vertical group boxes +*/ +# define QT_NO_VGROUPBOX +#endif +#if defined(QT_NO_BUTTONGROUP) +/*! + Horizontal button groups +*/ +# define QT_NO_HBUTTONGROUP +#endif +#if defined(QT_NO_HBUTTONGROUP) +/*! + Vertical button groups +*/ +# define QT_NO_VBUTTONGROUP +#endif +/*! + Horizonal box layout widgets +*/ +#ifdef QT_NO_FRAME +# define QT_NO_HBOX +#endif +#if defined(QT_NO_HBOX) +/*! + Vertical box layout widgets +*/ +# define QT_NO_VBOX +#endif +/*! + Single-line edits +*/ +#if defined(QT_NO_PALETTE) +# define QT_NO_LINEEDIT +#endif +#if defined(QT_NO_TOOLBAR) +/*! + Main-windows +*/ +# define QT_NO_MAINWINDOW +#endif +#if defined(QT_NO_ICONSET) +/*! + Menu-like widgets +*/ +# define QT_NO_MENUDATA +#endif +#if defined(QT_NO_MENUDATA) +/*! + Popup-menus +*/ +# define QT_NO_POPUPMENU +/*! + Menu bars +*/ +# define QT_NO_MENUBAR +#endif +#if defined(QT_NO_BUTTON) || defined(QT_NO_ICONSET) || defined(QT_NO_POPUPMENU) +/*! + Push-buttons +*/ +# define QT_NO_PUSHBUTTON +#endif +/*! + Progress bars +*/ +#ifdef QT_NO_FRAME +# define QT_NO_PROGRESSBAR +#endif +/*! + Range-control widgets +*/ +//#define QT_NO_RANGECONTROL +#if defined(QT_NO_RANGECONTROL) || defined(QT_NO_STYLE) +/*! + Scroll bars +*/ +# define QT_NO_SCROLLBAR +/*! + Sliders +*/ +# define QT_NO_SLIDER +/*! + Spin boxes +*/ +# define QT_NO_SPINBOX +/*! + Dials +*/ +# define QT_NO_DIAL +#endif + + +#if defined(QT_NO_SCROLLBAR) || defined(QT_NO_FRAME) +/*! + Scrollable view widgets +*/ +# define QT_NO_SCROLLVIEW +#endif +#if defined(QT_NO_SCROLLVIEW) +/*! + QCanvas +*/ +# define QT_NO_CANVAS +/*! + QIconView +*/ +# define QT_NO_ICONVIEW +#endif + +#if defined(QT_NO_SCROLLBAR) +/*! + Table-like widgets +*/ +# define QT_NO_TABLEVIEW +#endif +#if defined(QT_NO_TABLEVIEW) +/*! + Multi-line edits +*/ +# define QT_NO_MULTILINEEDIT +#endif + +/*! + Splitters +*/ +#ifdef QT_NO_FRAME +# define QT_NO_SPLITTER +#endif +/*! + Status bars +*/ +#ifdef QT_NO_LAYOUT +# define QT_NO_STATUSBAR +#endif +/*! + Tab-bars +*/ +#if defined(QT_NO_ICONSET) +# define QT_NO_TABBAR +#endif +#if defined(QT_NO_TABBAR) +/*! + Tab widgets +*/ +# define QT_NO_TABWIDGET +#endif +/*! + Tool tips +*/ +#if defined( QT_NO_LABEL ) || defined( QT_NO_PALETTE ) +# define QT_NO_TOOLTIP +#endif +/*! + Input validators +*/ +//#define QT_NO_VALIDATOR +/*! + "What's this" help +*/ +#if defined( QT_NO_TOOLTIP ) +# define QT_NO_WHATSTHIS +#endif +/*! + Widget stacks +*/ +#ifdef QT_NO_FRAME +# define QT_NO_WIDGETSTACK +#endif + +#if defined(QT_NO_RICHTEXT) || defined(QT_NO_SCROLLVIEW) + /*! + QTextView + */ +# define QT_NO_TEXTVIEW +#endif + +#if defined(QT_NO_TEXTVIEW) + /*! + QTextBrowser + */ +# define QT_NO_TEXTBROWSER +#endif + +#if defined(QT_NO_STYLE) + /*! + Windows style + */ +# define QT_NO_STYLE_WINDOWS + /*! + Motif style + */ +# define QT_NO_STYLE_MOTIF +#endif + +#if defined(QT_NO_STYLE_MOTIF) + /*! + Motif-plus style + */ +# define QT_NO_STYLE_MOTIFPLUS +#endif + + +#if defined(QT_NO_SCROLLVIEW) || defined(QT_NO_STRINGLIST) + /*! + QListBox + */ +# define QT_NO_LISTBOX +#endif + +/*! + QAccel +*/ +//#define QT_NO_ACCEL + +/*! + QSizeGrip +*/ +#ifdef QT_NO_PALETTE +# define QT_NO_SIZEGRIP +#endif +/*! + QHeader +*/ +#ifdef QT_NO_ICONSET +# define QT_NO_HEADER +#endif +/*! + QWorkSpace +*/ +#ifdef QT_NO_FRAME +# define QT_NO_WORKSPACE +#endif +/*! + QLCDNumber +*/ +#ifdef QT_NO_FRAME +# define QT_NO_LCDNUMBER +#endif +/*! + QAction +*/ +//#define QT_NO_ACTION + +#if defined(QT_NO_HEADER) + /*! + QTable + */ +# define QT_NO_TABLE +#endif + +#if defined(QT_NO_LISTBOX) + /*! + QComboBox + */ +# define QT_NO_COMBOBOX +#endif + +#if defined(QT_NO_HEADER) || defined(QT_NO_SCROLLVIEW) + /*! + QListView + */ +# define QT_NO_LISTVIEW +#endif + +#if defined(QT_NO_STYLE_WINDOWS) + /*! + Compact Windows style + */ +# define QT_NO_STYLE_COMPACT +#endif + +#if defined(QT_NO_STYLE_MOTIF) || defined(QT_NO_TRANSFORMATIONS) + /*! + CDE style + */ +# define QT_NO_STYLE_CDE + /*! + SGI style + */ +# define QT_NO_STYLE_SGI +#endif +#if defined(QT_NO_STYLE_WINDOWS) + /*! + Platinum style + */ +# define QT_NO_STYLE_PLATINUM +#endif + +/*! + QColorDialog +*/ +#if defined(QT_NO_LAYOUT) || defined(QT_NO_LABEL) || defined(QT_NO_PUSHBUTTON) || defined(QT_NO_DIALOG) +# define QT_NO_COLORDIALOG +#endif +#if defined(QT_NO_DIALOG) +/*! + QMessageBox +*/ +# define QT_NO_MESSAGEBOX +#endif +#if defined(QT_NO_DIALOG) || defined(QT_NO_TABBAR) +/*! + QTabDialog +*/ +#define QT_NO_TABDIALOG +#endif + +#if defined(QT_NO_DIALOG) +/*! + QWizard +*/ +# define QT_NO_WIZARD +#endif + +#if defined(QT_NO_DIALOG) || defined(QT_NO_LISTVIEW) || defined(QT_NO_NETWORKPROTOCOL) || defined(QT_NO_COMBOBOX) || defined(QT_NO_DIR) || defined(QT_NO_MESSAGEBOX) || defined(QT_NO_SEMIMODAL) + /*! + QFileDialog + */ +# define QT_NO_FILEDIALOG +#endif + +#if defined(QT_NO_DIALOG) || defined(QT_NO_FONTDATABASE) || defined(QT_NO_COMBOBOX) + /*! + QFontDialog + */ +# define QT_NO_FONTDIALOG +#endif + +#if defined(QT_NO_DIALOG) || defined(QT_NO_LISTVIEW) || defined(QT_NO_PRINTER) || defined(QT_NO_COMBOBOX) || defined(QT_NO_DIR) || defined(QT_NO_LAYOUT) || defined(QT_NO_LABEL) + /*! + QPrintDialog + */ +# define QT_NO_PRINTDIALOG +#endif + +#if defined(QT_NO_SEMIMODAL) + /*! + QProgressDialog + */ +# define QT_NO_PROGRESSDIALOG +#endif +#if defined(QT_NO_DIALOG) || defined(QT_NO_COMBOBOX) + /*! + QInputDialog + */ +# define QT_NO_INPUTDIALOG +#endif + +#if defined(QT_NO_STRINGLIST) + /*! + Session management support + */ +# define QT_NO_SESSIONMANAGER +#endif + +#endif // QFEATURES_H Index: branches/xZenu/src/util/doxygen/qtools/qtextcodec.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qtextcodec.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qtextcodec.h (revision 1322) @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** +** Definition of QTextCodec class +** +** Created : 981015 +** +** Copyright (C) 1998-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QTEXTCODEC_H +#define QTEXTCODEC_H + +#ifndef QT_H +#include "qstring.h" +#endif // QT_H + +#ifndef QT_NO_TEXTCODEC + +class QTextCodec; +class QIODevice; + +class Q_EXPORT QTextEncoder { +public: + virtual ~QTextEncoder(); + virtual QCString fromUnicode(const QString& uc, int& lenInOut) = 0; +}; + +class Q_EXPORT QTextDecoder { +public: + virtual ~QTextDecoder(); + virtual QString toUnicode(const char* chars, int len) = 0; +}; + +class Q_EXPORT QTextCodec { +public: + virtual ~QTextCodec(); + +#ifndef QT_NO_CODECS + static QTextCodec* loadCharmap(QIODevice*); + static QTextCodec* loadCharmapFile(QString filename); +#endif + static QTextCodec* codecForMib(int mib); + static QTextCodec* codecForName(const char* hint, int accuracy=0); + static QTextCodec* codecForContent(const char* chars, int len); + static QTextCodec* codecForIndex(int i); + static QTextCodec* codecForLocale(); + + static void deleteAllCodecs(); + + static const char* locale(); + + virtual const char* name() const = 0; + virtual int mibEnum() const = 0; + + virtual QTextDecoder* makeDecoder() const; + virtual QTextEncoder* makeEncoder() const; + + virtual QString toUnicode(const char* chars, int len) const; + virtual QCString fromUnicode(const QString& uc, int& lenInOut) const; + + QCString fromUnicode(const QString& uc) const; + QString toUnicode(const QByteArray&, int len) const; + QString toUnicode(const QByteArray&) const; + QString toUnicode(const char* chars) const; + virtual bool canEncode( QChar ) const; + virtual bool canEncode( const QString& ) const; + + virtual int heuristicContentMatch(const char* chars, int len) const = 0; + virtual int heuristicNameMatch(const char* hint) const; + +protected: + QTextCodec(); + static int simpleHeuristicNameMatch(const char* name, const char* hint); +}; +#endif // QT_NO_TEXTCODEC +#endif // QTEXTCODEC_H Index: branches/xZenu/src/util/doxygen/qtools/qstrlist.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qstrlist.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qstrlist.doc (revision 1322) @@ -0,0 +1,5 @@ +/**************************************************************************** +** +*****************************************************************************/ + +//typedef QListIterator QStrListIterator; Index: branches/xZenu/src/util/doxygen/qtools/qdict.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qdict.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qdict.h (revision 1322) @@ -0,0 +1,116 @@ +/**************************************************************************** +** +** +** Definition of QDict template class +** +** Created : 920821 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QDICT_H +#define QDICT_H + +#ifndef QT_H +#include "qgdict.h" +#endif // QT_H + +#define USE_ASCII_STRING + +#ifdef USE_ASCII_STRING + +#define QAsciiDict QDict +#define QAsciiDictIterator QDictIterator +#include "qasciidict.h" + +#else + +template class Q_EXPORT QDict : public QGDict +{ +public: + QDict(int size=17, bool caseSensitive=TRUE) + : QGDict(size,StringKey,caseSensitive,FALSE) {} + QDict( const QDict &d ) : QGDict(d) {} + ~QDict() { clear(); } + QDict &operator=(const QDict &d) + { return (QDict&)QGDict::operator=(d); } + uint count() const { return QGDict::count(); } + uint size() const { return QGDict::size(); } + bool isEmpty() const { return QGDict::count() == 0; } + + void insert( const QString &k, const type *d ) + { QGDict::look_string(k,(Item)d,1); } + void replace( const QString &k, const type *d ) + { QGDict::look_string(k,(Item)d,2); } + bool remove( const QString &k ) { return QGDict::remove_string(k); } + type *take( const QString &k ) { return (type *)QGDict::take_string(k); } + type *find( const QString &k ) const + { return (type *)((QGDict*)this)->QGDict::look_string(k,0,0); } + type *operator[]( const QString &k ) const + { return (type *)((QGDict*)this)->QGDict::look_string(k,0,0); } + + void clear() { QGDict::clear(); } + void resize( uint n ) { QGDict::resize(n); } + void statistics() const { QGDict::statistics(); } +private: + void deleteItem( Item d ); +}; + +#if defined(Q_DELETING_VOID_UNDEFINED) +template<> inline void QDict::deleteItem( Item ) +{ +} +#endif + +template inline void QDict::deleteItem( QCollection::Item d ) +{ + if ( del_item ) delete (type *)d; +} + + +template class Q_EXPORT QDictIterator : public QGDictIterator +{ +public: + QDictIterator(const QDict &d) :QGDictIterator((QGDict &)d) {} + ~QDictIterator() {} + uint count() const { return dict->count(); } + bool isEmpty() const { return dict->count() == 0; } + type *toFirst() { return (type *)QGDictIterator::toFirst(); } + operator type *() const { return (type *)QGDictIterator::get(); } + type *current() const { return (type *)QGDictIterator::get(); } + QString currentKey() const{ return QGDictIterator::getKeyString(); } + type *operator()() { return (type *)QGDictIterator::operator()(); } + type *operator++() { return (type *)QGDictIterator::operator++(); } + type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);} +}; + +#endif // USE_ASCII_STRING + +#endif // QDICT_H Index: branches/xZenu/src/util/doxygen/qtools/qstack.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qstack.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qstack.doc (revision 1322) @@ -0,0 +1,135 @@ +/**************************************************************************** +** +** +** QStack class documentation +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + + +/***************************************************************************** + QStack documentation + *****************************************************************************/ + +/*! + \class QStack qstack.h + \brief The QStack class is a template class that provides a stack. + + \ingroup collection + \ingroup tools + + QStack is implemented as a template class. Define a template + instance QStack\ to create a stack that operates on pointers to + X, or X*. + + A stack is a Last In, First Out (LIFO) structure. Items are added to + the top of the stack with push() and retrieved from the top + with pop(). + + \sa \link collection.html Collection Classes\endlink +*/ + +/*! \fn QStack::QStack () + Creates and empty stack. +*/ + +/*! \fn QStack::QStack (const QStack& s) + Creates a stack by making a shallow copy of another stack. +*/ + +/*! \fn QStack::~QStack () + Destroys the stack. All items will be deleted if autoDelete() is TRUE. +*/ + +/*! \fn QStack& QStack::operator= (const QStack& s) + Sets the contents of this stack by making a shallow copy of another stack. + Elements currently in this stack will be deleted if autoDelete() is TRUE. +*/ + +/*! \fn bool QStack::isEmpty () const + Returns TRUE is the stack contains no elements to be \link pop() popped\endlink. +*/ + +/*! \fn void QStack::push (const type* d) + Adds an element to the top of the stack. Last in, first out. +*/ + +/*! \fn type* QStack::pop () + Removes the top item from the stack and returns it. +*/ + +/*! \fn bool QStack::remove () + Removes the top item from the stack and deletes it if + autoDelete() is TRUE. Returns TRUE if there was an item to pop. + + \sa clear() +*/ + +/*! \fn void QStack::clear() + Removes all items from the stack, deleting them if + autoDelete() is TRUE. + + \sa remove() +*/ + +/*! \fn uint QStack::count() const + Returns the number of items in the stack. + + \sa isEmpty() +*/ + +/*! \fn type* QStack::top () const + Returns a reference to the top item on the stack (most recently pushed). + The stack is not changed. +*/ + +/*! \fn QStack::operator type* ()const + Returns a reference to the top item on the stack (most recently pushed). + The stack is not changed. +*/ + +/*! \fn type* QStack::current () const + Returns a reference to the top item on the stack (most recently pushed). + The stack is not changed. +*/ + +/*! \fn bool QStack::autoDelete() const + + The same as QCollection::autoDelete(). + + \sa setAutoDelete() +*/ + +/*! \fn void QStack::setAutoDelete( bool enable ) + + The same as QCollection::setAutoDelete(). + + \sa autoDelete() +*/ Index: branches/xZenu/src/util/doxygen/qtools/qqueue.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qqueue.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qqueue.h (revision 1322) @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** +** Definition of QQueue template/macro class +** +** Created : 920917 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QQUEUE_H +#define QQUEUE_H + +#ifndef QT_H +#include "qglist.h" +#endif // QT_H + + +template class QQueue : private QGList +{ +public: + QQueue() {} + QQueue( const QQueue &q ) : QGList(q) {} + ~QQueue() { clear(); } + QQueue& operator=(const QQueue &q) + { return (QQueue&)QGList::operator=(q); } + bool autoDelete() const { return QCollection::autoDelete(); } + void setAutoDelete( bool del ) { QCollection::setAutoDelete(del); } + uint count() const { return QGList::count(); } + bool isEmpty() const { return QGList::count() == 0; } + void enqueue( const type *d ) { QGList::append(Item(d)); } + type *dequeue() { return (type *)QGList::takeFirst();} + bool remove() { return QGList::removeFirst(); } + void clear() { QGList::clear(); } + type *head() const { return (type *)QGList::cfirst(); } + operator type *() const { return (type *)QGList::cfirst(); } + type *current() const { return (type *)QGList::cfirst(); } +private: + void deleteItem( Item d ) { if ( del_item ) delete (type *)d; } +}; + + +#endif // QQUEUE_H Index: branches/xZenu/src/util/doxygen/qtools/qregexp.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qregexp.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qregexp.cpp (revision 1322) @@ -0,0 +1,1092 @@ +/**************************************************************************** +** +** +** Implementation of QRegExp class +** +** Created : 950126 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qregexp.h" +#include +#include + +// NOT REVISED +/*! + \class QRegExp qregexp.h + \ingroup tools + \ingroup misc + \brief The QRegExp class provides pattern matching using regular + expressions or wildcards. + + QRegExp knows these regexp primitives: +

      +
    • c matches the character 'c' +
    • . matches any character +
    • ^ matches start of input +
    • $ matches end of input +
    • [] matches a defined set of characters - see below. +
    • a* matches a sequence of zero or more a's +
    • a+ matches a sequence of one or more a's +
    • a? matches an optional a +
    • \c escape code for matching special characters such + as \, [, *, +, . etc. +
    • \t matches the TAB character (9) +
    • \n matches newline (10) +
    • \r matches return (13) +
    • \s matches a white space (defined as any character + for which QChar::isSpace() returns TRUE. This includes at least + ASCII characters 9 (TAB), 10 (LF), 11 (VT), 12(FF), 13 (CR) and 32 + (Space)). +
    • \d matches a digit (defined as any character for + which QChar::isDigit() returns TRUE. This includes at least ASCII + characters '0'-'9'). +
    • \x1f6b matches the character with unicode point U1f6b + (hexadecimal 1f6b). \x0012 will match the ASCII/Latin1 character + 0x12 (18 decimal, 12 hexadecimal). +
    • \022 matches the ASCII/Latin1 character 022 (18 + decimal, 22 octal). +
    + + In wildcard mode, it only knows four primitives: +
      +
    • c matches the character 'c' +
    • ? matches any character +
    • * matches any sequence of characters +
    • [] matches a defined set of characters - see below. +
    + + QRegExp supports Unicode both in the pattern strings and in the + strings to be matched. + + When writing regular expressions in C++ code, remember that C++ + processes \ characters. So in order to match e.g. a "." character, + you must write "\\." in C++ source, not "\.". + + A character set matches a defined set of characters. For example, + [BSD] matches any of 'B', 'D' and 'S'. Within a character set, the + special characters '.', '*', '?', '^', '$', '+' and '[' lose their + special meanings. The following special characters apply: +
      +
    • ^ When placed first in the list, changes the + character set to match any character \e not in the list. To include + the character '^' itself in the set, escape it or place it anywhere + but first. +
    • - Defines a range of characters. To include the + character '-' itself in the set, escape it or place it last. +
    • ] Ends the character set definition. To include the + character ']' itself in the set, escape it or place it first (but + after the negation operator '^', if present) +
    + Thus, [a-zA-Z0-9.] matches upper and lower case ASCII letters, + digits and dot; and [^\s] matches everything except white space. + + \bug Case insensitive matching is not supported for non-ASCII/Latin1 + (non-8bit) characters. Any character with a non-zero QChar.row() is + matched case sensitively even if the QRegExp is in case insensitive + mode. + + \note In Qt 3.0, the language of regular expressions will contain + five more special characters, namely '(', ')', '{', '|' and '}'. To + ease porting, it's a good idea to escape these characters with a + backslash in all the regular expressions you'll write from now on. +*/ + + +// +// The regexp pattern is internally represented as an array of uints, +// each element containing an 16-bit character or a 32-bit code +// (listed below). User-defined character classes (e.g. [a-zA-Z]) +// are encoded as this: +// uint no: 1 2 3 ... +// value: CCL | n from | to from | to +// +// where n is the (16-bit) number of following range definitions and +// from and to define the ranges inclusive. from <= to is always true, +// otherwise it is a built-in charclass (Pxx, eg \s - PWS). Single +// characters in the class are coded as from==to. Negated classes +// (e.g. [^a-z]) use CCN instead of CCL. + +const uint END = 0x00000000; +const uint PWS = 0x10010000; // predef charclass: whitespace (\s) +const uint PDG = 0x10020000; // predef charclass: digit (\d) +const uint CCL = 0x20010000; // character class [] +const uint CCN = 0x20020000; // neg character class [^] +const uint CHR = 0x40000000; // character +const uint BOL = 0x80010000; // beginning of line ^ +const uint EOL = 0x80020000; // end of line $ +const uint BOW = 0x80030000; // beginning of word \< +const uint EOW = 0x80040000; // end of word \> +const uint ANY = 0x80050000; // any character . +const uint CLO = 0x80070000; // Kleene closure * +const uint OPT = 0x80080000; // Optional closure ? + +const uint MCC = 0x20000000; // character class bitmask +const uint MCD = 0xffff0000; // code mask +const uint MVL = 0x0000ffff; // value mask + +// +// QRegExp::error codes (internal) +// + +const int PatOk = 0; // pattern ok +const int PatNull = 1; // no pattern defined +const int PatSyntax = 2; // pattern syntax error +const int PatOverflow = 4; // pattern too long + + +/***************************************************************************** + QRegExp member functions + *****************************************************************************/ + +/*! + Constructs an empty regular expression. +*/ + +QRegExp::QRegExp() +{ + rxdata = 0; + cs = TRUE; + wc = FALSE; + error = PatOk; +} + +/*! + Constructs a regular expression. + + \arg \e pattern is the regular expression pattern string. + \arg \e caseSensitive specifies whether or not to use case sensitive + matching. + \arg \e wildcard specifies whether the pattern string should be used for + wildcard matching (also called globbing expression), normally used for + matching file names. + + \sa setWildcard() +*/ + +QRegExp::QRegExp( const QCString &pattern, bool caseSensitive, bool wildcard ) +{ + rxstring = pattern; + rxdata = 0; + cs = caseSensitive; + wc = wildcard; + compile(); +} + +/*! + Constructs a regular expression which is a copy of \e r. + \sa operator=(const QRegExp&) +*/ + +QRegExp::QRegExp( const QRegExp &r ) +{ + rxstring = r.pattern(); + rxdata = 0; + cs = r.caseSensitive(); + wc = r.wildcard(); + compile(); +} + +/*! + Destructs the regular expression and cleans up its internal data. +*/ + +QRegExp::~QRegExp() +{ + if ( rxdata ) // Avoid purify complaints + delete [] rxdata; +} + +/*! + Copies the regexp \e r and returns a reference to this regexp. + The case sensitivity and wildcard options are copied, as well. +*/ + +QRegExp &QRegExp::operator=( const QRegExp &r ) +{ + rxstring = r.rxstring; + cs = r.cs; + wc = r.wc; + compile(); + return *this; +} + +/*! + \obsolete + Consider using setPattern() instead of this method. + + Sets the pattern string to \e pattern and returns a reference to this regexp. + The case sensitivity or wildcard options do not change. +*/ + +QRegExp &QRegExp::operator=( const QCString &pattern ) +{ + rxstring = pattern; + compile(); + return *this; +} + + +/*! + Returns TRUE if this regexp is equal to \e r. + + Two regexp objects are equal if they have equal pattern strings, + case sensitivity options and wildcard options. +*/ + +bool QRegExp::operator==( const QRegExp &r ) const +{ + return rxstring == r.rxstring && cs == r.cs && wc == r.wc; +} + +/*! + \fn bool QRegExp::operator!=( const QRegExp &r ) const + + Returns TRUE if this regexp is \e not equal to \e r. + + \sa operator==() +*/ + +/*! + \fn bool QRegExp::isEmpty() const + Returns TRUE if the regexp is empty. +*/ + +/*! + \fn bool QRegExp::isValid() const + Returns TRUE if the regexp is valid, or FALSE if it is invalid. + + The pattern "[a-z" is an example of an invalid pattern, since it lacks a + closing bracket. +*/ + + +/*! + \fn bool QRegExp::wildcard() const + Returns TRUE if wildcard mode is on, otherwise FALSE. \sa setWildcard(). +*/ + +/*! + Sets the wildcard option for the regular expression. The default + is FALSE. + + Setting \e wildcard to TRUE makes it convenient to match filenames + instead of plain text. + + For example, "qr*.cpp" matches the string "qregexp.cpp" in wildcard mode, + but not "qicpp" (which would be matched in normal mode). + + \sa wildcard() +*/ + +void QRegExp::setWildcard( bool wildcard ) +{ + if ( wildcard != wc ) { + wc = wildcard; + compile(); + } +} + +/*! + \fn bool QRegExp::caseSensitive() const + + Returns TRUE if case sensitivity is enabled, otherwise FALSE. The + default is TRUE. + + \sa setCaseSensitive() +*/ + +/*! + Enables or disables case sensitive matching. + + In case sensitive mode, "a.e" matches "axe" but not "Axe". + + See also: caseSensitive() +*/ + +void QRegExp::setCaseSensitive( bool enable ) +{ + if ( cs != enable ) { + cs = enable; + compile(); + } +} + + +/*! + \fn QCString QRegExp::pattern() const + Returns the pattern string of the regexp. +*/ + + +/*! + \fn void QRegExp::setPattern(const QCString & pattern) + Sets the pattern string to \a pattern and returns a reference to this regexp. + The case sensitivity or wildcard options do not change. +*/ + +static inline bool iswordchar( int x ) +{ + return isalnum(x) || x == '_'; //# Only 8-bit support +} + + +/*! + \internal + Match character class +*/ + +static bool matchcharclass( uint *rxd, char c ) +{ + uint *d = rxd; + uint clcode = *d & MCD; + bool neg = clcode == CCN; + if ( clcode != CCL && clcode != CCN) + qWarning("QRegExp: Internal error, please report to qt-bugs@trolltech.com"); + uint numFields = *d & MVL; + uint cval = (uint)c; //(((uint)(c.row())) << 8) | ((uint)c.cell()); + bool found = FALSE; + for ( int i = 0; i < (int)numFields; i++ ) { + d++; + if ( *d == PWS && isspace(c) ) { + found = TRUE; + break; + } + if ( *d == PDG && isdigit(c) ) { + found = TRUE; + break; + } + else { + uint from = ( *d & MCD ) >> 16; + uint to = *d & MVL; + if ( (cval >= from) && (cval <= to) ) { + found = TRUE; + break; + } + } + } + return neg ? !found : found; +} + + + +/* + Internal: Recursively match string. +*/ + +static int matchstring( uint *rxd, const char *str, uint strlength, + const char *bol, bool cs ) +{ + const char *p = str; + const char *start = p; + uint pl = strlength; + uint *d = rxd; + + //### in all cases here: handle pl == 0! (don't read past strlen) + while ( *d ) { + if ( *d & CHR ) { // match char + if ( !pl ) + return -1; + char c = *d; + if ( !cs /*&& !c.row()*/ ) { // case insensitive, #Only 8bit + if ( tolower(*p) != c ) + return -1; + p++; + pl--; + } else { // case insensitive + if ( *p != c ) + return -1; + p++; + pl--; + } + d++; + } + else if ( *d & MCC ) { // match char class + if ( !pl ) + return -1; + if ( !matchcharclass( d, *p ) ) + return -1; + p++; + pl--; + d += (*d & MVL) + 1; + } + else switch ( *d++ ) { + case PWS: // match whitespace + if ( !pl || !isspace(*p) ) + return -1; + p++; + pl--; + break; + case PDG: // match digits + if ( !pl || !isdigit(*p) ) + return -1; + p++; + pl--; + break; + case ANY: // match anything + if ( !pl ) + return -1; + p++; + pl--; + break; + case BOL: // match beginning of line + if ( p != bol ) + return -1; + break; + case EOL: // match end of line + if ( pl ) + return -1; + break; + case BOW: // match beginning of word + if ( !iswordchar(*p) || (p > bol && iswordchar(*(p-1)) ) ) + return -1; + break; + case EOW: // match end of word + if ( iswordchar(*p) || p == bol || !iswordchar(*(p-1)) ) + return -1; + break; + case CLO: // Kleene closure + { + const char *first_p = p; + if ( *d & CHR ) { // match char + char c = *d; + if ( !cs /*&& !c.row()*/ ) { // case insensitive, #only 8bit + while ( pl /*&& !p->row()*/ && tolower(*p)==c ) { + p++; + pl--; + } + } + else { // case sensitive + while ( pl && *p == c ) { + p++; + pl--; + } + } + d++; + } + else if ( *d & MCC ) { // match char class + while( pl && matchcharclass( d, *p ) ) { + p++; + pl--; + } + d += (*d & MVL) + 1; + } + else if ( *d == PWS ) { + while ( pl && isspace(*p) ) { + p++; + pl--; + } + d++; + } + else if ( *d == PDG ) { + while ( pl && isdigit(*p) ) { + p++; + pl--; + } + d++; + } + else if ( *d == ANY ) { + p += pl; + pl = 0; + d++; + } + else { + return -1; // error + } + d++; // skip CLO's END + while ( p >= first_p ) { // go backwards + int end = matchstring( d, p, pl, bol, cs ); + if ( end >= 0 ) + return ( p - start ) + end; + if ( !p ) + return -1; + --p; + ++pl; + } + } + return -1; + case OPT: // optional closure + { + const char *first_p = p; + if ( *d & CHR ) { // match char + char c = *d; + if ( !cs /*&& !c.row()*/ ) { // case insensitive, #only 8bit + if ( pl && /*!p->row() &&*/ tolower(*p) == c ) { + p++; + pl--; + } + } + else { // case sensitive + if ( pl && *p == c ) { + p++; + pl--; + } + } + d++; + } + else if ( *d & MCC ) { // match char class + if ( pl && matchcharclass( d, *p ) ) { + p++; + pl--; + } + d += (*d & MVL) + 1; + } + else if ( *d == PWS ) { + if ( pl && isspace(*p) ) { + p++; + pl--; + } + d++; + } + else if ( *d == PDG ) { + if ( pl && isdigit(*p) ) { + p++; + pl--; + } + d++; + } + else if ( *d == ANY ) { + if ( pl ) { + p++; + pl--; + } + d++; + } + else { + return -1; // error + } + d++; // skip OPT's END + while ( p >= first_p ) { // go backwards + int end = matchstring( d, p, pl, bol, cs ); + if ( end >= 0 ) + return ( p - start ) + end; + if ( !p ) + return -1; + --p; + ++pl; + } + } + return -1; + + default: // error + return -1; + } + } + return p - start; +} + + +/*! + \internal + Recursively match string. +*/ + +// This is obsolete now, but since it is protected (not private), it +// is still implemented on the off-chance that somebody has made a +// class derived from QRegExp and calls this directly. +// Qt 3.0: Remove this? + +#if 0 +const char *QRegExp::matchstr( uint *rxd, const QChar *str, uint strlength, + const QChar *bol ) const +{ + int len = matchstring( rxd, str, strlength, bol, cs ); + if ( len < 0 ) + return 0; + return str + len; +} +#endif + +/*! + Attempts to match in \e str, starting from position \e index. + Returns the position of the match, or -1 if there was no match. + + If \e len is not a null pointer, the length of the match is stored in + \e *len. + + If \e indexIsStart is TRUE (the default), the position \e index in + the string will match the start-of-input primitive (^) in the + regexp, if present. Otherwise, position 0 in \e str will match. + + Example: + \code + QRegExp r("[0-9]*\\.[0-9]+"); // matches floating point + int len; + r.match("pi = 3.1416", 0, &len); // returns 5, len == 6 + \endcode + + \note In Qt 3.0, this function will be replaced by find(). +*/ + +int QRegExp::match( const QCString &str, int index, int *len, + bool indexIsStart ) const +{ + if ( !isValid() || isEmpty() ) + return -1; + if ( str.length() < (uint)index ) + return -1; + const char *start = str.data(); + const char *p = start + index; + uint pl = str.length() - index; + uint *d = rxdata; + int ep = -1; + + if ( *d == BOL ) { // match from beginning of line + ep = matchstring( d, p, pl, indexIsStart ? p : start, cs ); + } else { + if ( *d & CHR ) { + char c = *d; + if ( !cs /*&& !c.row()*/ ) { // case sensitive, # only 8bit + while ( pl && ( /*p->row() ||*/ tolower(*p) != c ) ) { + p++; + pl--; + } + } else { // case insensitive + while ( pl && *p != c ) { + p++; + pl--; + } + } + } + while( 1 ) { // regular match + ep = matchstring( d, p, pl, indexIsStart ? start+index : start, cs ); + if ( ep >= 0 ) + break; + if ( !pl ) + break; + p++; + pl--; + } + } + if ( len ) + *len = ep >= 0 ? ep : 0; // No match -> 0, for historical reasons + return ep >= 0 ? (int)(p - start) : -1; // return index; +} + +/*! \fn int QRegExp::find( const QCString& str, int index ) + + Attempts to match in \e str, starting from position \e index. + Returns the position of the match, or -1 if there was no match. + + \sa match() +*/ + +// +// Translate wildcard pattern to standard regexp pattern. +// Ex: *.cpp ==> ^.*\.cpp$ +// + +static QCString wc2rx( const QCString &pattern ) +{ + int patlen = (int)pattern.length(); + QCString wcpattern("^"); + + char c; + for( int i = 0; i < patlen; i++ ) { + c = pattern[i]; + switch ( (char)c ) { + case '*': // '*' ==> '.*' + wcpattern += '.'; + break; + case '?': // '?' ==> '.' + c = '.'; + break; + case '.': // quote special regexp chars + case '+': + case '\\': + case '$': + case '^': + wcpattern += '\\'; + break; + case '[': + if ( (char)pattern[i+1] == '^' ) { // don't quote '^' after '[' + wcpattern += '['; + c = pattern[i+1]; + i++; + } + break; + } + wcpattern += c; + + } + wcpattern += '$'; + return wcpattern; // return new regexp pattern +} + + +// +// Internal: Get char value and increment pointer. +// + +static uint char_val( const char **str, uint *strlength ) // get char value +{ + const char *p = *str; + uint pl = *strlength; + uint len = 1; + uint v = 0; + if ( (char)*p == '\\' ) { // escaped code + p++; + pl--; + if ( !pl ) { // it is just a '\' + (*str)++; + (*strlength)--; + return '\\'; + } + len++; // length at least 2 + int i; + char c; + char ch = tolower((char)*p); + switch ( ch ) { + case 'b': v = '\b'; break; // bell + case 'f': v = '\f'; break; // form feed + case 'n': v = '\n'; break; // newline + case 'r': v = '\r'; break; // return + case 't': v = '\t'; break; // tab + case 's': v = PWS; break; // whitespace charclass + case 'd': v = PDG; break; // digit charclass + case '<': v = BOW; break; // word beginning matcher + case '>': v = EOW; break; // word ending matcher + + case 'x': { // hex code + p++; + pl--; + for ( i = 0; (i < 4) && pl; i++ ) { //up to 4 hex digits + c = tolower((char)*p); + bool a = ( c >= 'a' && c <= 'f' ); + if ( (c >= '0' && c <= '9') || a ) { + v <<= 4; + v += a ? 10 + c - 'a' : c - '0'; + len++; + } + else { + break; + } + p++; + pl--; + } + } + break; + + default: { + if ( ch >= '0' && ch <= '7' ) { //octal code + len--; + for ( i = 0; (i < 3) && pl; i++ ) { // up to 3 oct digits + c = (char)*p; + if ( c >= '0' && c <= '7' ) { + v <<= 3; + v += c - '0'; + len++; + } + else { + break; + } + p++; + pl--; + } + } + else { // not an octal number + v = (uint)*p; //(((uint)(p->row())) << 8) | ((uint)p->cell()); + } + } + } + } else { + v = (uint)*p; //(((uint)(p->row())) << 8) | ((uint)p->cell()); + } + *str += len; + *strlength -= len; + return v; +} + + +#if defined(DEBUG) +static uint *dump( uint *p ) +{ + while ( *p != END ) { + if ( *p & CHR ) { + uchar uc = (uchar)*p; + char c = (char)uc; + uint u = (uint)uc; //(((uint)(uc.row())) << 8) | ((uint)uc.cell()); + qDebug( "\tCHR\tU%04x (%c)", u, (c ? c : ' ')); + p++; + } + else if ( *p & MCC ) { + uint clcode = *p & MCD; + uint numFields = *p & MVL; + if ( clcode == CCL ) + qDebug( "\tCCL\t%i", numFields ); + else if ( clcode == CCN ) + qDebug( "\tCCN\t%i", numFields ); + else + qDebug("coding error!"); + for ( int i = 0; i < (int)numFields; i++ ) { + p++; + if ( *p == PWS ) + qDebug( "\t\tPWS" ); + else if ( *p == PDG ) + qDebug( "\t\tPDG" ); + else { + uint from = ( *p & MCD ) >> 16; + uint to = *p & MVL; + char fc = (char)from; + char tc = (char)to; + qDebug( "\t\tU%04x (%c) - U%04x (%c)", from, + (fc ? fc : ' '), to, (tc ? tc : ' ') ); + } + } + p++; + } + else switch ( *p++ ) { + case PWS: + qDebug( "\tPWS" ); + break; + case PDG: + qDebug( "\tPDG" ); + break; + case BOL: + qDebug( "\tBOL" ); + break; + case EOL: + qDebug( "\tEOL" ); + break; + case BOW: + qDebug( "\tBOW" ); + break; + case EOW: + qDebug( "\tEOW" ); + break; + case ANY: + qDebug( "\tANY" ); + break; + case CLO: + qDebug( "\tCLO" ); + p = dump( p ); + break; + case OPT: + qDebug( "\tOPT" ); + p = dump( p ); + break; + } + } + qDebug( "\tEND" ); + return p+1; +} +#endif // DEBUG + + +static const int maxlen = 1024; // max length of regexp array +static uint rxarray[ maxlen ]; // tmp regexp array + +/*! + \internal + Compiles the regular expression and stores the result in rxdata. + The 'error' flag is set to non-zero if an error is detected. + NOTE! This function is not reentrant! +*/ + +void QRegExp::compile() +{ + if ( rxdata ) { // delete old data + delete [] rxdata; + rxdata = 0; + } + if ( rxstring.isEmpty() ) { // no regexp pattern set + error = PatNull; + return; + } + + error = PatOk; // assume pattern is ok + + QCString pattern; + if ( wc ) + pattern = wc2rx(rxstring); + else + pattern = rxstring; + const char *start = pattern.data(); // pattern pointer + const char *p = start; // pattern pointer + uint pl = pattern.length(); + uint *d = rxarray; // data pointer + uint *prev_d = 0; + +#define GEN(x) *d++ = (x) + + while ( pl ) { + char ch = (char)*p; + switch ( ch ) { + + case '^': // beginning of line + prev_d = d; + GEN( p == start ? BOL : (CHR | ch) ); + p++; + pl--; + break; + + case '$': // end of line + prev_d = d; + GEN( pl == 1 ? EOL : (CHR | ch) ); + p++; + pl--; + break; + + case '.': // any char + prev_d = d; + GEN( ANY ); + p++; + pl--; + break; + + case '[': // character class + { + prev_d = d; + p++; + pl--; + if ( !pl ) { + error = PatSyntax; + return; + } + bool firstIsEscaped = ( (char)*p == '\\' ); + uint cch = char_val( &p, &pl ); + if ( cch == '^' && !firstIsEscaped ) { // negate! + GEN( CCN ); + if ( !pl ) { + error = PatSyntax; + return; + } + cch = char_val( &p, &pl ); + } else { + GEN( CCL ); + } + uint numFields = 0; + while ( pl ) { + if ((pl>2) && ((char)*p == '-') && ((char)*(p+1) != ']')) { + // Found a range + char_val( &p, &pl ); // Read the '-' + uint cch2 = char_val( &p, &pl ); // Read the range end + if ( cch > cch2 ) { // swap start and stop + int tmp = cch; + cch = cch2; + cch2 = tmp; + } + GEN( (cch << 16) | cch2 ); // from < to + numFields++; + } + else { + // Found a single character + if ( cch & MCD ) // It's a code; will not be mistaken + GEN( cch ); // for a range, since from > to + else + GEN( (cch << 16) | cch ); // from == to range + numFields++; + } + if ( d >= rxarray + maxlen ) { // pattern too long + error = PatOverflow; + return; + } + if ( !pl ) { // At least ']' should be left + error = PatSyntax; + return; + } + bool nextIsEscaped = ( (char)*p == '\\' ); + cch = char_val( &p, &pl ); + if ( cch == (uint)']' && !nextIsEscaped ) + break; + if ( !pl ) { // End, should have seen ']' + error = PatSyntax; + return; + } + } + *prev_d |= numFields; // Store number of fields + } + break; + + case '*': // Kleene closure, or + case '+': // positive closure, or + case '?': // optional closure + { + if ( prev_d == 0 ) { // no previous expression + error = PatSyntax; // empty closure + return; + } + switch ( *prev_d ) { // test if invalid closure + case BOL: + case BOW: + case EOW: + case CLO: + case OPT: + error = PatSyntax; + return; + } + int ddiff = d - prev_d; + if ( *p == '+' ) { // convert to Kleene closure + if ( d + ddiff >= rxarray + maxlen ) { + error = PatOverflow; // pattern too long + return; + } + memcpy( d, prev_d, ddiff*sizeof(uint) ); + d += ddiff; + prev_d += ddiff; + } + memmove( prev_d+1, prev_d, ddiff*sizeof(uint) ); + *prev_d = ch == '?' ? OPT : CLO; + d++; + GEN( END ); + p++; + pl--; + } + break; + + default: + { + prev_d = d; + uint cv = char_val( &p, &pl ); + if ( cv & MCD ) { // It's a code + GEN( cv ); + } + else { + if ( !cs && cv <= 0xff ) // #only 8bit support + cv = tolower( cv ); + GEN( CHR | cv ); + } + } + } + if ( d >= rxarray + maxlen ) { // oops! + error = PatOverflow; // pattern too long + return; + } + } + GEN( END ); + int len = d - rxarray; + rxdata = new uint[ len ]; // copy from rxarray to rxdata + CHECK_PTR( rxdata ); + memcpy( rxdata, rxarray, len*sizeof(uint) ); +#if defined(DEBUG) + //dump( rxdata ); // uncomment this line for debugging +#endif +} Index: branches/xZenu/src/util/doxygen/qtools/qfileinfo.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qfileinfo.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qfileinfo.cpp (revision 1322) @@ -0,0 +1,458 @@ +/**************************************************************************** +** +** +** Implementation of QFileInfo class +** +** Created : 950628 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qglobal.h" + +#include "qfileinfo.h" +#include "qfiledefs_p.h" +#include "qdatetime.h" +#include "qdir.h" + +extern bool qt_file_access( const QString& fn, int t ); + +// NOT REVISED +/*! + \class QFileInfo qfileinfo.h + \brief The QFileInfo class provides system-independent file information. + + \ingroup io + + QFileInfo provides information about a file's name and position (path) in + the file system, its access rights and whether it is a directory or a + symbolic link. Its size and last modified/read times are also available. + + To speed up performance QFileInfo caches information about the file. Since + files can be changed by other users or programs, or even by other parts of + the same program there is a function that refreshes the file information; + refresh(). If you would rather like a QFileInfo to access the file system + every time you request information from it, you can call the function + setCaching( FALSE ). + + A QFileInfo can point to a file using either a relative or an absolute + file path. Absolute file paths begin with the directory separator + ('/') or a drive specification (not applicable to UNIX). + Relative file names begin with a directory name or a file name and specify + a path relative to the current directory. An example of + an absolute path is the string "/tmp/quartz". A relative path might look like + "src/fatlib". You can use the function isRelative() to check if a QFileInfo + is using a relative or an absolute file path. You can call the function + convertToAbs() to convert a relative QFileInfo to an absolute one. + + If you need to read and traverse directories, see the QDir class. +*/ + + +/*! + Constructs a new empty QFileInfo. +*/ + +QFileInfo::QFileInfo() +{ + fic = 0; + cache = TRUE; +} + +/*! + Constructs a new QFileInfo that gives information about the given file. + The string given can be an absolute or a relative file path. + + \sa bool setFile(QString ), isRelative(), QDir::setCurrent(), + QDir::isRelativePath() +*/ + +QFileInfo::QFileInfo( const QString &file ) +{ + fn = file; + slashify( fn ); + fic = 0; + cache = TRUE; +} + +/*! + Constructs a new QFileInfo that gives information about \e file. + + If the file has a relative path, the QFileInfo will also have one. + + \sa isRelative() +*/ + +QFileInfo::QFileInfo( const QFile &file ) +{ + fn = file.name(); + slashify( fn ); + fic = 0; + cache = TRUE; +} + +/*! + Constructs a new QFileInfo that gives information about the file + named \e fileName in the directory \e d. + + If the directory has a relative path, the QFileInfo will also have one. + + \sa isRelative() +*/ +#ifndef QT_NO_DIR +QFileInfo::QFileInfo( const QDir &d, const QString &fileName ) +{ + fn = d.filePath( fileName ); + slashify( fn ); + fic = 0; + cache = TRUE; +} +#endif +/*! + Constructs a new QFileInfo that is a copy of \e fi. +*/ + +QFileInfo::QFileInfo( const QFileInfo &fi ) +{ + fn = fi.fn; + if ( fi.fic ) { + fic = new QFileInfoCache; + *fic = *fi.fic; + } else { + fic = 0; + } + cache = fi.cache; +} + +/*! + Destructs the QFileInfo. +*/ + +QFileInfo::~QFileInfo() +{ + delete fic; +} + + +/*! + Makes a copy of \e fi and assigns it to this QFileInfo. +*/ + +QFileInfo &QFileInfo::operator=( const QFileInfo &fi ) +{ + fn = fi.fn; + if ( !fi.fic ) { + delete fic; + fic = 0; + } else { + if ( !fic ) { + fic = new QFileInfoCache; + CHECK_PTR( fic ); + } + *fic = *fi.fic; + } + cache = fi.cache; + return *this; +} + + +/*! + Sets the file to obtain information about. + + The string given can be an absolute or a relative file path. Absolute file + paths begin with the directory separator (e.g. '/' under UNIX) or a drive + specification (not applicable to UNIX). Relative file names begin with a + directory name or a file name and specify a path relative to the current + directory. + + Example: + \code + #include + #include + + void test() + { + QString absolute = "/liver/aorta"; + QString relative = "liver/aorta"; + QFileInfo fi1( absolute ); + QFileInfo fi2( relative ); + + QDir::setCurrent( QDir::rootDirPath() ); + // fi1 and fi2 now point to the same file + + QDir::setCurrent( "/tmp" ); + // fi1 now points to "/liver/aorta", + // while fi2 points to "/tmp/liver/aorta" + } + \endcode + + \sa isRelative(), QDir::setCurrent(), QDir::isRelativePath() +*/ + +void QFileInfo::setFile( const QString &file ) +{ + fn = file; + slashify( fn ); + delete fic; + fic = 0; +} + +/*! + Sets the file to obtain information about. + + If the file has a relative path, the QFileInfo will also have one. + + \sa isRelative() +*/ + +void QFileInfo::setFile( const QFile &file ) +{ + fn = file.name(); + slashify( fn ); + delete fic; + fic = 0; +} + +/*! + Sets the file to obtains information about to \e fileName in the + directory \e d. + + If the directory has a relative path, the QFileInfo will also have one. + + \sa isRelative() +*/ +#ifndef QT_NO_DIR +void QFileInfo::setFile( const QDir &d, const QString &fileName ) +{ + fn = d.filePath( fileName ); + slashify( fn ); + delete fic; + fic = 0; +} +#endif + +/*! + Returns TRUE if the file pointed to exists, otherwise FALSE. +*/ + +bool QFileInfo::exists() const +{ + return qt_file_access( fn, F_OK ); +} + +/*! + Refresh the information about the file, i.e. read in information from the + file system the next time a cached property is fetched. + + \sa setCaching() +*/ + +void QFileInfo::refresh() const +{ + QFileInfo *that = (QFileInfo*)this; // Mutable function + delete that->fic; + that->fic = 0; +} + +/*! + \fn bool QFileInfo::caching() const + Returns TRUE if caching is enabled. + \sa setCaching(), refresh() +*/ + +/*! + Enables caching of file information if \e enable is TRUE, or disables it + if \e enable is FALSE. + + When caching is enabled, QFileInfo reads the file information the first + time + + Caching is enabled by default. + + \sa refresh(), caching() +*/ + +void QFileInfo::setCaching( bool enable ) +{ + if ( cache == enable ) + return; + cache = enable; + if ( cache ) { + delete fic; + fic = 0; + } +} + + +/*! + Returns the name, i.e. the file name including the path (which can be + absolute or relative). + + \sa isRelative(), absFilePath() +*/ + +QString QFileInfo::filePath() const +{ + return fn; +} + +/*! + Returns the base name of the file. + + The base name consists of all characters in the file name up to (but not + including) the first '.' character. The path is not included. + + Example: + \code + QFileInfo fi( "/tmp/abdomen.lower" ); + QString base = fi.baseName(); // base = "abdomen" + \endcode + + \sa fileName(), extension() +*/ + +QString QFileInfo::baseName() const +{ + QString tmp = fileName(); + int pos = tmp.find( '.' ); + if ( pos == -1 ) + return tmp; + else + return tmp.left( pos ); +} + +/*! + Returns the extension name of the file. + + If \a complete is TRUE (the default), extension() returns the string + of all characters in the file name after (but not including) the + first '.' character. For a file named "archive.tar.gz" this + returns "tar.gz". + + If \a complete is FALSE, extension() returns the string of all + characters in the file name after (but not including) the last '.' + character. For a file named "archive.tar.gz" this returns "gz". + + Example: + \code + QFileInfo fi( "lex.yy.c" ); + QString ext = fi.extension(); // ext = "yy.c" + QString ext = fi.extension( FALSE ); // ext = "c" + \endcode + + \sa fileName(), baseName() + +*/ + +QString QFileInfo::extension( bool complete ) const +{ + QString s = fileName(); + int pos = complete ? s.find( '.' ) : s.findRev( '.' ); + if ( pos < 0 ) + return QString::fromLatin1( "" ); + else + return s.right( s.length() - pos - 1 ); +} + +/*! + Returns the directory path of the file. + + If the QFileInfo is relative and \e absPath is FALSE, the QDir will be + relative, otherwise it will be absolute. + + \sa dirPath(), filePath(), fileName(), isRelative() +*/ +#ifndef QT_NO_DIR +QDir QFileInfo::dir( bool absPath ) const +{ + return QDir( dirPath(absPath) ); +} +#endif + + +/*! + Returns TRUE if the file is readable. + \sa isWritable(), isExecutable(), permission() +*/ + +bool QFileInfo::isReadable() const +{ + return qt_file_access( fn, R_OK ); +} + +/*! + Returns TRUE if the file is writable. + \sa isReadable(), isExecutable(), permission() +*/ + +bool QFileInfo::isWritable() const +{ + return qt_file_access( fn, W_OK ); +} + +/*! + Returns TRUE if the file is executable. + \sa isReadable(), isWritable(), permission() +*/ + +bool QFileInfo::isExecutable() const +{ + return qt_file_access( fn, X_OK ); +} + + +/*! + Returns TRUE if the file path name is relative to the current directory, + FALSE if the path is absolute (e.g. under UNIX a path is relative if it + does not start with a '/'). + + According to Einstein this function should always return TRUE. +*/ +#ifndef QT_NO_DIR +bool QFileInfo::isRelative() const +{ + return QDir::isRelativePath( fn ); +} + +/*! + Converts the file path name to an absolute path. + + If it is already absolute nothing is done. + + \sa filePath(), isRelative() +*/ + +bool QFileInfo::convertToAbs() +{ + if ( isRelative() ) + fn = absFilePath(); + return QDir::isRelativePath( fn ); +} +#endif Index: branches/xZenu/src/util/doxygen/qtools/qiodevice.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qiodevice.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qiodevice.h (revision 1322) @@ -0,0 +1,155 @@ +/**************************************************************************** +** +** +** Definition of QIODevice class +** +** Created : 940913 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QIODEVICE_H +#define QIODEVICE_H + +#ifndef QT_H +#include "qglobal.h" +#include "qcstring.h" +#endif // QT_H + + +// IO device access types + +#define IO_Direct 0x0100 // direct access device +#define IO_Sequential 0x0200 // sequential access device +#define IO_Combined 0x0300 // combined direct/sequential +#define IO_TypeMask 0x0f00 + +// IO handling modes + +#define IO_Raw 0x0040 // raw access (not buffered) +#define IO_Async 0x0080 // asynchronous mode + +// IO device open modes + +#define IO_ReadOnly 0x0001 // readable device +#define IO_WriteOnly 0x0002 // writable device +#define IO_ReadWrite 0x0003 // read+write device +#define IO_Append 0x0004 // append +#define IO_Truncate 0x0008 // truncate device +#define IO_Translate 0x0010 // translate CR+LF +#define IO_ModeMask 0x00ff + +// IO device state + +#define IO_Open 0x1000 // device is open +#define IO_StateMask 0xf000 + + +// IO device status + +#define IO_Ok 0 +#define IO_ReadError 1 // read error +#define IO_WriteError 2 // write error +#define IO_FatalError 3 // fatal unrecoverable error +#define IO_ResourceError 4 // resource limitation +#define IO_OpenError 5 // cannot open device +#define IO_ConnectError 5 // cannot connect to device +#define IO_AbortError 6 // abort error +#define IO_TimeOutError 7 // time out +#define IO_UnspecifiedError 8 // unspecified error + +class Q_EXPORT QIODevice // IO device class +{ +public: + QIODevice(); + virtual ~QIODevice(); + + int flags() const { return ioMode; } + int mode() const { return ioMode & IO_ModeMask; } + int state() const { return ioMode & IO_StateMask; } + + bool isDirectAccess() const { return ((ioMode & IO_Direct) == IO_Direct); } + bool isSequentialAccess() const { return ((ioMode & IO_Sequential) == IO_Sequential); } + bool isCombinedAccess() const { return ((ioMode & IO_Combined) == IO_Combined); } + bool isBuffered() const { return ((ioMode & IO_Raw) != IO_Raw); } + bool isRaw() const { return ((ioMode & IO_Raw) == IO_Raw); } + bool isSynchronous() const { return ((ioMode & IO_Async) != IO_Async); } + bool isAsynchronous() const { return ((ioMode & IO_Async) == IO_Async); } + bool isTranslated() const { return ((ioMode & IO_Translate) == IO_Translate); } + bool isReadable() const { return ((ioMode & IO_ReadOnly) == IO_ReadOnly); } + bool isWritable() const { return ((ioMode & IO_WriteOnly) == IO_WriteOnly); } + bool isReadWrite() const { return ((ioMode & IO_ReadWrite) == IO_ReadWrite); } + bool isInactive() const { return state() == 0; } + bool isOpen() const { return state() == IO_Open; } + + int status() const { return ioSt; } + void resetStatus() { ioSt = IO_Ok; } + + 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: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + QIODevice( const QIODevice & ); + QIODevice &operator=( const QIODevice & ); +#endif +}; + + +#endif // QIODEVICE_H Index: branches/xZenu/src/util/doxygen/qtools/qdatetime.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qdatetime.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qdatetime.cpp (revision 1322) @@ -0,0 +1,1434 @@ +/**************************************************************************** +** +** +** Implementation of date and time classes +** +** Created : 940124 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#define gettimeofday __hide_gettimeofday +#include "qdatetime.h" +#include "qdatastream.h" +#include +#include +#if defined(_OS_WIN32_) +#if defined(_CC_BOOL_DEF_) +#undef bool +#include +#define bool int +#else +#include +#endif +#elif defined(_OS_MSDOS_) +#include +#elif defined(_OS_OS2_) +#include +#elif defined(_OS_UNIX_) +#include +#include +#undef gettimeofday +extern "C" int gettimeofday( struct timeval *, struct timezone * ); +#endif + +static const uint FIRST_DAY = 2361222; // Julian day for 1752/09/14 +static const int FIRST_YEAR = 1752; // ### wrong for many countries +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 const short monthDays[] ={0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + +// ##### Localize. + +const char * const QDate::monthNames[] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; + +const char * const QDate::weekdayNames[] ={ + "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" }; + + +/***************************************************************************** + QDate member functions + *****************************************************************************/ + +// REVISED: aavit + +/*! + \class QDate qdatetime.h + \brief The QDate class provides date functions. + + \ingroup time + + A QDate object contains a calendar date, i.e. year, month, and day + numbers in the modern western (Gregorian) calendar. It can read the + current date from the system clock. It provides functions for + comparing dates and for manipulating a date by adding a number of + days. + + A QDate object is typically created either by giving the year, month + and day numbers explicitly, or by using the static function + currentDate(), which makes a QDate object which contains the + system's clock date. An explicit date can also be set using + setYMD(). + + The year(), month(), and day() functions provide access to the year, + month, and day numbers. Also, dayOfWeek() and dayOfYear() functions + are provided. The same information is provided in textual format by + the toString(), dayName(), and monthName() functions. + + QDate provides a full set of operators to compare two QDate + objects. A date is considered smaller than another if it is earlier + than the other. + + The date a given number of days later than a given date can be found + using the addDays() function. Correspondingly, the number of days + between two dates can be found using the daysTo() function. + + The daysInMonth() and daysInYear() functions tell how many days + there are in this date's month and year, respectively. The + isLeapYear() function tells whether this date is in a leap year. + + Note that QDate may not be used for date calculations for dates in + the remote past, i.e. prior to the introduction of the Gregorian + calendar. This calendar was adopted by England Sep. 14. 1752 (hence + this is the earliest valid QDate), and subsequently by most other + western countries, until 1923. + + The end of time is reached around 8000AD, by which time we expect Qt + to be obsolete. + + \sa QTime, QDateTime +*/ + + +/*! + \fn QDate::QDate() + Constructs a null date. Null dates are invalid. + + \sa isNull(), isValid() +*/ + + +/*! + Constructs a date with the year \a y, month \a m and day \a d. + + \a y must be in the range 1752-ca. 8000, \a m must be in the range + 1-12, and \a d must be in the range 1-31. Exception: if \a y is in + the range 0-99, it is interpreted as 1900-1999. + + \sa isValid() +*/ + +QDate::QDate( int y, int m, int d ) +{ + jd = 0; + setYMD( y, m, d ); +} + + +/*! + \fn bool QDate::isNull() const + + Returns TRUE if the date is null. A null date is invalid. + + \sa isValid() +*/ + + +/*! + Returns TRUE if this date is valid. + + \sa isNull() +*/ + +bool QDate::isValid() const +{ + return jd >= FIRST_DAY; +} + + +/*! + Returns the year (>= 1752) of this date. + + \sa month(), day() +*/ + +int QDate::year() const +{ + int y, m, d; + jul2greg( jd, y, m, d ); + return y; +} + +/*! + Returns the month (January=1 .. December=12) of this date. + + \sa year(), day() +*/ + +int QDate::month() const +{ + int y, m, d; + jul2greg( jd, y, m, d ); + return m; +} + +/*! + Returns the day of the month (1..31) of this date. + + \sa year(), month(), dayOfWeek() +*/ + +int QDate::day() const +{ + int y, m, d; + jul2greg( jd, y, m, d ); + return d; +} + +/*! + Returns the weekday (Monday=1 .. Sunday=7) for this date. + + \sa day(), dayOfYear() +*/ + +int QDate::dayOfWeek() const +{ + return (((jd+1) % 7) + 6)%7 + 1; +} + +/*! + Returns the day of the year (1..365) for this date. + + \sa day(), dayOfWeek() +*/ + +int QDate::dayOfYear() const +{ + return jd - greg2jul(year(), 1, 1) + 1; +} + +/*! + Returns the number of days in the month (28..31) for this date. + + \sa day(), daysInYear() +*/ + +int QDate::daysInMonth() const +{ + int y, m, d; + jul2greg( jd, y, m, d ); + if ( m == 2 && leapYear(y) ) + return 29; + else + return monthDays[m]; +} + +/*! + Returns the number of days in the year (365 or 366) for this date. + + \sa day(), daysInMonth() +*/ + +int QDate::daysInYear() const +{ + int y, m, d; + jul2greg( jd, y, m, d ); + return leapYear(y) ? 366 : 365; +} + + +/*! + Returns the name of the \a month. + + Month 1 == "Jan", month 2 == "Feb" etc. + + \sa toString(), dayName() +*/ + +QString QDate::monthName( int month ) const +{ +#if defined(CHECK_RANGE) + if ( month < 1 || month > 12 ) { + qWarning( "QDate::monthName: Parameter out ouf range." ); + month = 1; + } +#endif + // ### Remove the fromLatin1 during localization + return QString::fromLatin1(monthNames[month-1]); +} + +/*! + Returns the name of the \a weekday. + + Weekday 1 == "Mon", day 2 == "Tue" etc. + + \sa toString(), monthName() +*/ + +QString QDate::dayName( int weekday ) const +{ +#if defined(CHECK_RANGE) + if ( weekday < 1 || weekday > 7 ) { + qWarning( "QDate::dayName: Parameter out of range." ); + weekday = 1; + } +#endif + // ### Remove the fromLatin1 during localization + return QString::fromLatin1(weekdayNames[weekday-1]); +} + + +/*! + Returns the date as a string. + + The string format is "Sat May 20 1995". This function uses the + dayName() and monthName() functions to generate the string. + + \sa dayName(), monthName() +*/ + +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; +} + + +/*! + Sets the year \a y, month \a m and day \a d. + + \a y must be in the range 1752-ca. 8000, \a m must be in the range + 1-12, and \a d must be in the range 1-31. Exception: if \a y is in + the range 0-99, it is interpreted as 1900-1999. + + Returns TRUE if the date is valid, otherwise FALSE. +*/ + +bool QDate::setYMD( int y, int m, int d ) +{ + if ( !isValid(y,m,d) ) { +#if defined(CHECK_RANGE) + qWarning( "QDate::setYMD: Invalid date %04d/%02d/%02d", y, m, d ); +#endif + return FALSE; + } + jd = greg2jul( y, m, d ); +#if defined(DEBUG) + ASSERT( year() == (y > 99 ? y : 1900+y) && month() == m && day() == d ); +#endif + return TRUE; +} + +/*! + Returns a QDate object containing a date \a ndays later than the + date of this object (or earlier if \a ndays is negative). + + \sa daysTo() +*/ + +QDate QDate::addDays( int ndays ) const +{ + QDate d; + d.jd = jd + ndays; + return d; +} + +/*! + Returns the number of days from this date to \a d (which is negative + if \a d is earlier than this date). + + Example: + \code + QDate d1( 1995, 5, 17 ); // May 17th 1995 + QDate d2( 1995, 5, 20 ); // May 20th 1995 + d1.daysTo( d2 ); // returns 3 + d2.daysTo( d1 ); // returns -3 + \endcode + + \sa addDays() +*/ + +int QDate::daysTo( const QDate &d ) const +{ + return d.jd - jd; +} + + +/*! + \fn bool QDate::operator==( const QDate &d ) const + Returns TRUE if this date is equal to \a d, or FALSE if + they are different. +*/ + +/*! + \fn bool QDate::operator!=( const QDate &d ) const + Returns TRUE if this date is different from \a d, or FALSE if + they are equal. +*/ + +/*! + \fn bool QDate::operator<( const QDate &d ) const + Returns TRUE if this date is earlier than \a d, otherwise FALSE. +*/ + +/*! + \fn bool QDate::operator<=( const QDate &d ) const + Returns TRUE if this date is earlier than or equal to \a d, otherwise FALSE. +*/ + +/*! + \fn bool QDate::operator>( const QDate &d ) const + Returns TRUE if this date is later than \a d, otherwise FALSE. +*/ + +/*! + \fn bool QDate::operator>=( const QDate &d ) const + Returns TRUE if this date is later than or equal to \a d, otherwise FALSE. +*/ + + +/*! + Returns the current date, as reported by the system clock. + + \sa QTime::currentTime(), QDateTime::currentDateTime() +*/ + +QDate QDate::currentDate() +{ +#if defined(_OS_WIN32_) + + SYSTEMTIME t; + GetLocalTime( &t ); + QDate d; + d.jd = greg2jul( t.wYear, t.wMonth, t.wDay ); + return d; + +#else + + time_t ltime; + time( <ime ); + tm *t = localtime( <ime ); + QDate d; + d.jd = greg2jul( t->tm_year + 1900, t->tm_mon + 1, t->tm_mday ); + return d; + +#endif +} + +/*! + Returns TRUE if the specified date (year \a y, month \a m and day \a + d) is valid. + + Example: + \code + QDate::isValid( 2002, 5, 17 ); // TRUE; May 17th 2002 is OK. + QDate::isValid( 2002, 2, 30 ); // FALSE; Feb 30th does not exist + QDate::isValid( 2004, 2, 29 ); // TRUE; 2004 is a leap year + QDate::isValid( 1202, 6, 6 ); // FALSE; 1202 is pre-Gregorian + \endcode + + Note that a \a y value in the range 00-99 is interpreted as + 1900-1999. + + \sa isNull(), setYMD() +*/ + +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))); +} + +/*! + Returns TRUE if the specified year \a y is a leap year. +*/ + +bool QDate::leapYear( int y ) +{ + return (y % 4 == 0 && y % 100 != 0) || (y % 400 == 0); +} + +/*! + \internal + Converts a Gregorian date to a Julian day. + This algorithm is taken from Communications of the ACM, Vol 6, No 8. + \sa jul2greg() +*/ + +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; // NOTE: Sym C++ 6.0 bug + c /= 100; + ya = y - 100*c; + return 1721119 + d + (146097*c)/4 + (1461*ya)/4 + (153*m+2)/5; +} + +/*! + \internal + Converts a Julian day to a Gregorian date. + This algorithm is taken from Communications of the ACM, Vol 6, No 8. + \sa greg2jul() +*/ + +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++; + } +} + + +/***************************************************************************** + QTime member functions + *****************************************************************************/ + +/*! + \class QTime qdatetime.h + + \brief The QTime class provides clock time functions. + + \ingroup time + + A QTime object contains a clock time, i.e. a number of hours, + minutes, seconds and milliseconds since midnight. It can read the + current time from the system clock, and measure a span of elapsed + time. It provides functions for comparing times and for manipulating + a time by adding a number of (milli)seconds. + + QTime operates with 24-hour clock format; it has no concept of + AM/PM. It operates with local time; it does not know anything about + time zones or daylight savings time. + + A QTime object is typically created either by giving the number of + hours, minutes, seconds, and milliseconds explicitly, or by using + the static function currentTime(), which makes a QTime object which + contains the system's clock time. Note that the accuracy depends on + the accuracy of the underlying operating system; not all systems + provide 1-millisecond accuracy. + + The hour(), minute(), second(), and msec() functions provide access + to the number of hours, minutes, seconds, and milliseconds of the + time. The same information is provided in textual format by the + toString() function. + + QTime provides a full set of operators to compare two QTime + objects. A time is considered smaller than another if it is earlier + than the other. + + The time a given number of seconds or milliseconds later than a + given time can be found using the addSecs() or addMSecs() + functions. Correspondingly, the number of (milli)seconds between two + times can be found using the secsTo() or msecsTo() functions. + + QTime can be used to measure a span of elapsed time using the + start(), restart(), and elapsed() functions. + + \sa QDate, QDateTime +*/ + +/*! + \fn QTime::QTime() + + Constructs the time 0 hours, minutes, seconds and milliseconds, + i.e. 00:00:00.000 (midnight). This is a valid time. + + \sa isValid() +*/ + +/*! + Constructs a time with hour \a h, minute \a m, seconds \a s and + milliseconds \a ms. + + \a h must be in the range 0-23, \a m and \a s must be in the range + 0-59, and \a ms must be in the range 0-999. + + \sa isValid() +*/ + +QTime::QTime( int h, int m, int s, int ms ) +{ + setHMS( h, m, s, ms ); +} + + +/*! + \fn bool QTime::isNull() const + Returns TRUE if the time is equal to 00:00:00.000. A null time is valid. + + \sa isValid() +*/ + +/*! + Returns TRUE if the time is valid, or FALSE if the time is invalid. + The time 23:30:55.746 is valid, while 24:12:30 is invalid. + + \sa isNull() +*/ + +bool QTime::isValid() const +{ + return ds < MSECS_PER_DAY; +} + + +/*! + Returns the hour part (0..23) of the time. +*/ + +int QTime::hour() const +{ + return ds / MSECS_PER_HOUR; +} + +/*! + Returns the minute part (0..59) of the time. +*/ + +int QTime::minute() const +{ + return (ds % MSECS_PER_HOUR)/MSECS_PER_MIN; +} + +/*! + Returns the second part (0..59) of the time. +*/ + +int QTime::second() const +{ + return (ds / 1000)%SECS_PER_MIN; +} + +/*! + Returns the millisecond part (0..999) of the time. +*/ + +int QTime::msec() const +{ + return ds % 1000; +} + + +/*! + Returns the time of this object in a textual format. Milliseconds + are not included. The string format is HH:MM:SS, e.g. 1 second + before midnight would be "23:59:59". +*/ + +QString QTime::toString() const +{ + QString buf; + buf.sprintf( "%.2d:%.2d:%.2d", hour(), minute(), second() ); + return buf; +} + + +/*! + Sets the time to hour \a h, minute \a m, seconds \a s and + milliseconds \a ms. + + \a h must be in the range 0-23, \a m and \a s must be in the range + 0-59, and \a ms must be in the range 0-999. Returns TRUE if the set + time is valid, otherwise FALSE. + + \sa isValid() +*/ + +bool QTime::setHMS( int h, int m, int s, int ms ) +{ + if ( !isValid(h,m,s,ms) ) { +#if defined(CHECK_RANGE) + qWarning( "QTime::setHMS Invalid time %02d:%02d:%02d.%03d", h, m, s, + ms ); +#endif + ds = MSECS_PER_DAY; // make this invalid + return FALSE; + } + ds = (h*SECS_PER_HOUR + m*SECS_PER_MIN + s)*1000 + ms; + return TRUE; +} + +/*! + Returns a QTime object containing a time \a nsecs seconds later than + the time of this object (or earlier if \a ms is negative). + + Note that the time will wrap if it passes midnight. + + Example: + \code + QTime n( 14, 0, 0 ); // n == 14:00:00 + QTime t; + t = n.addSecs( 70 ); // t == 14:01:10 + t = n.addSecs( -70 ); // t == 13:58:50 + t = n.addSecs( 10*60*60 + 5 ); // t == 00:00:05 + t = n.addSecs( -15*60*60 ); // t == 23:00:00 + \endcode + + \sa addMSecs(), secsTo(), QDateTime::addSecs() +*/ + +QTime QTime::addSecs( int nsecs ) const +{ + return addMSecs(nsecs*1000); +} + +/*! + Returns the number of seconds from this time to \a t (which is + negative if \a t is earlier than this time). + + Since QTime measures time within a day and there are 86400 seconds + in a day, the result is between -86400 and 86400. + + \sa addSecs() QDateTime::secsTo() +*/ + +int QTime::secsTo( const QTime &t ) const +{ + return ((int)t.ds - (int)ds)/1000; +} + +/*! + Returns a QTime object containing a time \a ms milliseconds later than + the time of this object (or earlier if \a ms is negative). + + Note that the time will wrap if it passes midnight. See addSecs() + for an example. + + \sa addSecs(), msecsTo() +*/ + +QTime QTime::addMSecs( int ms ) const +{ + QTime t; + if ( ms < 0 ) { + // % not well-defined for -ve, but / is. + 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; +} + +/*! + Returns the number of milliseconds from this time to \a t (which is + negative if \a t is earlier than this time). + + Since QTime measures time within a day and there are 86400000 + milliseconds in a day, the result is between -86400000 and 86400000. + + \sa secsTo() +*/ + +int QTime::msecsTo( const QTime &t ) const +{ + return (int)t.ds - (int)ds; +} + + +/*! + \fn bool QTime::operator==( const QTime &t ) const + + Returns TRUE if this time is equal to \a t, or FALSE if they are + different. +*/ + +/*! + \fn bool QTime::operator!=( const QTime &t ) const + + Returns TRUE if this time is different from \a t, or FALSE if they + are equal. +*/ + +/*! + \fn bool QTime::operator<( const QTime &t ) const + + Returns TRUE if this time is earlier than \a t, otherwise FALSE. +*/ + +/*! + \fn bool QTime::operator<=( const QTime &t ) const + + Returns TRUE if this time is earlier than or equal to \a t, + otherwise FALSE. +*/ + +/*! + \fn bool QTime::operator>( const QTime &t ) const + + Returns TRUE if this time is later than \a t, otherwise FALSE. +*/ + +/*! + \fn bool QTime::operator>=( const QTime &t ) const + + Returns TRUE if this time is later than or equal to \a t, otherwise + FALSE. +*/ + + + +/*! + Returns the current time, as reported by the system clock. + + Note that the accuracy depends on the accuracy of the underlying + operating system; not all systems provide 1-millisecond accuracy. +*/ + +QTime QTime::currentTime() +{ + QTime ct; + currentTime( &ct ); + return ct; +} + +/*! + \internal + + Fetches the current time and returns TRUE if the time is within one + minute after midnight, otherwise FALSE. The return value is used by + QDateTime::currentDateTime() to ensure that the date there is correct. +*/ + +bool QTime::currentTime( QTime *ct ) +{ + if ( !ct ) { +#if defined(CHECK_NULL) + qWarning( "QTime::currentTime(QTime *): Null pointer not allowed" ); +#endif + return FALSE; + } + +#if defined(_OS_WIN32_) + + SYSTEMTIME t; + GetLocalTime( &t ); + ct->ds = MSECS_PER_HOUR*t.wHour + MSECS_PER_MIN*t.wMinute + + 1000*t.wSecond + t.wMilliseconds; + return (t.wHour == 0 && t.wMinute == 0); + +#elif defined(_OS_OS2_) + + DATETIME t; + DosGetDateTime( &t ); + ct->ds = MSECS_PER_HOUR*t.hours + MSECS_PER_MIN*t.minutes + + 1000*t.seconds + 10*t.hundredths; + return (t.hours == 0 && t.minutes == 0); + +#elif defined(_OS_MSDOS_) + + _dostime_t t; + _dos_gettime( &t ); + ct->ds = MSECS_PER_HOUR*t.hour + MSECS_PER_MIN*t.minute + + t.second*1000 + t.hsecond*10; + return (t.hour== 0 && t.minute == 0); + +#elif defined(_OS_UNIX_) + + struct timeval tv; + gettimeofday( &tv, 0 ); + time_t ltime = tv.tv_sec; + tm *t = localtime( <ime ); + 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); + +#else + + time_t ltime; // no millisecond resolution!! + ::time( <ime ); + tm *t = localtime( <ime ); + ct->ds = MSECS_PER_HOUR*t->tm_hour + MSECS_PER_MIN*t->tm_min + + 1000*t->tm_sec; + return (t->tm_hour== 0 && t->tm_min == 0); +#endif +} + +/*! + Returns TRUE if the specified time is valid, otherwise FALSE. + + The time is valid if \a h is in the range 0-23, \a m and \a s are in + the range 0-59, and \a ms is in the range 0-999. + + Example: + \code + QTime::isValid(21, 10, 30); // returns TRUE + QTime::isValid(22, 5, 62); // returns FALSE + \endcode +*/ + +bool QTime::isValid( int h, int m, int s, int ms ) +{ + return (uint)h < 24 && (uint)m < 60 && (uint)s < 60 && (uint)ms < 1000; +} + + +/*! + Sets this time to the current time. This is practical for timing: + + \code + QTime t; + t.start(); // start clock + ... // some lengthy task + qDebug( "%d\n", t.elapsed() ); // prints # msecs elapsed + \endcode + + \sa restart(), elapsed(), currentTime() +*/ + +void QTime::start() +{ + *this = currentTime(); +} + +/*! + Sets this time to the current time, and returns the number of + milliseconds that have elapsed since the last time start() or + restart() was called. + + This function is guaranteed to be atomic, and is thus very handy for + repeated measurements: call start() to start the first measurement, + then restart() for each later measurement. + + Note that the counter wraps to zero 24 hours after the last call to + start() or restart(). + + \warning If the system's clock setting has been changed since the + last time start() or restart() was called, the result is undefined. + This can happen e.g. when daylight saving is turned on or off. + + \sa start(), elapsed(), currentTime() +*/ + +int QTime::restart() +{ + QTime t = currentTime(); + int n = msecsTo( t ); + if ( n < 0 ) // passed midnight + n += 86400*1000; + *this = t; + return n; +} + +/*! + Returns the number of milliseconds that have elapsed since the last + time start() or restart() was called. + + Note that the counter wraps to zero 24 hours after the last call to + start() or restart. + + Note that the accuracy depends on the accuracy of the underlying + operating system; not all systems provide 1-millisecond accuracy. + + \warning If the system's clock setting has been changed since the + last time start() or restart() was called, the result is undefined. + This can happen e.g. when daylight saving is turned on or off. + + \sa start(), restart() +*/ + +int QTime::elapsed() +{ + int n = msecsTo( currentTime() ); + if ( n < 0 ) // passed midnight + n += 86400*1000; + return n; +} + + +/***************************************************************************** + QDateTime member functions + *****************************************************************************/ + +/*! + \class QDateTime qdatetime.h + \brief The QDateTime class provides date and time functions. + + \ingroup time + + A QDateTime object contains a calendar date and a clock time (a + "datetime"). It is a combination of the QDate and QTime classes. It + can read the current datetime from the system clock. It provides + functions for comparing datetimes and for manipulating a datetime by + adding a number of seconds or days. + + A QDateTime object is typically created either by giving a date and + time explicitly, or by using the static function currentTime(), + which makes a QDateTime object which contains the system's clock + time. + + The date() and time() functions provide access to the date and time + parts of the datetime. The same information is provided in textual + format by the toString() function. + + QDateTime provides a full set of operators to compare two QDateTime + objects. A datetime is considered smaller than another if it is + earlier than the other. + + The datetime a given number of days or seconds later than a given + datetime can be found using the addDays() and addSecs() + functions. Correspondingly, the number of days or seconds between + two times can be found using the daysTo() or secsTo() functions. + + A datetime can also be set using the setTime_t() function, which + takes a POSIX-standard "number of seconds since 00:00:00 on January + 1, 1970" value. + + The limitations regarding range and resolution mentioned in the + QDate and QTime documentation apply for QDateTime also. + + \sa QDate, QTime +*/ + + +/*! + \fn QDateTime::QDateTime() + + Constructs a null datetime (i.e. null date and null time). A null + datetime is invalid, since the date is invalid. + + \sa isValid() +*/ + + +/*! + Constructs a datetime with date \a date and null time (00:00:00.000). +*/ + +QDateTime::QDateTime( const QDate &date ) + : d(date) +{ +} + +/*! + Constructs a datetime with date \a date and time \a time. +*/ + +QDateTime::QDateTime( const QDate &date, const QTime &time ) + : d(date), t(time) +{ +} + + +/*! + \fn bool QDateTime::isNull() const + + Returns TRUE if both the date and the time are null. A null date is invalid. + + \sa QDate::isNull(), QTime::isNull() +*/ + +/*! + \fn bool QDateTime::isValid() const + + Returns TRUE if both the date and the time are valid. + + \sa QDate::isValid(), QTime::isValid() +*/ + +/*! + \fn QDate QDateTime::date() const + + Returns the date part of this datetime. + + \sa setDate(), time() +*/ + +/*! + \fn QTime QDateTime::time() const + + Returns the time part of this datetime. + + \sa setTime(), date() +*/ + +/*! + \fn void QDateTime::setDate( const QDate &date ) + + Sets the date part of this datetime. + + \sa date(), setTime() +*/ + +/*! + \fn void QDateTime::setTime( const QTime &time ) + + Sets the time part of this datetime. + + \sa time(), setDate() +*/ + + +/*! + Sets the local date and time given the number of seconds that have passed + since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC). + On systems that do not support timezones this function will behave as if + local time were UTC. + + Note that Microsoft Windows supports only a limited range of values for + \a secsSince1Jan1970UTC. +*/ + +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; +} + + +/*! + Returns the datetime as a string. + + The string format is "Sat May 20 03:40:13 1998". + + This function uses QDate::dayName(), QDate::monthName(), and + QTime::toString() to generate the string. + +*/ + +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; +} + +/*! + Returns a QDateTime object containing a datetime \a ndays days later + than the datetime of this object (or earlier if \a ndays is + negative). + + \sa daysTo(), addSecs() +*/ + +QDateTime QDateTime::addDays( int ndays ) const +{ + return QDateTime( d.addDays(ndays), t ); +} + +/*! + Returns a QDateTime object containing a datetime \a nsecs seconds + later than the datetime of this object (or earlier if \a nsecs is + negative). + + \sa secsTo(), addDays() +*/ + +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; +} + +/*! + Returns the number of days from this datetime to \a dt (which is + negative if \a dt is earlier than this datetime). + + \sa addDays(), secsTo() +*/ + +int QDateTime::daysTo( const QDateTime &dt ) const +{ + return d.daysTo( dt.d ); +} + +/*! + Returns the number of seconds from this datetime to \a dt (which is + negative if \a dt is earlier than this datetime). + + Example: + \code + QDateTime dt = QDateTime::currentDateTime(); + QDateTime x( QDate(dt.year(),12,24), QTime(17,00) ); + qDebug( "There are %d seconds to Christmas", dt.secsTo(x) ); + \endcode + + \sa addSecs(), daysTo(), QTime::secsTo() +*/ + +int QDateTime::secsTo( const QDateTime &dt ) const +{ + return t.secsTo(dt.t) + d.daysTo(dt.d)*SECS_PER_DAY; +} + + +/*! + Returns TRUE if this datetime is equal to \a dt, or FALSE if + they are different. + \sa operator!=() +*/ + +bool QDateTime::operator==( const QDateTime &dt ) const +{ + return t == dt.t && d == dt.d; +} + +/*! + Returns TRUE if this datetime is different from \a dt, or FALSE if + they are equal. + \sa operator==() +*/ + +bool QDateTime::operator!=( const QDateTime &dt ) const +{ + return t != dt.t || d != dt.d; +} + +/*! + Returns TRUE if this datetime is earlier than \a dt, otherwise FALSE. +*/ + +bool QDateTime::operator<( const QDateTime &dt ) const +{ + if ( d < dt.d ) + return TRUE; + return d == dt.d ? t < dt.t : FALSE; +} + +/*! + Returns TRUE if this datetime is earlier than or equal to \a dt, + otherwise FALSE. +*/ + +bool QDateTime::operator<=( const QDateTime &dt ) const +{ + if ( d < dt.d ) + return TRUE; + return d == dt.d ? t <= dt.t : FALSE; +} + +/*! + Returns TRUE if this datetime is later than \a dt, otherwise FALSE. +*/ + +bool QDateTime::operator>( const QDateTime &dt ) const +{ + if ( d > dt.d ) + return TRUE; + return d == dt.d ? t > dt.t : FALSE; +} + +/*! + Returns TRUE if this datetime is later than or equal to \a dt, + otherwise FALSE. +*/ + +bool QDateTime::operator>=( const QDateTime &dt ) const +{ + if ( d > dt.d ) + return TRUE; + return d == dt.d ? t >= dt.t : FALSE; +} + +/*! + Returns the current datetime, as reported by the system clock. + + \sa QDate::currentDate(), QTime::currentTime() +*/ + +QDateTime QDateTime::currentDateTime() +{ + QDate cd = QDate::currentDate(); + QTime ct; + if ( QTime::currentTime(&ct) ) // too close to midnight? + cd = QDate::currentDate(); // YES! time for some midnight + // voodoo, fetch date again + return QDateTime( cd, ct ); +} + + +/***************************************************************************** + Date/time stream functions + *****************************************************************************/ + +#ifndef QT_NO_DATASTREAM +/*! + \relates QDate + Writes the date to the stream. + + \sa \link datastreamformat.html Format of the QDataStream operators \endlink +*/ + +QDataStream &operator<<( QDataStream &s, const QDate &d ) +{ + return s << (Q_UINT32)(d.jd); +} + +/*! + \relates QDate + Reads a date from the stream. + + \sa \link datastreamformat.html Format of the QDataStream operators \endlink +*/ + +QDataStream &operator>>( QDataStream &s, QDate &d ) +{ + Q_UINT32 jd; + s >> jd; + d.jd = jd; + return s; +} + +/*! + \relates QTime + Writes a time to the stream. + + \sa \link datastreamformat.html Format of the QDataStream operators \endlink +*/ + +QDataStream &operator<<( QDataStream &s, const QTime &t ) +{ + return s << (Q_UINT32)(t.ds); +} + +/*! + \relates QTime + Reads a time from the stream. + + \sa \link datastreamformat.html Format of the QDataStream operators \endlink +*/ + +QDataStream &operator>>( QDataStream &s, QTime &t ) +{ + Q_UINT32 ds; + s >> ds; + t.ds = ds; + return s; +} + +/*! + \relates QDateTime + Writes a datetime to the stream. + + \sa \link datastreamformat.html Format of the QDataStream operators \endlink +*/ + +QDataStream &operator<<( QDataStream &s, const QDateTime &dt ) +{ + return s << dt.d << dt.t; +} + +/*! + \relates QDateTime + Reads a datetime from the stream. + + \sa \link datastreamformat.html Format of the QDataStream operators \endlink +*/ + +QDataStream &operator>>( QDataStream &s, QDateTime &dt ) +{ + s >> dt.d >> dt.t; + return s; +} +#endif //QT_NO_DATASTREAM Index: branches/xZenu/src/util/doxygen/qtools/qwaitcondition_win32.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qwaitcondition_win32.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qwaitcondition_win32.cpp (revision 1322) @@ -0,0 +1,186 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include "qwaitcondition.h" +#include "qmutex.h" +#include "qlist.h" + +//*********************************************************************** +// QWaitConditionPrivate +// ********************************************************************** + +class QWaitConditionEvent +{ +public: + QWaitConditionEvent() : priority(0), wokenUp(false) + { + event = CreateEvent(NULL, TRUE, FALSE, NULL); + } + ~QWaitConditionEvent() { CloseHandle(event); } + int priority; + bool wokenUp; + HANDLE event; +}; + +class EventQueue : public QList +{ + public: + EventQueue() { setAutoDelete(TRUE); } + ~EventQueue() {} +}; + +class QWaitConditionPrivate +{ +public: + QMutex mtx; + EventQueue queue; + EventQueue freeQueue; + + QWaitConditionEvent *pre(); + void wait(QWaitConditionEvent *wce); + void post(QWaitConditionEvent *wce); +}; + +QWaitConditionEvent *QWaitConditionPrivate::pre() +{ + mtx.lock(); + QWaitConditionEvent *wce = + freeQueue.isEmpty() ? new QWaitConditionEvent : freeQueue.take(0); + wce->priority = GetThreadPriority(GetCurrentThread()); + wce->wokenUp = FALSE; + + // insert 'wce' into the queue (sorted by priority) + uint index = 0; + for (; index < queue.count(); ++index) + { + QWaitConditionEvent *current = queue.at(index); + if (current->priority < wce->priority) + break; + } + queue.insert(index, wce); + mtx.unlock(); + + return wce; +} + +void QWaitConditionPrivate::wait(QWaitConditionEvent *wce) +{ + WaitForSingleObject(wce->event, INFINITE); +} + +void QWaitConditionPrivate::post(QWaitConditionEvent *wce) +{ + mtx.lock(); + + // remove 'wce' from the queue + int idx = queue.find(wce); + ASSERT(idx!=-1); + queue.take(idx); + ResetEvent(wce->event); + freeQueue.append(wce); + + // wakeups delivered after the timeout should be forwarded to the next waiter + if (wce->wokenUp && !queue.isEmpty()) + { + QWaitConditionEvent *other = queue.getFirst(); + SetEvent(other->event); + other->wokenUp = TRUE; + } + + mtx.unlock(); +} + +//*********************************************************************** +// QWaitCondition implementation +//*********************************************************************** + +QWaitCondition::QWaitCondition() +{ + d = new QWaitConditionPrivate; +} + +QWaitCondition::~QWaitCondition() +{ + if (!d->queue.isEmpty()) + { + qWarning("QWaitCondition: Destroyed while threads are still waiting"); + } + delete d; +} + +void QWaitCondition::wait(QMutex *mutex) +{ + if (!mutex) return; + + QWaitConditionEvent *wce = d->pre(); + mutex->unlock(); + d->wait(wce); + mutex->lock(); + d->post(wce); +} + +void QWaitCondition::wakeOne() +{ + // wake up the first waiting thread in the queue + QMutexLocker locker(&d->mtx); + for (uint i = 0; i < d->queue.count(); ++i) + { + QWaitConditionEvent *current = d->queue.at(i); + if (current->wokenUp) continue; + SetEvent(current->event); + current->wokenUp = TRUE; + break; + } +} + +void QWaitCondition::wakeAll() +{ + // wake up the all threads in the queue + QMutexLocker locker(&d->mtx); + for (uint i = 0; i < d->queue.count(); ++i) + { + QWaitConditionEvent *current = d->queue.at(i); + SetEvent(current->event); + current->wokenUp = TRUE; + } +} + Index: branches/xZenu/src/util/doxygen/qtools/qlist.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qlist.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qlist.doc (revision 1322) @@ -0,0 +1,1048 @@ +/**************************************************************************** +** +** +** QList and QListIterator class documentation +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + + +/***************************************************************************** + QList documentation + *****************************************************************************/ + +/*! + \class QList qlist.h + \brief The QList class is a template class that provides doubly linked lists. + + \ingroup collection + \ingroup tools + + In Qt 2.0 QList is only implemented as a template class. Define a + template instance QList\ to create a list that operates on pointers + to X, or X*. + + Example: + \code + #include + #include + #include + + class Employee + { + public: + Employee( const QString& name, int salary ) { n=name; s=salary; } + QString name() const { return n; } + int salary() const { return s; } + private: + QString n; + int s; + }; + + void main() + { + QList list; // list of pointers to Employee + list.setAutoDelete( TRUE ); // delete items when they are removed + + list.append( new Employee("Bill", 50000) ); + list.append( new Employee("Steve",80000) ); + list.append( new Employee("Ron", 60000) ); + + Employee *emp; + for ( emp=list.first(); emp != 0; emp=list.next() ) + printf( "%s earns %d\n", emp->name().latin1(), emp->salary() ); + } + \endcode + + Program output: + \code + Bill earns 50000 + Steve earns 80000 + Ron earns 60000 + \endcode + + The list class is indexable and has a \link at() current index\endlink + and a \link current() current item\endlink. The first item corresponds + to index 0. The current index is -1 if the current item is null. + + QList has several member functions for traversing the list, but using + a QListIterator can be more practical. Multiple list iterators may + traverse the same list, independent of each other and independent of + the current list item. + + In the example above, we make the call setAutoDelete(TRUE). + Enabling auto-deletion tells the list to delete items that are removed + from the list. The default is to not delete items when they are + removed, but that would cause a memory leak in our example since we have + no other references to the list items. + + List items are stored as \c void* in an internal QLNode, which also + holds pointers to the next and previous list items. The functions + currentNode(), removeNode() and takeNode() operate directly on the + QLNode, but they should be used with care. + + When inserting an item into a list, only the pointer is copied, not the + item itself. This is called a shallow copy. It is possible to make the + list copy all of the item's data (known as a deep copy) when an item is + inserted. insert(), inSort() and append() call the virtual function + QCollection::newItem() for the item to be inserted. + Inherit a list and reimplement it if you want deep copies. + + When removing an item from a list, the virtual function + QCollection::deleteItem() is called. QList's default implementation + is to delete the item if auto-deletion is enabled. + + The virtual function QGList::compareItems() can be reimplemented to + compare two list items. This function is called from all list functions + that need to compare list items, for instance remove(const type*). + If you only want to deal with pointers, there are functions that + compare pointers instead, for instance removeRef(const type*). + These functions are somewhat faster than those that call compareItems(). + + The QStrList class in qstrlist.h is a list of \c char*. QStrList is + a good example of a list that reimplements newItem(), deleteItem() and + compareItems() + + \sa QListIterator, \link collection.html Collection Classes\endlink +*/ + + +/*! + \fn QList::QList() + Constructs an empty list. +*/ + +/*! + \fn QList::QList( const QList &list ) + Constructs a copy of \e list. + + Each item in \e list is \link append() appended\endlink to this list. + Only the pointers are copied (shallow copy). +*/ + +/*! + \fn QList::~QList() + Removes all items from the list and destroys the list. + + All list iterators that access this list will be reset. + + \sa setAutoDelete() +*/ + +/*! + \fn QList &QList::operator=(const QList &list) + Assigns \e list to this list and returns a reference to this list. + + This list is first cleared, then each item in \e list is + \link append() appended\endlink to this list. Only the pointers are copied + (shallow copy), unless newItem() has been reimplemented(). +*/ + +/*! + \fn bool QList::operator==(const QList &list ) const + + Compares this list with \a list. Retruns TRUE if the lists + contain the same data, else FALSE. +*/ + +/*! + \fn uint QList::count() const + Returns the number of items in the list. + \sa isEmpty() +*/ + +/*! + \fn void QList::sort() + + Sorts the list by the result of the virtual compareItems() function. + + The Heap-Sort algorithm is used for sorting. It sorts n items with + O(n*log n) compares. This is the asymptotic optimal solution of the + sorting problem. + + If the items in your list support operator< and operator== then you + might be better off with QSortedList since it implements the + compareItems() function for you using these two operators. + + \sa inSort() +*/ + +/*! + \fn bool QList::isEmpty() const + Returns TRUE if the list is empty, i.e. count() == 0. Returns FALSE + otherwise. + \sa count() +*/ + +/*! + \fn bool QList::insert( uint index, const type *item ) + Inserts the \e item at the position \e index in the list. + + Returns TRUE if successful, or FALSE if \e index is out of range. + The valid range is 0 .. count() inclusive. + The item is appended if \e index == count(). + + The inserted item becomes the current list item. + + The \e item must not be a null pointer. + + \sa append(), current() +*/ + +/*! + \fn void QList::inSort( const type *item ) + Inserts the \e item at its sorted position in the list. + + The sort order depends on the virtual QGList::compareItems() function. + All items must be inserted with inSort() to maintain the sorting order. + + The inserted item becomes the current list item. + + The \e item must not be a null pointer. + + Please note that inSort is slow. If you want to insert lots of items + in a list and sort after inserting then you should use sort(). + inSort() takes up to O(n) compares. That means inserting n items in + your list will need O(n^2) compares while sort() only needs O(n*logn) + for the same task. So you inSort() only if you already have a pre-sorted + list and want to insert only few additional items. + + \sa insert(), QGList::compareItems(), current(), sort() +*/ + +/*! + \fn void QList::append( const type *item ) + Inserts the \e item at the end of the list. + + The inserted item becomes the current list item. + This is equivalent to \c insert(count(),item). + + + The \e item must not be a null pointer. + + \sa insert(), current(), prepend() +*/ + +/*! + \fn void QList::prepend( const type *item ) + + Inserts the \e item at the start of the list. + + The inserted item becomes the current list item. + This is equivalent to \c insert(0,item). + + The \e item must not be a null pointer. + + \sa append(), insert(), current() +*/ + +/*! + \fn bool QList::remove( uint index ) + Removes the item at position \e index in the list. + + Returns TRUE if successful, or FALSE if \e index is out of range. + The valid range is 0 .. (count() - 1) inclusive. + + The removed item is deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + The item after the removed item becomes the new current list item if + the removed item is not the last item in the list. If the last item + is removed, the new last item becomes the current item in Qt 2.x. + In 3.0, the current item will be set to null. The current item is + set to null if the list becomes empty. + + All list iterators that refer to the removed item will be set to point + to the new current item. + + \sa take(), clear(), setAutoDelete(), current() removeRef() +*/ + +/*! + \fn bool QList::remove() + Removes the current list item. + + Returns TRUE if successful, or FALSE if the current item is null. + + The removed item is deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + The item after the removed item becomes the new current list item if + the removed item is not the last item in the list. If the last item + is removed, the new last item becomes the current item in Qt 2.x. + In 3.0, the current item will be set to null. The current item is + set to null if the list becomes empty. + + All list iterators that refer to the removed item will be set to point + to the new current item. + + \sa take(), clear(), setAutoDelete(), current() removeRef() +*/ + +/*! + \fn bool QList::remove( const type *item ) + Removes the first occurrence of \e item from the list. + + Returns TRUE if successful, or FALSE if the item could not be found in the + list. + + The removed item is deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + The compareItems() function is called when searching for the item + in the list. If compareItems() is not reimplemented, it is more + efficient to call removeRef(). + + The item after the removed item becomes the new current list item if + the removed item is not the last item in the list. If the last item + is removed, the new last item becomes the current item in Qt 2.x. + In 3.0, the current item will be set to null. The current item is + set to null if the list becomes empty. + + All list iterators that refer to the removed item will be set to point + to the new current item. + + \sa removeRef(), take(), clear(), setAutoDelete(), compareItems(), current() +*/ + +/*! + \fn bool QList::removeRef( const type *item ) + Removes the first occurrence of \e item from the list. + + Returns TRUE if successful, or FALSE if the item cannot be found in the + list. + + The removed item is deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + The list is scanned until the pointer \e item is found. It is removed + if it is found. + + Equivalent to: + \code + if ( list.findRef(item) != -1 ) + list.remove(); + \endcode + + The item after the removed item becomes the new current list item if + the removed item is not the last item in the list. If the last item + is removed, the new last item becomes the current item in Qt 2.x. + In 3.0, the current item will be set to null. The current item is + set to null if the list becomes empty. + + All list iterators that refer to the removed item will be set to point + to the new current item. + + \sa remove(), clear(), setAutoDelete(), current() +*/ + +/*! + \fn void QList::removeNode( QLNode *node ) + Removes the \e node from the list. + + This node must exist in the list, otherwise the program may crash. + + The removed item is deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + The first item in the list will become the new current list item. + The current item is set to null if the list becomes empty. + + All list iterators that refer to the removed item will be set to point to + the item succeeding this item, or the preceding item if the removed item + was the last item. + + \warning Do not call this function unless you are an expert. + + \sa takeNode(), currentNode() remove() removeRef() +*/ + +/*! + \fn bool QList::removeFirst() + Removes the first item from the list. + Returns TRUE if successful, or FALSE if the list is empty. + + The removed item is deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + The first item in the list becomes the new current list item. + The current item is set to null if the list becomes empty. + + All list iterators that refer to the removed item will be set to point + to the new current item. + + \sa removeLast(), setAutoDelete(), current() remove() +*/ + +/*! + \fn bool QList::removeLast() + Removes the last item from the list. + Returns TRUE if successful, or FALSE if the list is empty. + + The removed item is deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + The last item in the list becomes the new current list item. + The current item is set to null if the list becomes empty. + + All list iterators that refer to the removed item will be set to point + to the new current item. + + \sa removeFirst(), setAutoDelete(), current() +*/ + +/*! + \fn type *QList::take( uint index ) + Takes the item at position \e index out of the list without + deleting it (even if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled). + + Returns a pointer to the item taken out of the list, or null if + the index is out of range. + The valid range is 0 .. (count() - 1) inclusive. + + The item after the taken item becomes the new current list item if + the taken item is not the last item in the list. If the last item + is taken, the new last item becomes the current item in Qt 2.x. In + 3.0, the current item will be set to null. The current item is set + to null if the list becomes empty. + + All list iterators that refer to the taken item will be set to point to + the new current item. + + \sa remove(), clear(), current() +*/ + +/*! + \fn type *QList::take() + Takes the current item out of the list without deleting it (even if + \link QCollection::setAutoDelete() auto-deletion\endlink is enabled). + Returns a pointer to the item taken out of the list, or null if + the current item is null. + + The item after the taken item becomes the new current list item if + the taken item is not the last item in the list. If the last item + is taken, the new last item becomes the current item in Qt 2.x. In + 3.0, the current item will be set to null. The current item is set + to null if the list becomes empty. + + All list iterators that refer to the taken item will be set to point to + the new current item. + + \sa remove(), clear(), current() +*/ + +/*! + \fn type *QList::takeNode( QLNode *node ) + Takes the \e node out of the list without deleting its item (even if + \link QCollection::setAutoDelete() auto-deletion\endlink is enabled). + Returns a pointer to the item taken out of the list. + + This node must exist in the list, otherwise the program may crash. + + The first item in the list becomes the new current list item. + + All list iterators that refer to the taken item will be set to point to + the item succeeding this item, or the preceding item if the taken item + was the last item. + + \warning Do not call this function unless you are an expert. + + \sa removeNode(), currentNode() +*/ + +/*! + \fn void QList::clear() + Removes all items from the list. + + The removed items are deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + All list iterators that access this list will be reset. + + \sa remove(), take(), setAutoDelete() +*/ + +/*! + \fn int QList::find( const type *item ) + Finds the first occurrence of \e item in the list. + + If the item is found, the list sets the current item to point to + the found item and returns the index of this item. + If the item is not found, the list sets the current item to null, + the current index to -1 and returns -1. + + The compareItems() function is called when searching for the item + in the list. If compareItems() is not reimplemented, it is more + efficient to call findRef(). + + \sa findNext(), findRef(), compareItems(), current() +*/ + +/*! + \fn int QList::findNext( const type *item ) + Finds the next occurrence of \e item in the list, starting from + the current list item. + + If the item is found, the list sets the current item to point to + the found item and returns the index of this item. + If the item is not found, the list sets the current item to null, + the current index to -1 and returns -1. + + The compareItems() function is called when searching for the item + in the list. If compareItems() is not reimplemented, it is more + efficient to call findNextRef(). + + \sa find(), findNextRef(), compareItems(), current() +*/ + +/*! + \fn int QList::findRef( const type *item ) + Finds the first occurrence of \e item in the list. + + If the item is found, the list sets the current item to point to + the found item and returns the index of this item. + If the item is not found, the list sets the current item to null, + the current index to -1 and returns -1. + + Calling this function is must faster than find(), because find() + compares \e item with each list item using compareItems(). + This function only compares the pointers. + + \sa findNextRef(), find(), current() +*/ + +/*! + \fn int QList::findNextRef( const type *item ) + Finds the next occurrence of \e item in the list, starting from the + current list item. + + If the item is found, the list sets the current item to point to + the found item and returns the index of this item. + If the item is not found, the list sets the current item to null, + the current index to -1 and returns -1. + + Calling this function is must faster than findNext(), because findNext() + compares \e item with each list item using compareItems(). + This function only compares the pointers. + + \sa findRef(), findNext(), current() +*/ + +/*! + \fn uint QList::contains( const type *item ) const + Counts and returns the number of occurrences of \e item in the list. + + The compareItems() function is called when looking for the \e item + in the list. If compareItems() is not reimplemented, it is more + efficient to call containsRef(). + + Does not affect the current list item. + + \sa containsRef(), compareItems() +*/ + +/*! + \fn uint QList::containsRef( const type *item ) const + Counts and returns the number of occurrences of \e item in the list. + + Calling this function is must faster than contains(), because contains() + compares \e item with each list item using compareItems(). + This function only compares the pointers. + + Does not affect the current list item. + + \sa contains() +*/ + +/*! + \fn type *QList::at( uint index ) + Returns a pointer to the item at position \e index in the list, or + null if the index is out of range. + + Sets the current list item to this item if \e index is valid. + The valid range is 0 .. (count() - 1) inclusive. + + This function is very efficient. It starts scanning from the first + item, last item or current item, whichever is closest to \e index. + + \sa current() +*/ + +/*! + \fn int QList::at() const + Returns the index of the current list item. The returned value is -1 + if the current item is null. + \sa current() +*/ + +/*! + \fn type *QList::current() const + Returns a pointer to the current list item. The current item may be + null (implies that the current index is -1). + \sa at() +*/ + +/*! + \fn QLNode *QList::currentNode() const + Returns a pointer to the current list node. + + The node can be kept and removed later using removeNode(). + The advantage is that the item can be removed directly without + searching the list. + + \warning Do not call this function unless you are an expert. + + \sa removeNode(), takeNode(), current() +*/ + +/*! + \fn type *QList::getFirst() const + Returns a pointer to the first item in the list, or null if the + list is empty. + + Does not affect the current list item. + + \sa first(), getLast() +*/ + +/*! + \fn type *QList::getLast() const + Returns a pointer to the last item in the list, or null if the + list is empty. + + Does not affect the current list item. + + \sa last(), getFirst() +*/ + +/*! + \fn type *QList::first() + Returns a pointer to the first item in the list and makes this the + current list item, or null if the list is empty. + \sa getFirst(), last(), next(), prev(), current() +*/ + +/*! + \fn type *QList::last() + Returns a pointer to the last item in the list and makes this the + current list item, or null if the list is empty. + \sa getLast(), first(), next(), prev(), current() +*/ + +/*! + \fn type *QList::next() + Returns a pointer to the item succeeding the current item. + Returns null if the current item is null or equal to the last item. + + Makes the succeeding item current. If the current item before this + function call was the last item, the current item will be set to null. + If the current item was null, this function does nothing. + + \sa first(), last(), prev(), current() +*/ + +/*! + \fn type *QList::prev() + Returns a pointer to the item preceding the current item. + Returns null if the current item is null or equal to the first item. + + Makes the preceding item current. If the current item before this + function call was the first item, the current item will be set to null. + If the current item was null, this function does nothing. + + \sa first(), last(), next(), current() +*/ + +/*! + \fn void QList::toVector( QGVector *vec ) const + Stores all list items in the vector \e vec. + + The vector must be have the same item type, otherwise the result + will be undefined. +*/ + + +/***************************************************************************** + QListIterator documentation + *****************************************************************************/ + +/*! + \class QListIterator qlist.h + \brief The QListIterator class provides an iterator for QList collections. + + \ingroup collection + \ingroup tools + + Define a template instance QListIterator\ to create a list iterator + that operates on QList\ (list of X*). + + Example: + \code + #include + #include + #include + + class Employee + { + public: + Employee( const char *name, int salary ) { n=name; s=salary; } + const char *name() const { return n; } + int salary() const { return s; } + private: + QString n; + int s; + }; + + void main() + { + QList list; // list of pointers to Employee + list.setAutoDelete( TRUE ); // delete items when they are removed + + list.append( new Employee("Bill", 50000) ); + list.append( new Employee("Steve",80000) ); + list.append( new Employee("Ron", 60000) ); + + QListIterator it(list); // iterator for employee list + for ( ; it.current(); ++it ) { + Employee *emp = it.current(); + printf( "%s earns %d\n", emp->name().latin1(), emp->salary() ); + } + } + \endcode + + Program output: + \code + Bill earns 50000 + Steve earns 80000 + Ron earns 60000 + \endcode + + Although QList has member functions to traverse the doubly linked list + structure, using a list iterator is a much more robust way of traversing + the list, because multiple list iterators can operate on the same list, + independent of each other and independent of the QList's current item. + An iterator has its own current list item and can get the next and + previous list items. It can only traverse the list, never modify it. + + A QList knows about all list iterators that are operating on the list. + When an item is removed from the list, the list update all iterators + that are pointing the removed item to point to the new current list item. + + Example: + \code + #include + #include + #include + + class Employee + { + ... // same as above + }; + + void main() + { + QList list; // list of pointers to Employee + list.setAutoDelete( TRUE ); // delete items when they are removed + + list.append( new Employee("Bill", 50000) ); + list.append( new Employee("Steve",80000) ); + list.append( new Employee("Ron", 60000) ); + + QListIterator it(list); + + list.at( 1 ); // current list item: "Steve" + it.toLast(); // it: "Ron" + --it; // it: "Steve" + + // Now, both the list and the iterator are referring the same item + + list.remove(); + printf( "%s\n", it.current()->name().latin1() ); + } + \endcode + + Program output: + \code + Ron + \endcode + + \sa QList, \link collection.html collection classes\endlink +*/ + +/*! + \fn QListIterator::QListIterator( const QList &list ) + Constructs an iterator for \e list. The current iterator item is + set to point on the first item in the \e list. +*/ + +/*! + \fn QListIterator::~QListIterator() + Destroys the iterator. +*/ + +/*! + \fn uint QListIterator::count() const + Returns the number of items in the list this iterator operates on. + \sa isEmpty() +*/ + +/*! + \fn bool QListIterator::isEmpty() const + Returns TRUE if the list is empty, i.e. count() == 0, otherwise FALSE. + \sa count() +*/ + +/*! + \fn bool QListIterator::atFirst() const + Returns TRUE if the current iterator item is the first list item, otherwise + FALSE. + \sa toFirst(), atLast() +*/ + +/*! + \fn bool QListIterator::atLast() const + Returns TRUE if the current iterator item is the last list item, otherwise + FALSE. + \sa toLast(), atFirst() +*/ + +/*! + \fn type *QListIterator::toFirst() + Sets the current iterator item to point to the first list item and returns + a pointer to the item. Sets the current item to null and returns null + if the list is empty. + \sa toLast(), atFirst() +*/ + +/*! + \fn type *QListIterator::toLast() + Sets the current iterator item to point to the last list item and returns + a pointer to the item. Sets the current item to null and returns null + if the list is empty. + \sa toFirst(), atLast() +*/ + +/*! + \fn QListIterator::operator type *() const + Cast operator. Returns a pointer to the current iterator item. + Same as current(). +*/ + +/*! + \fn type *QListIterator::operator*() + Asterix operator. Returns a pointer to the current iterator item. + Same as current(). +*/ + +/*! + \fn type *QListIterator::current() const + Returns a pointer to the current iterator item. +*/ + +/*! + \fn type *QListIterator::operator()() + Makes the succeeding item current and returns the original current item. + + If the current iterator item was the last item in the list or if it was + null, null is returned. +*/ + +/*! + \fn char *QStrListIterator::operator()() + Makes the succeeding item current and returns the original current item. + + If the current iterator item was the last item in the list or if it was + null, null is returned. +*/ + +/*! + \fn type *QListIterator::operator++() + Prefix ++ makes the succeeding item current and returns the new current + item. + + If the current iterator item was the last item in the list or if it was + null, null is returned. +*/ + +/*! + \fn type *QListIterator::operator+=( uint jump ) + Sets the current item to the item \e jump positions after the current item, + and returns a pointer to that item. + + If that item is beyond the last item or if the dictionary is empty, + it sets the current item to null and returns null +*/ + +/*! + \fn type *QListIterator::operator--() + Prefix -- makes the preceding item current and returns the new current + item. + + If the current iterator item was the first item in the list or if it was + null, null is returned. +*/ + +/*! + \fn type *QListIterator::operator-=( uint jump ) + Returns the item \e jump positions before the current item, or null if + it is beyond the first item. Makes this the current item. +*/ + +/*! + \fn QListIterator& QListIterator::operator=( const QListIterator &it ) + Assignment. Makes a copy of the iterator \a it and returns a reference + to this iterator. +*/ + + +/***************************************************************************** + QStrList documentation + *****************************************************************************/ + +typedef QList QStrList + +/*! + \class QStrList qstrlist.h + \brief The QStrList class provides a doubly linked list of \c char*. + + \inherit QList + + \ingroup collection + \ingroup tools + + This class is a QList\ instance (a list of char*). + + QStrList can make deep or shallow copies of the strings that are inserted. + + A deep copy means to allocate space for the string and then copy the string + data into it. A shallow copy is just a copy of the pointer value and not + the string data. + + The disadvantage with shallow copies is that since a pointer can only + be deleted once, the program must put all strings in a central place and + know when it is safe to delete them (i.e. when the strings are no longer + referenced by other parts of the program). This can make the program + more complex. The advantage of shallow copies is that shallow copies + consume far less memory than deep copies. It is also much faster + to copy a pointer (typically 4 or 8 bytes) than to copy string data. + + A QStrList that operates on deep copies will by default turn on + auto-deletion (see setAutoDelete()). Thus, by default, QStrList will + deallocate any string copies it allocates. + + The virtual compareItems() function is reimplemented and does a case + sensitive string comparison. The inSort() function will insert + strings in a sorted order. + + The QStrListIterator class is an iterator for QStrList. +*/ + +/*! + \fn QStrList::QStrList( bool deepCopies ) + Constructs an empty list of strings. Will make deep copies of all inserted + strings if \e deepCopies is TRUE, or uses shallow copies if \e deepCopies + is FALSE. +*/ + +/*! + \fn QStrList::QStrList( const QStrList &list ) + Constructs a copy of \e list. + + If \e list has deep copies, this list will also get deep copies. + Only the pointers are copied (shallow copy) if the other list does not + use deep copies. +*/ + +/*! + \fn QStrList::~QStrList() + Destroys the list. All strings are removed. +*/ + +/*! + \fn QStrList& QStrList::operator=( const QStrList& list ) + Assigns \e list to this list and returns a reference to this list. + + If \e list has deep copies, this list will also get deep copies. + Only the pointers are copied (shallow copy) if the other list does not + use deep copies. +*/ + + +/***************************************************************************** + QStrIList documentation + *****************************************************************************/ + +/*! + \class QStrIList qstrlist.h + \brief The QStrIList class provides a doubly linked list of \c char* with +case insensitive compare. + + \ingroup collection + \ingroup tools + + This class is a QList\ instance (a list of char*). + + QStrIList is similar to QStrList except that it is case insensitive. + The virtual compareItems() function is reimplemented and does a + case insensitive string comparison. + The inSort() function will insert strings in a sorted order. + + The QStrListIterator class is an iterator for QStrList. +*/ + +/*! + \fn QStrIList::QStrIList( bool deepCopies ) + Constructs a list of strings. Will make deep copies of all inserted + strings if \e deepCopies is TRUE, or uses shallow copies if \e deepCopies + is FALSE. +*/ + +/*! + \fn QStrIList::~QStrIList() + Destroys the list. All strings are removed. +*/ + + +/***************************************************************************** + QStrListIterator documentation + *****************************************************************************/ + +/*! + \class QStrListIterator qstrlist.h + \brief The QStrListIterator class is an iterator for the QStrList and QStrIList classes. + + \inherit QListIterator + + \ingroup tools + + This class is a QListIterator\ instance. + It can traverse the strings in the QStrList and QStrIList classes. +*/ Index: branches/xZenu/src/util/doxygen/qtools/qdir_win32.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qdir_win32.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qdir_win32.cpp (revision 1322) @@ -0,0 +1,485 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2001 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + * Based on qdir_unix.cpp + * + * Copyright (C) 1992-2000 Trolltech AS. + */ + + +#include "qglobal.h" + +#include "qdir.h" +#ifndef QT_NO_DIR + + +#include "qfileinfo.h" +#include "qfiledefs_p.h" +#include "qregexp.h" +#include "qstringlist.h" +#include +#include +#if defined(_OS_WIN32_) +#if defined(_CC_BOOL_DEF_) +#undef bool +#include +#define bool int +#else +#include +#endif +#endif +#if defined(_OS_OS2EMX_) +extern Q_UINT32 DosQueryCurrentDisk(Q_UINT32*,Q_UINT32*); +#define NO_ERROR 0 +#endif + +extern QStringList qt_makeFilterList( const QString &filter ); + +extern int qt_cmp_si_sortSpec; + +#if defined(Q_C_CALLBACKS) +extern "C" { +#endif + +extern int qt_cmp_si( const void *, const void * ); + +#if defined(Q_C_CALLBACKS) +} +#endif + +static QString p_getenv( QString name ) +{ + DWORD len = GetEnvironmentVariableW( ( LPCWSTR ) qt_winTchar ( name, TRUE ), NULL, 0 ); + if ( len == 0 ) + return QString::null; + /* ansi: we allocate too much memory, but this shouldn't be the problem here ... */ + LPWSTR buf = (LPWSTR)new WCHAR[ len ]; + len = GetEnvironmentVariableW ( ( LPCWSTR ) qt_winTchar ( name, TRUE ), buf, len ); + if ( len == 0 ) + { + delete[] buf; + return QString::null; + } + QString ret = qt_winQString ( buf ); + delete[] buf; + return ret; +} + + +void QDir::slashify( QString& n ) +{ + for ( int i=0; i<(int)n.length(); i++ ) + { + if ( n[i] == '\\' ) + n[i] = '/'; + } +} + +QString QDir::homeDirPath() +{ + QString d = p_getenv ( "HOME" ); + if ( d.isNull () ) { + d = p_getenv ( "USERPROFILE" ); + if ( d.isNull () ) { + QString homeDrive = p_getenv ( "HOMEDRIVE" ); + QString homePath = p_getenv ( "HOMEPATH" ); + if ( !homeDrive.isNull () && !homePath.isNull () ) { + d = homeDrive + homePath; + } else { + d = rootDirPath (); + } + } + } + slashify( d ); + return d; +} + +QString QDir::canonicalPath() const +{ + QString r; + + char cur[PATH_MAX]; + char tmp[PATH_MAX]; + GETCWD( cur, PATH_MAX ); + if ( CHDIR(QFile::encodeName(dPath)) >= 0 ) { + GETCWD( tmp, PATH_MAX ); + r = QFile::decodeName(tmp); + } + CHDIR( cur ); + + slashify( r ); + return r; +} + +bool QDir::mkdir( const QString &dirName, bool acceptAbsPath ) const +{ +#if defined(__CYGWIN32_) + return MKDIR( QFile::encodeName(filePath(dirName,acceptAbsPath)), 0777 ) == 0; +#else + return _wmkdir( ( LPCWSTR ) filePath( dirName, acceptAbsPath ).ucs2() ) == 0; +#endif +} + +bool QDir::rmdir( const QString &dirName, bool acceptAbsPath ) const +{ +#if defined(__CYGWIN32_) + return RMDIR( QFile::encodeName(filePath(dirName,acceptAbsPath)) ) == 0; +#else + return _wrmdir( ( LPCWSTR ) filePath( dirName, acceptAbsPath ).ucs2() ) == 0; +#endif +} + +bool QDir::isReadable() const +{ + QString path = dPath; + if ( ( path[ 0 ] == '\\' ) || ( path[ 0 ] == '/' ) ) + path = rootDirPath() + path; +#if defined(__CYGWIN32_) + return ACCESS( QFile::encodeName(dPath), R_OK ) == 0; +#else + return ( _waccess( (wchar_t*) path.ucs2(), R_OK ) == 0 ); +#endif +} + +bool QDir::isRoot() const +{ + QString path = dPath; + slashify( path ); + return path == rootDirPath (); +} + +bool QDir::rename( const QString &name, const QString &newName, + bool acceptAbsPaths ) +{ + if ( name.isEmpty() || newName.isEmpty() ) { +#if defined(CHECK_NULL) + qWarning( "QDir::rename: Empty or null file name(s)" ); +#endif + return FALSE; + } + QString fn1 = filePath( name, acceptAbsPaths ); + QString fn2 = filePath( newName, acceptAbsPaths ); +#if defined(__CYGWIN32_) + return ::rename( QFile::encodeName(fn1), + QFile::encodeName(fn2) ) == 0; +#else + return MoveFileW( ( LPCWSTR ) fn1.ucs2(), ( LPCWSTR ) fn2.ucs2() ) != 0; +#endif +} + +bool QDir::setCurrent( const QString &path ) +{ +#if defined(__CYGWIN32_) + int r; + r = CHDIR( QFile::encodeName(path) ); + return r >= 0; +#else + if ( !QDir( path ).exists() ) + return false; + return ( SetCurrentDirectoryW( ( LPCWSTR ) path.ucs2() ) >= 0 ); +#endif +} + +QString QDir::currentDirPath() +{ + QString result; + +#if defined(__CYGWIN32_) + + STATBUF st; + if ( STAT( ".", &st ) == 0 ) { + char currentName[PATH_MAX]; + if ( GETCWD( currentName, PATH_MAX ) != 0 ) + result = QFile::decodeName(currentName); +#if defined(DEBUG) + if ( result.isNull() ) + qWarning( "QDir::currentDirPath: getcwd() failed" ); +#endif + } else { +#if defined(DEBUG) + qWarning( "QDir::currentDirPath: stat(\".\") failed" ); +#endif + } + +#else + + DWORD size = 0; + WCHAR currentName[ PATH_MAX ]; + size = ::GetCurrentDirectoryW( PATH_MAX, currentName ); + if ( size != 0 ) { + if ( size > PATH_MAX ) { + WCHAR * newCurrentName = new WCHAR[ size ]; + if ( ::GetCurrentDirectoryW( PATH_MAX, newCurrentName ) != 0 ) + result = QString::fromUcs2( ( ushort* ) newCurrentName ); + delete [] newCurrentName; + } else { + result = QString::fromUcs2( ( ushort* ) currentName ); + } + } + + if ( result.length() >= 2 && result[ 1 ] == ':' ) + result[ 0 ] = result.at( 0 ).upper(); // Force uppercase drive letters. +#endif + slashify( result ); + return result; +} + +QString QDir::rootDirPath() +{ + QString d = p_getenv ( "SystemDrive" ); + if ( d.isNull () ) + d = QString::fromLatin1( "c:" ); // not "c:\\" ! + slashify ( d ); + return d; +} + +bool QDir::isRelativePath( const QString &path ) +{ + if ( path.isEmpty() ) + return TRUE; + int p = 0; + if ( path[ 0 ].isLetter() && path[ 1 ] == ':' ) + p = 2; // we have checked the first 2. + return ( ( path[ p ] != '/' ) && ( path[ p ] != '\\' ) ); +} + +#undef IS_SUBDIR +#undef IS_RDONLY +#undef IS_ARCH +#undef IS_HIDDEN +#undef IS_SYSTEM +#undef FF_GETFIRST +#undef FF_GETNEXT +#undef FF_ERROR + +#if defined(_OS_WIN32_) +#define IS_SUBDIR FILE_ATTRIBUTE_DIRECTORY +#define IS_RDONLY FILE_ATTRIBUTE_READONLY +#define IS_ARCH FILE_ATTRIBUTE_ARCHIVE +#define IS_HIDDEN FILE_ATTRIBUTE_HIDDEN +#define IS_SYSTEM FILE_ATTRIBUTE_SYSTEM +#define FF_GETFIRST FindFirstFile +#define FF_GETNEXT FindNextFile +#define FF_ERROR INVALID_HANDLE_VALUE +#else +#define IS_SUBDIR _A_SUBDIR +#define IS_RDONLY _A_RDONLY +#define IS_ARCH _A_ARCH +#define IS_HIDDEN _A_HIDDEN +#define IS_SYSTEM _A_SYSTEM +#define FF_GETFIRST _findfirst +#define FF_GETNEXT _findnext +#define FF_ERROR -1 +#endif + + +bool QDir::readDirEntries( const QString &nameFilter, + int filterSpec, int sortSpec ) +{ + int i; + if ( !fList ) { + fList = new QStringList; + CHECK_PTR( fList ); + fiList = new QFileInfoList; + CHECK_PTR( fiList ); + fiList->setAutoDelete( TRUE ); + } else { + fList->clear(); + fiList->clear(); + } + + QStringList filters = qt_makeFilterList( nameFilter ); + + bool doDirs = (filterSpec & Dirs) != 0; + bool doFiles = (filterSpec & Files) != 0; + bool noSymLinks = (filterSpec & NoSymLinks) != 0; + bool doReadable = (filterSpec & Readable) != 0; + bool doWritable = (filterSpec & Writable) != 0; + bool doExecable = (filterSpec & Executable) != 0; + bool doHidden = (filterSpec & Hidden) != 0; + // show hidden files if the user asks explicitly for e.g. .* + if ( !doHidden && !nameFilter.isEmpty() && nameFilter[0] == '.' ) + doHidden = TRUE; + bool doModified = (filterSpec & Modified) != 0; + bool doSystem = (filterSpec & System) != 0; + + QRegExp wc( nameFilter.data(), FALSE, TRUE ); // wild card, case insensitive + bool first = TRUE; + QString p = dPath.copy(); + int plen = p.length(); +#if defined(_OS_WIN32_) + HANDLE ff; + WIN32_FIND_DATAW finfo; +#else + long ff; + _finddata_t finfo; +#endif + QFileInfo fi; + if ( plen == 0 ) + { +#if defined(CHECK_NULL) + warning( "QDir::readDirEntries: No directory name specified" ); +#endif + return FALSE; + } + if ( p.at(plen-1) != '/' && p.at(plen-1) != '\\' ) + p += '/'; + p += "*.*"; + +#if defined(__CYGWIN32_) + ff = FF_GETFIRST( p.data(), &finfo ); +#else + ff = FindFirstFileW ( ( LPCWSTR ) p.ucs2(), &finfo ); +#endif + if ( ff == FF_ERROR ) + { +#if defined(DEBUG) + warning( "QDir::readDirEntries: Cannot read the directory: %s", + (const char *)dPath ); +#endif + return FALSE; + } + + while ( TRUE ) + { + if ( first ) + first = FALSE; + else + { +#if defined(__CYGWIN32_) + if ( FF_GETNEXT(ff,&finfo) == -1 ) + break; +#else + //if ( !FF_GETNEXT(ff,&finfo) ) + // break; + if (!FindNextFileW(ff, &finfo )) + break; +#endif + } +#if defined(__CYGWIN32_) + int attrib = finfo.attrib; +#else + int attrib = finfo.dwFileAttributes; +#endif + bool isDir = (attrib & IS_SUBDIR) != 0; + bool isFile = !isDir; + bool isSymLink = FALSE; + bool isReadable = TRUE; + bool isWritable = (attrib & IS_RDONLY) == 0; + bool isExecable = FALSE; + bool isModified = (attrib & IS_ARCH) != 0; + bool isHidden = (attrib & IS_HIDDEN) != 0; + bool isSystem = (attrib & IS_SYSTEM) != 0; + +#if defined(__CYGWIN32_) + const char *fname = finfo.name; +#else + //const char *fname = finfo.cFileName; + QString fname = QString::fromUcs2( ( const unsigned short* ) finfo.cFileName); +#endif + if ( wc.match(fname.utf8()) == -1 && !(allDirs && isDir) ) + continue; + + QString name = fname; + if ( doExecable ) + { + QString ext = name.right(4).lower(); + if ( ext == ".exe" || ext == ".com" || ext == ".bat" || + ext == ".pif" || ext == ".cmd" ) + isExecable = TRUE; + } + + if ( (doDirs && isDir) || (doFiles && isFile) ) + { + if ( noSymLinks && isSymLink ) + continue; + if ( (filterSpec & RWEMask) != 0 ) + if ( (doReadable && !isReadable) || + (doWritable && !isWritable) || + (doExecable && !isExecable) ) + continue; + if ( doModified && !isModified ) + continue; + if ( !doHidden && isHidden ) + continue; + if ( !doSystem && isSystem ) + continue; + fi.setFile( *this, name ); + fiList->append( new QFileInfo( fi ) ); + } + } +#if defined(__CYGWIN32_) + _findclose( ff ); +#else + FindClose( ff ); +#endif + + // Sort... + QDirSortItem* si= new QDirSortItem[fiList->count()]; + QFileInfo* itm; + i=0; + for (itm = fiList->first(); itm; itm = fiList->next()) + si[i++].item = itm; + qt_cmp_si_sortSpec = sortSpec; + qsort( si, i, sizeof(si[0]), qt_cmp_si ); + // put them back in the list + fiList->setAutoDelete( FALSE ); + fiList->clear(); + int j; + for ( j=0; jappend( si[j].item ); + fList->append( si[j].item->fileName() ); + } + delete [] si; + fiList->setAutoDelete( TRUE ); + + if ( filterSpec == (FilterSpec)filtS && sortSpec == (SortSpec)sortS && + nameFilter == nameFilt ) + dirty = FALSE; + else + dirty = TRUE; + return TRUE; +} + +const QFileInfoList * QDir::drives() +{ + // at most one instance of QFileInfoList is leaked, and this variable + // points to that list + static QFileInfoList * knownMemoryLeak = 0; + + if ( !knownMemoryLeak ) { + knownMemoryLeak = new QFileInfoList; + +#if defined(_OS_WIN32_) + Q_UINT32 driveBits = (Q_UINT32) GetLogicalDrives() & 0x3ffffff; +#elif defined(_OS_OS2EMX_) + Q_UINT32 driveBits, cur; + if (DosQueryCurrentDisk(&cur,&driveBits) != NO_ERROR) + exit(1); + driveBits &= 0x3ffffff; +#endif + char driveName[4]; + qstrcpy( driveName, "a:/" ); + while( driveBits ) { + if ( driveBits & 1 ) + knownMemoryLeak->append( new QFileInfo( driveName ) ); + driveName[0]++; + driveBits = driveBits >> 1; + } + } + + return knownMemoryLeak; +} +#endif //QT_NO_DIR Index: branches/xZenu/src/util/doxygen/qtools/qmutex_unix.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qmutex_unix.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qmutex_unix.cpp (revision 1322) @@ -0,0 +1,117 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#include "qglobal.h" +#include "qmutex.h" +#include "qmutex_p.h" + +static pthread_mutex_t qAtomicMutex = PTHREAD_MUTEX_INITIALIZER; + +static void report_error(int code, const char *where, const char *what) +{ + if (code != 0) + qWarning("%s: %s failure: %d", where, what, code); +} + + +QMutexPrivate::QMutexPrivate() + : contenders(0), wakeup(FALSE) +{ + report_error(pthread_mutex_init(&mutex, NULL), "QMutex", "mutex init"); + report_error(pthread_cond_init(&cond, NULL), "QMutex", "cv init"); +} + +QMutexPrivate::~QMutexPrivate() +{ + report_error(pthread_cond_destroy(&cond), "QMutex", "cv destroy"); + report_error(pthread_mutex_destroy(&mutex), "QMutex", "mutex destroy"); +} + +void QMutexPrivate::wait() +{ + report_error(pthread_mutex_lock(&mutex), "QMutex::lock", "mutex lock"); + int errorCode = 0; + while (!wakeup) + { + errorCode = pthread_cond_wait(&cond, &mutex); + if (errorCode) + { + report_error(errorCode, "QMutex::lock()", "cv wait"); + } + } + wakeup = FALSE; + report_error(pthread_mutex_unlock(&mutex), "QMutex::lock", "mutex unlock"); +} + +void QMutexPrivate::wakeUp() +{ + report_error(pthread_mutex_lock(&mutex), "QMutex::unlock", "mutex lock"); + wakeup = TRUE; + report_error(pthread_cond_signal(&cond), "QMutex::unlock", "cv signal"); + report_error(pthread_mutex_unlock(&mutex), "QMutex::unlock", "mutex unlock"); +} + +bool QAtomicInt::testAndSet(int expectedValue,int newValue) +{ + bool returnValue = false; + pthread_mutex_lock(&qAtomicMutex); + if (m_value == expectedValue) + { + m_value = newValue; + returnValue = true; + } + pthread_mutex_unlock(&qAtomicMutex); + return returnValue; +} + +int QAtomicInt::fetchAndAdd(int valueToAdd) +{ + int returnValue; + pthread_mutex_lock(&qAtomicMutex); + returnValue = m_value; + m_value += valueToAdd; + pthread_mutex_unlock(&qAtomicMutex); + return returnValue; +} + Index: branches/xZenu/src/util/doxygen/qtools/qtextstream.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qtextstream.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qtextstream.h (revision 1322) @@ -0,0 +1,351 @@ +/**************************************************************************** +** +** +** Definition of QTextStream class +** +** Created : 940922 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QTEXTSTREAM_H +#define QTEXTSTREAM_H + +#ifndef QT_H +#include "qiodevice.h" +#include "qstring.h" +#include +#endif // QT_H + +#ifndef QT_NO_TEXTSTREAM +class QTextCodec; +class QTextDecoder; + +class QTextStreamPrivate; + +class Q_EXPORT QTextStream // text stream class +{ +public: + enum Encoding { Locale, Latin1, Unicode, UnicodeNetworkOrder, + UnicodeReverse, RawUnicode, UnicodeUTF8 }; + + void setEncoding( Encoding ); +#ifndef QT_NO_TEXTCODEC + void setCodec( QTextCodec* ); +#endif + + // Encoding encoding() const { return cmode; } + + QTextStream(); + QTextStream( QIODevice * ); + QTextStream( QString*, int mode ); + QTextStream( QString&, int mode ); // obsolete + QTextStream( QByteArray, int mode ); + QTextStream( FILE *, int mode ); + virtual ~QTextStream(); + + QIODevice *device() const; + void setDevice( QIODevice * ); + void unsetDevice(); + + bool atEnd() const; + bool eof() const; + + QTextStream &operator>>( QChar & ); + QTextStream &operator>>( char & ); + QTextStream &operator>>( signed short & ); + QTextStream &operator>>( unsigned short & ); + QTextStream &operator>>( signed int & ); + QTextStream &operator>>( unsigned int & ); + QTextStream &operator>>( signed long & ); + QTextStream &operator>>( unsigned long & ); + QTextStream &operator>>( float & ); + QTextStream &operator>>( double & ); + QTextStream &operator>>( char * ); + QTextStream &operator>>( QString & ); + QTextStream &operator>>( QCString & ); + + QTextStream &operator<<( QChar ); + QTextStream &operator<<( char ); + QTextStream &operator<<( signed short ); + QTextStream &operator<<( unsigned short ); + QTextStream &operator<<( signed int ); + QTextStream &operator<<( unsigned int ); + QTextStream &operator<<( signed long ); + QTextStream &operator<<( unsigned long ); + QTextStream &operator<<( float ); + QTextStream &operator<<( double ); + QTextStream &operator<<( const char* ); + QTextStream &operator<<( const QString & ); + QTextStream &operator<<( const QCString & ); + QTextStream &operator<<( void * ); // any pointer + + QTextStream &readRawBytes( char *, uint len ); + QTextStream &writeRawBytes( const char* , uint len ); + + QString readLine(); + QString read(); + void skipWhiteSpace(); + + enum { + skipws = 0x0001, // skip whitespace on input + left = 0x0002, // left-adjust output + right = 0x0004, // right-adjust output + internal = 0x0008, // pad after sign + bin = 0x0010, // binary format integer + oct = 0x0020, // octal format integer + dec = 0x0040, // decimal format integer + hex = 0x0080, // hex format integer + showbase = 0x0100, // show base indicator + showpoint = 0x0200, // force decimal point (float) + uppercase = 0x0400, // upper-case hex output + showpos = 0x0800, // add '+' to positive integers + scientific= 0x1000, // scientific float output + fixed = 0x2000 // fixed float output + }; + + static const int basefield; // bin | oct | dec | hex + static const int adjustfield; // left | right | internal + static const int floatfield; // scientific | fixed + + int flags() const; + int flags( int f ); + int setf( int bits ); + int setf( int bits, int mask ); + int unsetf( int bits ); + + void reset(); + + int width() const; + int width( int ); + int fill() const; + int fill( int ); + int precision() const; + int precision( int ); + +private: + long input_int(); + void init(); + QTextStream &output_int( int, ulong, bool ); + QIODevice *dev; + bool isNetworkOrder() { return internalOrder == QChar::networkOrdered(); } + + int fflags; + int fwidth; + int fillchar; + int fprec; + bool fstrm; + bool owndev; + QTextCodec *mapper; + QTextStreamPrivate * d; + QChar ungetcBuf; + bool latin1; + bool internalOrder; + bool doUnicodeHeader; + void *reserved_ptr; + + QChar eat_ws(); + void ts_ungetc( QChar ); + QChar ts_getc(); + uint ts_getbuf( QChar*, uint ); + void ts_putc(int); + void ts_putc(QChar); + bool ts_isspace(QChar); + bool ts_isdigit(QChar); + ulong input_bin(); + ulong input_oct(); + ulong input_dec(); + ulong input_hex(); + double input_double(); + QTextStream &writeBlock( const char* p, uint len ); + QTextStream &writeBlock( const QChar* p, uint len ); + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + QTextStream( const QTextStream & ); + QTextStream &operator=( const QTextStream & ); +#endif +}; + +typedef QTextStream QTS; + +class Q_EXPORT QTextIStream : public QTextStream { +public: + QTextIStream( QString* s ) : + QTextStream(s,IO_ReadOnly) { } + QTextIStream( QByteArray ba ) : + QTextStream(ba,IO_ReadOnly) { } + QTextIStream( FILE *f ) : + QTextStream(f,IO_ReadOnly) { } +}; + +class Q_EXPORT QTextOStream : public QTextStream { +public: + QTextOStream( QString* s ) : + QTextStream(s,IO_WriteOnly) { } + QTextOStream( QByteArray ba ) : + QTextStream(ba,IO_WriteOnly) { } + QTextOStream( FILE *f ) : + QTextStream(f,IO_WriteOnly) { } +}; + +/***************************************************************************** + QTextStream inline functions + *****************************************************************************/ + +inline QIODevice *QTextStream::device() const +{ return dev; } + +inline bool QTextStream::atEnd() const +{ return dev ? dev->atEnd() : FALSE; } + +inline bool QTextStream::eof() const +{ return atEnd(); } + +inline int QTextStream::flags() const +{ return fflags; } + +inline int QTextStream::flags( int f ) +{ int oldf = fflags; fflags = f; return oldf; } + +inline int QTextStream::setf( int bits ) +{ int oldf = fflags; fflags |= bits; return oldf; } + +inline int QTextStream::setf( int bits, int mask ) +{ int oldf = fflags; fflags = (fflags & ~mask) | (bits & mask); return oldf; } + +inline int QTextStream::unsetf( int bits ) +{ int oldf = fflags; fflags &= ~bits; return oldf; } + +inline int QTextStream::width() const +{ return fwidth; } + +inline int QTextStream::width( int w ) +{ int oldw = fwidth; fwidth = w; return oldw; } + +inline int QTextStream::fill() const +{ return fillchar; } + +inline int QTextStream::fill( int f ) +{ int oldc = fillchar; fillchar = f; return oldc; } + +inline int QTextStream::precision() const +{ return fprec; } + +inline int QTextStream::precision( int p ) +{ int oldp = fprec; fprec = p; return oldp; } + +/*! + Returns one character from the stream, or EOF. +*/ +inline QChar QTextStream::ts_getc() +{ QChar r; return ( ts_getbuf( &r,1 ) == 1 ? r : QChar((ushort)0xffff) ); } + +/***************************************************************************** + QTextStream manipulators + *****************************************************************************/ + +typedef QTextStream & (*QTSFUNC)(QTextStream &);// manipulator function +typedef int (QTextStream::*QTSMFI)(int); // manipulator w/int argument + +class Q_EXPORT QTSManip { // text stream manipulator +public: + QTSManip( QTSMFI m, int a ) { mf=m; arg=a; } + void exec( QTextStream &s ) { (s.*mf)(arg); } +private: + QTSMFI mf; // QTextStream member function + int arg; // member function argument +}; + +Q_EXPORT inline QTextStream &operator>>( QTextStream &s, QTSFUNC f ) +{ return (*f)( s ); } + +Q_EXPORT inline QTextStream &operator<<( QTextStream &s, QTSFUNC f ) +{ return (*f)( s ); } + +Q_EXPORT inline QTextStream &operator<<( QTextStream &s, QTSManip m ) +{ m.exec(s); return s; } + +Q_EXPORT QTextStream &bin( QTextStream &s ); // set bin notation +Q_EXPORT QTextStream &oct( QTextStream &s ); // set oct notation +Q_EXPORT QTextStream &dec( QTextStream &s ); // set dec notation +Q_EXPORT QTextStream &hex( QTextStream &s ); // set hex notation +Q_EXPORT QTextStream &endl( QTextStream &s ); // insert EOL ('\n') +Q_EXPORT QTextStream &flush( QTextStream &s ); // flush output +Q_EXPORT QTextStream &ws( QTextStream &s ); // eat whitespace on input +Q_EXPORT QTextStream &reset( QTextStream &s ); // set default flags + +Q_EXPORT inline QTSManip qSetW( int w ) +{ + QTSMFI func = &QTextStream::width; + return QTSManip(func,w); +} + +Q_EXPORT inline QTSManip qSetFill( int f ) +{ + QTSMFI func = &QTextStream::fill; + return QTSManip(func,f); +} + +Q_EXPORT inline QTSManip qSetPrecision( int p ) +{ + QTSMFI func = &QTextStream::precision; + return QTSManip(func,p); +} + + +#ifndef QT_ALTERNATE_QTSMANIP + +// These will go away in Qt 3.0, as they conflict with std libs +// +// If you get conflicts now, #define QT_ALTERNATE_QTSMANIP before +// including this file. + +Q_EXPORT inline QTSManip setw( int w ) +{ + QTSMFI func = &QTextStream::width; + return QTSManip(func,w); +} + +Q_EXPORT inline QTSManip setfill( int f ) +{ + QTSMFI func = &QTextStream::fill; + return QTSManip(func,f); +} + +Q_EXPORT inline QTSManip setprecision( int p ) +{ + QTSMFI func = &QTextStream::precision; + return QTSManip(func,p); +} +#endif + +#endif // QT_NO_TEXTSTREAM +#endif // QTEXTSTREAM_H Index: branches/xZenu/src/util/doxygen/qtools/qstring.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qstring.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qstring.cpp (revision 1322) @@ -0,0 +1,15318 @@ +/**************************************************************************** +** +** +** Implementation of the QString class and related Unicode functions +** +** Created : 920722 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +// Don't define it while compiling this module, or USERS of Qt will +// not be able to link. +#ifdef QT_NO_CAST_ASCII +#undef QT_NO_CAST_ASCII +#endif + +#include "qstring.h" +#include "qregexp.h" +#include "qdatastream.h" +#include "qtextcodec.h" +#include "qstack.h" +#include +#include +#include +#include +#include + + +/* ------------------------------------------------------------------------- + * unicode information + * these tables are generated from the unicode reference file + * ftp://ftp.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.html + * + * Lars Knoll + * ------------------------------------------------------------------------- + */ + +/* Perl script to generate (run perl -x tools/qstring.cpp) + +#!perl + +sub numberize +{ + my(%r, $n, $id); + for $id ( @_ ) { + $id="" if $id eq "EMPTY"; + $r{$id}=$n++; + } + return %r; +} + + +# Code to integer mappings... +# +%category_code = numberize(qw{ + EMPTY + Mn Mc Me + Nd Nl No + Zs Zl Zp + Cc Cf Cs Co Cn + + Lu Ll Lt Lm Lo + Pc Pd Ps Pe Pi Pf Po + Sm Sc Sk So +}); +%bidi_category_code = numberize(qw{ + L R EN ES ET AN CS B S WS ON LRE LRO AL RLE RLO PDF NSM BN}); +%character_decomposition_tag = numberize(qw{ + + + +}); +%mirrored_code = numberize(qw{N Y}); + +%joining_code = numberize(qw{U D R C}); + +# Read data into hashes... +# +open IN, "UnicodeData.txt"; +$position = 1; +while () { + @fields = split /;/; + $code = shift @fields; + for $n (qw{ + name category combining_class bidi_category + character_decomposition decimal_digit_value digit_value + numeric_value mirrored oldname comment + uppercase lowercase titlecase}) + { + $id = shift @fields; + $codes = "${n}_code"; + if ( defined %$codes && defined $$codes{$id} ) { + $id = $$codes{$id}; + } + ${$n}{$code}=$id; + } + $decomp = $character_decomposition{$code}; + if ( length $decomp == 0 ) { + $decomp = ""; + } + if (substr($decomp, 0, 1) ne '<') { + $decomp = " " . $decomp; + } + @fields = split(" ", $decomp); + $tag = shift @fields; + $tag = $character_decomposition_tag{$tag}; + $decomp = join( ", 0x", @fields ); + $decomp = "0x".$decomp; + $decomposition{$code} = $decomp; + $decomposition_tag{$code} = $tag; + $decomposition_pos{$code} = $position; + $len = scalar(@fields); + $decomposition_len{$code} = $len; + +# we use canonical decompositions longer than 1 char +# and all arabic ligatures for the ligature table + if(($len > 1 and $tag == 1) or ($tag > 3 and $tag < 8)) { +# ligature to add... + $start = shift @fields; + $ligature{$start} = $ligature{$start}." ".$code; + } + +# adjust position + if($len != 0) { + $position += $len + 3; + } + + +} + +open IN2, "ArabicShaping.txt"; +$position = 1; +while () { + @fields = split /;/; + $code = shift @fields; + $dummy = shift @fields; + $join = shift @fields; + $join =~ s/ //g; + $join = $joining_code{$join}; + $joining{$code}=$join; +} + +# Build pages... +# +$rowtable_txt = + "static const Q_UINT8 * const unicode_info[256] = {"; +for $row ( 0..255 ) { + $nonzero=0; + $txt = ""; + for $cell ( 0..255 ) { + $code = sprintf("%02X%02X",$row,$cell); + $info = $category{$code}; + $info = 0 if !defined $info; + $txt .= "\n " if $cell%8 == 0; + $txt .= "$info, "; + } + $therow = $row{$txt}; + if ( !defined $therow ) { + $size+=256; + $therow = "ui_".sprintf("%02X",$row); + $rowtext{$therow} = + "static const Q_UINT8 ${therow}[] = {$txt\n};\n\n"; + $row{$txt}=$therow; + } + $rowtable_txt .= "\n " if $row%8 == 0; + $rowtable_txt .= "$therow, "; +} + +print "// START OF GENERATED DATA\n\n"; +print "#ifndef QT_NO_UNICODETABLES\n\n"; + +# Print pages... +# +for $r ( sort keys %rowtext ) { + print $rowtext{$r}; +} +print "$rowtable_txt\n};\n"; +$size += 256*4; +print "// $size bytes\n\n"; + +# Build decomposition tables +# +$rowtable_txt = + "static const Q_UINT16 * const decomposition_info[256] = {"; +$table_txt = + "static const Q_UINT16 decomposition_map[] = {\n 0,\n"; +for $row ( 0..255 ) { + $nonzero=0; + $txt = ""; + for $cell ( 0..255 ) { + $code = sprintf("%02X%02X",$row,$cell); + $txt .= "\n " if $cell%8 == 0; + if( $decomposition_tag{$code} != 0 ) { + $txt .= " $decomposition_pos{$code},"; + $table_txt .= " $decomposition_tag{$code},"; + $table_txt .= " 0x$code,"; + $table_txt .= " $decomposition{$code}, 0,\n"; + $size += 2 * $decomposition_len{$code} + 6; + } else { + $txt .= " 0,"; + } + } + $therow = $row{$txt}; + if ( !defined $therow ) { + $size+=512; + $therow = "di_".sprintf("%02X",$row); + $dec_rowtext{$therow} = + "static const Q_UINT16 ${therow}[] = {$txt\n};\n\n"; + $row{$txt}=$therow; + } + $rowtable_txt .= "\n " if $row%8 == 0; + $rowtable_txt .= "$therow, "; +} + +# Print decomposition tables +# +print "$table_txt\n};\n\n"; +for $r ( sort keys %dec_rowtext ) { + print $dec_rowtext{$r}; +} +print "$rowtable_txt\n};\n"; +$size += 256*4; +print "// $size bytes\n\n"; + + +# build ligature tables +# +$size = 0; +$position = 1; +$rowtable_txt = + "static const Q_UINT16 * const ligature_info[256] = {"; +$table_txt = + "static const Q_UINT16 ligature_map[] = {\n 0,\n"; +for $lig_row ( 0..255 ) { + $nonzero=0; + $txt = ""; + for $cell ( 0..255 ) { + $code = sprintf("%02X%02X",$lig_row,$cell); + $txt .= "\n " if $cell%8 == 0; + if( defined $ligature{$code} ) { + $txt .= " $position,"; + @ligature = split(" ", $ligature{$code}); +# we need to sort ligatures according to their length. +# long ones have to come first! + @ligature_sort = sort { $decomposition_len{$b} <=> $decomposition_len{$a} } @ligature; +# now replace each code by it's position in +# the decomposition map. + undef(@lig_pos); + for $n (@ligature_sort) { + push(@lig_pos, $decomposition_pos{$n}); + } +# debug info + if( 0 ) { + print "ligatures: $ligature{$code}\n"; + $sort = join(" ", @ligature_sort); + print "sorted : $sort\n"; + } + $lig = join(", ", @lig_pos); + $table_txt .= " $lig, 0,\n"; + $size += 2 * scalar(@ligature) + 2; + $position += scalar(@ligature) + 1; + } else { + $txt .= " 0,"; + } + } + $therow = $lig_row{$txt}; + if ( !defined $therow ) { + $size+=512; + $therow = "li_".sprintf("%02X",$lig_row); + $lig_rowtext{$therow} = + "static const Q_UINT16 ${therow}[] = {$txt\n};\n\n"; + $lig_row{$txt}=$therow; + } + $rowtable_txt .= "\n " if $lig_row%8 == 0; + $rowtable_txt .= "$therow, "; +} + +# Print ligature tables +# +print "$table_txt\n};\n\n"; +for $r ( sort keys %lig_rowtext ) { + print $lig_rowtext{$r}; +} +print "$rowtable_txt\n};\n"; +$size += 256*4; +print "// $size bytes\n\n"; + + + +# Build direction/joining/mirrored pages... +# +$rowtable_txt = + "static const Q_UINT8 * const direction_info[256] = {"; +for $dir_row ( 0..255 ) { + $nonzero=0; + $txt = ""; + for $cell ( 0..255 ) { + $code = sprintf("%02X%02X",$dir_row,$cell); + $dir = $bidi_category{$code}; + $dir = 0 if !defined $dir; + $join = $joining{$code}; + $join = 0 if !defined $join; + $mirr = $mirrored{$code}; + $mirr = 0 if !defined $mirr; + $info = $dir + 32*$join + 128*$mirr; + $txt .= "\n " if $cell%8 == 0; + $txt .= "$info, "; + } + $therow = $dir_row{$txt}; + if ( !defined $therow ) { + $size+=256; + $therow = "dir_".sprintf("%02X",$dir_row); + $dir_rowtext{$therow} = + "static const Q_UINT8 ${therow}[] = {$txt\n};\n\n"; + $dir_row{$txt}=$therow; + } + $rowtable_txt .= "\n " if $dir_row%8 == 0; + $rowtable_txt .= "$therow, "; +} + +# Print pages... +# +for $r ( sort keys %dir_rowtext ) { + print $dir_rowtext{$r}; +} +print "$rowtable_txt\n};\n"; +$size += 256*4; +print "// $size bytes\n\n"; + + + +print "#endif\n\n"; +print "// END OF GENERATED DATA\n\n"; + + +__END__ + +*/ + + +// START OF GENERATED DATA + +static const Q_UINT8 ui_00[] = { + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 7, 26, 26, 26, 28, 26, 26, 26, + 22, 23, 26, 27, 26, 21, 26, 26, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 26, 26, 27, 27, 27, 26, + 26, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 22, 26, 23, 29, 20, + 29, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 22, 27, 23, 27, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 7, 26, 28, 28, 28, 28, 30, 30, + 29, 30, 16, 24, 27, 21, 30, 29, + 30, 27, 6, 6, 29, 16, 30, 26, + 29, 6, 16, 25, 6, 6, 6, 26, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 27, + 15, 15, 15, 15, 15, 15, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 27, + 16, 16, 16, 16, 16, 16, 16, 16, +}; + +#ifndef QT_NO_UNICODETABLES + +static const Q_UINT8 ui_01[] = { + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 16, 15, 16, 15, 16, 15, 16, 15, + 16, 15, 16, 15, 16, 15, 16, 15, + 16, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 15, 16, 15, 16, 15, 16, 16, + 16, 15, 15, 16, 15, 16, 15, 15, + 16, 15, 15, 15, 16, 16, 15, 15, + 15, 15, 16, 15, 15, 16, 15, 15, + 15, 16, 16, 16, 15, 15, 16, 15, + 15, 16, 15, 16, 15, 16, 15, 15, + 16, 15, 16, 16, 15, 16, 15, 15, + 16, 15, 15, 15, 16, 15, 16, 15, + 15, 16, 16, 19, 15, 16, 16, 16, + 19, 19, 19, 19, 15, 17, 16, 15, + 17, 16, 15, 17, 16, 15, 16, 15, + 16, 15, 16, 15, 16, 15, 16, 15, + 16, 15, 16, 15, 16, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 16, 15, 17, 16, 15, 16, 15, 15, + 15, 16, 15, 16, 15, 16, 15, 16, +}; + +static const Q_UINT8 ui_02[] = { + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 0, 0, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 0, 0, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 29, 29, 18, 18, 18, 18, 18, + 18, 18, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, + 18, 18, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, + 18, 18, 18, 18, 18, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 18, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_03[] = { + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 29, 29, 0, 0, + 0, 0, 18, 0, 0, 0, 26, 0, + 0, 0, 0, 0, 29, 29, 15, 26, + 15, 15, 15, 0, 15, 0, 15, 15, + 16, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 0, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 15, 15, 15, 16, 16, 16, + 0, 0, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 16, 16, 16, 16, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_04[] = { + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 30, 1, 1, 1, 1, 0, + 3, 3, 0, 0, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 15, 16, 15, 16, 0, 0, 15, + 16, 0, 0, 15, 16, 0, 0, 0, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 0, 0, + 15, 16, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_05[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 0, + 0, 18, 26, 26, 26, 26, 26, 26, + 0, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 0, 26, 21, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 1, 26, 1, + 26, 1, 1, 26, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 0, 0, 0, 0, 0, + 19, 19, 19, 26, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_06[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 26, 0, 0, 0, 26, + 0, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 0, 0, 0, 0, 0, + 18, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 26, 26, 26, 26, 0, 0, + 1, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 26, 19, 1, 1, + 1, 1, 1, 1, 1, 3, 3, 1, + 1, 1, 1, 1, 1, 18, 18, 1, + 1, 30, 1, 1, 1, 1, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 19, 19, 19, 30, 30, 0, +}; + +static const Q_UINT8 ui_07[] = { + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 0, 11, + 19, 1, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_08[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_09[] = { + 0, 1, 1, 2, 0, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 0, 0, 1, 19, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 1, 0, 0, + 19, 1, 1, 1, 1, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 1, 1, 26, 26, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 26, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 2, 0, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 0, 19, + 19, 0, 0, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 0, 0, 0, 19, 19, + 19, 19, 0, 0, 1, 0, 2, 2, + 2, 1, 1, 1, 1, 0, 0, 2, + 2, 0, 0, 2, 2, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 0, 19, 19, 0, 19, + 19, 19, 1, 1, 0, 0, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 19, 19, 28, 28, 6, 6, 6, 6, + 6, 6, 30, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_0A[] = { + 0, 0, 1, 0, 0, 19, 19, 19, + 19, 19, 19, 0, 0, 0, 0, 19, + 19, 0, 0, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 19, 0, 19, 19, 0, + 19, 19, 0, 0, 1, 0, 2, 2, + 2, 1, 1, 0, 0, 0, 0, 1, + 1, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 19, 19, 19, 19, 0, 19, 0, + 0, 0, 0, 0, 0, 0, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 19, 19, 19, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 2, 0, 19, 19, 19, + 19, 19, 19, 19, 0, 19, 0, 19, + 19, 19, 0, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 19, 0, 19, 19, 19, + 19, 19, 0, 0, 1, 19, 2, 2, + 2, 1, 1, 1, 1, 1, 0, 1, + 1, 2, 0, 2, 2, 1, 0, 0, + 19, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 0, 0, 0, 0, 0, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_0B[] = { + 0, 1, 2, 2, 0, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 0, 19, + 19, 0, 0, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 19, 0, 0, 19, 19, + 19, 19, 0, 0, 1, 19, 2, 1, + 2, 1, 1, 1, 0, 0, 0, 2, + 2, 0, 0, 2, 2, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 2, + 0, 0, 0, 0, 19, 19, 0, 19, + 19, 19, 0, 0, 0, 0, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 30, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 0, 19, 19, 19, + 19, 19, 19, 0, 0, 0, 19, 19, + 19, 0, 19, 19, 19, 19, 0, 0, + 0, 19, 19, 0, 19, 0, 19, 19, + 0, 0, 0, 19, 19, 0, 0, 0, + 19, 19, 19, 0, 0, 0, 19, 19, + 19, 19, 19, 19, 19, 19, 0, 19, + 19, 19, 0, 0, 0, 0, 2, 2, + 1, 2, 2, 0, 0, 0, 2, 2, + 2, 0, 2, 2, 2, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 6, 6, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_0C[] = { + 0, 2, 2, 2, 0, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 0, 19, 19, 19, + 19, 19, 0, 0, 0, 0, 1, 1, + 1, 2, 2, 2, 2, 0, 1, 1, + 1, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 0, 0, 0, 0, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 0, 19, 19, 19, + 19, 19, 0, 0, 0, 0, 2, 1, + 2, 2, 2, 2, 2, 0, 1, 2, + 2, 0, 2, 2, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, + 0, 0, 0, 0, 0, 0, 19, 0, + 19, 19, 0, 0, 0, 0, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_0D[] = { + 0, 0, 2, 2, 0, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 0, 0, 0, 0, 2, 2, + 2, 1, 1, 1, 0, 0, 2, 2, + 2, 0, 2, 2, 2, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 0, 0, 0, 0, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 0, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 0, 0, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 0, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 0, 19, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 0, + 0, 0, 1, 0, 0, 0, 0, 2, + 2, 2, 1, 1, 1, 0, 1, 0, + 2, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_0E[] = { + 0, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 1, 19, 19, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 28, + 19, 19, 19, 19, 19, 19, 18, 1, + 1, 1, 1, 1, 1, 1, 1, 26, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 26, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 19, 19, 0, 19, 0, 0, 19, + 19, 0, 19, 0, 0, 19, 0, 0, + 0, 0, 0, 0, 19, 19, 19, 19, + 0, 19, 19, 19, 19, 19, 19, 19, + 0, 19, 19, 19, 0, 19, 0, 19, + 0, 0, 19, 19, 0, 19, 19, 19, + 19, 1, 19, 19, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 19, 0, 0, + 19, 19, 19, 19, 19, 0, 18, 0, + 1, 1, 1, 1, 1, 1, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 0, 0, 19, 19, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_0F[] = { + 19, 30, 30, 30, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 30, 30, 30, 30, 30, + 1, 1, 30, 30, 30, 30, 30, 30, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 30, 1, 30, 1, + 30, 1, 22, 23, 22, 23, 2, 2, + 19, 19, 19, 19, 19, 19, 19, 19, + 0, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, + 1, 1, 1, 1, 1, 26, 1, 1, + 19, 19, 19, 19, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 30, 30, + 30, 30, 30, 30, 30, 30, 1, 30, + 30, 30, 30, 30, 30, 0, 0, 30, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_10[] = { + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 0, 19, 19, 19, 19, 19, + 0, 19, 19, 0, 2, 1, 1, 1, + 1, 2, 1, 0, 0, 0, 1, 1, + 2, 1, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 26, 26, 26, 26, 26, 26, + 19, 19, 19, 19, 19, 19, 2, 2, + 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 0, 0, 0, 26, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_11[] = { + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 0, 0, 0, 0, 0, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_12[] = { + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 0, 19, 19, 19, 19, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 0, 19, 19, 19, 19, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 0, 19, 19, 19, 19, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 0, 19, 19, 19, 19, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 0, 19, 19, 19, 19, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, +}; + +static const Q_UINT8 ui_13[] = { + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 0, 19, 19, 19, 19, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 0, 0, 0, 0, 0, + 0, 26, 26, 26, 26, 26, 26, 26, + 26, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_14[] = { + 0, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, +}; + +static const Q_UINT8 ui_15[] = { + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, +}; + +static const Q_UINT8 ui_16[] = { + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 26, 26, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 7, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 22, 23, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 26, 26, 26, 6, 6, + 6, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_17[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 2, 2, 2, 1, + 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, + 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 26, 26, 26, 26, + 26, 26, 26, 28, 26, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_18[] = { + 26, 26, 26, 26, 26, 26, 21, 26, + 26, 26, 26, 11, 11, 11, 11, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 18, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_1E[] = { + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 16, 16, + 16, 16, 16, 16, 0, 0, 0, 0, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 15, 16, 15, 16, 15, 16, + 15, 16, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_1F[] = { + 16, 16, 16, 16, 16, 16, 16, 16, + 15, 15, 15, 15, 15, 15, 15, 15, + 16, 16, 16, 16, 16, 16, 0, 0, + 15, 15, 15, 15, 15, 15, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, + 15, 15, 15, 15, 15, 15, 15, 15, + 16, 16, 16, 16, 16, 16, 16, 16, + 15, 15, 15, 15, 15, 15, 15, 15, + 16, 16, 16, 16, 16, 16, 0, 0, + 15, 15, 15, 15, 15, 15, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, + 0, 15, 0, 15, 0, 15, 0, 15, + 16, 16, 16, 16, 16, 16, 16, 16, + 15, 15, 15, 15, 15, 15, 15, 15, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, + 17, 17, 17, 17, 17, 17, 17, 17, + 16, 16, 16, 16, 16, 16, 16, 16, + 17, 17, 17, 17, 17, 17, 17, 17, + 16, 16, 16, 16, 16, 16, 16, 16, + 17, 17, 17, 17, 17, 17, 17, 17, + 16, 16, 16, 16, 16, 0, 16, 16, + 15, 15, 15, 15, 17, 29, 16, 29, + 29, 29, 16, 16, 16, 0, 16, 16, + 15, 15, 15, 15, 17, 29, 29, 29, + 16, 16, 16, 16, 0, 0, 16, 16, + 15, 15, 15, 15, 0, 29, 29, 29, + 16, 16, 16, 16, 16, 16, 16, 16, + 15, 15, 15, 15, 15, 29, 29, 29, + 0, 0, 16, 16, 16, 0, 16, 16, + 15, 15, 15, 15, 17, 29, 29, 0, +}; + +static const Q_UINT8 ui_20[] = { + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 11, 11, 11, 11, + 21, 21, 21, 21, 21, 21, 26, 26, + 24, 25, 22, 24, 24, 25, 22, 24, + 26, 26, 26, 26, 26, 26, 26, 26, + 8, 9, 11, 11, 11, 11, 11, 7, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 24, 25, 26, 26, 26, 26, 20, + 20, 26, 26, 26, 27, 22, 23, 0, + 26, 26, 26, 26, 26, 26, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 11, 11, 11, 11, 11, 11, + 6, 0, 0, 0, 6, 6, 6, 6, + 6, 6, 27, 27, 27, 22, 23, 16, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 27, 27, 27, 22, 23, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 3, 3, + 3, 1, 3, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_21[] = { + 30, 30, 15, 30, 30, 30, 30, 15, + 30, 30, 16, 15, 15, 15, 16, 16, + 15, 15, 15, 16, 30, 15, 30, 30, + 30, 15, 15, 15, 15, 15, 30, 30, + 30, 30, 30, 30, 15, 30, 15, 30, + 15, 30, 15, 15, 15, 15, 30, 16, + 15, 15, 30, 15, 16, 19, 19, 19, + 19, 16, 30, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 27, 27, 27, 27, 27, 30, 30, 30, + 30, 30, 27, 27, 30, 30, 30, 30, + 27, 30, 30, 27, 30, 30, 27, 30, + 30, 30, 30, 30, 30, 30, 27, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 27, 27, + 30, 30, 27, 30, 27, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_22[] = { + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_23[] = { + 30, 30, 30, 30, 30, 30, 30, 30, + 27, 27, 27, 27, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 27, 27, 30, 30, 30, 30, 30, 30, + 30, 22, 23, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 0, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_24[] = { + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_25[] = { + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 27, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 27, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_26[] = { + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 0, 0, 0, 0, + 0, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 27, + 30, 30, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_27[] = { + 0, 30, 30, 30, 30, 0, 30, 30, + 30, 30, 0, 0, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 0, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 0, 30, 0, 30, + 30, 30, 30, 0, 0, 0, 30, 0, + 30, 30, 30, 30, 30, 30, 30, 0, + 0, 30, 30, 30, 30, 30, 30, 30, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 30, 0, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 0, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_28[] = { + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, +}; + +static const Q_UINT8 ui_2E[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 0, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_2F[] = { + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_30[] = { + 7, 26, 26, 26, 30, 18, 19, 5, + 22, 23, 22, 23, 22, 23, 22, 23, + 22, 23, 30, 30, 22, 23, 22, 23, + 22, 23, 22, 23, 21, 22, 23, 23, + 30, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 1, 1, 1, 1, 1, 1, + 21, 18, 18, 18, 18, 18, 30, 30, + 5, 5, 5, 0, 0, 0, 30, 30, + 0, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 0, 0, + 0, 1, 1, 29, 29, 18, 18, 0, + 0, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 20, 18, 18, 18, 0, +}; + +static const Q_UINT8 ui_31[] = { + 0, 0, 0, 0, 0, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 0, 0, + 0, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 30, 30, 6, 6, 6, 6, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_32[] = { + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 0, 0, 0, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 0, 0, 0, 30, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 0, 0, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 0, +}; + +static const Q_UINT8 ui_33[] = { + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 0, + 0, 0, 0, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 0, +}; + +static const Q_UINT8 ui_34[] = { + 19, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_4D[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 19, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_9F[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 19, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_A4[] = { + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 0, 0, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 0, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, + 30, 0, 30, 30, 30, 0, 30, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_D7[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 19, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_D8[] = { + 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_DB[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 12, + 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 12, +}; + +static const Q_UINT8 ui_DF[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 12, +}; + +static const Q_UINT8 ui_E0[] = { + 13, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_F8[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 13, +}; + +static const Q_UINT8 ui_FA[] = { + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_FB[] = { + 16, 16, 16, 16, 16, 16, 16, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 16, 16, 16, 16, 16, + 0, 0, 0, 0, 0, 19, 1, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 27, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 19, 19, 19, 19, 19, 0, 19, 0, + 19, 19, 0, 19, 19, 0, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, +}; + +static const Q_UINT8 ui_FD[] = { + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 22, 23, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 0, 0, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 0, 0, 0, 0, +}; + +static const Q_UINT8 ui_FE[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 26, 21, 21, 20, 20, 22, 23, 22, + 23, 22, 23, 22, 23, 22, 23, 22, + 23, 22, 23, 22, 23, 0, 0, 0, + 0, 26, 26, 26, 26, 20, 20, 20, + 26, 26, 26, 0, 26, 26, 26, 26, + 21, 22, 23, 22, 23, 22, 23, 26, + 26, 26, 27, 21, 27, 27, 27, 0, + 26, 28, 26, 26, 0, 0, 0, 0, + 19, 19, 19, 0, 19, 0, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 0, 11, +}; + +static const Q_UINT8 ui_FF[] = { + 0, 26, 26, 26, 28, 26, 26, 26, + 22, 23, 26, 27, 26, 21, 26, 26, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 26, 26, 27, 27, 27, 26, + 26, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 22, 26, 23, 29, 20, + 29, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 22, 27, 23, 27, 0, + 0, 26, 22, 23, 26, 20, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 18, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 18, 18, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 0, + 0, 0, 19, 19, 19, 19, 19, 19, + 0, 0, 19, 19, 19, 19, 19, 19, + 0, 0, 19, 19, 19, 19, 19, 19, + 0, 0, 19, 19, 19, 0, 0, 0, + 28, 28, 27, 29, 30, 28, 28, 0, + 30, 27, 27, 27, 27, 30, 30, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 11, 11, 11, 30, 30, 0, 0, +}; + +static const Q_UINT8 * const unicode_info[256] = { + ui_00, ui_01, ui_02, ui_03, ui_04, ui_05, ui_06, ui_07, + ui_08, ui_09, ui_0A, ui_0B, ui_0C, ui_0D, ui_0E, ui_0F, + ui_10, ui_11, ui_12, ui_13, ui_14, ui_15, ui_16, ui_17, + ui_18, ui_08, ui_08, ui_08, ui_08, ui_08, ui_1E, ui_1F, + ui_20, ui_21, ui_22, ui_23, ui_24, ui_25, ui_26, ui_27, + ui_28, ui_08, ui_08, ui_08, ui_08, ui_08, ui_2E, ui_2F, + ui_30, ui_31, ui_32, ui_33, ui_34, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_4D, ui_34, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_9F, + ui_15, ui_15, ui_15, ui_15, ui_A4, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_34, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_D7, + ui_D8, ui_08, ui_08, ui_DB, ui_D8, ui_08, ui_08, ui_DF, + ui_E0, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, + ui_F8, ui_15, ui_FA, ui_FB, ui_15, ui_FD, ui_FE, ui_FF, +}; +// 15616 bytes + +static const Q_UINT16 decomposition_map [] = { + 0, + 3, 0x00A0, 0x0020, 0, + 16, 0x00A8, 0x0020, 0x0308, 0, + 9, 0x00AA, 0x0061, 0, + 16, 0x00AF, 0x0020, 0x0304, 0, + 9, 0x00B2, 0x0032, 0, + 9, 0x00B3, 0x0033, 0, + 16, 0x00B4, 0x0020, 0x0301, 0, + 16, 0x00B5, 0x03BC, 0, + 16, 0x00B8, 0x0020, 0x0327, 0, + 9, 0x00B9, 0x0031, 0, + 9, 0x00BA, 0x006F, 0, + 17, 0x00BC, 0x0031, 0x2044, 0x0034, 0, + 17, 0x00BD, 0x0031, 0x2044, 0x0032, 0, + 17, 0x00BE, 0x0033, 0x2044, 0x0034, 0, + 1, 0x00C0, 0x0041, 0x0300, 0, + 1, 0x00C1, 0x0041, 0x0301, 0, + 1, 0x00C2, 0x0041, 0x0302, 0, + 1, 0x00C3, 0x0041, 0x0303, 0, + 1, 0x00C4, 0x0041, 0x0308, 0, + 1, 0x00C5, 0x0041, 0x030A, 0, + 1, 0x00C7, 0x0043, 0x0327, 0, + 1, 0x00C8, 0x0045, 0x0300, 0, + 1, 0x00C9, 0x0045, 0x0301, 0, + 1, 0x00CA, 0x0045, 0x0302, 0, + 1, 0x00CB, 0x0045, 0x0308, 0, + 1, 0x00CC, 0x0049, 0x0300, 0, + 1, 0x00CD, 0x0049, 0x0301, 0, + 1, 0x00CE, 0x0049, 0x0302, 0, + 1, 0x00CF, 0x0049, 0x0308, 0, + 1, 0x00D1, 0x004E, 0x0303, 0, + 1, 0x00D2, 0x004F, 0x0300, 0, + 1, 0x00D3, 0x004F, 0x0301, 0, + 1, 0x00D4, 0x004F, 0x0302, 0, + 1, 0x00D5, 0x004F, 0x0303, 0, + 1, 0x00D6, 0x004F, 0x0308, 0, + 1, 0x00D9, 0x0055, 0x0300, 0, + 1, 0x00DA, 0x0055, 0x0301, 0, + 1, 0x00DB, 0x0055, 0x0302, 0, + 1, 0x00DC, 0x0055, 0x0308, 0, + 1, 0x00DD, 0x0059, 0x0301, 0, + 1, 0x00E0, 0x0061, 0x0300, 0, + 1, 0x00E1, 0x0061, 0x0301, 0, + 1, 0x00E2, 0x0061, 0x0302, 0, + 1, 0x00E3, 0x0061, 0x0303, 0, + 1, 0x00E4, 0x0061, 0x0308, 0, + 1, 0x00E5, 0x0061, 0x030A, 0, + 1, 0x00E7, 0x0063, 0x0327, 0, + 1, 0x00E8, 0x0065, 0x0300, 0, + 1, 0x00E9, 0x0065, 0x0301, 0, + 1, 0x00EA, 0x0065, 0x0302, 0, + 1, 0x00EB, 0x0065, 0x0308, 0, + 1, 0x00EC, 0x0069, 0x0300, 0, + 1, 0x00ED, 0x0069, 0x0301, 0, + 1, 0x00EE, 0x0069, 0x0302, 0, + 1, 0x00EF, 0x0069, 0x0308, 0, + 1, 0x00F1, 0x006E, 0x0303, 0, + 1, 0x00F2, 0x006F, 0x0300, 0, + 1, 0x00F3, 0x006F, 0x0301, 0, + 1, 0x00F4, 0x006F, 0x0302, 0, + 1, 0x00F5, 0x006F, 0x0303, 0, + 1, 0x00F6, 0x006F, 0x0308, 0, + 1, 0x00F9, 0x0075, 0x0300, 0, + 1, 0x00FA, 0x0075, 0x0301, 0, + 1, 0x00FB, 0x0075, 0x0302, 0, + 1, 0x00FC, 0x0075, 0x0308, 0, + 1, 0x00FD, 0x0079, 0x0301, 0, + 1, 0x00FF, 0x0079, 0x0308, 0, + 1, 0x0100, 0x0041, 0x0304, 0, + 1, 0x0101, 0x0061, 0x0304, 0, + 1, 0x0102, 0x0041, 0x0306, 0, + 1, 0x0103, 0x0061, 0x0306, 0, + 1, 0x0104, 0x0041, 0x0328, 0, + 1, 0x0105, 0x0061, 0x0328, 0, + 1, 0x0106, 0x0043, 0x0301, 0, + 1, 0x0107, 0x0063, 0x0301, 0, + 1, 0x0108, 0x0043, 0x0302, 0, + 1, 0x0109, 0x0063, 0x0302, 0, + 1, 0x010A, 0x0043, 0x0307, 0, + 1, 0x010B, 0x0063, 0x0307, 0, + 1, 0x010C, 0x0043, 0x030C, 0, + 1, 0x010D, 0x0063, 0x030C, 0, + 1, 0x010E, 0x0044, 0x030C, 0, + 1, 0x010F, 0x0064, 0x030C, 0, + 1, 0x0112, 0x0045, 0x0304, 0, + 1, 0x0113, 0x0065, 0x0304, 0, + 1, 0x0114, 0x0045, 0x0306, 0, + 1, 0x0115, 0x0065, 0x0306, 0, + 1, 0x0116, 0x0045, 0x0307, 0, + 1, 0x0117, 0x0065, 0x0307, 0, + 1, 0x0118, 0x0045, 0x0328, 0, + 1, 0x0119, 0x0065, 0x0328, 0, + 1, 0x011A, 0x0045, 0x030C, 0, + 1, 0x011B, 0x0065, 0x030C, 0, + 1, 0x011C, 0x0047, 0x0302, 0, + 1, 0x011D, 0x0067, 0x0302, 0, + 1, 0x011E, 0x0047, 0x0306, 0, + 1, 0x011F, 0x0067, 0x0306, 0, + 1, 0x0120, 0x0047, 0x0307, 0, + 1, 0x0121, 0x0067, 0x0307, 0, + 1, 0x0122, 0x0047, 0x0327, 0, + 1, 0x0123, 0x0067, 0x0327, 0, + 1, 0x0124, 0x0048, 0x0302, 0, + 1, 0x0125, 0x0068, 0x0302, 0, + 1, 0x0128, 0x0049, 0x0303, 0, + 1, 0x0129, 0x0069, 0x0303, 0, + 1, 0x012A, 0x0049, 0x0304, 0, + 1, 0x012B, 0x0069, 0x0304, 0, + 1, 0x012C, 0x0049, 0x0306, 0, + 1, 0x012D, 0x0069, 0x0306, 0, + 1, 0x012E, 0x0049, 0x0328, 0, + 1, 0x012F, 0x0069, 0x0328, 0, + 1, 0x0130, 0x0049, 0x0307, 0, + 16, 0x0132, 0x0049, 0x004A, 0, + 16, 0x0133, 0x0069, 0x006A, 0, + 1, 0x0134, 0x004A, 0x0302, 0, + 1, 0x0135, 0x006A, 0x0302, 0, + 1, 0x0136, 0x004B, 0x0327, 0, + 1, 0x0137, 0x006B, 0x0327, 0, + 1, 0x0139, 0x004C, 0x0301, 0, + 1, 0x013A, 0x006C, 0x0301, 0, + 1, 0x013B, 0x004C, 0x0327, 0, + 1, 0x013C, 0x006C, 0x0327, 0, + 1, 0x013D, 0x004C, 0x030C, 0, + 1, 0x013E, 0x006C, 0x030C, 0, + 16, 0x013F, 0x004C, 0x00B7, 0, + 16, 0x0140, 0x006C, 0x00B7, 0, + 1, 0x0143, 0x004E, 0x0301, 0, + 1, 0x0144, 0x006E, 0x0301, 0, + 1, 0x0145, 0x004E, 0x0327, 0, + 1, 0x0146, 0x006E, 0x0327, 0, + 1, 0x0147, 0x004E, 0x030C, 0, + 1, 0x0148, 0x006E, 0x030C, 0, + 16, 0x0149, 0x02BC, 0x006E, 0, + 1, 0x014C, 0x004F, 0x0304, 0, + 1, 0x014D, 0x006F, 0x0304, 0, + 1, 0x014E, 0x004F, 0x0306, 0, + 1, 0x014F, 0x006F, 0x0306, 0, + 1, 0x0150, 0x004F, 0x030B, 0, + 1, 0x0151, 0x006F, 0x030B, 0, + 1, 0x0154, 0x0052, 0x0301, 0, + 1, 0x0155, 0x0072, 0x0301, 0, + 1, 0x0156, 0x0052, 0x0327, 0, + 1, 0x0157, 0x0072, 0x0327, 0, + 1, 0x0158, 0x0052, 0x030C, 0, + 1, 0x0159, 0x0072, 0x030C, 0, + 1, 0x015A, 0x0053, 0x0301, 0, + 1, 0x015B, 0x0073, 0x0301, 0, + 1, 0x015C, 0x0053, 0x0302, 0, + 1, 0x015D, 0x0073, 0x0302, 0, + 1, 0x015E, 0x0053, 0x0327, 0, + 1, 0x015F, 0x0073, 0x0327, 0, + 1, 0x0160, 0x0053, 0x030C, 0, + 1, 0x0161, 0x0073, 0x030C, 0, + 1, 0x0162, 0x0054, 0x0327, 0, + 1, 0x0163, 0x0074, 0x0327, 0, + 1, 0x0164, 0x0054, 0x030C, 0, + 1, 0x0165, 0x0074, 0x030C, 0, + 1, 0x0168, 0x0055, 0x0303, 0, + 1, 0x0169, 0x0075, 0x0303, 0, + 1, 0x016A, 0x0055, 0x0304, 0, + 1, 0x016B, 0x0075, 0x0304, 0, + 1, 0x016C, 0x0055, 0x0306, 0, + 1, 0x016D, 0x0075, 0x0306, 0, + 1, 0x016E, 0x0055, 0x030A, 0, + 1, 0x016F, 0x0075, 0x030A, 0, + 1, 0x0170, 0x0055, 0x030B, 0, + 1, 0x0171, 0x0075, 0x030B, 0, + 1, 0x0172, 0x0055, 0x0328, 0, + 1, 0x0173, 0x0075, 0x0328, 0, + 1, 0x0174, 0x0057, 0x0302, 0, + 1, 0x0175, 0x0077, 0x0302, 0, + 1, 0x0176, 0x0059, 0x0302, 0, + 1, 0x0177, 0x0079, 0x0302, 0, + 1, 0x0178, 0x0059, 0x0308, 0, + 1, 0x0179, 0x005A, 0x0301, 0, + 1, 0x017A, 0x007A, 0x0301, 0, + 1, 0x017B, 0x005A, 0x0307, 0, + 1, 0x017C, 0x007A, 0x0307, 0, + 1, 0x017D, 0x005A, 0x030C, 0, + 1, 0x017E, 0x007A, 0x030C, 0, + 16, 0x017F, 0x0073, 0, + 1, 0x01A0, 0x004F, 0x031B, 0, + 1, 0x01A1, 0x006F, 0x031B, 0, + 1, 0x01AF, 0x0055, 0x031B, 0, + 1, 0x01B0, 0x0075, 0x031B, 0, + 16, 0x01C4, 0x0044, 0x017D, 0, + 16, 0x01C5, 0x0044, 0x017E, 0, + 16, 0x01C6, 0x0064, 0x017E, 0, + 16, 0x01C7, 0x004C, 0x004A, 0, + 16, 0x01C8, 0x004C, 0x006A, 0, + 16, 0x01C9, 0x006C, 0x006A, 0, + 16, 0x01CA, 0x004E, 0x004A, 0, + 16, 0x01CB, 0x004E, 0x006A, 0, + 16, 0x01CC, 0x006E, 0x006A, 0, + 1, 0x01CD, 0x0041, 0x030C, 0, + 1, 0x01CE, 0x0061, 0x030C, 0, + 1, 0x01CF, 0x0049, 0x030C, 0, + 1, 0x01D0, 0x0069, 0x030C, 0, + 1, 0x01D1, 0x004F, 0x030C, 0, + 1, 0x01D2, 0x006F, 0x030C, 0, + 1, 0x01D3, 0x0055, 0x030C, 0, + 1, 0x01D4, 0x0075, 0x030C, 0, + 1, 0x01D5, 0x00DC, 0x0304, 0, + 1, 0x01D6, 0x00FC, 0x0304, 0, + 1, 0x01D7, 0x00DC, 0x0301, 0, + 1, 0x01D8, 0x00FC, 0x0301, 0, + 1, 0x01D9, 0x00DC, 0x030C, 0, + 1, 0x01DA, 0x00FC, 0x030C, 0, + 1, 0x01DB, 0x00DC, 0x0300, 0, + 1, 0x01DC, 0x00FC, 0x0300, 0, + 1, 0x01DE, 0x00C4, 0x0304, 0, + 1, 0x01DF, 0x00E4, 0x0304, 0, + 1, 0x01E0, 0x0226, 0x0304, 0, + 1, 0x01E1, 0x0227, 0x0304, 0, + 1, 0x01E2, 0x00C6, 0x0304, 0, + 1, 0x01E3, 0x00E6, 0x0304, 0, + 1, 0x01E6, 0x0047, 0x030C, 0, + 1, 0x01E7, 0x0067, 0x030C, 0, + 1, 0x01E8, 0x004B, 0x030C, 0, + 1, 0x01E9, 0x006B, 0x030C, 0, + 1, 0x01EA, 0x004F, 0x0328, 0, + 1, 0x01EB, 0x006F, 0x0328, 0, + 1, 0x01EC, 0x01EA, 0x0304, 0, + 1, 0x01ED, 0x01EB, 0x0304, 0, + 1, 0x01EE, 0x01B7, 0x030C, 0, + 1, 0x01EF, 0x0292, 0x030C, 0, + 1, 0x01F0, 0x006A, 0x030C, 0, + 16, 0x01F1, 0x0044, 0x005A, 0, + 16, 0x01F2, 0x0044, 0x007A, 0, + 16, 0x01F3, 0x0064, 0x007A, 0, + 1, 0x01F4, 0x0047, 0x0301, 0, + 1, 0x01F5, 0x0067, 0x0301, 0, + 1, 0x01F8, 0x004E, 0x0300, 0, + 1, 0x01F9, 0x006E, 0x0300, 0, + 1, 0x01FA, 0x00C5, 0x0301, 0, + 1, 0x01FB, 0x00E5, 0x0301, 0, + 1, 0x01FC, 0x00C6, 0x0301, 0, + 1, 0x01FD, 0x00E6, 0x0301, 0, + 1, 0x01FE, 0x00D8, 0x0301, 0, + 1, 0x01FF, 0x00F8, 0x0301, 0, + 1, 0x0200, 0x0041, 0x030F, 0, + 1, 0x0201, 0x0061, 0x030F, 0, + 1, 0x0202, 0x0041, 0x0311, 0, + 1, 0x0203, 0x0061, 0x0311, 0, + 1, 0x0204, 0x0045, 0x030F, 0, + 1, 0x0205, 0x0065, 0x030F, 0, + 1, 0x0206, 0x0045, 0x0311, 0, + 1, 0x0207, 0x0065, 0x0311, 0, + 1, 0x0208, 0x0049, 0x030F, 0, + 1, 0x0209, 0x0069, 0x030F, 0, + 1, 0x020A, 0x0049, 0x0311, 0, + 1, 0x020B, 0x0069, 0x0311, 0, + 1, 0x020C, 0x004F, 0x030F, 0, + 1, 0x020D, 0x006F, 0x030F, 0, + 1, 0x020E, 0x004F, 0x0311, 0, + 1, 0x020F, 0x006F, 0x0311, 0, + 1, 0x0210, 0x0052, 0x030F, 0, + 1, 0x0211, 0x0072, 0x030F, 0, + 1, 0x0212, 0x0052, 0x0311, 0, + 1, 0x0213, 0x0072, 0x0311, 0, + 1, 0x0214, 0x0055, 0x030F, 0, + 1, 0x0215, 0x0075, 0x030F, 0, + 1, 0x0216, 0x0055, 0x0311, 0, + 1, 0x0217, 0x0075, 0x0311, 0, + 1, 0x0218, 0x0053, 0x0326, 0, + 1, 0x0219, 0x0073, 0x0326, 0, + 1, 0x021A, 0x0054, 0x0326, 0, + 1, 0x021B, 0x0074, 0x0326, 0, + 1, 0x021E, 0x0048, 0x030C, 0, + 1, 0x021F, 0x0068, 0x030C, 0, + 1, 0x0226, 0x0041, 0x0307, 0, + 1, 0x0227, 0x0061, 0x0307, 0, + 1, 0x0228, 0x0045, 0x0327, 0, + 1, 0x0229, 0x0065, 0x0327, 0, + 1, 0x022A, 0x00D6, 0x0304, 0, + 1, 0x022B, 0x00F6, 0x0304, 0, + 1, 0x022C, 0x00D5, 0x0304, 0, + 1, 0x022D, 0x00F5, 0x0304, 0, + 1, 0x022E, 0x004F, 0x0307, 0, + 1, 0x022F, 0x006F, 0x0307, 0, + 1, 0x0230, 0x022E, 0x0304, 0, + 1, 0x0231, 0x022F, 0x0304, 0, + 1, 0x0232, 0x0059, 0x0304, 0, + 1, 0x0233, 0x0079, 0x0304, 0, + 9, 0x02B0, 0x0068, 0, + 9, 0x02B1, 0x0266, 0, + 9, 0x02B2, 0x006A, 0, + 9, 0x02B3, 0x0072, 0, + 9, 0x02B4, 0x0279, 0, + 9, 0x02B5, 0x027B, 0, + 9, 0x02B6, 0x0281, 0, + 9, 0x02B7, 0x0077, 0, + 9, 0x02B8, 0x0079, 0, + 16, 0x02D8, 0x0020, 0x0306, 0, + 16, 0x02D9, 0x0020, 0x0307, 0, + 16, 0x02DA, 0x0020, 0x030A, 0, + 16, 0x02DB, 0x0020, 0x0328, 0, + 16, 0x02DC, 0x0020, 0x0303, 0, + 16, 0x02DD, 0x0020, 0x030B, 0, + 9, 0x02E0, 0x0263, 0, + 9, 0x02E1, 0x006C, 0, + 9, 0x02E2, 0x0073, 0, + 9, 0x02E3, 0x0078, 0, + 9, 0x02E4, 0x0295, 0, + 1, 0x0340, 0x0300, 0, + 1, 0x0341, 0x0301, 0, + 1, 0x0343, 0x0313, 0, + 1, 0x0344, 0x0308, 0x0301, 0, + 1, 0x0374, 0x02B9, 0, + 16, 0x037A, 0x0020, 0x0345, 0, + 1, 0x037E, 0x003B, 0, + 16, 0x0384, 0x0020, 0x0301, 0, + 1, 0x0385, 0x00A8, 0x0301, 0, + 1, 0x0386, 0x0391, 0x0301, 0, + 1, 0x0387, 0x00B7, 0, + 1, 0x0388, 0x0395, 0x0301, 0, + 1, 0x0389, 0x0397, 0x0301, 0, + 1, 0x038A, 0x0399, 0x0301, 0, + 1, 0x038C, 0x039F, 0x0301, 0, + 1, 0x038E, 0x03A5, 0x0301, 0, + 1, 0x038F, 0x03A9, 0x0301, 0, + 1, 0x0390, 0x03CA, 0x0301, 0, + 1, 0x03AA, 0x0399, 0x0308, 0, + 1, 0x03AB, 0x03A5, 0x0308, 0, + 1, 0x03AC, 0x03B1, 0x0301, 0, + 1, 0x03AD, 0x03B5, 0x0301, 0, + 1, 0x03AE, 0x03B7, 0x0301, 0, + 1, 0x03AF, 0x03B9, 0x0301, 0, + 1, 0x03B0, 0x03CB, 0x0301, 0, + 1, 0x03CA, 0x03B9, 0x0308, 0, + 1, 0x03CB, 0x03C5, 0x0308, 0, + 1, 0x03CC, 0x03BF, 0x0301, 0, + 1, 0x03CD, 0x03C5, 0x0301, 0, + 1, 0x03CE, 0x03C9, 0x0301, 0, + 16, 0x03D0, 0x03B2, 0, + 16, 0x03D1, 0x03B8, 0, + 16, 0x03D2, 0x03A5, 0, + 1, 0x03D3, 0x03D2, 0x0301, 0, + 1, 0x03D4, 0x03D2, 0x0308, 0, + 16, 0x03D5, 0x03C6, 0, + 16, 0x03D6, 0x03C0, 0, + 16, 0x03F0, 0x03BA, 0, + 16, 0x03F1, 0x03C1, 0, + 16, 0x03F2, 0x03C2, 0, + 1, 0x0400, 0x0415, 0x0300, 0, + 1, 0x0401, 0x0415, 0x0308, 0, + 1, 0x0403, 0x0413, 0x0301, 0, + 1, 0x0407, 0x0406, 0x0308, 0, + 1, 0x040C, 0x041A, 0x0301, 0, + 1, 0x040D, 0x0418, 0x0300, 0, + 1, 0x040E, 0x0423, 0x0306, 0, + 1, 0x0419, 0x0418, 0x0306, 0, + 1, 0x0439, 0x0438, 0x0306, 0, + 1, 0x0450, 0x0435, 0x0300, 0, + 1, 0x0451, 0x0435, 0x0308, 0, + 1, 0x0453, 0x0433, 0x0301, 0, + 1, 0x0457, 0x0456, 0x0308, 0, + 1, 0x045C, 0x043A, 0x0301, 0, + 1, 0x045D, 0x0438, 0x0300, 0, + 1, 0x045E, 0x0443, 0x0306, 0, + 1, 0x0476, 0x0474, 0x030F, 0, + 1, 0x0477, 0x0475, 0x030F, 0, + 1, 0x04C1, 0x0416, 0x0306, 0, + 1, 0x04C2, 0x0436, 0x0306, 0, + 1, 0x04D0, 0x0410, 0x0306, 0, + 1, 0x04D1, 0x0430, 0x0306, 0, + 1, 0x04D2, 0x0410, 0x0308, 0, + 1, 0x04D3, 0x0430, 0x0308, 0, + 1, 0x04D6, 0x0415, 0x0306, 0, + 1, 0x04D7, 0x0435, 0x0306, 0, + 1, 0x04DA, 0x04D8, 0x0308, 0, + 1, 0x04DB, 0x04D9, 0x0308, 0, + 1, 0x04DC, 0x0416, 0x0308, 0, + 1, 0x04DD, 0x0436, 0x0308, 0, + 1, 0x04DE, 0x0417, 0x0308, 0, + 1, 0x04DF, 0x0437, 0x0308, 0, + 1, 0x04E2, 0x0418, 0x0304, 0, + 1, 0x04E3, 0x0438, 0x0304, 0, + 1, 0x04E4, 0x0418, 0x0308, 0, + 1, 0x04E5, 0x0438, 0x0308, 0, + 1, 0x04E6, 0x041E, 0x0308, 0, + 1, 0x04E7, 0x043E, 0x0308, 0, + 1, 0x04EA, 0x04E8, 0x0308, 0, + 1, 0x04EB, 0x04E9, 0x0308, 0, + 1, 0x04EC, 0x042D, 0x0308, 0, + 1, 0x04ED, 0x044D, 0x0308, 0, + 1, 0x04EE, 0x0423, 0x0304, 0, + 1, 0x04EF, 0x0443, 0x0304, 0, + 1, 0x04F0, 0x0423, 0x0308, 0, + 1, 0x04F1, 0x0443, 0x0308, 0, + 1, 0x04F2, 0x0423, 0x030B, 0, + 1, 0x04F3, 0x0443, 0x030B, 0, + 1, 0x04F4, 0x0427, 0x0308, 0, + 1, 0x04F5, 0x0447, 0x0308, 0, + 1, 0x04F8, 0x042B, 0x0308, 0, + 1, 0x04F9, 0x044B, 0x0308, 0, + 16, 0x0587, 0x0565, 0x0582, 0, + 1, 0x0622, 0x0627, 0x0653, 0, + 1, 0x0623, 0x0627, 0x0654, 0, + 1, 0x0624, 0x0648, 0x0654, 0, + 1, 0x0625, 0x0627, 0x0655, 0, + 1, 0x0626, 0x064A, 0x0654, 0, + 16, 0x0675, 0x0627, 0x0674, 0, + 16, 0x0676, 0x0648, 0x0674, 0, + 16, 0x0677, 0x06C7, 0x0674, 0, + 16, 0x0678, 0x064A, 0x0674, 0, + 1, 0x06C0, 0x06D5, 0x0654, 0, + 1, 0x06C2, 0x06C1, 0x0654, 0, + 1, 0x06D3, 0x06D2, 0x0654, 0, + 1, 0x0929, 0x0928, 0x093C, 0, + 1, 0x0931, 0x0930, 0x093C, 0, + 1, 0x0934, 0x0933, 0x093C, 0, + 1, 0x0958, 0x0915, 0x093C, 0, + 1, 0x0959, 0x0916, 0x093C, 0, + 1, 0x095A, 0x0917, 0x093C, 0, + 1, 0x095B, 0x091C, 0x093C, 0, + 1, 0x095C, 0x0921, 0x093C, 0, + 1, 0x095D, 0x0922, 0x093C, 0, + 1, 0x095E, 0x092B, 0x093C, 0, + 1, 0x095F, 0x092F, 0x093C, 0, + 1, 0x09CB, 0x09C7, 0x09BE, 0, + 1, 0x09CC, 0x09C7, 0x09D7, 0, + 1, 0x09DC, 0x09A1, 0x09BC, 0, + 1, 0x09DD, 0x09A2, 0x09BC, 0, + 1, 0x09DF, 0x09AF, 0x09BC, 0, + 1, 0x0A33, 0x0A32, 0x0A3C, 0, + 1, 0x0A36, 0x0A38, 0x0A3C, 0, + 1, 0x0A59, 0x0A16, 0x0A3C, 0, + 1, 0x0A5A, 0x0A17, 0x0A3C, 0, + 1, 0x0A5B, 0x0A1C, 0x0A3C, 0, + 1, 0x0A5E, 0x0A2B, 0x0A3C, 0, + 1, 0x0B48, 0x0B47, 0x0B56, 0, + 1, 0x0B4B, 0x0B47, 0x0B3E, 0, + 1, 0x0B4C, 0x0B47, 0x0B57, 0, + 1, 0x0B5C, 0x0B21, 0x0B3C, 0, + 1, 0x0B5D, 0x0B22, 0x0B3C, 0, + 1, 0x0B94, 0x0B92, 0x0BD7, 0, + 1, 0x0BCA, 0x0BC6, 0x0BBE, 0, + 1, 0x0BCB, 0x0BC7, 0x0BBE, 0, + 1, 0x0BCC, 0x0BC6, 0x0BD7, 0, + 1, 0x0C48, 0x0C46, 0x0C56, 0, + 1, 0x0CC0, 0x0CBF, 0x0CD5, 0, + 1, 0x0CC7, 0x0CC6, 0x0CD5, 0, + 1, 0x0CC8, 0x0CC6, 0x0CD6, 0, + 1, 0x0CCA, 0x0CC6, 0x0CC2, 0, + 1, 0x0CCB, 0x0CCA, 0x0CD5, 0, + 1, 0x0D4A, 0x0D46, 0x0D3E, 0, + 1, 0x0D4B, 0x0D47, 0x0D3E, 0, + 1, 0x0D4C, 0x0D46, 0x0D57, 0, + 1, 0x0DDA, 0x0DD9, 0x0DCA, 0, + 1, 0x0DDC, 0x0DD9, 0x0DCF, 0, + 1, 0x0DDD, 0x0DDC, 0x0DCA, 0, + 1, 0x0DDE, 0x0DD9, 0x0DDF, 0, + 16, 0x0E33, 0x0E4D, 0x0E32, 0, + 16, 0x0EB3, 0x0ECD, 0x0EB2, 0, + 16, 0x0EDC, 0x0EAB, 0x0E99, 0, + 16, 0x0EDD, 0x0EAB, 0x0EA1, 0, + 3, 0x0F0C, 0x0F0B, 0, + 1, 0x0F43, 0x0F42, 0x0FB7, 0, + 1, 0x0F4D, 0x0F4C, 0x0FB7, 0, + 1, 0x0F52, 0x0F51, 0x0FB7, 0, + 1, 0x0F57, 0x0F56, 0x0FB7, 0, + 1, 0x0F5C, 0x0F5B, 0x0FB7, 0, + 1, 0x0F69, 0x0F40, 0x0FB5, 0, + 1, 0x0F73, 0x0F71, 0x0F72, 0, + 1, 0x0F75, 0x0F71, 0x0F74, 0, + 1, 0x0F76, 0x0FB2, 0x0F80, 0, + 16, 0x0F77, 0x0FB2, 0x0F81, 0, + 1, 0x0F78, 0x0FB3, 0x0F80, 0, + 16, 0x0F79, 0x0FB3, 0x0F81, 0, + 1, 0x0F81, 0x0F71, 0x0F80, 0, + 1, 0x0F93, 0x0F92, 0x0FB7, 0, + 1, 0x0F9D, 0x0F9C, 0x0FB7, 0, + 1, 0x0FA2, 0x0FA1, 0x0FB7, 0, + 1, 0x0FA7, 0x0FA6, 0x0FB7, 0, + 1, 0x0FAC, 0x0FAB, 0x0FB7, 0, + 1, 0x0FB9, 0x0F90, 0x0FB5, 0, + 1, 0x1026, 0x1025, 0x102E, 0, + 1, 0x1E00, 0x0041, 0x0325, 0, + 1, 0x1E01, 0x0061, 0x0325, 0, + 1, 0x1E02, 0x0042, 0x0307, 0, + 1, 0x1E03, 0x0062, 0x0307, 0, + 1, 0x1E04, 0x0042, 0x0323, 0, + 1, 0x1E05, 0x0062, 0x0323, 0, + 1, 0x1E06, 0x0042, 0x0331, 0, + 1, 0x1E07, 0x0062, 0x0331, 0, + 1, 0x1E08, 0x00C7, 0x0301, 0, + 1, 0x1E09, 0x00E7, 0x0301, 0, + 1, 0x1E0A, 0x0044, 0x0307, 0, + 1, 0x1E0B, 0x0064, 0x0307, 0, + 1, 0x1E0C, 0x0044, 0x0323, 0, + 1, 0x1E0D, 0x0064, 0x0323, 0, + 1, 0x1E0E, 0x0044, 0x0331, 0, + 1, 0x1E0F, 0x0064, 0x0331, 0, + 1, 0x1E10, 0x0044, 0x0327, 0, + 1, 0x1E11, 0x0064, 0x0327, 0, + 1, 0x1E12, 0x0044, 0x032D, 0, + 1, 0x1E13, 0x0064, 0x032D, 0, + 1, 0x1E14, 0x0112, 0x0300, 0, + 1, 0x1E15, 0x0113, 0x0300, 0, + 1, 0x1E16, 0x0112, 0x0301, 0, + 1, 0x1E17, 0x0113, 0x0301, 0, + 1, 0x1E18, 0x0045, 0x032D, 0, + 1, 0x1E19, 0x0065, 0x032D, 0, + 1, 0x1E1A, 0x0045, 0x0330, 0, + 1, 0x1E1B, 0x0065, 0x0330, 0, + 1, 0x1E1C, 0x0228, 0x0306, 0, + 1, 0x1E1D, 0x0229, 0x0306, 0, + 1, 0x1E1E, 0x0046, 0x0307, 0, + 1, 0x1E1F, 0x0066, 0x0307, 0, + 1, 0x1E20, 0x0047, 0x0304, 0, + 1, 0x1E21, 0x0067, 0x0304, 0, + 1, 0x1E22, 0x0048, 0x0307, 0, + 1, 0x1E23, 0x0068, 0x0307, 0, + 1, 0x1E24, 0x0048, 0x0323, 0, + 1, 0x1E25, 0x0068, 0x0323, 0, + 1, 0x1E26, 0x0048, 0x0308, 0, + 1, 0x1E27, 0x0068, 0x0308, 0, + 1, 0x1E28, 0x0048, 0x0327, 0, + 1, 0x1E29, 0x0068, 0x0327, 0, + 1, 0x1E2A, 0x0048, 0x032E, 0, + 1, 0x1E2B, 0x0068, 0x032E, 0, + 1, 0x1E2C, 0x0049, 0x0330, 0, + 1, 0x1E2D, 0x0069, 0x0330, 0, + 1, 0x1E2E, 0x00CF, 0x0301, 0, + 1, 0x1E2F, 0x00EF, 0x0301, 0, + 1, 0x1E30, 0x004B, 0x0301, 0, + 1, 0x1E31, 0x006B, 0x0301, 0, + 1, 0x1E32, 0x004B, 0x0323, 0, + 1, 0x1E33, 0x006B, 0x0323, 0, + 1, 0x1E34, 0x004B, 0x0331, 0, + 1, 0x1E35, 0x006B, 0x0331, 0, + 1, 0x1E36, 0x004C, 0x0323, 0, + 1, 0x1E37, 0x006C, 0x0323, 0, + 1, 0x1E38, 0x1E36, 0x0304, 0, + 1, 0x1E39, 0x1E37, 0x0304, 0, + 1, 0x1E3A, 0x004C, 0x0331, 0, + 1, 0x1E3B, 0x006C, 0x0331, 0, + 1, 0x1E3C, 0x004C, 0x032D, 0, + 1, 0x1E3D, 0x006C, 0x032D, 0, + 1, 0x1E3E, 0x004D, 0x0301, 0, + 1, 0x1E3F, 0x006D, 0x0301, 0, + 1, 0x1E40, 0x004D, 0x0307, 0, + 1, 0x1E41, 0x006D, 0x0307, 0, + 1, 0x1E42, 0x004D, 0x0323, 0, + 1, 0x1E43, 0x006D, 0x0323, 0, + 1, 0x1E44, 0x004E, 0x0307, 0, + 1, 0x1E45, 0x006E, 0x0307, 0, + 1, 0x1E46, 0x004E, 0x0323, 0, + 1, 0x1E47, 0x006E, 0x0323, 0, + 1, 0x1E48, 0x004E, 0x0331, 0, + 1, 0x1E49, 0x006E, 0x0331, 0, + 1, 0x1E4A, 0x004E, 0x032D, 0, + 1, 0x1E4B, 0x006E, 0x032D, 0, + 1, 0x1E4C, 0x00D5, 0x0301, 0, + 1, 0x1E4D, 0x00F5, 0x0301, 0, + 1, 0x1E4E, 0x00D5, 0x0308, 0, + 1, 0x1E4F, 0x00F5, 0x0308, 0, + 1, 0x1E50, 0x014C, 0x0300, 0, + 1, 0x1E51, 0x014D, 0x0300, 0, + 1, 0x1E52, 0x014C, 0x0301, 0, + 1, 0x1E53, 0x014D, 0x0301, 0, + 1, 0x1E54, 0x0050, 0x0301, 0, + 1, 0x1E55, 0x0070, 0x0301, 0, + 1, 0x1E56, 0x0050, 0x0307, 0, + 1, 0x1E57, 0x0070, 0x0307, 0, + 1, 0x1E58, 0x0052, 0x0307, 0, + 1, 0x1E59, 0x0072, 0x0307, 0, + 1, 0x1E5A, 0x0052, 0x0323, 0, + 1, 0x1E5B, 0x0072, 0x0323, 0, + 1, 0x1E5C, 0x1E5A, 0x0304, 0, + 1, 0x1E5D, 0x1E5B, 0x0304, 0, + 1, 0x1E5E, 0x0052, 0x0331, 0, + 1, 0x1E5F, 0x0072, 0x0331, 0, + 1, 0x1E60, 0x0053, 0x0307, 0, + 1, 0x1E61, 0x0073, 0x0307, 0, + 1, 0x1E62, 0x0053, 0x0323, 0, + 1, 0x1E63, 0x0073, 0x0323, 0, + 1, 0x1E64, 0x015A, 0x0307, 0, + 1, 0x1E65, 0x015B, 0x0307, 0, + 1, 0x1E66, 0x0160, 0x0307, 0, + 1, 0x1E67, 0x0161, 0x0307, 0, + 1, 0x1E68, 0x1E62, 0x0307, 0, + 1, 0x1E69, 0x1E63, 0x0307, 0, + 1, 0x1E6A, 0x0054, 0x0307, 0, + 1, 0x1E6B, 0x0074, 0x0307, 0, + 1, 0x1E6C, 0x0054, 0x0323, 0, + 1, 0x1E6D, 0x0074, 0x0323, 0, + 1, 0x1E6E, 0x0054, 0x0331, 0, + 1, 0x1E6F, 0x0074, 0x0331, 0, + 1, 0x1E70, 0x0054, 0x032D, 0, + 1, 0x1E71, 0x0074, 0x032D, 0, + 1, 0x1E72, 0x0055, 0x0324, 0, + 1, 0x1E73, 0x0075, 0x0324, 0, + 1, 0x1E74, 0x0055, 0x0330, 0, + 1, 0x1E75, 0x0075, 0x0330, 0, + 1, 0x1E76, 0x0055, 0x032D, 0, + 1, 0x1E77, 0x0075, 0x032D, 0, + 1, 0x1E78, 0x0168, 0x0301, 0, + 1, 0x1E79, 0x0169, 0x0301, 0, + 1, 0x1E7A, 0x016A, 0x0308, 0, + 1, 0x1E7B, 0x016B, 0x0308, 0, + 1, 0x1E7C, 0x0056, 0x0303, 0, + 1, 0x1E7D, 0x0076, 0x0303, 0, + 1, 0x1E7E, 0x0056, 0x0323, 0, + 1, 0x1E7F, 0x0076, 0x0323, 0, + 1, 0x1E80, 0x0057, 0x0300, 0, + 1, 0x1E81, 0x0077, 0x0300, 0, + 1, 0x1E82, 0x0057, 0x0301, 0, + 1, 0x1E83, 0x0077, 0x0301, 0, + 1, 0x1E84, 0x0057, 0x0308, 0, + 1, 0x1E85, 0x0077, 0x0308, 0, + 1, 0x1E86, 0x0057, 0x0307, 0, + 1, 0x1E87, 0x0077, 0x0307, 0, + 1, 0x1E88, 0x0057, 0x0323, 0, + 1, 0x1E89, 0x0077, 0x0323, 0, + 1, 0x1E8A, 0x0058, 0x0307, 0, + 1, 0x1E8B, 0x0078, 0x0307, 0, + 1, 0x1E8C, 0x0058, 0x0308, 0, + 1, 0x1E8D, 0x0078, 0x0308, 0, + 1, 0x1E8E, 0x0059, 0x0307, 0, + 1, 0x1E8F, 0x0079, 0x0307, 0, + 1, 0x1E90, 0x005A, 0x0302, 0, + 1, 0x1E91, 0x007A, 0x0302, 0, + 1, 0x1E92, 0x005A, 0x0323, 0, + 1, 0x1E93, 0x007A, 0x0323, 0, + 1, 0x1E94, 0x005A, 0x0331, 0, + 1, 0x1E95, 0x007A, 0x0331, 0, + 1, 0x1E96, 0x0068, 0x0331, 0, + 1, 0x1E97, 0x0074, 0x0308, 0, + 1, 0x1E98, 0x0077, 0x030A, 0, + 1, 0x1E99, 0x0079, 0x030A, 0, + 16, 0x1E9A, 0x0061, 0x02BE, 0, + 1, 0x1E9B, 0x017F, 0x0307, 0, + 1, 0x1EA0, 0x0041, 0x0323, 0, + 1, 0x1EA1, 0x0061, 0x0323, 0, + 1, 0x1EA2, 0x0041, 0x0309, 0, + 1, 0x1EA3, 0x0061, 0x0309, 0, + 1, 0x1EA4, 0x00C2, 0x0301, 0, + 1, 0x1EA5, 0x00E2, 0x0301, 0, + 1, 0x1EA6, 0x00C2, 0x0300, 0, + 1, 0x1EA7, 0x00E2, 0x0300, 0, + 1, 0x1EA8, 0x00C2, 0x0309, 0, + 1, 0x1EA9, 0x00E2, 0x0309, 0, + 1, 0x1EAA, 0x00C2, 0x0303, 0, + 1, 0x1EAB, 0x00E2, 0x0303, 0, + 1, 0x1EAC, 0x1EA0, 0x0302, 0, + 1, 0x1EAD, 0x1EA1, 0x0302, 0, + 1, 0x1EAE, 0x0102, 0x0301, 0, + 1, 0x1EAF, 0x0103, 0x0301, 0, + 1, 0x1EB0, 0x0102, 0x0300, 0, + 1, 0x1EB1, 0x0103, 0x0300, 0, + 1, 0x1EB2, 0x0102, 0x0309, 0, + 1, 0x1EB3, 0x0103, 0x0309, 0, + 1, 0x1EB4, 0x0102, 0x0303, 0, + 1, 0x1EB5, 0x0103, 0x0303, 0, + 1, 0x1EB6, 0x1EA0, 0x0306, 0, + 1, 0x1EB7, 0x1EA1, 0x0306, 0, + 1, 0x1EB8, 0x0045, 0x0323, 0, + 1, 0x1EB9, 0x0065, 0x0323, 0, + 1, 0x1EBA, 0x0045, 0x0309, 0, + 1, 0x1EBB, 0x0065, 0x0309, 0, + 1, 0x1EBC, 0x0045, 0x0303, 0, + 1, 0x1EBD, 0x0065, 0x0303, 0, + 1, 0x1EBE, 0x00CA, 0x0301, 0, + 1, 0x1EBF, 0x00EA, 0x0301, 0, + 1, 0x1EC0, 0x00CA, 0x0300, 0, + 1, 0x1EC1, 0x00EA, 0x0300, 0, + 1, 0x1EC2, 0x00CA, 0x0309, 0, + 1, 0x1EC3, 0x00EA, 0x0309, 0, + 1, 0x1EC4, 0x00CA, 0x0303, 0, + 1, 0x1EC5, 0x00EA, 0x0303, 0, + 1, 0x1EC6, 0x1EB8, 0x0302, 0, + 1, 0x1EC7, 0x1EB9, 0x0302, 0, + 1, 0x1EC8, 0x0049, 0x0309, 0, + 1, 0x1EC9, 0x0069, 0x0309, 0, + 1, 0x1ECA, 0x0049, 0x0323, 0, + 1, 0x1ECB, 0x0069, 0x0323, 0, + 1, 0x1ECC, 0x004F, 0x0323, 0, + 1, 0x1ECD, 0x006F, 0x0323, 0, + 1, 0x1ECE, 0x004F, 0x0309, 0, + 1, 0x1ECF, 0x006F, 0x0309, 0, + 1, 0x1ED0, 0x00D4, 0x0301, 0, + 1, 0x1ED1, 0x00F4, 0x0301, 0, + 1, 0x1ED2, 0x00D4, 0x0300, 0, + 1, 0x1ED3, 0x00F4, 0x0300, 0, + 1, 0x1ED4, 0x00D4, 0x0309, 0, + 1, 0x1ED5, 0x00F4, 0x0309, 0, + 1, 0x1ED6, 0x00D4, 0x0303, 0, + 1, 0x1ED7, 0x00F4, 0x0303, 0, + 1, 0x1ED8, 0x1ECC, 0x0302, 0, + 1, 0x1ED9, 0x1ECD, 0x0302, 0, + 1, 0x1EDA, 0x01A0, 0x0301, 0, + 1, 0x1EDB, 0x01A1, 0x0301, 0, + 1, 0x1EDC, 0x01A0, 0x0300, 0, + 1, 0x1EDD, 0x01A1, 0x0300, 0, + 1, 0x1EDE, 0x01A0, 0x0309, 0, + 1, 0x1EDF, 0x01A1, 0x0309, 0, + 1, 0x1EE0, 0x01A0, 0x0303, 0, + 1, 0x1EE1, 0x01A1, 0x0303, 0, + 1, 0x1EE2, 0x01A0, 0x0323, 0, + 1, 0x1EE3, 0x01A1, 0x0323, 0, + 1, 0x1EE4, 0x0055, 0x0323, 0, + 1, 0x1EE5, 0x0075, 0x0323, 0, + 1, 0x1EE6, 0x0055, 0x0309, 0, + 1, 0x1EE7, 0x0075, 0x0309, 0, + 1, 0x1EE8, 0x01AF, 0x0301, 0, + 1, 0x1EE9, 0x01B0, 0x0301, 0, + 1, 0x1EEA, 0x01AF, 0x0300, 0, + 1, 0x1EEB, 0x01B0, 0x0300, 0, + 1, 0x1EEC, 0x01AF, 0x0309, 0, + 1, 0x1EED, 0x01B0, 0x0309, 0, + 1, 0x1EEE, 0x01AF, 0x0303, 0, + 1, 0x1EEF, 0x01B0, 0x0303, 0, + 1, 0x1EF0, 0x01AF, 0x0323, 0, + 1, 0x1EF1, 0x01B0, 0x0323, 0, + 1, 0x1EF2, 0x0059, 0x0300, 0, + 1, 0x1EF3, 0x0079, 0x0300, 0, + 1, 0x1EF4, 0x0059, 0x0323, 0, + 1, 0x1EF5, 0x0079, 0x0323, 0, + 1, 0x1EF6, 0x0059, 0x0309, 0, + 1, 0x1EF7, 0x0079, 0x0309, 0, + 1, 0x1EF8, 0x0059, 0x0303, 0, + 1, 0x1EF9, 0x0079, 0x0303, 0, + 1, 0x1F00, 0x03B1, 0x0313, 0, + 1, 0x1F01, 0x03B1, 0x0314, 0, + 1, 0x1F02, 0x1F00, 0x0300, 0, + 1, 0x1F03, 0x1F01, 0x0300, 0, + 1, 0x1F04, 0x1F00, 0x0301, 0, + 1, 0x1F05, 0x1F01, 0x0301, 0, + 1, 0x1F06, 0x1F00, 0x0342, 0, + 1, 0x1F07, 0x1F01, 0x0342, 0, + 1, 0x1F08, 0x0391, 0x0313, 0, + 1, 0x1F09, 0x0391, 0x0314, 0, + 1, 0x1F0A, 0x1F08, 0x0300, 0, + 1, 0x1F0B, 0x1F09, 0x0300, 0, + 1, 0x1F0C, 0x1F08, 0x0301, 0, + 1, 0x1F0D, 0x1F09, 0x0301, 0, + 1, 0x1F0E, 0x1F08, 0x0342, 0, + 1, 0x1F0F, 0x1F09, 0x0342, 0, + 1, 0x1F10, 0x03B5, 0x0313, 0, + 1, 0x1F11, 0x03B5, 0x0314, 0, + 1, 0x1F12, 0x1F10, 0x0300, 0, + 1, 0x1F13, 0x1F11, 0x0300, 0, + 1, 0x1F14, 0x1F10, 0x0301, 0, + 1, 0x1F15, 0x1F11, 0x0301, 0, + 1, 0x1F18, 0x0395, 0x0313, 0, + 1, 0x1F19, 0x0395, 0x0314, 0, + 1, 0x1F1A, 0x1F18, 0x0300, 0, + 1, 0x1F1B, 0x1F19, 0x0300, 0, + 1, 0x1F1C, 0x1F18, 0x0301, 0, + 1, 0x1F1D, 0x1F19, 0x0301, 0, + 1, 0x1F20, 0x03B7, 0x0313, 0, + 1, 0x1F21, 0x03B7, 0x0314, 0, + 1, 0x1F22, 0x1F20, 0x0300, 0, + 1, 0x1F23, 0x1F21, 0x0300, 0, + 1, 0x1F24, 0x1F20, 0x0301, 0, + 1, 0x1F25, 0x1F21, 0x0301, 0, + 1, 0x1F26, 0x1F20, 0x0342, 0, + 1, 0x1F27, 0x1F21, 0x0342, 0, + 1, 0x1F28, 0x0397, 0x0313, 0, + 1, 0x1F29, 0x0397, 0x0314, 0, + 1, 0x1F2A, 0x1F28, 0x0300, 0, + 1, 0x1F2B, 0x1F29, 0x0300, 0, + 1, 0x1F2C, 0x1F28, 0x0301, 0, + 1, 0x1F2D, 0x1F29, 0x0301, 0, + 1, 0x1F2E, 0x1F28, 0x0342, 0, + 1, 0x1F2F, 0x1F29, 0x0342, 0, + 1, 0x1F30, 0x03B9, 0x0313, 0, + 1, 0x1F31, 0x03B9, 0x0314, 0, + 1, 0x1F32, 0x1F30, 0x0300, 0, + 1, 0x1F33, 0x1F31, 0x0300, 0, + 1, 0x1F34, 0x1F30, 0x0301, 0, + 1, 0x1F35, 0x1F31, 0x0301, 0, + 1, 0x1F36, 0x1F30, 0x0342, 0, + 1, 0x1F37, 0x1F31, 0x0342, 0, + 1, 0x1F38, 0x0399, 0x0313, 0, + 1, 0x1F39, 0x0399, 0x0314, 0, + 1, 0x1F3A, 0x1F38, 0x0300, 0, + 1, 0x1F3B, 0x1F39, 0x0300, 0, + 1, 0x1F3C, 0x1F38, 0x0301, 0, + 1, 0x1F3D, 0x1F39, 0x0301, 0, + 1, 0x1F3E, 0x1F38, 0x0342, 0, + 1, 0x1F3F, 0x1F39, 0x0342, 0, + 1, 0x1F40, 0x03BF, 0x0313, 0, + 1, 0x1F41, 0x03BF, 0x0314, 0, + 1, 0x1F42, 0x1F40, 0x0300, 0, + 1, 0x1F43, 0x1F41, 0x0300, 0, + 1, 0x1F44, 0x1F40, 0x0301, 0, + 1, 0x1F45, 0x1F41, 0x0301, 0, + 1, 0x1F48, 0x039F, 0x0313, 0, + 1, 0x1F49, 0x039F, 0x0314, 0, + 1, 0x1F4A, 0x1F48, 0x0300, 0, + 1, 0x1F4B, 0x1F49, 0x0300, 0, + 1, 0x1F4C, 0x1F48, 0x0301, 0, + 1, 0x1F4D, 0x1F49, 0x0301, 0, + 1, 0x1F50, 0x03C5, 0x0313, 0, + 1, 0x1F51, 0x03C5, 0x0314, 0, + 1, 0x1F52, 0x1F50, 0x0300, 0, + 1, 0x1F53, 0x1F51, 0x0300, 0, + 1, 0x1F54, 0x1F50, 0x0301, 0, + 1, 0x1F55, 0x1F51, 0x0301, 0, + 1, 0x1F56, 0x1F50, 0x0342, 0, + 1, 0x1F57, 0x1F51, 0x0342, 0, + 1, 0x1F59, 0x03A5, 0x0314, 0, + 1, 0x1F5B, 0x1F59, 0x0300, 0, + 1, 0x1F5D, 0x1F59, 0x0301, 0, + 1, 0x1F5F, 0x1F59, 0x0342, 0, + 1, 0x1F60, 0x03C9, 0x0313, 0, + 1, 0x1F61, 0x03C9, 0x0314, 0, + 1, 0x1F62, 0x1F60, 0x0300, 0, + 1, 0x1F63, 0x1F61, 0x0300, 0, + 1, 0x1F64, 0x1F60, 0x0301, 0, + 1, 0x1F65, 0x1F61, 0x0301, 0, + 1, 0x1F66, 0x1F60, 0x0342, 0, + 1, 0x1F67, 0x1F61, 0x0342, 0, + 1, 0x1F68, 0x03A9, 0x0313, 0, + 1, 0x1F69, 0x03A9, 0x0314, 0, + 1, 0x1F6A, 0x1F68, 0x0300, 0, + 1, 0x1F6B, 0x1F69, 0x0300, 0, + 1, 0x1F6C, 0x1F68, 0x0301, 0, + 1, 0x1F6D, 0x1F69, 0x0301, 0, + 1, 0x1F6E, 0x1F68, 0x0342, 0, + 1, 0x1F6F, 0x1F69, 0x0342, 0, + 1, 0x1F70, 0x03B1, 0x0300, 0, + 1, 0x1F71, 0x03AC, 0, + 1, 0x1F72, 0x03B5, 0x0300, 0, + 1, 0x1F73, 0x03AD, 0, + 1, 0x1F74, 0x03B7, 0x0300, 0, + 1, 0x1F75, 0x03AE, 0, + 1, 0x1F76, 0x03B9, 0x0300, 0, + 1, 0x1F77, 0x03AF, 0, + 1, 0x1F78, 0x03BF, 0x0300, 0, + 1, 0x1F79, 0x03CC, 0, + 1, 0x1F7A, 0x03C5, 0x0300, 0, + 1, 0x1F7B, 0x03CD, 0, + 1, 0x1F7C, 0x03C9, 0x0300, 0, + 1, 0x1F7D, 0x03CE, 0, + 1, 0x1F80, 0x1F00, 0x0345, 0, + 1, 0x1F81, 0x1F01, 0x0345, 0, + 1, 0x1F82, 0x1F02, 0x0345, 0, + 1, 0x1F83, 0x1F03, 0x0345, 0, + 1, 0x1F84, 0x1F04, 0x0345, 0, + 1, 0x1F85, 0x1F05, 0x0345, 0, + 1, 0x1F86, 0x1F06, 0x0345, 0, + 1, 0x1F87, 0x1F07, 0x0345, 0, + 1, 0x1F88, 0x1F08, 0x0345, 0, + 1, 0x1F89, 0x1F09, 0x0345, 0, + 1, 0x1F8A, 0x1F0A, 0x0345, 0, + 1, 0x1F8B, 0x1F0B, 0x0345, 0, + 1, 0x1F8C, 0x1F0C, 0x0345, 0, + 1, 0x1F8D, 0x1F0D, 0x0345, 0, + 1, 0x1F8E, 0x1F0E, 0x0345, 0, + 1, 0x1F8F, 0x1F0F, 0x0345, 0, + 1, 0x1F90, 0x1F20, 0x0345, 0, + 1, 0x1F91, 0x1F21, 0x0345, 0, + 1, 0x1F92, 0x1F22, 0x0345, 0, + 1, 0x1F93, 0x1F23, 0x0345, 0, + 1, 0x1F94, 0x1F24, 0x0345, 0, + 1, 0x1F95, 0x1F25, 0x0345, 0, + 1, 0x1F96, 0x1F26, 0x0345, 0, + 1, 0x1F97, 0x1F27, 0x0345, 0, + 1, 0x1F98, 0x1F28, 0x0345, 0, + 1, 0x1F99, 0x1F29, 0x0345, 0, + 1, 0x1F9A, 0x1F2A, 0x0345, 0, + 1, 0x1F9B, 0x1F2B, 0x0345, 0, + 1, 0x1F9C, 0x1F2C, 0x0345, 0, + 1, 0x1F9D, 0x1F2D, 0x0345, 0, + 1, 0x1F9E, 0x1F2E, 0x0345, 0, + 1, 0x1F9F, 0x1F2F, 0x0345, 0, + 1, 0x1FA0, 0x1F60, 0x0345, 0, + 1, 0x1FA1, 0x1F61, 0x0345, 0, + 1, 0x1FA2, 0x1F62, 0x0345, 0, + 1, 0x1FA3, 0x1F63, 0x0345, 0, + 1, 0x1FA4, 0x1F64, 0x0345, 0, + 1, 0x1FA5, 0x1F65, 0x0345, 0, + 1, 0x1FA6, 0x1F66, 0x0345, 0, + 1, 0x1FA7, 0x1F67, 0x0345, 0, + 1, 0x1FA8, 0x1F68, 0x0345, 0, + 1, 0x1FA9, 0x1F69, 0x0345, 0, + 1, 0x1FAA, 0x1F6A, 0x0345, 0, + 1, 0x1FAB, 0x1F6B, 0x0345, 0, + 1, 0x1FAC, 0x1F6C, 0x0345, 0, + 1, 0x1FAD, 0x1F6D, 0x0345, 0, + 1, 0x1FAE, 0x1F6E, 0x0345, 0, + 1, 0x1FAF, 0x1F6F, 0x0345, 0, + 1, 0x1FB0, 0x03B1, 0x0306, 0, + 1, 0x1FB1, 0x03B1, 0x0304, 0, + 1, 0x1FB2, 0x1F70, 0x0345, 0, + 1, 0x1FB3, 0x03B1, 0x0345, 0, + 1, 0x1FB4, 0x03AC, 0x0345, 0, + 1, 0x1FB6, 0x03B1, 0x0342, 0, + 1, 0x1FB7, 0x1FB6, 0x0345, 0, + 1, 0x1FB8, 0x0391, 0x0306, 0, + 1, 0x1FB9, 0x0391, 0x0304, 0, + 1, 0x1FBA, 0x0391, 0x0300, 0, + 1, 0x1FBB, 0x0386, 0, + 1, 0x1FBC, 0x0391, 0x0345, 0, + 16, 0x1FBD, 0x0020, 0x0313, 0, + 1, 0x1FBE, 0x03B9, 0, + 16, 0x1FBF, 0x0020, 0x0313, 0, + 16, 0x1FC0, 0x0020, 0x0342, 0, + 1, 0x1FC1, 0x00A8, 0x0342, 0, + 1, 0x1FC2, 0x1F74, 0x0345, 0, + 1, 0x1FC3, 0x03B7, 0x0345, 0, + 1, 0x1FC4, 0x03AE, 0x0345, 0, + 1, 0x1FC6, 0x03B7, 0x0342, 0, + 1, 0x1FC7, 0x1FC6, 0x0345, 0, + 1, 0x1FC8, 0x0395, 0x0300, 0, + 1, 0x1FC9, 0x0388, 0, + 1, 0x1FCA, 0x0397, 0x0300, 0, + 1, 0x1FCB, 0x0389, 0, + 1, 0x1FCC, 0x0397, 0x0345, 0, + 1, 0x1FCD, 0x1FBF, 0x0300, 0, + 1, 0x1FCE, 0x1FBF, 0x0301, 0, + 1, 0x1FCF, 0x1FBF, 0x0342, 0, + 1, 0x1FD0, 0x03B9, 0x0306, 0, + 1, 0x1FD1, 0x03B9, 0x0304, 0, + 1, 0x1FD2, 0x03CA, 0x0300, 0, + 1, 0x1FD3, 0x0390, 0, + 1, 0x1FD6, 0x03B9, 0x0342, 0, + 1, 0x1FD7, 0x03CA, 0x0342, 0, + 1, 0x1FD8, 0x0399, 0x0306, 0, + 1, 0x1FD9, 0x0399, 0x0304, 0, + 1, 0x1FDA, 0x0399, 0x0300, 0, + 1, 0x1FDB, 0x038A, 0, + 1, 0x1FDD, 0x1FFE, 0x0300, 0, + 1, 0x1FDE, 0x1FFE, 0x0301, 0, + 1, 0x1FDF, 0x1FFE, 0x0342, 0, + 1, 0x1FE0, 0x03C5, 0x0306, 0, + 1, 0x1FE1, 0x03C5, 0x0304, 0, + 1, 0x1FE2, 0x03CB, 0x0300, 0, + 1, 0x1FE3, 0x03B0, 0, + 1, 0x1FE4, 0x03C1, 0x0313, 0, + 1, 0x1FE5, 0x03C1, 0x0314, 0, + 1, 0x1FE6, 0x03C5, 0x0342, 0, + 1, 0x1FE7, 0x03CB, 0x0342, 0, + 1, 0x1FE8, 0x03A5, 0x0306, 0, + 1, 0x1FE9, 0x03A5, 0x0304, 0, + 1, 0x1FEA, 0x03A5, 0x0300, 0, + 1, 0x1FEB, 0x038E, 0, + 1, 0x1FEC, 0x03A1, 0x0314, 0, + 1, 0x1FED, 0x00A8, 0x0300, 0, + 1, 0x1FEE, 0x0385, 0, + 1, 0x1FEF, 0x0060, 0, + 1, 0x1FF2, 0x1F7C, 0x0345, 0, + 1, 0x1FF3, 0x03C9, 0x0345, 0, + 1, 0x1FF4, 0x03CE, 0x0345, 0, + 1, 0x1FF6, 0x03C9, 0x0342, 0, + 1, 0x1FF7, 0x1FF6, 0x0345, 0, + 1, 0x1FF8, 0x039F, 0x0300, 0, + 1, 0x1FF9, 0x038C, 0, + 1, 0x1FFA, 0x03A9, 0x0300, 0, + 1, 0x1FFB, 0x038F, 0, + 1, 0x1FFC, 0x03A9, 0x0345, 0, + 1, 0x1FFD, 0x00B4, 0, + 16, 0x1FFE, 0x0020, 0x0314, 0, + 1, 0x2000, 0x2002, 0, + 1, 0x2001, 0x2003, 0, + 16, 0x2002, 0x0020, 0, + 16, 0x2003, 0x0020, 0, + 16, 0x2004, 0x0020, 0, + 16, 0x2005, 0x0020, 0, + 16, 0x2006, 0x0020, 0, + 3, 0x2007, 0x0020, 0, + 16, 0x2008, 0x0020, 0, + 16, 0x2009, 0x0020, 0, + 16, 0x200A, 0x0020, 0, + 3, 0x2011, 0x2010, 0, + 16, 0x2017, 0x0020, 0x0333, 0, + 16, 0x2024, 0x002E, 0, + 16, 0x2025, 0x002E, 0x002E, 0, + 16, 0x2026, 0x002E, 0x002E, 0x002E, 0, + 3, 0x202F, 0x0020, 0, + 16, 0x2033, 0x2032, 0x2032, 0, + 16, 0x2034, 0x2032, 0x2032, 0x2032, 0, + 16, 0x2036, 0x2035, 0x2035, 0, + 16, 0x2037, 0x2035, 0x2035, 0x2035, 0, + 16, 0x203C, 0x0021, 0x0021, 0, + 16, 0x203E, 0x0020, 0x0305, 0, + 16, 0x2048, 0x003F, 0x0021, 0, + 16, 0x2049, 0x0021, 0x003F, 0, + 9, 0x2070, 0x0030, 0, + 9, 0x2074, 0x0034, 0, + 9, 0x2075, 0x0035, 0, + 9, 0x2076, 0x0036, 0, + 9, 0x2077, 0x0037, 0, + 9, 0x2078, 0x0038, 0, + 9, 0x2079, 0x0039, 0, + 9, 0x207A, 0x002B, 0, + 9, 0x207B, 0x2212, 0, + 9, 0x207C, 0x003D, 0, + 9, 0x207D, 0x0028, 0, + 9, 0x207E, 0x0029, 0, + 9, 0x207F, 0x006E, 0, + 10, 0x2080, 0x0030, 0, + 10, 0x2081, 0x0031, 0, + 10, 0x2082, 0x0032, 0, + 10, 0x2083, 0x0033, 0, + 10, 0x2084, 0x0034, 0, + 10, 0x2085, 0x0035, 0, + 10, 0x2086, 0x0036, 0, + 10, 0x2087, 0x0037, 0, + 10, 0x2088, 0x0038, 0, + 10, 0x2089, 0x0039, 0, + 10, 0x208A, 0x002B, 0, + 10, 0x208B, 0x2212, 0, + 10, 0x208C, 0x003D, 0, + 10, 0x208D, 0x0028, 0, + 10, 0x208E, 0x0029, 0, + 16, 0x20A8, 0x0052, 0x0073, 0, + 16, 0x2100, 0x0061, 0x002F, 0x0063, 0, + 16, 0x2101, 0x0061, 0x002F, 0x0073, 0, + 2, 0x2102, 0x0043, 0, + 16, 0x2103, 0x00B0, 0x0043, 0, + 16, 0x2105, 0x0063, 0x002F, 0x006F, 0, + 16, 0x2106, 0x0063, 0x002F, 0x0075, 0, + 16, 0x2107, 0x0190, 0, + 16, 0x2109, 0x00B0, 0x0046, 0, + 2, 0x210A, 0x0067, 0, + 2, 0x210B, 0x0048, 0, + 2, 0x210C, 0x0048, 0, + 2, 0x210D, 0x0048, 0, + 2, 0x210E, 0x0068, 0, + 2, 0x210F, 0x0127, 0, + 2, 0x2110, 0x0049, 0, + 2, 0x2111, 0x0049, 0, + 2, 0x2112, 0x004C, 0, + 2, 0x2113, 0x006C, 0, + 2, 0x2115, 0x004E, 0, + 16, 0x2116, 0x004E, 0x006F, 0, + 2, 0x2119, 0x0050, 0, + 2, 0x211A, 0x0051, 0, + 2, 0x211B, 0x0052, 0, + 2, 0x211C, 0x0052, 0, + 2, 0x211D, 0x0052, 0, + 9, 0x2120, 0x0053, 0x004D, 0, + 16, 0x2121, 0x0054, 0x0045, 0x004C, 0, + 9, 0x2122, 0x0054, 0x004D, 0, + 2, 0x2124, 0x005A, 0, + 1, 0x2126, 0x03A9, 0, + 2, 0x2128, 0x005A, 0, + 1, 0x212A, 0x004B, 0, + 1, 0x212B, 0x00C5, 0, + 2, 0x212C, 0x0042, 0, + 2, 0x212D, 0x0043, 0, + 2, 0x212F, 0x0065, 0, + 2, 0x2130, 0x0045, 0, + 2, 0x2131, 0x0046, 0, + 2, 0x2133, 0x004D, 0, + 2, 0x2134, 0x006F, 0, + 16, 0x2135, 0x05D0, 0, + 16, 0x2136, 0x05D1, 0, + 16, 0x2137, 0x05D2, 0, + 16, 0x2138, 0x05D3, 0, + 2, 0x2139, 0x0069, 0, + 17, 0x2153, 0x0031, 0x2044, 0x0033, 0, + 17, 0x2154, 0x0032, 0x2044, 0x0033, 0, + 17, 0x2155, 0x0031, 0x2044, 0x0035, 0, + 17, 0x2156, 0x0032, 0x2044, 0x0035, 0, + 17, 0x2157, 0x0033, 0x2044, 0x0035, 0, + 17, 0x2158, 0x0034, 0x2044, 0x0035, 0, + 17, 0x2159, 0x0031, 0x2044, 0x0036, 0, + 17, 0x215A, 0x0035, 0x2044, 0x0036, 0, + 17, 0x215B, 0x0031, 0x2044, 0x0038, 0, + 17, 0x215C, 0x0033, 0x2044, 0x0038, 0, + 17, 0x215D, 0x0035, 0x2044, 0x0038, 0, + 17, 0x215E, 0x0037, 0x2044, 0x0038, 0, + 17, 0x215F, 0x0031, 0x2044, 0, + 16, 0x2160, 0x0049, 0, + 16, 0x2161, 0x0049, 0x0049, 0, + 16, 0x2162, 0x0049, 0x0049, 0x0049, 0, + 16, 0x2163, 0x0049, 0x0056, 0, + 16, 0x2164, 0x0056, 0, + 16, 0x2165, 0x0056, 0x0049, 0, + 16, 0x2166, 0x0056, 0x0049, 0x0049, 0, + 16, 0x2167, 0x0056, 0x0049, 0x0049, 0x0049, 0, + 16, 0x2168, 0x0049, 0x0058, 0, + 16, 0x2169, 0x0058, 0, + 16, 0x216A, 0x0058, 0x0049, 0, + 16, 0x216B, 0x0058, 0x0049, 0x0049, 0, + 16, 0x216C, 0x004C, 0, + 16, 0x216D, 0x0043, 0, + 16, 0x216E, 0x0044, 0, + 16, 0x216F, 0x004D, 0, + 16, 0x2170, 0x0069, 0, + 16, 0x2171, 0x0069, 0x0069, 0, + 16, 0x2172, 0x0069, 0x0069, 0x0069, 0, + 16, 0x2173, 0x0069, 0x0076, 0, + 16, 0x2174, 0x0076, 0, + 16, 0x2175, 0x0076, 0x0069, 0, + 16, 0x2176, 0x0076, 0x0069, 0x0069, 0, + 16, 0x2177, 0x0076, 0x0069, 0x0069, 0x0069, 0, + 16, 0x2178, 0x0069, 0x0078, 0, + 16, 0x2179, 0x0078, 0, + 16, 0x217A, 0x0078, 0x0069, 0, + 16, 0x217B, 0x0078, 0x0069, 0x0069, 0, + 16, 0x217C, 0x006C, 0, + 16, 0x217D, 0x0063, 0, + 16, 0x217E, 0x0064, 0, + 16, 0x217F, 0x006D, 0, + 1, 0x219A, 0x2190, 0x0338, 0, + 1, 0x219B, 0x2192, 0x0338, 0, + 1, 0x21AE, 0x2194, 0x0338, 0, + 1, 0x21CD, 0x21D0, 0x0338, 0, + 1, 0x21CE, 0x21D4, 0x0338, 0, + 1, 0x21CF, 0x21D2, 0x0338, 0, + 1, 0x2204, 0x2203, 0x0338, 0, + 1, 0x2209, 0x2208, 0x0338, 0, + 1, 0x220C, 0x220B, 0x0338, 0, + 1, 0x2224, 0x2223, 0x0338, 0, + 1, 0x2226, 0x2225, 0x0338, 0, + 16, 0x222C, 0x222B, 0x222B, 0, + 16, 0x222D, 0x222B, 0x222B, 0x222B, 0, + 16, 0x222F, 0x222E, 0x222E, 0, + 16, 0x2230, 0x222E, 0x222E, 0x222E, 0, + 1, 0x2241, 0x223C, 0x0338, 0, + 1, 0x2244, 0x2243, 0x0338, 0, + 1, 0x2247, 0x2245, 0x0338, 0, + 1, 0x2249, 0x2248, 0x0338, 0, + 1, 0x2260, 0x003D, 0x0338, 0, + 1, 0x2262, 0x2261, 0x0338, 0, + 1, 0x226D, 0x224D, 0x0338, 0, + 1, 0x226E, 0x003C, 0x0338, 0, + 1, 0x226F, 0x003E, 0x0338, 0, + 1, 0x2270, 0x2264, 0x0338, 0, + 1, 0x2271, 0x2265, 0x0338, 0, + 1, 0x2274, 0x2272, 0x0338, 0, + 1, 0x2275, 0x2273, 0x0338, 0, + 1, 0x2278, 0x2276, 0x0338, 0, + 1, 0x2279, 0x2277, 0x0338, 0, + 1, 0x2280, 0x227A, 0x0338, 0, + 1, 0x2281, 0x227B, 0x0338, 0, + 1, 0x2284, 0x2282, 0x0338, 0, + 1, 0x2285, 0x2283, 0x0338, 0, + 1, 0x2288, 0x2286, 0x0338, 0, + 1, 0x2289, 0x2287, 0x0338, 0, + 1, 0x22AC, 0x22A2, 0x0338, 0, + 1, 0x22AD, 0x22A8, 0x0338, 0, + 1, 0x22AE, 0x22A9, 0x0338, 0, + 1, 0x22AF, 0x22AB, 0x0338, 0, + 1, 0x22E0, 0x227C, 0x0338, 0, + 1, 0x22E1, 0x227D, 0x0338, 0, + 1, 0x22E2, 0x2291, 0x0338, 0, + 1, 0x22E3, 0x2292, 0x0338, 0, + 1, 0x22EA, 0x22B2, 0x0338, 0, + 1, 0x22EB, 0x22B3, 0x0338, 0, + 1, 0x22EC, 0x22B4, 0x0338, 0, + 1, 0x22ED, 0x22B5, 0x0338, 0, + 1, 0x2329, 0x3008, 0, + 1, 0x232A, 0x3009, 0, + 8, 0x2460, 0x0031, 0, + 8, 0x2461, 0x0032, 0, + 8, 0x2462, 0x0033, 0, + 8, 0x2463, 0x0034, 0, + 8, 0x2464, 0x0035, 0, + 8, 0x2465, 0x0036, 0, + 8, 0x2466, 0x0037, 0, + 8, 0x2467, 0x0038, 0, + 8, 0x2468, 0x0039, 0, + 8, 0x2469, 0x0031, 0x0030, 0, + 8, 0x246A, 0x0031, 0x0031, 0, + 8, 0x246B, 0x0031, 0x0032, 0, + 8, 0x246C, 0x0031, 0x0033, 0, + 8, 0x246D, 0x0031, 0x0034, 0, + 8, 0x246E, 0x0031, 0x0035, 0, + 8, 0x246F, 0x0031, 0x0036, 0, + 8, 0x2470, 0x0031, 0x0037, 0, + 8, 0x2471, 0x0031, 0x0038, 0, + 8, 0x2472, 0x0031, 0x0039, 0, + 8, 0x2473, 0x0032, 0x0030, 0, + 16, 0x2474, 0x0028, 0x0031, 0x0029, 0, + 16, 0x2475, 0x0028, 0x0032, 0x0029, 0, + 16, 0x2476, 0x0028, 0x0033, 0x0029, 0, + 16, 0x2477, 0x0028, 0x0034, 0x0029, 0, + 16, 0x2478, 0x0028, 0x0035, 0x0029, 0, + 16, 0x2479, 0x0028, 0x0036, 0x0029, 0, + 16, 0x247A, 0x0028, 0x0037, 0x0029, 0, + 16, 0x247B, 0x0028, 0x0038, 0x0029, 0, + 16, 0x247C, 0x0028, 0x0039, 0x0029, 0, + 16, 0x247D, 0x0028, 0x0031, 0x0030, 0x0029, 0, + 16, 0x247E, 0x0028, 0x0031, 0x0031, 0x0029, 0, + 16, 0x247F, 0x0028, 0x0031, 0x0032, 0x0029, 0, + 16, 0x2480, 0x0028, 0x0031, 0x0033, 0x0029, 0, + 16, 0x2481, 0x0028, 0x0031, 0x0034, 0x0029, 0, + 16, 0x2482, 0x0028, 0x0031, 0x0035, 0x0029, 0, + 16, 0x2483, 0x0028, 0x0031, 0x0036, 0x0029, 0, + 16, 0x2484, 0x0028, 0x0031, 0x0037, 0x0029, 0, + 16, 0x2485, 0x0028, 0x0031, 0x0038, 0x0029, 0, + 16, 0x2486, 0x0028, 0x0031, 0x0039, 0x0029, 0, + 16, 0x2487, 0x0028, 0x0032, 0x0030, 0x0029, 0, + 16, 0x2488, 0x0031, 0x002E, 0, + 16, 0x2489, 0x0032, 0x002E, 0, + 16, 0x248A, 0x0033, 0x002E, 0, + 16, 0x248B, 0x0034, 0x002E, 0, + 16, 0x248C, 0x0035, 0x002E, 0, + 16, 0x248D, 0x0036, 0x002E, 0, + 16, 0x248E, 0x0037, 0x002E, 0, + 16, 0x248F, 0x0038, 0x002E, 0, + 16, 0x2490, 0x0039, 0x002E, 0, + 16, 0x2491, 0x0031, 0x0030, 0x002E, 0, + 16, 0x2492, 0x0031, 0x0031, 0x002E, 0, + 16, 0x2493, 0x0031, 0x0032, 0x002E, 0, + 16, 0x2494, 0x0031, 0x0033, 0x002E, 0, + 16, 0x2495, 0x0031, 0x0034, 0x002E, 0, + 16, 0x2496, 0x0031, 0x0035, 0x002E, 0, + 16, 0x2497, 0x0031, 0x0036, 0x002E, 0, + 16, 0x2498, 0x0031, 0x0037, 0x002E, 0, + 16, 0x2499, 0x0031, 0x0038, 0x002E, 0, + 16, 0x249A, 0x0031, 0x0039, 0x002E, 0, + 16, 0x249B, 0x0032, 0x0030, 0x002E, 0, + 16, 0x249C, 0x0028, 0x0061, 0x0029, 0, + 16, 0x249D, 0x0028, 0x0062, 0x0029, 0, + 16, 0x249E, 0x0028, 0x0063, 0x0029, 0, + 16, 0x249F, 0x0028, 0x0064, 0x0029, 0, + 16, 0x24A0, 0x0028, 0x0065, 0x0029, 0, + 16, 0x24A1, 0x0028, 0x0066, 0x0029, 0, + 16, 0x24A2, 0x0028, 0x0067, 0x0029, 0, + 16, 0x24A3, 0x0028, 0x0068, 0x0029, 0, + 16, 0x24A4, 0x0028, 0x0069, 0x0029, 0, + 16, 0x24A5, 0x0028, 0x006A, 0x0029, 0, + 16, 0x24A6, 0x0028, 0x006B, 0x0029, 0, + 16, 0x24A7, 0x0028, 0x006C, 0x0029, 0, + 16, 0x24A8, 0x0028, 0x006D, 0x0029, 0, + 16, 0x24A9, 0x0028, 0x006E, 0x0029, 0, + 16, 0x24AA, 0x0028, 0x006F, 0x0029, 0, + 16, 0x24AB, 0x0028, 0x0070, 0x0029, 0, + 16, 0x24AC, 0x0028, 0x0071, 0x0029, 0, + 16, 0x24AD, 0x0028, 0x0072, 0x0029, 0, + 16, 0x24AE, 0x0028, 0x0073, 0x0029, 0, + 16, 0x24AF, 0x0028, 0x0074, 0x0029, 0, + 16, 0x24B0, 0x0028, 0x0075, 0x0029, 0, + 16, 0x24B1, 0x0028, 0x0076, 0x0029, 0, + 16, 0x24B2, 0x0028, 0x0077, 0x0029, 0, + 16, 0x24B3, 0x0028, 0x0078, 0x0029, 0, + 16, 0x24B4, 0x0028, 0x0079, 0x0029, 0, + 16, 0x24B5, 0x0028, 0x007A, 0x0029, 0, + 8, 0x24B6, 0x0041, 0, + 8, 0x24B7, 0x0042, 0, + 8, 0x24B8, 0x0043, 0, + 8, 0x24B9, 0x0044, 0, + 8, 0x24BA, 0x0045, 0, + 8, 0x24BB, 0x0046, 0, + 8, 0x24BC, 0x0047, 0, + 8, 0x24BD, 0x0048, 0, + 8, 0x24BE, 0x0049, 0, + 8, 0x24BF, 0x004A, 0, + 8, 0x24C0, 0x004B, 0, + 8, 0x24C1, 0x004C, 0, + 8, 0x24C2, 0x004D, 0, + 8, 0x24C3, 0x004E, 0, + 8, 0x24C4, 0x004F, 0, + 8, 0x24C5, 0x0050, 0, + 8, 0x24C6, 0x0051, 0, + 8, 0x24C7, 0x0052, 0, + 8, 0x24C8, 0x0053, 0, + 8, 0x24C9, 0x0054, 0, + 8, 0x24CA, 0x0055, 0, + 8, 0x24CB, 0x0056, 0, + 8, 0x24CC, 0x0057, 0, + 8, 0x24CD, 0x0058, 0, + 8, 0x24CE, 0x0059, 0, + 8, 0x24CF, 0x005A, 0, + 8, 0x24D0, 0x0061, 0, + 8, 0x24D1, 0x0062, 0, + 8, 0x24D2, 0x0063, 0, + 8, 0x24D3, 0x0064, 0, + 8, 0x24D4, 0x0065, 0, + 8, 0x24D5, 0x0066, 0, + 8, 0x24D6, 0x0067, 0, + 8, 0x24D7, 0x0068, 0, + 8, 0x24D8, 0x0069, 0, + 8, 0x24D9, 0x006A, 0, + 8, 0x24DA, 0x006B, 0, + 8, 0x24DB, 0x006C, 0, + 8, 0x24DC, 0x006D, 0, + 8, 0x24DD, 0x006E, 0, + 8, 0x24DE, 0x006F, 0, + 8, 0x24DF, 0x0070, 0, + 8, 0x24E0, 0x0071, 0, + 8, 0x24E1, 0x0072, 0, + 8, 0x24E2, 0x0073, 0, + 8, 0x24E3, 0x0074, 0, + 8, 0x24E4, 0x0075, 0, + 8, 0x24E5, 0x0076, 0, + 8, 0x24E6, 0x0077, 0, + 8, 0x24E7, 0x0078, 0, + 8, 0x24E8, 0x0079, 0, + 8, 0x24E9, 0x007A, 0, + 8, 0x24EA, 0x0030, 0, + 16, 0x2E9F, 0x6BCD, 0, + 16, 0x2EF3, 0x9F9F, 0, + 16, 0x2F00, 0x4E00, 0, + 16, 0x2F01, 0x4E28, 0, + 16, 0x2F02, 0x4E36, 0, + 16, 0x2F03, 0x4E3F, 0, + 16, 0x2F04, 0x4E59, 0, + 16, 0x2F05, 0x4E85, 0, + 16, 0x2F06, 0x4E8C, 0, + 16, 0x2F07, 0x4EA0, 0, + 16, 0x2F08, 0x4EBA, 0, + 16, 0x2F09, 0x513F, 0, + 16, 0x2F0A, 0x5165, 0, + 16, 0x2F0B, 0x516B, 0, + 16, 0x2F0C, 0x5182, 0, + 16, 0x2F0D, 0x5196, 0, + 16, 0x2F0E, 0x51AB, 0, + 16, 0x2F0F, 0x51E0, 0, + 16, 0x2F10, 0x51F5, 0, + 16, 0x2F11, 0x5200, 0, + 16, 0x2F12, 0x529B, 0, + 16, 0x2F13, 0x52F9, 0, + 16, 0x2F14, 0x5315, 0, + 16, 0x2F15, 0x531A, 0, + 16, 0x2F16, 0x5338, 0, + 16, 0x2F17, 0x5341, 0, + 16, 0x2F18, 0x535C, 0, + 16, 0x2F19, 0x5369, 0, + 16, 0x2F1A, 0x5382, 0, + 16, 0x2F1B, 0x53B6, 0, + 16, 0x2F1C, 0x53C8, 0, + 16, 0x2F1D, 0x53E3, 0, + 16, 0x2F1E, 0x56D7, 0, + 16, 0x2F1F, 0x571F, 0, + 16, 0x2F20, 0x58EB, 0, + 16, 0x2F21, 0x5902, 0, + 16, 0x2F22, 0x590A, 0, + 16, 0x2F23, 0x5915, 0, + 16, 0x2F24, 0x5927, 0, + 16, 0x2F25, 0x5973, 0, + 16, 0x2F26, 0x5B50, 0, + 16, 0x2F27, 0x5B80, 0, + 16, 0x2F28, 0x5BF8, 0, + 16, 0x2F29, 0x5C0F, 0, + 16, 0x2F2A, 0x5C22, 0, + 16, 0x2F2B, 0x5C38, 0, + 16, 0x2F2C, 0x5C6E, 0, + 16, 0x2F2D, 0x5C71, 0, + 16, 0x2F2E, 0x5DDB, 0, + 16, 0x2F2F, 0x5DE5, 0, + 16, 0x2F30, 0x5DF1, 0, + 16, 0x2F31, 0x5DFE, 0, + 16, 0x2F32, 0x5E72, 0, + 16, 0x2F33, 0x5E7A, 0, + 16, 0x2F34, 0x5E7F, 0, + 16, 0x2F35, 0x5EF4, 0, + 16, 0x2F36, 0x5EFE, 0, + 16, 0x2F37, 0x5F0B, 0, + 16, 0x2F38, 0x5F13, 0, + 16, 0x2F39, 0x5F50, 0, + 16, 0x2F3A, 0x5F61, 0, + 16, 0x2F3B, 0x5F73, 0, + 16, 0x2F3C, 0x5FC3, 0, + 16, 0x2F3D, 0x6208, 0, + 16, 0x2F3E, 0x6236, 0, + 16, 0x2F3F, 0x624B, 0, + 16, 0x2F40, 0x652F, 0, + 16, 0x2F41, 0x6534, 0, + 16, 0x2F42, 0x6587, 0, + 16, 0x2F43, 0x6597, 0, + 16, 0x2F44, 0x65A4, 0, + 16, 0x2F45, 0x65B9, 0, + 16, 0x2F46, 0x65E0, 0, + 16, 0x2F47, 0x65E5, 0, + 16, 0x2F48, 0x66F0, 0, + 16, 0x2F49, 0x6708, 0, + 16, 0x2F4A, 0x6728, 0, + 16, 0x2F4B, 0x6B20, 0, + 16, 0x2F4C, 0x6B62, 0, + 16, 0x2F4D, 0x6B79, 0, + 16, 0x2F4E, 0x6BB3, 0, + 16, 0x2F4F, 0x6BCB, 0, + 16, 0x2F50, 0x6BD4, 0, + 16, 0x2F51, 0x6BDB, 0, + 16, 0x2F52, 0x6C0F, 0, + 16, 0x2F53, 0x6C14, 0, + 16, 0x2F54, 0x6C34, 0, + 16, 0x2F55, 0x706B, 0, + 16, 0x2F56, 0x722A, 0, + 16, 0x2F57, 0x7236, 0, + 16, 0x2F58, 0x723B, 0, + 16, 0x2F59, 0x723F, 0, + 16, 0x2F5A, 0x7247, 0, + 16, 0x2F5B, 0x7259, 0, + 16, 0x2F5C, 0x725B, 0, + 16, 0x2F5D, 0x72AC, 0, + 16, 0x2F5E, 0x7384, 0, + 16, 0x2F5F, 0x7389, 0, + 16, 0x2F60, 0x74DC, 0, + 16, 0x2F61, 0x74E6, 0, + 16, 0x2F62, 0x7518, 0, + 16, 0x2F63, 0x751F, 0, + 16, 0x2F64, 0x7528, 0, + 16, 0x2F65, 0x7530, 0, + 16, 0x2F66, 0x758B, 0, + 16, 0x2F67, 0x7592, 0, + 16, 0x2F68, 0x7676, 0, + 16, 0x2F69, 0x767D, 0, + 16, 0x2F6A, 0x76AE, 0, + 16, 0x2F6B, 0x76BF, 0, + 16, 0x2F6C, 0x76EE, 0, + 16, 0x2F6D, 0x77DB, 0, + 16, 0x2F6E, 0x77E2, 0, + 16, 0x2F6F, 0x77F3, 0, + 16, 0x2F70, 0x793A, 0, + 16, 0x2F71, 0x79B8, 0, + 16, 0x2F72, 0x79BE, 0, + 16, 0x2F73, 0x7A74, 0, + 16, 0x2F74, 0x7ACB, 0, + 16, 0x2F75, 0x7AF9, 0, + 16, 0x2F76, 0x7C73, 0, + 16, 0x2F77, 0x7CF8, 0, + 16, 0x2F78, 0x7F36, 0, + 16, 0x2F79, 0x7F51, 0, + 16, 0x2F7A, 0x7F8A, 0, + 16, 0x2F7B, 0x7FBD, 0, + 16, 0x2F7C, 0x8001, 0, + 16, 0x2F7D, 0x800C, 0, + 16, 0x2F7E, 0x8012, 0, + 16, 0x2F7F, 0x8033, 0, + 16, 0x2F80, 0x807F, 0, + 16, 0x2F81, 0x8089, 0, + 16, 0x2F82, 0x81E3, 0, + 16, 0x2F83, 0x81EA, 0, + 16, 0x2F84, 0x81F3, 0, + 16, 0x2F85, 0x81FC, 0, + 16, 0x2F86, 0x820C, 0, + 16, 0x2F87, 0x821B, 0, + 16, 0x2F88, 0x821F, 0, + 16, 0x2F89, 0x826E, 0, + 16, 0x2F8A, 0x8272, 0, + 16, 0x2F8B, 0x8278, 0, + 16, 0x2F8C, 0x864D, 0, + 16, 0x2F8D, 0x866B, 0, + 16, 0x2F8E, 0x8840, 0, + 16, 0x2F8F, 0x884C, 0, + 16, 0x2F90, 0x8863, 0, + 16, 0x2F91, 0x897E, 0, + 16, 0x2F92, 0x898B, 0, + 16, 0x2F93, 0x89D2, 0, + 16, 0x2F94, 0x8A00, 0, + 16, 0x2F95, 0x8C37, 0, + 16, 0x2F96, 0x8C46, 0, + 16, 0x2F97, 0x8C55, 0, + 16, 0x2F98, 0x8C78, 0, + 16, 0x2F99, 0x8C9D, 0, + 16, 0x2F9A, 0x8D64, 0, + 16, 0x2F9B, 0x8D70, 0, + 16, 0x2F9C, 0x8DB3, 0, + 16, 0x2F9D, 0x8EAB, 0, + 16, 0x2F9E, 0x8ECA, 0, + 16, 0x2F9F, 0x8F9B, 0, + 16, 0x2FA0, 0x8FB0, 0, + 16, 0x2FA1, 0x8FB5, 0, + 16, 0x2FA2, 0x9091, 0, + 16, 0x2FA3, 0x9149, 0, + 16, 0x2FA4, 0x91C6, 0, + 16, 0x2FA5, 0x91CC, 0, + 16, 0x2FA6, 0x91D1, 0, + 16, 0x2FA7, 0x9577, 0, + 16, 0x2FA8, 0x9580, 0, + 16, 0x2FA9, 0x961C, 0, + 16, 0x2FAA, 0x96B6, 0, + 16, 0x2FAB, 0x96B9, 0, + 16, 0x2FAC, 0x96E8, 0, + 16, 0x2FAD, 0x9751, 0, + 16, 0x2FAE, 0x975E, 0, + 16, 0x2FAF, 0x9762, 0, + 16, 0x2FB0, 0x9769, 0, + 16, 0x2FB1, 0x97CB, 0, + 16, 0x2FB2, 0x97ED, 0, + 16, 0x2FB3, 0x97F3, 0, + 16, 0x2FB4, 0x9801, 0, + 16, 0x2FB5, 0x98A8, 0, + 16, 0x2FB6, 0x98DB, 0, + 16, 0x2FB7, 0x98DF, 0, + 16, 0x2FB8, 0x9996, 0, + 16, 0x2FB9, 0x9999, 0, + 16, 0x2FBA, 0x99AC, 0, + 16, 0x2FBB, 0x9AA8, 0, + 16, 0x2FBC, 0x9AD8, 0, + 16, 0x2FBD, 0x9ADF, 0, + 16, 0x2FBE, 0x9B25, 0, + 16, 0x2FBF, 0x9B2F, 0, + 16, 0x2FC0, 0x9B32, 0, + 16, 0x2FC1, 0x9B3C, 0, + 16, 0x2FC2, 0x9B5A, 0, + 16, 0x2FC3, 0x9CE5, 0, + 16, 0x2FC4, 0x9E75, 0, + 16, 0x2FC5, 0x9E7F, 0, + 16, 0x2FC6, 0x9EA5, 0, + 16, 0x2FC7, 0x9EBB, 0, + 16, 0x2FC8, 0x9EC3, 0, + 16, 0x2FC9, 0x9ECD, 0, + 16, 0x2FCA, 0x9ED1, 0, + 16, 0x2FCB, 0x9EF9, 0, + 16, 0x2FCC, 0x9EFD, 0, + 16, 0x2FCD, 0x9F0E, 0, + 16, 0x2FCE, 0x9F13, 0, + 16, 0x2FCF, 0x9F20, 0, + 16, 0x2FD0, 0x9F3B, 0, + 16, 0x2FD1, 0x9F4A, 0, + 16, 0x2FD2, 0x9F52, 0, + 16, 0x2FD3, 0x9F8D, 0, + 16, 0x2FD4, 0x9F9C, 0, + 16, 0x2FD5, 0x9FA0, 0, + 12, 0x3000, 0x0020, 0, + 16, 0x3036, 0x3012, 0, + 16, 0x3038, 0x5341, 0, + 16, 0x3039, 0x5344, 0, + 16, 0x303A, 0x5345, 0, + 1, 0x304C, 0x304B, 0x3099, 0, + 1, 0x304E, 0x304D, 0x3099, 0, + 1, 0x3050, 0x304F, 0x3099, 0, + 1, 0x3052, 0x3051, 0x3099, 0, + 1, 0x3054, 0x3053, 0x3099, 0, + 1, 0x3056, 0x3055, 0x3099, 0, + 1, 0x3058, 0x3057, 0x3099, 0, + 1, 0x305A, 0x3059, 0x3099, 0, + 1, 0x305C, 0x305B, 0x3099, 0, + 1, 0x305E, 0x305D, 0x3099, 0, + 1, 0x3060, 0x305F, 0x3099, 0, + 1, 0x3062, 0x3061, 0x3099, 0, + 1, 0x3065, 0x3064, 0x3099, 0, + 1, 0x3067, 0x3066, 0x3099, 0, + 1, 0x3069, 0x3068, 0x3099, 0, + 1, 0x3070, 0x306F, 0x3099, 0, + 1, 0x3071, 0x306F, 0x309A, 0, + 1, 0x3073, 0x3072, 0x3099, 0, + 1, 0x3074, 0x3072, 0x309A, 0, + 1, 0x3076, 0x3075, 0x3099, 0, + 1, 0x3077, 0x3075, 0x309A, 0, + 1, 0x3079, 0x3078, 0x3099, 0, + 1, 0x307A, 0x3078, 0x309A, 0, + 1, 0x307C, 0x307B, 0x3099, 0, + 1, 0x307D, 0x307B, 0x309A, 0, + 1, 0x3094, 0x3046, 0x3099, 0, + 16, 0x309B, 0x0020, 0x3099, 0, + 16, 0x309C, 0x0020, 0x309A, 0, + 1, 0x309E, 0x309D, 0x3099, 0, + 1, 0x30AC, 0x30AB, 0x3099, 0, + 1, 0x30AE, 0x30AD, 0x3099, 0, + 1, 0x30B0, 0x30AF, 0x3099, 0, + 1, 0x30B2, 0x30B1, 0x3099, 0, + 1, 0x30B4, 0x30B3, 0x3099, 0, + 1, 0x30B6, 0x30B5, 0x3099, 0, + 1, 0x30B8, 0x30B7, 0x3099, 0, + 1, 0x30BA, 0x30B9, 0x3099, 0, + 1, 0x30BC, 0x30BB, 0x3099, 0, + 1, 0x30BE, 0x30BD, 0x3099, 0, + 1, 0x30C0, 0x30BF, 0x3099, 0, + 1, 0x30C2, 0x30C1, 0x3099, 0, + 1, 0x30C5, 0x30C4, 0x3099, 0, + 1, 0x30C7, 0x30C6, 0x3099, 0, + 1, 0x30C9, 0x30C8, 0x3099, 0, + 1, 0x30D0, 0x30CF, 0x3099, 0, + 1, 0x30D1, 0x30CF, 0x309A, 0, + 1, 0x30D3, 0x30D2, 0x3099, 0, + 1, 0x30D4, 0x30D2, 0x309A, 0, + 1, 0x30D6, 0x30D5, 0x3099, 0, + 1, 0x30D7, 0x30D5, 0x309A, 0, + 1, 0x30D9, 0x30D8, 0x3099, 0, + 1, 0x30DA, 0x30D8, 0x309A, 0, + 1, 0x30DC, 0x30DB, 0x3099, 0, + 1, 0x30DD, 0x30DB, 0x309A, 0, + 1, 0x30F4, 0x30A6, 0x3099, 0, + 1, 0x30F7, 0x30EF, 0x3099, 0, + 1, 0x30F8, 0x30F0, 0x3099, 0, + 1, 0x30F9, 0x30F1, 0x3099, 0, + 1, 0x30FA, 0x30F2, 0x3099, 0, + 1, 0x30FE, 0x30FD, 0x3099, 0, + 16, 0x3131, 0x1100, 0, + 16, 0x3132, 0x1101, 0, + 16, 0x3133, 0x11AA, 0, + 16, 0x3134, 0x1102, 0, + 16, 0x3135, 0x11AC, 0, + 16, 0x3136, 0x11AD, 0, + 16, 0x3137, 0x1103, 0, + 16, 0x3138, 0x1104, 0, + 16, 0x3139, 0x1105, 0, + 16, 0x313A, 0x11B0, 0, + 16, 0x313B, 0x11B1, 0, + 16, 0x313C, 0x11B2, 0, + 16, 0x313D, 0x11B3, 0, + 16, 0x313E, 0x11B4, 0, + 16, 0x313F, 0x11B5, 0, + 16, 0x3140, 0x111A, 0, + 16, 0x3141, 0x1106, 0, + 16, 0x3142, 0x1107, 0, + 16, 0x3143, 0x1108, 0, + 16, 0x3144, 0x1121, 0, + 16, 0x3145, 0x1109, 0, + 16, 0x3146, 0x110A, 0, + 16, 0x3147, 0x110B, 0, + 16, 0x3148, 0x110C, 0, + 16, 0x3149, 0x110D, 0, + 16, 0x314A, 0x110E, 0, + 16, 0x314B, 0x110F, 0, + 16, 0x314C, 0x1110, 0, + 16, 0x314D, 0x1111, 0, + 16, 0x314E, 0x1112, 0, + 16, 0x314F, 0x1161, 0, + 16, 0x3150, 0x1162, 0, + 16, 0x3151, 0x1163, 0, + 16, 0x3152, 0x1164, 0, + 16, 0x3153, 0x1165, 0, + 16, 0x3154, 0x1166, 0, + 16, 0x3155, 0x1167, 0, + 16, 0x3156, 0x1168, 0, + 16, 0x3157, 0x1169, 0, + 16, 0x3158, 0x116A, 0, + 16, 0x3159, 0x116B, 0, + 16, 0x315A, 0x116C, 0, + 16, 0x315B, 0x116D, 0, + 16, 0x315C, 0x116E, 0, + 16, 0x315D, 0x116F, 0, + 16, 0x315E, 0x1170, 0, + 16, 0x315F, 0x1171, 0, + 16, 0x3160, 0x1172, 0, + 16, 0x3161, 0x1173, 0, + 16, 0x3162, 0x1174, 0, + 16, 0x3163, 0x1175, 0, + 16, 0x3164, 0x1160, 0, + 16, 0x3165, 0x1114, 0, + 16, 0x3166, 0x1115, 0, + 16, 0x3167, 0x11C7, 0, + 16, 0x3168, 0x11C8, 0, + 16, 0x3169, 0x11CC, 0, + 16, 0x316A, 0x11CE, 0, + 16, 0x316B, 0x11D3, 0, + 16, 0x316C, 0x11D7, 0, + 16, 0x316D, 0x11D9, 0, + 16, 0x316E, 0x111C, 0, + 16, 0x316F, 0x11DD, 0, + 16, 0x3170, 0x11DF, 0, + 16, 0x3171, 0x111D, 0, + 16, 0x3172, 0x111E, 0, + 16, 0x3173, 0x1120, 0, + 16, 0x3174, 0x1122, 0, + 16, 0x3175, 0x1123, 0, + 16, 0x3176, 0x1127, 0, + 16, 0x3177, 0x1129, 0, + 16, 0x3178, 0x112B, 0, + 16, 0x3179, 0x112C, 0, + 16, 0x317A, 0x112D, 0, + 16, 0x317B, 0x112E, 0, + 16, 0x317C, 0x112F, 0, + 16, 0x317D, 0x1132, 0, + 16, 0x317E, 0x1136, 0, + 16, 0x317F, 0x1140, 0, + 16, 0x3180, 0x1147, 0, + 16, 0x3181, 0x114C, 0, + 16, 0x3182, 0x11F1, 0, + 16, 0x3183, 0x11F2, 0, + 16, 0x3184, 0x1157, 0, + 16, 0x3185, 0x1158, 0, + 16, 0x3186, 0x1159, 0, + 16, 0x3187, 0x1184, 0, + 16, 0x3188, 0x1185, 0, + 16, 0x3189, 0x1188, 0, + 16, 0x318A, 0x1191, 0, + 16, 0x318B, 0x1192, 0, + 16, 0x318C, 0x1194, 0, + 16, 0x318D, 0x119E, 0, + 16, 0x318E, 0x11A1, 0, + 9, 0x3192, 0x4E00, 0, + 9, 0x3193, 0x4E8C, 0, + 9, 0x3194, 0x4E09, 0, + 9, 0x3195, 0x56DB, 0, + 9, 0x3196, 0x4E0A, 0, + 9, 0x3197, 0x4E2D, 0, + 9, 0x3198, 0x4E0B, 0, + 9, 0x3199, 0x7532, 0, + 9, 0x319A, 0x4E59, 0, + 9, 0x319B, 0x4E19, 0, + 9, 0x319C, 0x4E01, 0, + 9, 0x319D, 0x5929, 0, + 9, 0x319E, 0x5730, 0, + 9, 0x319F, 0x4EBA, 0, + 16, 0x3200, 0x0028, 0x1100, 0x0029, 0, + 16, 0x3201, 0x0028, 0x1102, 0x0029, 0, + 16, 0x3202, 0x0028, 0x1103, 0x0029, 0, + 16, 0x3203, 0x0028, 0x1105, 0x0029, 0, + 16, 0x3204, 0x0028, 0x1106, 0x0029, 0, + 16, 0x3205, 0x0028, 0x1107, 0x0029, 0, + 16, 0x3206, 0x0028, 0x1109, 0x0029, 0, + 16, 0x3207, 0x0028, 0x110B, 0x0029, 0, + 16, 0x3208, 0x0028, 0x110C, 0x0029, 0, + 16, 0x3209, 0x0028, 0x110E, 0x0029, 0, + 16, 0x320A, 0x0028, 0x110F, 0x0029, 0, + 16, 0x320B, 0x0028, 0x1110, 0x0029, 0, + 16, 0x320C, 0x0028, 0x1111, 0x0029, 0, + 16, 0x320D, 0x0028, 0x1112, 0x0029, 0, + 16, 0x320E, 0x0028, 0x1100, 0x1161, 0x0029, 0, + 16, 0x320F, 0x0028, 0x1102, 0x1161, 0x0029, 0, + 16, 0x3210, 0x0028, 0x1103, 0x1161, 0x0029, 0, + 16, 0x3211, 0x0028, 0x1105, 0x1161, 0x0029, 0, + 16, 0x3212, 0x0028, 0x1106, 0x1161, 0x0029, 0, + 16, 0x3213, 0x0028, 0x1107, 0x1161, 0x0029, 0, + 16, 0x3214, 0x0028, 0x1109, 0x1161, 0x0029, 0, + 16, 0x3215, 0x0028, 0x110B, 0x1161, 0x0029, 0, + 16, 0x3216, 0x0028, 0x110C, 0x1161, 0x0029, 0, + 16, 0x3217, 0x0028, 0x110E, 0x1161, 0x0029, 0, + 16, 0x3218, 0x0028, 0x110F, 0x1161, 0x0029, 0, + 16, 0x3219, 0x0028, 0x1110, 0x1161, 0x0029, 0, + 16, 0x321A, 0x0028, 0x1111, 0x1161, 0x0029, 0, + 16, 0x321B, 0x0028, 0x1112, 0x1161, 0x0029, 0, + 16, 0x321C, 0x0028, 0x110C, 0x116E, 0x0029, 0, + 16, 0x3220, 0x0028, 0x4E00, 0x0029, 0, + 16, 0x3221, 0x0028, 0x4E8C, 0x0029, 0, + 16, 0x3222, 0x0028, 0x4E09, 0x0029, 0, + 16, 0x3223, 0x0028, 0x56DB, 0x0029, 0, + 16, 0x3224, 0x0028, 0x4E94, 0x0029, 0, + 16, 0x3225, 0x0028, 0x516D, 0x0029, 0, + 16, 0x3226, 0x0028, 0x4E03, 0x0029, 0, + 16, 0x3227, 0x0028, 0x516B, 0x0029, 0, + 16, 0x3228, 0x0028, 0x4E5D, 0x0029, 0, + 16, 0x3229, 0x0028, 0x5341, 0x0029, 0, + 16, 0x322A, 0x0028, 0x6708, 0x0029, 0, + 16, 0x322B, 0x0028, 0x706B, 0x0029, 0, + 16, 0x322C, 0x0028, 0x6C34, 0x0029, 0, + 16, 0x322D, 0x0028, 0x6728, 0x0029, 0, + 16, 0x322E, 0x0028, 0x91D1, 0x0029, 0, + 16, 0x322F, 0x0028, 0x571F, 0x0029, 0, + 16, 0x3230, 0x0028, 0x65E5, 0x0029, 0, + 16, 0x3231, 0x0028, 0x682A, 0x0029, 0, + 16, 0x3232, 0x0028, 0x6709, 0x0029, 0, + 16, 0x3233, 0x0028, 0x793E, 0x0029, 0, + 16, 0x3234, 0x0028, 0x540D, 0x0029, 0, + 16, 0x3235, 0x0028, 0x7279, 0x0029, 0, + 16, 0x3236, 0x0028, 0x8CA1, 0x0029, 0, + 16, 0x3237, 0x0028, 0x795D, 0x0029, 0, + 16, 0x3238, 0x0028, 0x52B4, 0x0029, 0, + 16, 0x3239, 0x0028, 0x4EE3, 0x0029, 0, + 16, 0x323A, 0x0028, 0x547C, 0x0029, 0, + 16, 0x323B, 0x0028, 0x5B66, 0x0029, 0, + 16, 0x323C, 0x0028, 0x76E3, 0x0029, 0, + 16, 0x323D, 0x0028, 0x4F01, 0x0029, 0, + 16, 0x323E, 0x0028, 0x8CC7, 0x0029, 0, + 16, 0x323F, 0x0028, 0x5354, 0x0029, 0, + 16, 0x3240, 0x0028, 0x796D, 0x0029, 0, + 16, 0x3241, 0x0028, 0x4F11, 0x0029, 0, + 16, 0x3242, 0x0028, 0x81EA, 0x0029, 0, + 16, 0x3243, 0x0028, 0x81F3, 0x0029, 0, + 8, 0x3260, 0x1100, 0, + 8, 0x3261, 0x1102, 0, + 8, 0x3262, 0x1103, 0, + 8, 0x3263, 0x1105, 0, + 8, 0x3264, 0x1106, 0, + 8, 0x3265, 0x1107, 0, + 8, 0x3266, 0x1109, 0, + 8, 0x3267, 0x110B, 0, + 8, 0x3268, 0x110C, 0, + 8, 0x3269, 0x110E, 0, + 8, 0x326A, 0x110F, 0, + 8, 0x326B, 0x1110, 0, + 8, 0x326C, 0x1111, 0, + 8, 0x326D, 0x1112, 0, + 8, 0x326E, 0x1100, 0x1161, 0, + 8, 0x326F, 0x1102, 0x1161, 0, + 8, 0x3270, 0x1103, 0x1161, 0, + 8, 0x3271, 0x1105, 0x1161, 0, + 8, 0x3272, 0x1106, 0x1161, 0, + 8, 0x3273, 0x1107, 0x1161, 0, + 8, 0x3274, 0x1109, 0x1161, 0, + 8, 0x3275, 0x110B, 0x1161, 0, + 8, 0x3276, 0x110C, 0x1161, 0, + 8, 0x3277, 0x110E, 0x1161, 0, + 8, 0x3278, 0x110F, 0x1161, 0, + 8, 0x3279, 0x1110, 0x1161, 0, + 8, 0x327A, 0x1111, 0x1161, 0, + 8, 0x327B, 0x1112, 0x1161, 0, + 8, 0x3280, 0x4E00, 0, + 8, 0x3281, 0x4E8C, 0, + 8, 0x3282, 0x4E09, 0, + 8, 0x3283, 0x56DB, 0, + 8, 0x3284, 0x4E94, 0, + 8, 0x3285, 0x516D, 0, + 8, 0x3286, 0x4E03, 0, + 8, 0x3287, 0x516B, 0, + 8, 0x3288, 0x4E5D, 0, + 8, 0x3289, 0x5341, 0, + 8, 0x328A, 0x6708, 0, + 8, 0x328B, 0x706B, 0, + 8, 0x328C, 0x6C34, 0, + 8, 0x328D, 0x6728, 0, + 8, 0x328E, 0x91D1, 0, + 8, 0x328F, 0x571F, 0, + 8, 0x3290, 0x65E5, 0, + 8, 0x3291, 0x682A, 0, + 8, 0x3292, 0x6709, 0, + 8, 0x3293, 0x793E, 0, + 8, 0x3294, 0x540D, 0, + 8, 0x3295, 0x7279, 0, + 8, 0x3296, 0x8CA1, 0, + 8, 0x3297, 0x795D, 0, + 8, 0x3298, 0x52B4, 0, + 8, 0x3299, 0x79D8, 0, + 8, 0x329A, 0x7537, 0, + 8, 0x329B, 0x5973, 0, + 8, 0x329C, 0x9069, 0, + 8, 0x329D, 0x512A, 0, + 8, 0x329E, 0x5370, 0, + 8, 0x329F, 0x6CE8, 0, + 8, 0x32A0, 0x9805, 0, + 8, 0x32A1, 0x4F11, 0, + 8, 0x32A2, 0x5199, 0, + 8, 0x32A3, 0x6B63, 0, + 8, 0x32A4, 0x4E0A, 0, + 8, 0x32A5, 0x4E2D, 0, + 8, 0x32A6, 0x4E0B, 0, + 8, 0x32A7, 0x5DE6, 0, + 8, 0x32A8, 0x53F3, 0, + 8, 0x32A9, 0x533B, 0, + 8, 0x32AA, 0x5B97, 0, + 8, 0x32AB, 0x5B66, 0, + 8, 0x32AC, 0x76E3, 0, + 8, 0x32AD, 0x4F01, 0, + 8, 0x32AE, 0x8CC7, 0, + 8, 0x32AF, 0x5354, 0, + 8, 0x32B0, 0x591C, 0, + 16, 0x32C0, 0x0031, 0x6708, 0, + 16, 0x32C1, 0x0032, 0x6708, 0, + 16, 0x32C2, 0x0033, 0x6708, 0, + 16, 0x32C3, 0x0034, 0x6708, 0, + 16, 0x32C4, 0x0035, 0x6708, 0, + 16, 0x32C5, 0x0036, 0x6708, 0, + 16, 0x32C6, 0x0037, 0x6708, 0, + 16, 0x32C7, 0x0038, 0x6708, 0, + 16, 0x32C8, 0x0039, 0x6708, 0, + 16, 0x32C9, 0x0031, 0x0030, 0x6708, 0, + 16, 0x32CA, 0x0031, 0x0031, 0x6708, 0, + 16, 0x32CB, 0x0031, 0x0032, 0x6708, 0, + 8, 0x32D0, 0x30A2, 0, + 8, 0x32D1, 0x30A4, 0, + 8, 0x32D2, 0x30A6, 0, + 8, 0x32D3, 0x30A8, 0, + 8, 0x32D4, 0x30AA, 0, + 8, 0x32D5, 0x30AB, 0, + 8, 0x32D6, 0x30AD, 0, + 8, 0x32D7, 0x30AF, 0, + 8, 0x32D8, 0x30B1, 0, + 8, 0x32D9, 0x30B3, 0, + 8, 0x32DA, 0x30B5, 0, + 8, 0x32DB, 0x30B7, 0, + 8, 0x32DC, 0x30B9, 0, + 8, 0x32DD, 0x30BB, 0, + 8, 0x32DE, 0x30BD, 0, + 8, 0x32DF, 0x30BF, 0, + 8, 0x32E0, 0x30C1, 0, + 8, 0x32E1, 0x30C4, 0, + 8, 0x32E2, 0x30C6, 0, + 8, 0x32E3, 0x30C8, 0, + 8, 0x32E4, 0x30CA, 0, + 8, 0x32E5, 0x30CB, 0, + 8, 0x32E6, 0x30CC, 0, + 8, 0x32E7, 0x30CD, 0, + 8, 0x32E8, 0x30CE, 0, + 8, 0x32E9, 0x30CF, 0, + 8, 0x32EA, 0x30D2, 0, + 8, 0x32EB, 0x30D5, 0, + 8, 0x32EC, 0x30D8, 0, + 8, 0x32ED, 0x30DB, 0, + 8, 0x32EE, 0x30DE, 0, + 8, 0x32EF, 0x30DF, 0, + 8, 0x32F0, 0x30E0, 0, + 8, 0x32F1, 0x30E1, 0, + 8, 0x32F2, 0x30E2, 0, + 8, 0x32F3, 0x30E4, 0, + 8, 0x32F4, 0x30E6, 0, + 8, 0x32F5, 0x30E8, 0, + 8, 0x32F6, 0x30E9, 0, + 8, 0x32F7, 0x30EA, 0, + 8, 0x32F8, 0x30EB, 0, + 8, 0x32F9, 0x30EC, 0, + 8, 0x32FA, 0x30ED, 0, + 8, 0x32FB, 0x30EF, 0, + 8, 0x32FC, 0x30F0, 0, + 8, 0x32FD, 0x30F1, 0, + 8, 0x32FE, 0x30F2, 0, + 15, 0x3300, 0x30A2, 0x30D1, 0x30FC, 0x30C8, 0, + 15, 0x3301, 0x30A2, 0x30EB, 0x30D5, 0x30A1, 0, + 15, 0x3302, 0x30A2, 0x30F3, 0x30DA, 0x30A2, 0, + 15, 0x3303, 0x30A2, 0x30FC, 0x30EB, 0, + 15, 0x3304, 0x30A4, 0x30CB, 0x30F3, 0x30B0, 0, + 15, 0x3305, 0x30A4, 0x30F3, 0x30C1, 0, + 15, 0x3306, 0x30A6, 0x30A9, 0x30F3, 0, + 15, 0x3307, 0x30A8, 0x30B9, 0x30AF, 0x30FC, 0x30C9, 0, + 15, 0x3308, 0x30A8, 0x30FC, 0x30AB, 0x30FC, 0, + 15, 0x3309, 0x30AA, 0x30F3, 0x30B9, 0, + 15, 0x330A, 0x30AA, 0x30FC, 0x30E0, 0, + 15, 0x330B, 0x30AB, 0x30A4, 0x30EA, 0, + 15, 0x330C, 0x30AB, 0x30E9, 0x30C3, 0x30C8, 0, + 15, 0x330D, 0x30AB, 0x30ED, 0x30EA, 0x30FC, 0, + 15, 0x330E, 0x30AC, 0x30ED, 0x30F3, 0, + 15, 0x330F, 0x30AC, 0x30F3, 0x30DE, 0, + 15, 0x3310, 0x30AE, 0x30AC, 0, + 15, 0x3311, 0x30AE, 0x30CB, 0x30FC, 0, + 15, 0x3312, 0x30AD, 0x30E5, 0x30EA, 0x30FC, 0, + 15, 0x3313, 0x30AE, 0x30EB, 0x30C0, 0x30FC, 0, + 15, 0x3314, 0x30AD, 0x30ED, 0, + 15, 0x3315, 0x30AD, 0x30ED, 0x30B0, 0x30E9, 0x30E0, 0, + 15, 0x3316, 0x30AD, 0x30ED, 0x30E1, 0x30FC, 0x30C8, 0x30EB, 0, + 15, 0x3317, 0x30AD, 0x30ED, 0x30EF, 0x30C3, 0x30C8, 0, + 15, 0x3318, 0x30B0, 0x30E9, 0x30E0, 0, + 15, 0x3319, 0x30B0, 0x30E9, 0x30E0, 0x30C8, 0x30F3, 0, + 15, 0x331A, 0x30AF, 0x30EB, 0x30BC, 0x30A4, 0x30ED, 0, + 15, 0x331B, 0x30AF, 0x30ED, 0x30FC, 0x30CD, 0, + 15, 0x331C, 0x30B1, 0x30FC, 0x30B9, 0, + 15, 0x331D, 0x30B3, 0x30EB, 0x30CA, 0, + 15, 0x331E, 0x30B3, 0x30FC, 0x30DD, 0, + 15, 0x331F, 0x30B5, 0x30A4, 0x30AF, 0x30EB, 0, + 15, 0x3320, 0x30B5, 0x30F3, 0x30C1, 0x30FC, 0x30E0, 0, + 15, 0x3321, 0x30B7, 0x30EA, 0x30F3, 0x30B0, 0, + 15, 0x3322, 0x30BB, 0x30F3, 0x30C1, 0, + 15, 0x3323, 0x30BB, 0x30F3, 0x30C8, 0, + 15, 0x3324, 0x30C0, 0x30FC, 0x30B9, 0, + 15, 0x3325, 0x30C7, 0x30B7, 0, + 15, 0x3326, 0x30C9, 0x30EB, 0, + 15, 0x3327, 0x30C8, 0x30F3, 0, + 15, 0x3328, 0x30CA, 0x30CE, 0, + 15, 0x3329, 0x30CE, 0x30C3, 0x30C8, 0, + 15, 0x332A, 0x30CF, 0x30A4, 0x30C4, 0, + 15, 0x332B, 0x30D1, 0x30FC, 0x30BB, 0x30F3, 0x30C8, 0, + 15, 0x332C, 0x30D1, 0x30FC, 0x30C4, 0, + 15, 0x332D, 0x30D0, 0x30FC, 0x30EC, 0x30EB, 0, + 15, 0x332E, 0x30D4, 0x30A2, 0x30B9, 0x30C8, 0x30EB, 0, + 15, 0x332F, 0x30D4, 0x30AF, 0x30EB, 0, + 15, 0x3330, 0x30D4, 0x30B3, 0, + 15, 0x3331, 0x30D3, 0x30EB, 0, + 15, 0x3332, 0x30D5, 0x30A1, 0x30E9, 0x30C3, 0x30C9, 0, + 15, 0x3333, 0x30D5, 0x30A3, 0x30FC, 0x30C8, 0, + 15, 0x3334, 0x30D6, 0x30C3, 0x30B7, 0x30A7, 0x30EB, 0, + 15, 0x3335, 0x30D5, 0x30E9, 0x30F3, 0, + 15, 0x3336, 0x30D8, 0x30AF, 0x30BF, 0x30FC, 0x30EB, 0, + 15, 0x3337, 0x30DA, 0x30BD, 0, + 15, 0x3338, 0x30DA, 0x30CB, 0x30D2, 0, + 15, 0x3339, 0x30D8, 0x30EB, 0x30C4, 0, + 15, 0x333A, 0x30DA, 0x30F3, 0x30B9, 0, + 15, 0x333B, 0x30DA, 0x30FC, 0x30B8, 0, + 15, 0x333C, 0x30D9, 0x30FC, 0x30BF, 0, + 15, 0x333D, 0x30DD, 0x30A4, 0x30F3, 0x30C8, 0, + 15, 0x333E, 0x30DC, 0x30EB, 0x30C8, 0, + 15, 0x333F, 0x30DB, 0x30F3, 0, + 15, 0x3340, 0x30DD, 0x30F3, 0x30C9, 0, + 15, 0x3341, 0x30DB, 0x30FC, 0x30EB, 0, + 15, 0x3342, 0x30DB, 0x30FC, 0x30F3, 0, + 15, 0x3343, 0x30DE, 0x30A4, 0x30AF, 0x30ED, 0, + 15, 0x3344, 0x30DE, 0x30A4, 0x30EB, 0, + 15, 0x3345, 0x30DE, 0x30C3, 0x30CF, 0, + 15, 0x3346, 0x30DE, 0x30EB, 0x30AF, 0, + 15, 0x3347, 0x30DE, 0x30F3, 0x30B7, 0x30E7, 0x30F3, 0, + 15, 0x3348, 0x30DF, 0x30AF, 0x30ED, 0x30F3, 0, + 15, 0x3349, 0x30DF, 0x30EA, 0, + 15, 0x334A, 0x30DF, 0x30EA, 0x30D0, 0x30FC, 0x30EB, 0, + 15, 0x334B, 0x30E1, 0x30AC, 0, + 15, 0x334C, 0x30E1, 0x30AC, 0x30C8, 0x30F3, 0, + 15, 0x334D, 0x30E1, 0x30FC, 0x30C8, 0x30EB, 0, + 15, 0x334E, 0x30E4, 0x30FC, 0x30C9, 0, + 15, 0x334F, 0x30E4, 0x30FC, 0x30EB, 0, + 15, 0x3350, 0x30E6, 0x30A2, 0x30F3, 0, + 15, 0x3351, 0x30EA, 0x30C3, 0x30C8, 0x30EB, 0, + 15, 0x3352, 0x30EA, 0x30E9, 0, + 15, 0x3353, 0x30EB, 0x30D4, 0x30FC, 0, + 15, 0x3354, 0x30EB, 0x30FC, 0x30D6, 0x30EB, 0, + 15, 0x3355, 0x30EC, 0x30E0, 0, + 15, 0x3356, 0x30EC, 0x30F3, 0x30C8, 0x30B2, 0x30F3, 0, + 15, 0x3357, 0x30EF, 0x30C3, 0x30C8, 0, + 16, 0x3358, 0x0030, 0x70B9, 0, + 16, 0x3359, 0x0031, 0x70B9, 0, + 16, 0x335A, 0x0032, 0x70B9, 0, + 16, 0x335B, 0x0033, 0x70B9, 0, + 16, 0x335C, 0x0034, 0x70B9, 0, + 16, 0x335D, 0x0035, 0x70B9, 0, + 16, 0x335E, 0x0036, 0x70B9, 0, + 16, 0x335F, 0x0037, 0x70B9, 0, + 16, 0x3360, 0x0038, 0x70B9, 0, + 16, 0x3361, 0x0039, 0x70B9, 0, + 16, 0x3362, 0x0031, 0x0030, 0x70B9, 0, + 16, 0x3363, 0x0031, 0x0031, 0x70B9, 0, + 16, 0x3364, 0x0031, 0x0032, 0x70B9, 0, + 16, 0x3365, 0x0031, 0x0033, 0x70B9, 0, + 16, 0x3366, 0x0031, 0x0034, 0x70B9, 0, + 16, 0x3367, 0x0031, 0x0035, 0x70B9, 0, + 16, 0x3368, 0x0031, 0x0036, 0x70B9, 0, + 16, 0x3369, 0x0031, 0x0037, 0x70B9, 0, + 16, 0x336A, 0x0031, 0x0038, 0x70B9, 0, + 16, 0x336B, 0x0031, 0x0039, 0x70B9, 0, + 16, 0x336C, 0x0032, 0x0030, 0x70B9, 0, + 16, 0x336D, 0x0032, 0x0031, 0x70B9, 0, + 16, 0x336E, 0x0032, 0x0032, 0x70B9, 0, + 16, 0x336F, 0x0032, 0x0033, 0x70B9, 0, + 16, 0x3370, 0x0032, 0x0034, 0x70B9, 0, + 15, 0x3371, 0x0068, 0x0050, 0x0061, 0, + 15, 0x3372, 0x0064, 0x0061, 0, + 15, 0x3373, 0x0041, 0x0055, 0, + 15, 0x3374, 0x0062, 0x0061, 0x0072, 0, + 15, 0x3375, 0x006F, 0x0056, 0, + 15, 0x3376, 0x0070, 0x0063, 0, + 15, 0x337B, 0x5E73, 0x6210, 0, + 15, 0x337C, 0x662D, 0x548C, 0, + 15, 0x337D, 0x5927, 0x6B63, 0, + 15, 0x337E, 0x660E, 0x6CBB, 0, + 15, 0x337F, 0x682A, 0x5F0F, 0x4F1A, 0x793E, 0, + 15, 0x3380, 0x0070, 0x0041, 0, + 15, 0x3381, 0x006E, 0x0041, 0, + 15, 0x3382, 0x03BC, 0x0041, 0, + 15, 0x3383, 0x006D, 0x0041, 0, + 15, 0x3384, 0x006B, 0x0041, 0, + 15, 0x3385, 0x004B, 0x0042, 0, + 15, 0x3386, 0x004D, 0x0042, 0, + 15, 0x3387, 0x0047, 0x0042, 0, + 15, 0x3388, 0x0063, 0x0061, 0x006C, 0, + 15, 0x3389, 0x006B, 0x0063, 0x0061, 0x006C, 0, + 15, 0x338A, 0x0070, 0x0046, 0, + 15, 0x338B, 0x006E, 0x0046, 0, + 15, 0x338C, 0x03BC, 0x0046, 0, + 15, 0x338D, 0x03BC, 0x0067, 0, + 15, 0x338E, 0x006D, 0x0067, 0, + 15, 0x338F, 0x006B, 0x0067, 0, + 15, 0x3390, 0x0048, 0x007A, 0, + 15, 0x3391, 0x006B, 0x0048, 0x007A, 0, + 15, 0x3392, 0x004D, 0x0048, 0x007A, 0, + 15, 0x3393, 0x0047, 0x0048, 0x007A, 0, + 15, 0x3394, 0x0054, 0x0048, 0x007A, 0, + 15, 0x3395, 0x03BC, 0x2113, 0, + 15, 0x3396, 0x006D, 0x2113, 0, + 15, 0x3397, 0x0064, 0x2113, 0, + 15, 0x3398, 0x006B, 0x2113, 0, + 15, 0x3399, 0x0066, 0x006D, 0, + 15, 0x339A, 0x006E, 0x006D, 0, + 15, 0x339B, 0x03BC, 0x006D, 0, + 15, 0x339C, 0x006D, 0x006D, 0, + 15, 0x339D, 0x0063, 0x006D, 0, + 15, 0x339E, 0x006B, 0x006D, 0, + 15, 0x339F, 0x006D, 0x006D, 0x00B2, 0, + 15, 0x33A0, 0x0063, 0x006D, 0x00B2, 0, + 15, 0x33A1, 0x006D, 0x00B2, 0, + 15, 0x33A2, 0x006B, 0x006D, 0x00B2, 0, + 15, 0x33A3, 0x006D, 0x006D, 0x00B3, 0, + 15, 0x33A4, 0x0063, 0x006D, 0x00B3, 0, + 15, 0x33A5, 0x006D, 0x00B3, 0, + 15, 0x33A6, 0x006B, 0x006D, 0x00B3, 0, + 15, 0x33A7, 0x006D, 0x2215, 0x0073, 0, + 15, 0x33A8, 0x006D, 0x2215, 0x0073, 0x00B2, 0, + 15, 0x33A9, 0x0050, 0x0061, 0, + 15, 0x33AA, 0x006B, 0x0050, 0x0061, 0, + 15, 0x33AB, 0x004D, 0x0050, 0x0061, 0, + 15, 0x33AC, 0x0047, 0x0050, 0x0061, 0, + 15, 0x33AD, 0x0072, 0x0061, 0x0064, 0, + 15, 0x33AE, 0x0072, 0x0061, 0x0064, 0x2215, 0x0073, 0, + 15, 0x33AF, 0x0072, 0x0061, 0x0064, 0x2215, 0x0073, 0x00B2, 0, + 15, 0x33B0, 0x0070, 0x0073, 0, + 15, 0x33B1, 0x006E, 0x0073, 0, + 15, 0x33B2, 0x03BC, 0x0073, 0, + 15, 0x33B3, 0x006D, 0x0073, 0, + 15, 0x33B4, 0x0070, 0x0056, 0, + 15, 0x33B5, 0x006E, 0x0056, 0, + 15, 0x33B6, 0x03BC, 0x0056, 0, + 15, 0x33B7, 0x006D, 0x0056, 0, + 15, 0x33B8, 0x006B, 0x0056, 0, + 15, 0x33B9, 0x004D, 0x0056, 0, + 15, 0x33BA, 0x0070, 0x0057, 0, + 15, 0x33BB, 0x006E, 0x0057, 0, + 15, 0x33BC, 0x03BC, 0x0057, 0, + 15, 0x33BD, 0x006D, 0x0057, 0, + 15, 0x33BE, 0x006B, 0x0057, 0, + 15, 0x33BF, 0x004D, 0x0057, 0, + 15, 0x33C0, 0x006B, 0x03A9, 0, + 15, 0x33C1, 0x004D, 0x03A9, 0, + 15, 0x33C2, 0x0061, 0x002E, 0x006D, 0x002E, 0, + 15, 0x33C3, 0x0042, 0x0071, 0, + 15, 0x33C4, 0x0063, 0x0063, 0, + 15, 0x33C5, 0x0063, 0x0064, 0, + 15, 0x33C6, 0x0043, 0x2215, 0x006B, 0x0067, 0, + 15, 0x33C7, 0x0043, 0x006F, 0x002E, 0, + 15, 0x33C8, 0x0064, 0x0042, 0, + 15, 0x33C9, 0x0047, 0x0079, 0, + 15, 0x33CA, 0x0068, 0x0061, 0, + 15, 0x33CB, 0x0048, 0x0050, 0, + 15, 0x33CC, 0x0069, 0x006E, 0, + 15, 0x33CD, 0x004B, 0x004B, 0, + 15, 0x33CE, 0x004B, 0x004D, 0, + 15, 0x33CF, 0x006B, 0x0074, 0, + 15, 0x33D0, 0x006C, 0x006D, 0, + 15, 0x33D1, 0x006C, 0x006E, 0, + 15, 0x33D2, 0x006C, 0x006F, 0x0067, 0, + 15, 0x33D3, 0x006C, 0x0078, 0, + 15, 0x33D4, 0x006D, 0x0062, 0, + 15, 0x33D5, 0x006D, 0x0069, 0x006C, 0, + 15, 0x33D6, 0x006D, 0x006F, 0x006C, 0, + 15, 0x33D7, 0x0050, 0x0048, 0, + 15, 0x33D8, 0x0070, 0x002E, 0x006D, 0x002E, 0, + 15, 0x33D9, 0x0050, 0x0050, 0x004D, 0, + 15, 0x33DA, 0x0050, 0x0052, 0, + 15, 0x33DB, 0x0073, 0x0072, 0, + 15, 0x33DC, 0x0053, 0x0076, 0, + 15, 0x33DD, 0x0057, 0x0062, 0, + 16, 0x33E0, 0x0031, 0x65E5, 0, + 16, 0x33E1, 0x0032, 0x65E5, 0, + 16, 0x33E2, 0x0033, 0x65E5, 0, + 16, 0x33E3, 0x0034, 0x65E5, 0, + 16, 0x33E4, 0x0035, 0x65E5, 0, + 16, 0x33E5, 0x0036, 0x65E5, 0, + 16, 0x33E6, 0x0037, 0x65E5, 0, + 16, 0x33E7, 0x0038, 0x65E5, 0, + 16, 0x33E8, 0x0039, 0x65E5, 0, + 16, 0x33E9, 0x0031, 0x0030, 0x65E5, 0, + 16, 0x33EA, 0x0031, 0x0031, 0x65E5, 0, + 16, 0x33EB, 0x0031, 0x0032, 0x65E5, 0, + 16, 0x33EC, 0x0031, 0x0033, 0x65E5, 0, + 16, 0x33ED, 0x0031, 0x0034, 0x65E5, 0, + 16, 0x33EE, 0x0031, 0x0035, 0x65E5, 0, + 16, 0x33EF, 0x0031, 0x0036, 0x65E5, 0, + 16, 0x33F0, 0x0031, 0x0037, 0x65E5, 0, + 16, 0x33F1, 0x0031, 0x0038, 0x65E5, 0, + 16, 0x33F2, 0x0031, 0x0039, 0x65E5, 0, + 16, 0x33F3, 0x0032, 0x0030, 0x65E5, 0, + 16, 0x33F4, 0x0032, 0x0031, 0x65E5, 0, + 16, 0x33F5, 0x0032, 0x0032, 0x65E5, 0, + 16, 0x33F6, 0x0032, 0x0033, 0x65E5, 0, + 16, 0x33F7, 0x0032, 0x0034, 0x65E5, 0, + 16, 0x33F8, 0x0032, 0x0035, 0x65E5, 0, + 16, 0x33F9, 0x0032, 0x0036, 0x65E5, 0, + 16, 0x33FA, 0x0032, 0x0037, 0x65E5, 0, + 16, 0x33FB, 0x0032, 0x0038, 0x65E5, 0, + 16, 0x33FC, 0x0032, 0x0039, 0x65E5, 0, + 16, 0x33FD, 0x0033, 0x0030, 0x65E5, 0, + 16, 0x33FE, 0x0033, 0x0031, 0x65E5, 0, + 1, 0xF900, 0x8C48, 0, + 1, 0xF901, 0x66F4, 0, + 1, 0xF902, 0x8ECA, 0, + 1, 0xF903, 0x8CC8, 0, + 1, 0xF904, 0x6ED1, 0, + 1, 0xF905, 0x4E32, 0, + 1, 0xF906, 0x53E5, 0, + 1, 0xF907, 0x9F9C, 0, + 1, 0xF908, 0x9F9C, 0, + 1, 0xF909, 0x5951, 0, + 1, 0xF90A, 0x91D1, 0, + 1, 0xF90B, 0x5587, 0, + 1, 0xF90C, 0x5948, 0, + 1, 0xF90D, 0x61F6, 0, + 1, 0xF90E, 0x7669, 0, + 1, 0xF90F, 0x7F85, 0, + 1, 0xF910, 0x863F, 0, + 1, 0xF911, 0x87BA, 0, + 1, 0xF912, 0x88F8, 0, + 1, 0xF913, 0x908F, 0, + 1, 0xF914, 0x6A02, 0, + 1, 0xF915, 0x6D1B, 0, + 1, 0xF916, 0x70D9, 0, + 1, 0xF917, 0x73DE, 0, + 1, 0xF918, 0x843D, 0, + 1, 0xF919, 0x916A, 0, + 1, 0xF91A, 0x99F1, 0, + 1, 0xF91B, 0x4E82, 0, + 1, 0xF91C, 0x5375, 0, + 1, 0xF91D, 0x6B04, 0, + 1, 0xF91E, 0x721B, 0, + 1, 0xF91F, 0x862D, 0, + 1, 0xF920, 0x9E1E, 0, + 1, 0xF921, 0x5D50, 0, + 1, 0xF922, 0x6FEB, 0, + 1, 0xF923, 0x85CD, 0, + 1, 0xF924, 0x8964, 0, + 1, 0xF925, 0x62C9, 0, + 1, 0xF926, 0x81D8, 0, + 1, 0xF927, 0x881F, 0, + 1, 0xF928, 0x5ECA, 0, + 1, 0xF929, 0x6717, 0, + 1, 0xF92A, 0x6D6A, 0, + 1, 0xF92B, 0x72FC, 0, + 1, 0xF92C, 0x90CE, 0, + 1, 0xF92D, 0x4F86, 0, + 1, 0xF92E, 0x51B7, 0, + 1, 0xF92F, 0x52DE, 0, + 1, 0xF930, 0x64C4, 0, + 1, 0xF931, 0x6AD3, 0, + 1, 0xF932, 0x7210, 0, + 1, 0xF933, 0x76E7, 0, + 1, 0xF934, 0x8001, 0, + 1, 0xF935, 0x8606, 0, + 1, 0xF936, 0x865C, 0, + 1, 0xF937, 0x8DEF, 0, + 1, 0xF938, 0x9732, 0, + 1, 0xF939, 0x9B6F, 0, + 1, 0xF93A, 0x9DFA, 0, + 1, 0xF93B, 0x788C, 0, + 1, 0xF93C, 0x797F, 0, + 1, 0xF93D, 0x7DA0, 0, + 1, 0xF93E, 0x83C9, 0, + 1, 0xF93F, 0x9304, 0, + 1, 0xF940, 0x9E7F, 0, + 1, 0xF941, 0x8AD6, 0, + 1, 0xF942, 0x58DF, 0, + 1, 0xF943, 0x5F04, 0, + 1, 0xF944, 0x7C60, 0, + 1, 0xF945, 0x807E, 0, + 1, 0xF946, 0x7262, 0, + 1, 0xF947, 0x78CA, 0, + 1, 0xF948, 0x8CC2, 0, + 1, 0xF949, 0x96F7, 0, + 1, 0xF94A, 0x58D8, 0, + 1, 0xF94B, 0x5C62, 0, + 1, 0xF94C, 0x6A13, 0, + 1, 0xF94D, 0x6DDA, 0, + 1, 0xF94E, 0x6F0F, 0, + 1, 0xF94F, 0x7D2F, 0, + 1, 0xF950, 0x7E37, 0, + 1, 0xF951, 0x96FB, 0, + 1, 0xF952, 0x52D2, 0, + 1, 0xF953, 0x808B, 0, + 1, 0xF954, 0x51DC, 0, + 1, 0xF955, 0x51CC, 0, + 1, 0xF956, 0x7A1C, 0, + 1, 0xF957, 0x7DBE, 0, + 1, 0xF958, 0x83F1, 0, + 1, 0xF959, 0x9675, 0, + 1, 0xF95A, 0x8B80, 0, + 1, 0xF95B, 0x62CF, 0, + 1, 0xF95C, 0x6A02, 0, + 1, 0xF95D, 0x8AFE, 0, + 1, 0xF95E, 0x4E39, 0, + 1, 0xF95F, 0x5BE7, 0, + 1, 0xF960, 0x6012, 0, + 1, 0xF961, 0x7387, 0, + 1, 0xF962, 0x7570, 0, + 1, 0xF963, 0x5317, 0, + 1, 0xF964, 0x78FB, 0, + 1, 0xF965, 0x4FBF, 0, + 1, 0xF966, 0x5FA9, 0, + 1, 0xF967, 0x4E0D, 0, + 1, 0xF968, 0x6CCC, 0, + 1, 0xF969, 0x6578, 0, + 1, 0xF96A, 0x7D22, 0, + 1, 0xF96B, 0x53C3, 0, + 1, 0xF96C, 0x585E, 0, + 1, 0xF96D, 0x7701, 0, + 1, 0xF96E, 0x8449, 0, + 1, 0xF96F, 0x8AAA, 0, + 1, 0xF970, 0x6BBA, 0, + 1, 0xF971, 0x8FB0, 0, + 1, 0xF972, 0x6C88, 0, + 1, 0xF973, 0x62FE, 0, + 1, 0xF974, 0x82E5, 0, + 1, 0xF975, 0x63A0, 0, + 1, 0xF976, 0x7565, 0, + 1, 0xF977, 0x4EAE, 0, + 1, 0xF978, 0x5169, 0, + 1, 0xF979, 0x51C9, 0, + 1, 0xF97A, 0x6881, 0, + 1, 0xF97B, 0x7CE7, 0, + 1, 0xF97C, 0x826F, 0, + 1, 0xF97D, 0x8AD2, 0, + 1, 0xF97E, 0x91CF, 0, + 1, 0xF97F, 0x52F5, 0, + 1, 0xF980, 0x5442, 0, + 1, 0xF981, 0x5973, 0, + 1, 0xF982, 0x5EEC, 0, + 1, 0xF983, 0x65C5, 0, + 1, 0xF984, 0x6FFE, 0, + 1, 0xF985, 0x792A, 0, + 1, 0xF986, 0x95AD, 0, + 1, 0xF987, 0x9A6A, 0, + 1, 0xF988, 0x9E97, 0, + 1, 0xF989, 0x9ECE, 0, + 1, 0xF98A, 0x529B, 0, + 1, 0xF98B, 0x66C6, 0, + 1, 0xF98C, 0x6B77, 0, + 1, 0xF98D, 0x8F62, 0, + 1, 0xF98E, 0x5E74, 0, + 1, 0xF98F, 0x6190, 0, + 1, 0xF990, 0x6200, 0, + 1, 0xF991, 0x649A, 0, + 1, 0xF992, 0x6F23, 0, + 1, 0xF993, 0x7149, 0, + 1, 0xF994, 0x7489, 0, + 1, 0xF995, 0x79CA, 0, + 1, 0xF996, 0x7DF4, 0, + 1, 0xF997, 0x806F, 0, + 1, 0xF998, 0x8F26, 0, + 1, 0xF999, 0x84EE, 0, + 1, 0xF99A, 0x9023, 0, + 1, 0xF99B, 0x934A, 0, + 1, 0xF99C, 0x5217, 0, + 1, 0xF99D, 0x52A3, 0, + 1, 0xF99E, 0x54BD, 0, + 1, 0xF99F, 0x70C8, 0, + 1, 0xF9A0, 0x88C2, 0, + 1, 0xF9A1, 0x8AAA, 0, + 1, 0xF9A2, 0x5EC9, 0, + 1, 0xF9A3, 0x5FF5, 0, + 1, 0xF9A4, 0x637B, 0, + 1, 0xF9A5, 0x6BAE, 0, + 1, 0xF9A6, 0x7C3E, 0, + 1, 0xF9A7, 0x7375, 0, + 1, 0xF9A8, 0x4EE4, 0, + 1, 0xF9A9, 0x56F9, 0, + 1, 0xF9AA, 0x5BE7, 0, + 1, 0xF9AB, 0x5DBA, 0, + 1, 0xF9AC, 0x601C, 0, + 1, 0xF9AD, 0x73B2, 0, + 1, 0xF9AE, 0x7469, 0, + 1, 0xF9AF, 0x7F9A, 0, + 1, 0xF9B0, 0x8046, 0, + 1, 0xF9B1, 0x9234, 0, + 1, 0xF9B2, 0x96F6, 0, + 1, 0xF9B3, 0x9748, 0, + 1, 0xF9B4, 0x9818, 0, + 1, 0xF9B5, 0x4F8B, 0, + 1, 0xF9B6, 0x79AE, 0, + 1, 0xF9B7, 0x91B4, 0, + 1, 0xF9B8, 0x96B8, 0, + 1, 0xF9B9, 0x60E1, 0, + 1, 0xF9BA, 0x4E86, 0, + 1, 0xF9BB, 0x50DA, 0, + 1, 0xF9BC, 0x5BEE, 0, + 1, 0xF9BD, 0x5C3F, 0, + 1, 0xF9BE, 0x6599, 0, + 1, 0xF9BF, 0x6A02, 0, + 1, 0xF9C0, 0x71CE, 0, + 1, 0xF9C1, 0x7642, 0, + 1, 0xF9C2, 0x84FC, 0, + 1, 0xF9C3, 0x907C, 0, + 1, 0xF9C4, 0x9F8D, 0, + 1, 0xF9C5, 0x6688, 0, + 1, 0xF9C6, 0x962E, 0, + 1, 0xF9C7, 0x5289, 0, + 1, 0xF9C8, 0x677B, 0, + 1, 0xF9C9, 0x67F3, 0, + 1, 0xF9CA, 0x6D41, 0, + 1, 0xF9CB, 0x6E9C, 0, + 1, 0xF9CC, 0x7409, 0, + 1, 0xF9CD, 0x7559, 0, + 1, 0xF9CE, 0x786B, 0, + 1, 0xF9CF, 0x7D10, 0, + 1, 0xF9D0, 0x985E, 0, + 1, 0xF9D1, 0x516D, 0, + 1, 0xF9D2, 0x622E, 0, + 1, 0xF9D3, 0x9678, 0, + 1, 0xF9D4, 0x502B, 0, + 1, 0xF9D5, 0x5D19, 0, + 1, 0xF9D6, 0x6DEA, 0, + 1, 0xF9D7, 0x8F2A, 0, + 1, 0xF9D8, 0x5F8B, 0, + 1, 0xF9D9, 0x6144, 0, + 1, 0xF9DA, 0x6817, 0, + 1, 0xF9DB, 0x7387, 0, + 1, 0xF9DC, 0x9686, 0, + 1, 0xF9DD, 0x5229, 0, + 1, 0xF9DE, 0x540F, 0, + 1, 0xF9DF, 0x5C65, 0, + 1, 0xF9E0, 0x6613, 0, + 1, 0xF9E1, 0x674E, 0, + 1, 0xF9E2, 0x68A8, 0, + 1, 0xF9E3, 0x6CE5, 0, + 1, 0xF9E4, 0x7406, 0, + 1, 0xF9E5, 0x75E2, 0, + 1, 0xF9E6, 0x7F79, 0, + 1, 0xF9E7, 0x88CF, 0, + 1, 0xF9E8, 0x88E1, 0, + 1, 0xF9E9, 0x91CC, 0, + 1, 0xF9EA, 0x96E2, 0, + 1, 0xF9EB, 0x533F, 0, + 1, 0xF9EC, 0x6EBA, 0, + 1, 0xF9ED, 0x541D, 0, + 1, 0xF9EE, 0x71D0, 0, + 1, 0xF9EF, 0x7498, 0, + 1, 0xF9F0, 0x85FA, 0, + 1, 0xF9F1, 0x96A3, 0, + 1, 0xF9F2, 0x9C57, 0, + 1, 0xF9F3, 0x9E9F, 0, + 1, 0xF9F4, 0x6797, 0, + 1, 0xF9F5, 0x6DCB, 0, + 1, 0xF9F6, 0x81E8, 0, + 1, 0xF9F7, 0x7ACB, 0, + 1, 0xF9F8, 0x7B20, 0, + 1, 0xF9F9, 0x7C92, 0, + 1, 0xF9FA, 0x72C0, 0, + 1, 0xF9FB, 0x7099, 0, + 1, 0xF9FC, 0x8B58, 0, + 1, 0xF9FD, 0x4EC0, 0, + 1, 0xF9FE, 0x8336, 0, + 1, 0xF9FF, 0x523A, 0, + 1, 0xFA00, 0x5207, 0, + 1, 0xFA01, 0x5EA6, 0, + 1, 0xFA02, 0x62D3, 0, + 1, 0xFA03, 0x7CD6, 0, + 1, 0xFA04, 0x5B85, 0, + 1, 0xFA05, 0x6D1E, 0, + 1, 0xFA06, 0x66B4, 0, + 1, 0xFA07, 0x8F3B, 0, + 1, 0xFA08, 0x884C, 0, + 1, 0xFA09, 0x964D, 0, + 1, 0xFA0A, 0x898B, 0, + 1, 0xFA0B, 0x5ED3, 0, + 1, 0xFA0C, 0x5140, 0, + 1, 0xFA0D, 0x55C0, 0, + 1, 0xFA10, 0x585A, 0, + 1, 0xFA12, 0x6674, 0, + 1, 0xFA15, 0x51DE, 0, + 1, 0xFA16, 0x732A, 0, + 1, 0xFA17, 0x76CA, 0, + 1, 0xFA18, 0x793C, 0, + 1, 0xFA19, 0x795E, 0, + 1, 0xFA1A, 0x7965, 0, + 1, 0xFA1B, 0x798F, 0, + 1, 0xFA1C, 0x9756, 0, + 1, 0xFA1D, 0x7CBE, 0, + 1, 0xFA1E, 0x7FBD, 0, + 1, 0xFA20, 0x8612, 0, + 1, 0xFA22, 0x8AF8, 0, + 1, 0xFA25, 0x9038, 0, + 1, 0xFA26, 0x90FD, 0, + 1, 0xFA2A, 0x98EF, 0, + 1, 0xFA2B, 0x98FC, 0, + 1, 0xFA2C, 0x9928, 0, + 1, 0xFA2D, 0x9DB4, 0, + 16, 0xFB00, 0x0066, 0x0066, 0, + 16, 0xFB01, 0x0066, 0x0069, 0, + 16, 0xFB02, 0x0066, 0x006C, 0, + 16, 0xFB03, 0x0066, 0x0066, 0x0069, 0, + 16, 0xFB04, 0x0066, 0x0066, 0x006C, 0, + 16, 0xFB05, 0x017F, 0x0074, 0, + 16, 0xFB06, 0x0073, 0x0074, 0, + 16, 0xFB13, 0x0574, 0x0576, 0, + 16, 0xFB14, 0x0574, 0x0565, 0, + 16, 0xFB15, 0x0574, 0x056B, 0, + 16, 0xFB16, 0x057E, 0x0576, 0, + 16, 0xFB17, 0x0574, 0x056D, 0, + 1, 0xFB1D, 0x05D9, 0x05B4, 0, + 1, 0xFB1F, 0x05F2, 0x05B7, 0, + 2, 0xFB20, 0x05E2, 0, + 2, 0xFB21, 0x05D0, 0, + 2, 0xFB22, 0x05D3, 0, + 2, 0xFB23, 0x05D4, 0, + 2, 0xFB24, 0x05DB, 0, + 2, 0xFB25, 0x05DC, 0, + 2, 0xFB26, 0x05DD, 0, + 2, 0xFB27, 0x05E8, 0, + 2, 0xFB28, 0x05EA, 0, + 2, 0xFB29, 0x002B, 0, + 1, 0xFB2A, 0x05E9, 0x05C1, 0, + 1, 0xFB2B, 0x05E9, 0x05C2, 0, + 1, 0xFB2C, 0xFB49, 0x05C1, 0, + 1, 0xFB2D, 0xFB49, 0x05C2, 0, + 1, 0xFB2E, 0x05D0, 0x05B7, 0, + 1, 0xFB2F, 0x05D0, 0x05B8, 0, + 1, 0xFB30, 0x05D0, 0x05BC, 0, + 1, 0xFB31, 0x05D1, 0x05BC, 0, + 1, 0xFB32, 0x05D2, 0x05BC, 0, + 1, 0xFB33, 0x05D3, 0x05BC, 0, + 1, 0xFB34, 0x05D4, 0x05BC, 0, + 1, 0xFB35, 0x05D5, 0x05BC, 0, + 1, 0xFB36, 0x05D6, 0x05BC, 0, + 1, 0xFB38, 0x05D8, 0x05BC, 0, + 1, 0xFB39, 0x05D9, 0x05BC, 0, + 1, 0xFB3A, 0x05DA, 0x05BC, 0, + 1, 0xFB3B, 0x05DB, 0x05BC, 0, + 1, 0xFB3C, 0x05DC, 0x05BC, 0, + 1, 0xFB3E, 0x05DE, 0x05BC, 0, + 1, 0xFB40, 0x05E0, 0x05BC, 0, + 1, 0xFB41, 0x05E1, 0x05BC, 0, + 1, 0xFB43, 0x05E3, 0x05BC, 0, + 1, 0xFB44, 0x05E4, 0x05BC, 0, + 1, 0xFB46, 0x05E6, 0x05BC, 0, + 1, 0xFB47, 0x05E7, 0x05BC, 0, + 1, 0xFB48, 0x05E8, 0x05BC, 0, + 1, 0xFB49, 0x05E9, 0x05BC, 0, + 1, 0xFB4A, 0x05EA, 0x05BC, 0, + 1, 0xFB4B, 0x05D5, 0x05B9, 0, + 1, 0xFB4C, 0x05D1, 0x05BF, 0, + 1, 0xFB4D, 0x05DB, 0x05BF, 0, + 1, 0xFB4E, 0x05E4, 0x05BF, 0, + 16, 0xFB4F, 0x05D0, 0x05DC, 0, + 7, 0xFB50, 0x0671, 0, + 6, 0xFB51, 0x0671, 0, + 7, 0xFB52, 0x067B, 0, + 6, 0xFB53, 0x067B, 0, + 4, 0xFB54, 0x067B, 0, + 5, 0xFB55, 0x067B, 0, + 7, 0xFB56, 0x067E, 0, + 6, 0xFB57, 0x067E, 0, + 4, 0xFB58, 0x067E, 0, + 5, 0xFB59, 0x067E, 0, + 7, 0xFB5A, 0x0680, 0, + 6, 0xFB5B, 0x0680, 0, + 4, 0xFB5C, 0x0680, 0, + 5, 0xFB5D, 0x0680, 0, + 7, 0xFB5E, 0x067A, 0, + 6, 0xFB5F, 0x067A, 0, + 4, 0xFB60, 0x067A, 0, + 5, 0xFB61, 0x067A, 0, + 7, 0xFB62, 0x067F, 0, + 6, 0xFB63, 0x067F, 0, + 4, 0xFB64, 0x067F, 0, + 5, 0xFB65, 0x067F, 0, + 7, 0xFB66, 0x0679, 0, + 6, 0xFB67, 0x0679, 0, + 4, 0xFB68, 0x0679, 0, + 5, 0xFB69, 0x0679, 0, + 7, 0xFB6A, 0x06A4, 0, + 6, 0xFB6B, 0x06A4, 0, + 4, 0xFB6C, 0x06A4, 0, + 5, 0xFB6D, 0x06A4, 0, + 7, 0xFB6E, 0x06A6, 0, + 6, 0xFB6F, 0x06A6, 0, + 4, 0xFB70, 0x06A6, 0, + 5, 0xFB71, 0x06A6, 0, + 7, 0xFB72, 0x0684, 0, + 6, 0xFB73, 0x0684, 0, + 4, 0xFB74, 0x0684, 0, + 5, 0xFB75, 0x0684, 0, + 7, 0xFB76, 0x0683, 0, + 6, 0xFB77, 0x0683, 0, + 4, 0xFB78, 0x0683, 0, + 5, 0xFB79, 0x0683, 0, + 7, 0xFB7A, 0x0686, 0, + 6, 0xFB7B, 0x0686, 0, + 4, 0xFB7C, 0x0686, 0, + 5, 0xFB7D, 0x0686, 0, + 7, 0xFB7E, 0x0687, 0, + 6, 0xFB7F, 0x0687, 0, + 4, 0xFB80, 0x0687, 0, + 5, 0xFB81, 0x0687, 0, + 7, 0xFB82, 0x068D, 0, + 6, 0xFB83, 0x068D, 0, + 7, 0xFB84, 0x068C, 0, + 6, 0xFB85, 0x068C, 0, + 7, 0xFB86, 0x068E, 0, + 6, 0xFB87, 0x068E, 0, + 7, 0xFB88, 0x0688, 0, + 6, 0xFB89, 0x0688, 0, + 7, 0xFB8A, 0x0698, 0, + 6, 0xFB8B, 0x0698, 0, + 7, 0xFB8C, 0x0691, 0, + 6, 0xFB8D, 0x0691, 0, + 7, 0xFB8E, 0x06A9, 0, + 6, 0xFB8F, 0x06A9, 0, + 4, 0xFB90, 0x06A9, 0, + 5, 0xFB91, 0x06A9, 0, + 7, 0xFB92, 0x06AF, 0, + 6, 0xFB93, 0x06AF, 0, + 4, 0xFB94, 0x06AF, 0, + 5, 0xFB95, 0x06AF, 0, + 7, 0xFB96, 0x06B3, 0, + 6, 0xFB97, 0x06B3, 0, + 4, 0xFB98, 0x06B3, 0, + 5, 0xFB99, 0x06B3, 0, + 7, 0xFB9A, 0x06B1, 0, + 6, 0xFB9B, 0x06B1, 0, + 4, 0xFB9C, 0x06B1, 0, + 5, 0xFB9D, 0x06B1, 0, + 7, 0xFB9E, 0x06BA, 0, + 6, 0xFB9F, 0x06BA, 0, + 7, 0xFBA0, 0x06BB, 0, + 6, 0xFBA1, 0x06BB, 0, + 4, 0xFBA2, 0x06BB, 0, + 5, 0xFBA3, 0x06BB, 0, + 7, 0xFBA4, 0x06C0, 0, + 6, 0xFBA5, 0x06C0, 0, + 7, 0xFBA6, 0x06C1, 0, + 6, 0xFBA7, 0x06C1, 0, + 4, 0xFBA8, 0x06C1, 0, + 5, 0xFBA9, 0x06C1, 0, + 7, 0xFBAA, 0x06BE, 0, + 6, 0xFBAB, 0x06BE, 0, + 4, 0xFBAC, 0x06BE, 0, + 5, 0xFBAD, 0x06BE, 0, + 7, 0xFBAE, 0x06D2, 0, + 6, 0xFBAF, 0x06D2, 0, + 7, 0xFBB0, 0x06D3, 0, + 6, 0xFBB1, 0x06D3, 0, + 7, 0xFBD3, 0x06AD, 0, + 6, 0xFBD4, 0x06AD, 0, + 4, 0xFBD5, 0x06AD, 0, + 5, 0xFBD6, 0x06AD, 0, + 7, 0xFBD7, 0x06C7, 0, + 6, 0xFBD8, 0x06C7, 0, + 7, 0xFBD9, 0x06C6, 0, + 6, 0xFBDA, 0x06C6, 0, + 7, 0xFBDB, 0x06C8, 0, + 6, 0xFBDC, 0x06C8, 0, + 7, 0xFBDD, 0x0677, 0, + 7, 0xFBDE, 0x06CB, 0, + 6, 0xFBDF, 0x06CB, 0, + 7, 0xFBE0, 0x06C5, 0, + 6, 0xFBE1, 0x06C5, 0, + 7, 0xFBE2, 0x06C9, 0, + 6, 0xFBE3, 0x06C9, 0, + 7, 0xFBE4, 0x06D0, 0, + 6, 0xFBE5, 0x06D0, 0, + 4, 0xFBE6, 0x06D0, 0, + 5, 0xFBE7, 0x06D0, 0, + 4, 0xFBE8, 0x0649, 0, + 5, 0xFBE9, 0x0649, 0, + 7, 0xFBEA, 0x0626, 0x0627, 0, + 6, 0xFBEB, 0x0626, 0x0627, 0, + 7, 0xFBEC, 0x0626, 0x06D5, 0, + 6, 0xFBED, 0x0626, 0x06D5, 0, + 7, 0xFBEE, 0x0626, 0x0648, 0, + 6, 0xFBEF, 0x0626, 0x0648, 0, + 7, 0xFBF0, 0x0626, 0x06C7, 0, + 6, 0xFBF1, 0x0626, 0x06C7, 0, + 7, 0xFBF2, 0x0626, 0x06C6, 0, + 6, 0xFBF3, 0x0626, 0x06C6, 0, + 7, 0xFBF4, 0x0626, 0x06C8, 0, + 6, 0xFBF5, 0x0626, 0x06C8, 0, + 7, 0xFBF6, 0x0626, 0x06D0, 0, + 6, 0xFBF7, 0x0626, 0x06D0, 0, + 4, 0xFBF8, 0x0626, 0x06D0, 0, + 7, 0xFBF9, 0x0626, 0x0649, 0, + 6, 0xFBFA, 0x0626, 0x0649, 0, + 4, 0xFBFB, 0x0626, 0x0649, 0, + 7, 0xFBFC, 0x06CC, 0, + 6, 0xFBFD, 0x06CC, 0, + 4, 0xFBFE, 0x06CC, 0, + 5, 0xFBFF, 0x06CC, 0, + 7, 0xFC00, 0x0626, 0x062C, 0, + 7, 0xFC01, 0x0626, 0x062D, 0, + 7, 0xFC02, 0x0626, 0x0645, 0, + 7, 0xFC03, 0x0626, 0x0649, 0, + 7, 0xFC04, 0x0626, 0x064A, 0, + 7, 0xFC05, 0x0628, 0x062C, 0, + 7, 0xFC06, 0x0628, 0x062D, 0, + 7, 0xFC07, 0x0628, 0x062E, 0, + 7, 0xFC08, 0x0628, 0x0645, 0, + 7, 0xFC09, 0x0628, 0x0649, 0, + 7, 0xFC0A, 0x0628, 0x064A, 0, + 7, 0xFC0B, 0x062A, 0x062C, 0, + 7, 0xFC0C, 0x062A, 0x062D, 0, + 7, 0xFC0D, 0x062A, 0x062E, 0, + 7, 0xFC0E, 0x062A, 0x0645, 0, + 7, 0xFC0F, 0x062A, 0x0649, 0, + 7, 0xFC10, 0x062A, 0x064A, 0, + 7, 0xFC11, 0x062B, 0x062C, 0, + 7, 0xFC12, 0x062B, 0x0645, 0, + 7, 0xFC13, 0x062B, 0x0649, 0, + 7, 0xFC14, 0x062B, 0x064A, 0, + 7, 0xFC15, 0x062C, 0x062D, 0, + 7, 0xFC16, 0x062C, 0x0645, 0, + 7, 0xFC17, 0x062D, 0x062C, 0, + 7, 0xFC18, 0x062D, 0x0645, 0, + 7, 0xFC19, 0x062E, 0x062C, 0, + 7, 0xFC1A, 0x062E, 0x062D, 0, + 7, 0xFC1B, 0x062E, 0x0645, 0, + 7, 0xFC1C, 0x0633, 0x062C, 0, + 7, 0xFC1D, 0x0633, 0x062D, 0, + 7, 0xFC1E, 0x0633, 0x062E, 0, + 7, 0xFC1F, 0x0633, 0x0645, 0, + 7, 0xFC20, 0x0635, 0x062D, 0, + 7, 0xFC21, 0x0635, 0x0645, 0, + 7, 0xFC22, 0x0636, 0x062C, 0, + 7, 0xFC23, 0x0636, 0x062D, 0, + 7, 0xFC24, 0x0636, 0x062E, 0, + 7, 0xFC25, 0x0636, 0x0645, 0, + 7, 0xFC26, 0x0637, 0x062D, 0, + 7, 0xFC27, 0x0637, 0x0645, 0, + 7, 0xFC28, 0x0638, 0x0645, 0, + 7, 0xFC29, 0x0639, 0x062C, 0, + 7, 0xFC2A, 0x0639, 0x0645, 0, + 7, 0xFC2B, 0x063A, 0x062C, 0, + 7, 0xFC2C, 0x063A, 0x0645, 0, + 7, 0xFC2D, 0x0641, 0x062C, 0, + 7, 0xFC2E, 0x0641, 0x062D, 0, + 7, 0xFC2F, 0x0641, 0x062E, 0, + 7, 0xFC30, 0x0641, 0x0645, 0, + 7, 0xFC31, 0x0641, 0x0649, 0, + 7, 0xFC32, 0x0641, 0x064A, 0, + 7, 0xFC33, 0x0642, 0x062D, 0, + 7, 0xFC34, 0x0642, 0x0645, 0, + 7, 0xFC35, 0x0642, 0x0649, 0, + 7, 0xFC36, 0x0642, 0x064A, 0, + 7, 0xFC37, 0x0643, 0x0627, 0, + 7, 0xFC38, 0x0643, 0x062C, 0, + 7, 0xFC39, 0x0643, 0x062D, 0, + 7, 0xFC3A, 0x0643, 0x062E, 0, + 7, 0xFC3B, 0x0643, 0x0644, 0, + 7, 0xFC3C, 0x0643, 0x0645, 0, + 7, 0xFC3D, 0x0643, 0x0649, 0, + 7, 0xFC3E, 0x0643, 0x064A, 0, + 7, 0xFC3F, 0x0644, 0x062C, 0, + 7, 0xFC40, 0x0644, 0x062D, 0, + 7, 0xFC41, 0x0644, 0x062E, 0, + 7, 0xFC42, 0x0644, 0x0645, 0, + 7, 0xFC43, 0x0644, 0x0649, 0, + 7, 0xFC44, 0x0644, 0x064A, 0, + 7, 0xFC45, 0x0645, 0x062C, 0, + 7, 0xFC46, 0x0645, 0x062D, 0, + 7, 0xFC47, 0x0645, 0x062E, 0, + 7, 0xFC48, 0x0645, 0x0645, 0, + 7, 0xFC49, 0x0645, 0x0649, 0, + 7, 0xFC4A, 0x0645, 0x064A, 0, + 7, 0xFC4B, 0x0646, 0x062C, 0, + 7, 0xFC4C, 0x0646, 0x062D, 0, + 7, 0xFC4D, 0x0646, 0x062E, 0, + 7, 0xFC4E, 0x0646, 0x0645, 0, + 7, 0xFC4F, 0x0646, 0x0649, 0, + 7, 0xFC50, 0x0646, 0x064A, 0, + 7, 0xFC51, 0x0647, 0x062C, 0, + 7, 0xFC52, 0x0647, 0x0645, 0, + 7, 0xFC53, 0x0647, 0x0649, 0, + 7, 0xFC54, 0x0647, 0x064A, 0, + 7, 0xFC55, 0x064A, 0x062C, 0, + 7, 0xFC56, 0x064A, 0x062D, 0, + 7, 0xFC57, 0x064A, 0x062E, 0, + 7, 0xFC58, 0x064A, 0x0645, 0, + 7, 0xFC59, 0x064A, 0x0649, 0, + 7, 0xFC5A, 0x064A, 0x064A, 0, + 7, 0xFC5B, 0x0630, 0x0670, 0, + 7, 0xFC5C, 0x0631, 0x0670, 0, + 7, 0xFC5D, 0x0649, 0x0670, 0, + 7, 0xFC5E, 0x0020, 0x064C, 0x0651, 0, + 7, 0xFC5F, 0x0020, 0x064D, 0x0651, 0, + 7, 0xFC60, 0x0020, 0x064E, 0x0651, 0, + 7, 0xFC61, 0x0020, 0x064F, 0x0651, 0, + 7, 0xFC62, 0x0020, 0x0650, 0x0651, 0, + 7, 0xFC63, 0x0020, 0x0651, 0x0670, 0, + 6, 0xFC64, 0x0626, 0x0631, 0, + 6, 0xFC65, 0x0626, 0x0632, 0, + 6, 0xFC66, 0x0626, 0x0645, 0, + 6, 0xFC67, 0x0626, 0x0646, 0, + 6, 0xFC68, 0x0626, 0x0649, 0, + 6, 0xFC69, 0x0626, 0x064A, 0, + 6, 0xFC6A, 0x0628, 0x0631, 0, + 6, 0xFC6B, 0x0628, 0x0632, 0, + 6, 0xFC6C, 0x0628, 0x0645, 0, + 6, 0xFC6D, 0x0628, 0x0646, 0, + 6, 0xFC6E, 0x0628, 0x0649, 0, + 6, 0xFC6F, 0x0628, 0x064A, 0, + 6, 0xFC70, 0x062A, 0x0631, 0, + 6, 0xFC71, 0x062A, 0x0632, 0, + 6, 0xFC72, 0x062A, 0x0645, 0, + 6, 0xFC73, 0x062A, 0x0646, 0, + 6, 0xFC74, 0x062A, 0x0649, 0, + 6, 0xFC75, 0x062A, 0x064A, 0, + 6, 0xFC76, 0x062B, 0x0631, 0, + 6, 0xFC77, 0x062B, 0x0632, 0, + 6, 0xFC78, 0x062B, 0x0645, 0, + 6, 0xFC79, 0x062B, 0x0646, 0, + 6, 0xFC7A, 0x062B, 0x0649, 0, + 6, 0xFC7B, 0x062B, 0x064A, 0, + 6, 0xFC7C, 0x0641, 0x0649, 0, + 6, 0xFC7D, 0x0641, 0x064A, 0, + 6, 0xFC7E, 0x0642, 0x0649, 0, + 6, 0xFC7F, 0x0642, 0x064A, 0, + 6, 0xFC80, 0x0643, 0x0627, 0, + 6, 0xFC81, 0x0643, 0x0644, 0, + 6, 0xFC82, 0x0643, 0x0645, 0, + 6, 0xFC83, 0x0643, 0x0649, 0, + 6, 0xFC84, 0x0643, 0x064A, 0, + 6, 0xFC85, 0x0644, 0x0645, 0, + 6, 0xFC86, 0x0644, 0x0649, 0, + 6, 0xFC87, 0x0644, 0x064A, 0, + 6, 0xFC88, 0x0645, 0x0627, 0, + 6, 0xFC89, 0x0645, 0x0645, 0, + 6, 0xFC8A, 0x0646, 0x0631, 0, + 6, 0xFC8B, 0x0646, 0x0632, 0, + 6, 0xFC8C, 0x0646, 0x0645, 0, + 6, 0xFC8D, 0x0646, 0x0646, 0, + 6, 0xFC8E, 0x0646, 0x0649, 0, + 6, 0xFC8F, 0x0646, 0x064A, 0, + 6, 0xFC90, 0x0649, 0x0670, 0, + 6, 0xFC91, 0x064A, 0x0631, 0, + 6, 0xFC92, 0x064A, 0x0632, 0, + 6, 0xFC93, 0x064A, 0x0645, 0, + 6, 0xFC94, 0x064A, 0x0646, 0, + 6, 0xFC95, 0x064A, 0x0649, 0, + 6, 0xFC96, 0x064A, 0x064A, 0, + 4, 0xFC97, 0x0626, 0x062C, 0, + 4, 0xFC98, 0x0626, 0x062D, 0, + 4, 0xFC99, 0x0626, 0x062E, 0, + 4, 0xFC9A, 0x0626, 0x0645, 0, + 4, 0xFC9B, 0x0626, 0x0647, 0, + 4, 0xFC9C, 0x0628, 0x062C, 0, + 4, 0xFC9D, 0x0628, 0x062D, 0, + 4, 0xFC9E, 0x0628, 0x062E, 0, + 4, 0xFC9F, 0x0628, 0x0645, 0, + 4, 0xFCA0, 0x0628, 0x0647, 0, + 4, 0xFCA1, 0x062A, 0x062C, 0, + 4, 0xFCA2, 0x062A, 0x062D, 0, + 4, 0xFCA3, 0x062A, 0x062E, 0, + 4, 0xFCA4, 0x062A, 0x0645, 0, + 4, 0xFCA5, 0x062A, 0x0647, 0, + 4, 0xFCA6, 0x062B, 0x0645, 0, + 4, 0xFCA7, 0x062C, 0x062D, 0, + 4, 0xFCA8, 0x062C, 0x0645, 0, + 4, 0xFCA9, 0x062D, 0x062C, 0, + 4, 0xFCAA, 0x062D, 0x0645, 0, + 4, 0xFCAB, 0x062E, 0x062C, 0, + 4, 0xFCAC, 0x062E, 0x0645, 0, + 4, 0xFCAD, 0x0633, 0x062C, 0, + 4, 0xFCAE, 0x0633, 0x062D, 0, + 4, 0xFCAF, 0x0633, 0x062E, 0, + 4, 0xFCB0, 0x0633, 0x0645, 0, + 4, 0xFCB1, 0x0635, 0x062D, 0, + 4, 0xFCB2, 0x0635, 0x062E, 0, + 4, 0xFCB3, 0x0635, 0x0645, 0, + 4, 0xFCB4, 0x0636, 0x062C, 0, + 4, 0xFCB5, 0x0636, 0x062D, 0, + 4, 0xFCB6, 0x0636, 0x062E, 0, + 4, 0xFCB7, 0x0636, 0x0645, 0, + 4, 0xFCB8, 0x0637, 0x062D, 0, + 4, 0xFCB9, 0x0638, 0x0645, 0, + 4, 0xFCBA, 0x0639, 0x062C, 0, + 4, 0xFCBB, 0x0639, 0x0645, 0, + 4, 0xFCBC, 0x063A, 0x062C, 0, + 4, 0xFCBD, 0x063A, 0x0645, 0, + 4, 0xFCBE, 0x0641, 0x062C, 0, + 4, 0xFCBF, 0x0641, 0x062D, 0, + 4, 0xFCC0, 0x0641, 0x062E, 0, + 4, 0xFCC1, 0x0641, 0x0645, 0, + 4, 0xFCC2, 0x0642, 0x062D, 0, + 4, 0xFCC3, 0x0642, 0x0645, 0, + 4, 0xFCC4, 0x0643, 0x062C, 0, + 4, 0xFCC5, 0x0643, 0x062D, 0, + 4, 0xFCC6, 0x0643, 0x062E, 0, + 4, 0xFCC7, 0x0643, 0x0644, 0, + 4, 0xFCC8, 0x0643, 0x0645, 0, + 4, 0xFCC9, 0x0644, 0x062C, 0, + 4, 0xFCCA, 0x0644, 0x062D, 0, + 4, 0xFCCB, 0x0644, 0x062E, 0, + 4, 0xFCCC, 0x0644, 0x0645, 0, + 4, 0xFCCD, 0x0644, 0x0647, 0, + 4, 0xFCCE, 0x0645, 0x062C, 0, + 4, 0xFCCF, 0x0645, 0x062D, 0, + 4, 0xFCD0, 0x0645, 0x062E, 0, + 4, 0xFCD1, 0x0645, 0x0645, 0, + 4, 0xFCD2, 0x0646, 0x062C, 0, + 4, 0xFCD3, 0x0646, 0x062D, 0, + 4, 0xFCD4, 0x0646, 0x062E, 0, + 4, 0xFCD5, 0x0646, 0x0645, 0, + 4, 0xFCD6, 0x0646, 0x0647, 0, + 4, 0xFCD7, 0x0647, 0x062C, 0, + 4, 0xFCD8, 0x0647, 0x0645, 0, + 4, 0xFCD9, 0x0647, 0x0670, 0, + 4, 0xFCDA, 0x064A, 0x062C, 0, + 4, 0xFCDB, 0x064A, 0x062D, 0, + 4, 0xFCDC, 0x064A, 0x062E, 0, + 4, 0xFCDD, 0x064A, 0x0645, 0, + 4, 0xFCDE, 0x064A, 0x0647, 0, + 5, 0xFCDF, 0x0626, 0x0645, 0, + 5, 0xFCE0, 0x0626, 0x0647, 0, + 5, 0xFCE1, 0x0628, 0x0645, 0, + 5, 0xFCE2, 0x0628, 0x0647, 0, + 5, 0xFCE3, 0x062A, 0x0645, 0, + 5, 0xFCE4, 0x062A, 0x0647, 0, + 5, 0xFCE5, 0x062B, 0x0645, 0, + 5, 0xFCE6, 0x062B, 0x0647, 0, + 5, 0xFCE7, 0x0633, 0x0645, 0, + 5, 0xFCE8, 0x0633, 0x0647, 0, + 5, 0xFCE9, 0x0634, 0x0645, 0, + 5, 0xFCEA, 0x0634, 0x0647, 0, + 5, 0xFCEB, 0x0643, 0x0644, 0, + 5, 0xFCEC, 0x0643, 0x0645, 0, + 5, 0xFCED, 0x0644, 0x0645, 0, + 5, 0xFCEE, 0x0646, 0x0645, 0, + 5, 0xFCEF, 0x0646, 0x0647, 0, + 5, 0xFCF0, 0x064A, 0x0645, 0, + 5, 0xFCF1, 0x064A, 0x0647, 0, + 5, 0xFCF2, 0x0640, 0x064E, 0x0651, 0, + 5, 0xFCF3, 0x0640, 0x064F, 0x0651, 0, + 5, 0xFCF4, 0x0640, 0x0650, 0x0651, 0, + 7, 0xFCF5, 0x0637, 0x0649, 0, + 7, 0xFCF6, 0x0637, 0x064A, 0, + 7, 0xFCF7, 0x0639, 0x0649, 0, + 7, 0xFCF8, 0x0639, 0x064A, 0, + 7, 0xFCF9, 0x063A, 0x0649, 0, + 7, 0xFCFA, 0x063A, 0x064A, 0, + 7, 0xFCFB, 0x0633, 0x0649, 0, + 7, 0xFCFC, 0x0633, 0x064A, 0, + 7, 0xFCFD, 0x0634, 0x0649, 0, + 7, 0xFCFE, 0x0634, 0x064A, 0, + 7, 0xFCFF, 0x062D, 0x0649, 0, + 7, 0xFD00, 0x062D, 0x064A, 0, + 7, 0xFD01, 0x062C, 0x0649, 0, + 7, 0xFD02, 0x062C, 0x064A, 0, + 7, 0xFD03, 0x062E, 0x0649, 0, + 7, 0xFD04, 0x062E, 0x064A, 0, + 7, 0xFD05, 0x0635, 0x0649, 0, + 7, 0xFD06, 0x0635, 0x064A, 0, + 7, 0xFD07, 0x0636, 0x0649, 0, + 7, 0xFD08, 0x0636, 0x064A, 0, + 7, 0xFD09, 0x0634, 0x062C, 0, + 7, 0xFD0A, 0x0634, 0x062D, 0, + 7, 0xFD0B, 0x0634, 0x062E, 0, + 7, 0xFD0C, 0x0634, 0x0645, 0, + 7, 0xFD0D, 0x0634, 0x0631, 0, + 7, 0xFD0E, 0x0633, 0x0631, 0, + 7, 0xFD0F, 0x0635, 0x0631, 0, + 7, 0xFD10, 0x0636, 0x0631, 0, + 6, 0xFD11, 0x0637, 0x0649, 0, + 6, 0xFD12, 0x0637, 0x064A, 0, + 6, 0xFD13, 0x0639, 0x0649, 0, + 6, 0xFD14, 0x0639, 0x064A, 0, + 6, 0xFD15, 0x063A, 0x0649, 0, + 6, 0xFD16, 0x063A, 0x064A, 0, + 6, 0xFD17, 0x0633, 0x0649, 0, + 6, 0xFD18, 0x0633, 0x064A, 0, + 6, 0xFD19, 0x0634, 0x0649, 0, + 6, 0xFD1A, 0x0634, 0x064A, 0, + 6, 0xFD1B, 0x062D, 0x0649, 0, + 6, 0xFD1C, 0x062D, 0x064A, 0, + 6, 0xFD1D, 0x062C, 0x0649, 0, + 6, 0xFD1E, 0x062C, 0x064A, 0, + 6, 0xFD1F, 0x062E, 0x0649, 0, + 6, 0xFD20, 0x062E, 0x064A, 0, + 6, 0xFD21, 0x0635, 0x0649, 0, + 6, 0xFD22, 0x0635, 0x064A, 0, + 6, 0xFD23, 0x0636, 0x0649, 0, + 6, 0xFD24, 0x0636, 0x064A, 0, + 6, 0xFD25, 0x0634, 0x062C, 0, + 6, 0xFD26, 0x0634, 0x062D, 0, + 6, 0xFD27, 0x0634, 0x062E, 0, + 6, 0xFD28, 0x0634, 0x0645, 0, + 6, 0xFD29, 0x0634, 0x0631, 0, + 6, 0xFD2A, 0x0633, 0x0631, 0, + 6, 0xFD2B, 0x0635, 0x0631, 0, + 6, 0xFD2C, 0x0636, 0x0631, 0, + 4, 0xFD2D, 0x0634, 0x062C, 0, + 4, 0xFD2E, 0x0634, 0x062D, 0, + 4, 0xFD2F, 0x0634, 0x062E, 0, + 4, 0xFD30, 0x0634, 0x0645, 0, + 4, 0xFD31, 0x0633, 0x0647, 0, + 4, 0xFD32, 0x0634, 0x0647, 0, + 4, 0xFD33, 0x0637, 0x0645, 0, + 5, 0xFD34, 0x0633, 0x062C, 0, + 5, 0xFD35, 0x0633, 0x062D, 0, + 5, 0xFD36, 0x0633, 0x062E, 0, + 5, 0xFD37, 0x0634, 0x062C, 0, + 5, 0xFD38, 0x0634, 0x062D, 0, + 5, 0xFD39, 0x0634, 0x062E, 0, + 5, 0xFD3A, 0x0637, 0x0645, 0, + 5, 0xFD3B, 0x0638, 0x0645, 0, + 6, 0xFD3C, 0x0627, 0x064B, 0, + 7, 0xFD3D, 0x0627, 0x064B, 0, + 4, 0xFD50, 0x062A, 0x062C, 0x0645, 0, + 6, 0xFD51, 0x062A, 0x062D, 0x062C, 0, + 4, 0xFD52, 0x062A, 0x062D, 0x062C, 0, + 4, 0xFD53, 0x062A, 0x062D, 0x0645, 0, + 4, 0xFD54, 0x062A, 0x062E, 0x0645, 0, + 4, 0xFD55, 0x062A, 0x0645, 0x062C, 0, + 4, 0xFD56, 0x062A, 0x0645, 0x062D, 0, + 4, 0xFD57, 0x062A, 0x0645, 0x062E, 0, + 6, 0xFD58, 0x062C, 0x0645, 0x062D, 0, + 4, 0xFD59, 0x062C, 0x0645, 0x062D, 0, + 6, 0xFD5A, 0x062D, 0x0645, 0x064A, 0, + 6, 0xFD5B, 0x062D, 0x0645, 0x0649, 0, + 4, 0xFD5C, 0x0633, 0x062D, 0x062C, 0, + 4, 0xFD5D, 0x0633, 0x062C, 0x062D, 0, + 6, 0xFD5E, 0x0633, 0x062C, 0x0649, 0, + 6, 0xFD5F, 0x0633, 0x0645, 0x062D, 0, + 4, 0xFD60, 0x0633, 0x0645, 0x062D, 0, + 4, 0xFD61, 0x0633, 0x0645, 0x062C, 0, + 6, 0xFD62, 0x0633, 0x0645, 0x0645, 0, + 4, 0xFD63, 0x0633, 0x0645, 0x0645, 0, + 6, 0xFD64, 0x0635, 0x062D, 0x062D, 0, + 4, 0xFD65, 0x0635, 0x062D, 0x062D, 0, + 6, 0xFD66, 0x0635, 0x0645, 0x0645, 0, + 6, 0xFD67, 0x0634, 0x062D, 0x0645, 0, + 4, 0xFD68, 0x0634, 0x062D, 0x0645, 0, + 6, 0xFD69, 0x0634, 0x062C, 0x064A, 0, + 6, 0xFD6A, 0x0634, 0x0645, 0x062E, 0, + 4, 0xFD6B, 0x0634, 0x0645, 0x062E, 0, + 6, 0xFD6C, 0x0634, 0x0645, 0x0645, 0, + 4, 0xFD6D, 0x0634, 0x0645, 0x0645, 0, + 6, 0xFD6E, 0x0636, 0x062D, 0x0649, 0, + 6, 0xFD6F, 0x0636, 0x062E, 0x0645, 0, + 4, 0xFD70, 0x0636, 0x062E, 0x0645, 0, + 6, 0xFD71, 0x0637, 0x0645, 0x062D, 0, + 4, 0xFD72, 0x0637, 0x0645, 0x062D, 0, + 4, 0xFD73, 0x0637, 0x0645, 0x0645, 0, + 6, 0xFD74, 0x0637, 0x0645, 0x064A, 0, + 6, 0xFD75, 0x0639, 0x062C, 0x0645, 0, + 6, 0xFD76, 0x0639, 0x0645, 0x0645, 0, + 4, 0xFD77, 0x0639, 0x0645, 0x0645, 0, + 6, 0xFD78, 0x0639, 0x0645, 0x0649, 0, + 6, 0xFD79, 0x063A, 0x0645, 0x0645, 0, + 6, 0xFD7A, 0x063A, 0x0645, 0x064A, 0, + 6, 0xFD7B, 0x063A, 0x0645, 0x0649, 0, + 6, 0xFD7C, 0x0641, 0x062E, 0x0645, 0, + 4, 0xFD7D, 0x0641, 0x062E, 0x0645, 0, + 6, 0xFD7E, 0x0642, 0x0645, 0x062D, 0, + 6, 0xFD7F, 0x0642, 0x0645, 0x0645, 0, + 6, 0xFD80, 0x0644, 0x062D, 0x0645, 0, + 6, 0xFD81, 0x0644, 0x062D, 0x064A, 0, + 6, 0xFD82, 0x0644, 0x062D, 0x0649, 0, + 4, 0xFD83, 0x0644, 0x062C, 0x062C, 0, + 6, 0xFD84, 0x0644, 0x062C, 0x062C, 0, + 6, 0xFD85, 0x0644, 0x062E, 0x0645, 0, + 4, 0xFD86, 0x0644, 0x062E, 0x0645, 0, + 6, 0xFD87, 0x0644, 0x0645, 0x062D, 0, + 4, 0xFD88, 0x0644, 0x0645, 0x062D, 0, + 4, 0xFD89, 0x0645, 0x062D, 0x062C, 0, + 4, 0xFD8A, 0x0645, 0x062D, 0x0645, 0, + 6, 0xFD8B, 0x0645, 0x062D, 0x064A, 0, + 4, 0xFD8C, 0x0645, 0x062C, 0x062D, 0, + 4, 0xFD8D, 0x0645, 0x062C, 0x0645, 0, + 4, 0xFD8E, 0x0645, 0x062E, 0x062C, 0, + 4, 0xFD8F, 0x0645, 0x062E, 0x0645, 0, + 4, 0xFD92, 0x0645, 0x062C, 0x062E, 0, + 4, 0xFD93, 0x0647, 0x0645, 0x062C, 0, + 4, 0xFD94, 0x0647, 0x0645, 0x0645, 0, + 4, 0xFD95, 0x0646, 0x062D, 0x0645, 0, + 6, 0xFD96, 0x0646, 0x062D, 0x0649, 0, + 6, 0xFD97, 0x0646, 0x062C, 0x0645, 0, + 4, 0xFD98, 0x0646, 0x062C, 0x0645, 0, + 6, 0xFD99, 0x0646, 0x062C, 0x0649, 0, + 6, 0xFD9A, 0x0646, 0x0645, 0x064A, 0, + 6, 0xFD9B, 0x0646, 0x0645, 0x0649, 0, + 6, 0xFD9C, 0x064A, 0x0645, 0x0645, 0, + 4, 0xFD9D, 0x064A, 0x0645, 0x0645, 0, + 6, 0xFD9E, 0x0628, 0x062E, 0x064A, 0, + 6, 0xFD9F, 0x062A, 0x062C, 0x064A, 0, + 6, 0xFDA0, 0x062A, 0x062C, 0x0649, 0, + 6, 0xFDA1, 0x062A, 0x062E, 0x064A, 0, + 6, 0xFDA2, 0x062A, 0x062E, 0x0649, 0, + 6, 0xFDA3, 0x062A, 0x0645, 0x064A, 0, + 6, 0xFDA4, 0x062A, 0x0645, 0x0649, 0, + 6, 0xFDA5, 0x062C, 0x0645, 0x064A, 0, + 6, 0xFDA6, 0x062C, 0x062D, 0x0649, 0, + 6, 0xFDA7, 0x062C, 0x0645, 0x0649, 0, + 6, 0xFDA8, 0x0633, 0x062E, 0x0649, 0, + 6, 0xFDA9, 0x0635, 0x062D, 0x064A, 0, + 6, 0xFDAA, 0x0634, 0x062D, 0x064A, 0, + 6, 0xFDAB, 0x0636, 0x062D, 0x064A, 0, + 6, 0xFDAC, 0x0644, 0x062C, 0x064A, 0, + 6, 0xFDAD, 0x0644, 0x0645, 0x064A, 0, + 6, 0xFDAE, 0x064A, 0x062D, 0x064A, 0, + 6, 0xFDAF, 0x064A, 0x062C, 0x064A, 0, + 6, 0xFDB0, 0x064A, 0x0645, 0x064A, 0, + 6, 0xFDB1, 0x0645, 0x0645, 0x064A, 0, + 6, 0xFDB2, 0x0642, 0x0645, 0x064A, 0, + 6, 0xFDB3, 0x0646, 0x062D, 0x064A, 0, + 4, 0xFDB4, 0x0642, 0x0645, 0x062D, 0, + 4, 0xFDB5, 0x0644, 0x062D, 0x0645, 0, + 6, 0xFDB6, 0x0639, 0x0645, 0x064A, 0, + 6, 0xFDB7, 0x0643, 0x0645, 0x064A, 0, + 4, 0xFDB8, 0x0646, 0x062C, 0x062D, 0, + 6, 0xFDB9, 0x0645, 0x062E, 0x064A, 0, + 4, 0xFDBA, 0x0644, 0x062C, 0x0645, 0, + 6, 0xFDBB, 0x0643, 0x0645, 0x0645, 0, + 6, 0xFDBC, 0x0644, 0x062C, 0x0645, 0, + 6, 0xFDBD, 0x0646, 0x062C, 0x062D, 0, + 6, 0xFDBE, 0x062C, 0x062D, 0x064A, 0, + 6, 0xFDBF, 0x062D, 0x062C, 0x064A, 0, + 6, 0xFDC0, 0x0645, 0x062C, 0x064A, 0, + 6, 0xFDC1, 0x0641, 0x0645, 0x064A, 0, + 6, 0xFDC2, 0x0628, 0x062D, 0x064A, 0, + 4, 0xFDC3, 0x0643, 0x0645, 0x0645, 0, + 4, 0xFDC4, 0x0639, 0x062C, 0x0645, 0, + 4, 0xFDC5, 0x0635, 0x0645, 0x0645, 0, + 6, 0xFDC6, 0x0633, 0x062E, 0x064A, 0, + 6, 0xFDC7, 0x0646, 0x062C, 0x064A, 0, + 7, 0xFDF0, 0x0635, 0x0644, 0x06D2, 0, + 7, 0xFDF1, 0x0642, 0x0644, 0x06D2, 0, + 7, 0xFDF2, 0x0627, 0x0644, 0x0644, 0x0647, 0, + 7, 0xFDF3, 0x0627, 0x0643, 0x0628, 0x0631, 0, + 7, 0xFDF4, 0x0645, 0x062D, 0x0645, 0x062F, 0, + 7, 0xFDF5, 0x0635, 0x0644, 0x0639, 0x0645, 0, + 7, 0xFDF6, 0x0631, 0x0633, 0x0648, 0x0644, 0, + 7, 0xFDF7, 0x0639, 0x0644, 0x064A, 0x0647, 0, + 7, 0xFDF8, 0x0648, 0x0633, 0x0644, 0x0645, 0, + 7, 0xFDF9, 0x0635, 0x0644, 0x0649, 0, + 7, 0xFDFA, 0x0635, 0x0644, 0x0649, 0x0020, 0x0627, 0x0644, 0x0644, 0x0647, 0x0020, 0x0639, 0x0644, 0x064A, 0x0647, 0x0020, 0x0648, 0x0633, 0x0644, 0x0645, 0, + 7, 0xFDFB, 0x062C, 0x0644, 0x0020, 0x062C, 0x0644, 0x0627, 0x0644, 0x0647, 0, + 11, 0xFE30, 0x2025, 0, + 11, 0xFE31, 0x2014, 0, + 11, 0xFE32, 0x2013, 0, + 11, 0xFE33, 0x005F, 0, + 11, 0xFE34, 0x005F, 0, + 11, 0xFE35, 0x0028, 0, + 11, 0xFE36, 0x0029, 0, + 11, 0xFE37, 0x007B, 0, + 11, 0xFE38, 0x007D, 0, + 11, 0xFE39, 0x3014, 0, + 11, 0xFE3A, 0x3015, 0, + 11, 0xFE3B, 0x3010, 0, + 11, 0xFE3C, 0x3011, 0, + 11, 0xFE3D, 0x300A, 0, + 11, 0xFE3E, 0x300B, 0, + 11, 0xFE3F, 0x3008, 0, + 11, 0xFE40, 0x3009, 0, + 11, 0xFE41, 0x300C, 0, + 11, 0xFE42, 0x300D, 0, + 11, 0xFE43, 0x300E, 0, + 11, 0xFE44, 0x300F, 0, + 16, 0xFE49, 0x203E, 0, + 16, 0xFE4A, 0x203E, 0, + 16, 0xFE4B, 0x203E, 0, + 16, 0xFE4C, 0x203E, 0, + 16, 0xFE4D, 0x005F, 0, + 16, 0xFE4E, 0x005F, 0, + 16, 0xFE4F, 0x005F, 0, + 14, 0xFE50, 0x002C, 0, + 14, 0xFE51, 0x3001, 0, + 14, 0xFE52, 0x002E, 0, + 14, 0xFE54, 0x003B, 0, + 14, 0xFE55, 0x003A, 0, + 14, 0xFE56, 0x003F, 0, + 14, 0xFE57, 0x0021, 0, + 14, 0xFE58, 0x2014, 0, + 14, 0xFE59, 0x0028, 0, + 14, 0xFE5A, 0x0029, 0, + 14, 0xFE5B, 0x007B, 0, + 14, 0xFE5C, 0x007D, 0, + 14, 0xFE5D, 0x3014, 0, + 14, 0xFE5E, 0x3015, 0, + 14, 0xFE5F, 0x0023, 0, + 14, 0xFE60, 0x0026, 0, + 14, 0xFE61, 0x002A, 0, + 14, 0xFE62, 0x002B, 0, + 14, 0xFE63, 0x002D, 0, + 14, 0xFE64, 0x003C, 0, + 14, 0xFE65, 0x003E, 0, + 14, 0xFE66, 0x003D, 0, + 14, 0xFE68, 0x005C, 0, + 14, 0xFE69, 0x0024, 0, + 14, 0xFE6A, 0x0025, 0, + 14, 0xFE6B, 0x0040, 0, + 7, 0xFE70, 0x0020, 0x064B, 0, + 5, 0xFE71, 0x0640, 0x064B, 0, + 7, 0xFE72, 0x0020, 0x064C, 0, + 7, 0xFE74, 0x0020, 0x064D, 0, + 7, 0xFE76, 0x0020, 0x064E, 0, + 5, 0xFE77, 0x0640, 0x064E, 0, + 7, 0xFE78, 0x0020, 0x064F, 0, + 5, 0xFE79, 0x0640, 0x064F, 0, + 7, 0xFE7A, 0x0020, 0x0650, 0, + 5, 0xFE7B, 0x0640, 0x0650, 0, + 7, 0xFE7C, 0x0020, 0x0651, 0, + 5, 0xFE7D, 0x0640, 0x0651, 0, + 7, 0xFE7E, 0x0020, 0x0652, 0, + 5, 0xFE7F, 0x0640, 0x0652, 0, + 7, 0xFE80, 0x0621, 0, + 7, 0xFE81, 0x0622, 0, + 6, 0xFE82, 0x0622, 0, + 7, 0xFE83, 0x0623, 0, + 6, 0xFE84, 0x0623, 0, + 7, 0xFE85, 0x0624, 0, + 6, 0xFE86, 0x0624, 0, + 7, 0xFE87, 0x0625, 0, + 6, 0xFE88, 0x0625, 0, + 7, 0xFE89, 0x0626, 0, + 6, 0xFE8A, 0x0626, 0, + 4, 0xFE8B, 0x0626, 0, + 5, 0xFE8C, 0x0626, 0, + 7, 0xFE8D, 0x0627, 0, + 6, 0xFE8E, 0x0627, 0, + 7, 0xFE8F, 0x0628, 0, + 6, 0xFE90, 0x0628, 0, + 4, 0xFE91, 0x0628, 0, + 5, 0xFE92, 0x0628, 0, + 7, 0xFE93, 0x0629, 0, + 6, 0xFE94, 0x0629, 0, + 7, 0xFE95, 0x062A, 0, + 6, 0xFE96, 0x062A, 0, + 4, 0xFE97, 0x062A, 0, + 5, 0xFE98, 0x062A, 0, + 7, 0xFE99, 0x062B, 0, + 6, 0xFE9A, 0x062B, 0, + 4, 0xFE9B, 0x062B, 0, + 5, 0xFE9C, 0x062B, 0, + 7, 0xFE9D, 0x062C, 0, + 6, 0xFE9E, 0x062C, 0, + 4, 0xFE9F, 0x062C, 0, + 5, 0xFEA0, 0x062C, 0, + 7, 0xFEA1, 0x062D, 0, + 6, 0xFEA2, 0x062D, 0, + 4, 0xFEA3, 0x062D, 0, + 5, 0xFEA4, 0x062D, 0, + 7, 0xFEA5, 0x062E, 0, + 6, 0xFEA6, 0x062E, 0, + 4, 0xFEA7, 0x062E, 0, + 5, 0xFEA8, 0x062E, 0, + 7, 0xFEA9, 0x062F, 0, + 6, 0xFEAA, 0x062F, 0, + 7, 0xFEAB, 0x0630, 0, + 6, 0xFEAC, 0x0630, 0, + 7, 0xFEAD, 0x0631, 0, + 6, 0xFEAE, 0x0631, 0, + 7, 0xFEAF, 0x0632, 0, + 6, 0xFEB0, 0x0632, 0, + 7, 0xFEB1, 0x0633, 0, + 6, 0xFEB2, 0x0633, 0, + 4, 0xFEB3, 0x0633, 0, + 5, 0xFEB4, 0x0633, 0, + 7, 0xFEB5, 0x0634, 0, + 6, 0xFEB6, 0x0634, 0, + 4, 0xFEB7, 0x0634, 0, + 5, 0xFEB8, 0x0634, 0, + 7, 0xFEB9, 0x0635, 0, + 6, 0xFEBA, 0x0635, 0, + 4, 0xFEBB, 0x0635, 0, + 5, 0xFEBC, 0x0635, 0, + 7, 0xFEBD, 0x0636, 0, + 6, 0xFEBE, 0x0636, 0, + 4, 0xFEBF, 0x0636, 0, + 5, 0xFEC0, 0x0636, 0, + 7, 0xFEC1, 0x0637, 0, + 6, 0xFEC2, 0x0637, 0, + 4, 0xFEC3, 0x0637, 0, + 5, 0xFEC4, 0x0637, 0, + 7, 0xFEC5, 0x0638, 0, + 6, 0xFEC6, 0x0638, 0, + 4, 0xFEC7, 0x0638, 0, + 5, 0xFEC8, 0x0638, 0, + 7, 0xFEC9, 0x0639, 0, + 6, 0xFECA, 0x0639, 0, + 4, 0xFECB, 0x0639, 0, + 5, 0xFECC, 0x0639, 0, + 7, 0xFECD, 0x063A, 0, + 6, 0xFECE, 0x063A, 0, + 4, 0xFECF, 0x063A, 0, + 5, 0xFED0, 0x063A, 0, + 7, 0xFED1, 0x0641, 0, + 6, 0xFED2, 0x0641, 0, + 4, 0xFED3, 0x0641, 0, + 5, 0xFED4, 0x0641, 0, + 7, 0xFED5, 0x0642, 0, + 6, 0xFED6, 0x0642, 0, + 4, 0xFED7, 0x0642, 0, + 5, 0xFED8, 0x0642, 0, + 7, 0xFED9, 0x0643, 0, + 6, 0xFEDA, 0x0643, 0, + 4, 0xFEDB, 0x0643, 0, + 5, 0xFEDC, 0x0643, 0, + 7, 0xFEDD, 0x0644, 0, + 6, 0xFEDE, 0x0644, 0, + 4, 0xFEDF, 0x0644, 0, + 5, 0xFEE0, 0x0644, 0, + 7, 0xFEE1, 0x0645, 0, + 6, 0xFEE2, 0x0645, 0, + 4, 0xFEE3, 0x0645, 0, + 5, 0xFEE4, 0x0645, 0, + 7, 0xFEE5, 0x0646, 0, + 6, 0xFEE6, 0x0646, 0, + 4, 0xFEE7, 0x0646, 0, + 5, 0xFEE8, 0x0646, 0, + 7, 0xFEE9, 0x0647, 0, + 6, 0xFEEA, 0x0647, 0, + 4, 0xFEEB, 0x0647, 0, + 5, 0xFEEC, 0x0647, 0, + 7, 0xFEED, 0x0648, 0, + 6, 0xFEEE, 0x0648, 0, + 7, 0xFEEF, 0x0649, 0, + 6, 0xFEF0, 0x0649, 0, + 7, 0xFEF1, 0x064A, 0, + 6, 0xFEF2, 0x064A, 0, + 4, 0xFEF3, 0x064A, 0, + 5, 0xFEF4, 0x064A, 0, + 7, 0xFEF5, 0x0644, 0x0622, 0, + 6, 0xFEF6, 0x0644, 0x0622, 0, + 7, 0xFEF7, 0x0644, 0x0623, 0, + 6, 0xFEF8, 0x0644, 0x0623, 0, + 7, 0xFEF9, 0x0644, 0x0625, 0, + 6, 0xFEFA, 0x0644, 0x0625, 0, + 7, 0xFEFB, 0x0644, 0x0627, 0, + 6, 0xFEFC, 0x0644, 0x0627, 0, + 12, 0xFF01, 0x0021, 0, + 12, 0xFF02, 0x0022, 0, + 12, 0xFF03, 0x0023, 0, + 12, 0xFF04, 0x0024, 0, + 12, 0xFF05, 0x0025, 0, + 12, 0xFF06, 0x0026, 0, + 12, 0xFF07, 0x0027, 0, + 12, 0xFF08, 0x0028, 0, + 12, 0xFF09, 0x0029, 0, + 12, 0xFF0A, 0x002A, 0, + 12, 0xFF0B, 0x002B, 0, + 12, 0xFF0C, 0x002C, 0, + 12, 0xFF0D, 0x002D, 0, + 12, 0xFF0E, 0x002E, 0, + 12, 0xFF0F, 0x002F, 0, + 12, 0xFF10, 0x0030, 0, + 12, 0xFF11, 0x0031, 0, + 12, 0xFF12, 0x0032, 0, + 12, 0xFF13, 0x0033, 0, + 12, 0xFF14, 0x0034, 0, + 12, 0xFF15, 0x0035, 0, + 12, 0xFF16, 0x0036, 0, + 12, 0xFF17, 0x0037, 0, + 12, 0xFF18, 0x0038, 0, + 12, 0xFF19, 0x0039, 0, + 12, 0xFF1A, 0x003A, 0, + 12, 0xFF1B, 0x003B, 0, + 12, 0xFF1C, 0x003C, 0, + 12, 0xFF1D, 0x003D, 0, + 12, 0xFF1E, 0x003E, 0, + 12, 0xFF1F, 0x003F, 0, + 12, 0xFF20, 0x0040, 0, + 12, 0xFF21, 0x0041, 0, + 12, 0xFF22, 0x0042, 0, + 12, 0xFF23, 0x0043, 0, + 12, 0xFF24, 0x0044, 0, + 12, 0xFF25, 0x0045, 0, + 12, 0xFF26, 0x0046, 0, + 12, 0xFF27, 0x0047, 0, + 12, 0xFF28, 0x0048, 0, + 12, 0xFF29, 0x0049, 0, + 12, 0xFF2A, 0x004A, 0, + 12, 0xFF2B, 0x004B, 0, + 12, 0xFF2C, 0x004C, 0, + 12, 0xFF2D, 0x004D, 0, + 12, 0xFF2E, 0x004E, 0, + 12, 0xFF2F, 0x004F, 0, + 12, 0xFF30, 0x0050, 0, + 12, 0xFF31, 0x0051, 0, + 12, 0xFF32, 0x0052, 0, + 12, 0xFF33, 0x0053, 0, + 12, 0xFF34, 0x0054, 0, + 12, 0xFF35, 0x0055, 0, + 12, 0xFF36, 0x0056, 0, + 12, 0xFF37, 0x0057, 0, + 12, 0xFF38, 0x0058, 0, + 12, 0xFF39, 0x0059, 0, + 12, 0xFF3A, 0x005A, 0, + 12, 0xFF3B, 0x005B, 0, + 12, 0xFF3C, 0x005C, 0, + 12, 0xFF3D, 0x005D, 0, + 12, 0xFF3E, 0x005E, 0, + 12, 0xFF3F, 0x005F, 0, + 12, 0xFF40, 0x0060, 0, + 12, 0xFF41, 0x0061, 0, + 12, 0xFF42, 0x0062, 0, + 12, 0xFF43, 0x0063, 0, + 12, 0xFF44, 0x0064, 0, + 12, 0xFF45, 0x0065, 0, + 12, 0xFF46, 0x0066, 0, + 12, 0xFF47, 0x0067, 0, + 12, 0xFF48, 0x0068, 0, + 12, 0xFF49, 0x0069, 0, + 12, 0xFF4A, 0x006A, 0, + 12, 0xFF4B, 0x006B, 0, + 12, 0xFF4C, 0x006C, 0, + 12, 0xFF4D, 0x006D, 0, + 12, 0xFF4E, 0x006E, 0, + 12, 0xFF4F, 0x006F, 0, + 12, 0xFF50, 0x0070, 0, + 12, 0xFF51, 0x0071, 0, + 12, 0xFF52, 0x0072, 0, + 12, 0xFF53, 0x0073, 0, + 12, 0xFF54, 0x0074, 0, + 12, 0xFF55, 0x0075, 0, + 12, 0xFF56, 0x0076, 0, + 12, 0xFF57, 0x0077, 0, + 12, 0xFF58, 0x0078, 0, + 12, 0xFF59, 0x0079, 0, + 12, 0xFF5A, 0x007A, 0, + 12, 0xFF5B, 0x007B, 0, + 12, 0xFF5C, 0x007C, 0, + 12, 0xFF5D, 0x007D, 0, + 12, 0xFF5E, 0x007E, 0, + 13, 0xFF61, 0x3002, 0, + 13, 0xFF62, 0x300C, 0, + 13, 0xFF63, 0x300D, 0, + 13, 0xFF64, 0x3001, 0, + 13, 0xFF65, 0x30FB, 0, + 13, 0xFF66, 0x30F2, 0, + 13, 0xFF67, 0x30A1, 0, + 13, 0xFF68, 0x30A3, 0, + 13, 0xFF69, 0x30A5, 0, + 13, 0xFF6A, 0x30A7, 0, + 13, 0xFF6B, 0x30A9, 0, + 13, 0xFF6C, 0x30E3, 0, + 13, 0xFF6D, 0x30E5, 0, + 13, 0xFF6E, 0x30E7, 0, + 13, 0xFF6F, 0x30C3, 0, + 13, 0xFF70, 0x30FC, 0, + 13, 0xFF71, 0x30A2, 0, + 13, 0xFF72, 0x30A4, 0, + 13, 0xFF73, 0x30A6, 0, + 13, 0xFF74, 0x30A8, 0, + 13, 0xFF75, 0x30AA, 0, + 13, 0xFF76, 0x30AB, 0, + 13, 0xFF77, 0x30AD, 0, + 13, 0xFF78, 0x30AF, 0, + 13, 0xFF79, 0x30B1, 0, + 13, 0xFF7A, 0x30B3, 0, + 13, 0xFF7B, 0x30B5, 0, + 13, 0xFF7C, 0x30B7, 0, + 13, 0xFF7D, 0x30B9, 0, + 13, 0xFF7E, 0x30BB, 0, + 13, 0xFF7F, 0x30BD, 0, + 13, 0xFF80, 0x30BF, 0, + 13, 0xFF81, 0x30C1, 0, + 13, 0xFF82, 0x30C4, 0, + 13, 0xFF83, 0x30C6, 0, + 13, 0xFF84, 0x30C8, 0, + 13, 0xFF85, 0x30CA, 0, + 13, 0xFF86, 0x30CB, 0, + 13, 0xFF87, 0x30CC, 0, + 13, 0xFF88, 0x30CD, 0, + 13, 0xFF89, 0x30CE, 0, + 13, 0xFF8A, 0x30CF, 0, + 13, 0xFF8B, 0x30D2, 0, + 13, 0xFF8C, 0x30D5, 0, + 13, 0xFF8D, 0x30D8, 0, + 13, 0xFF8E, 0x30DB, 0, + 13, 0xFF8F, 0x30DE, 0, + 13, 0xFF90, 0x30DF, 0, + 13, 0xFF91, 0x30E0, 0, + 13, 0xFF92, 0x30E1, 0, + 13, 0xFF93, 0x30E2, 0, + 13, 0xFF94, 0x30E4, 0, + 13, 0xFF95, 0x30E6, 0, + 13, 0xFF96, 0x30E8, 0, + 13, 0xFF97, 0x30E9, 0, + 13, 0xFF98, 0x30EA, 0, + 13, 0xFF99, 0x30EB, 0, + 13, 0xFF9A, 0x30EC, 0, + 13, 0xFF9B, 0x30ED, 0, + 13, 0xFF9C, 0x30EF, 0, + 13, 0xFF9D, 0x30F3, 0, + 13, 0xFF9E, 0x3099, 0, + 13, 0xFF9F, 0x309A, 0, + 13, 0xFFA0, 0x3164, 0, + 13, 0xFFA1, 0x3131, 0, + 13, 0xFFA2, 0x3132, 0, + 13, 0xFFA3, 0x3133, 0, + 13, 0xFFA4, 0x3134, 0, + 13, 0xFFA5, 0x3135, 0, + 13, 0xFFA6, 0x3136, 0, + 13, 0xFFA7, 0x3137, 0, + 13, 0xFFA8, 0x3138, 0, + 13, 0xFFA9, 0x3139, 0, + 13, 0xFFAA, 0x313A, 0, + 13, 0xFFAB, 0x313B, 0, + 13, 0xFFAC, 0x313C, 0, + 13, 0xFFAD, 0x313D, 0, + 13, 0xFFAE, 0x313E, 0, + 13, 0xFFAF, 0x313F, 0, + 13, 0xFFB0, 0x3140, 0, + 13, 0xFFB1, 0x3141, 0, + 13, 0xFFB2, 0x3142, 0, + 13, 0xFFB3, 0x3143, 0, + 13, 0xFFB4, 0x3144, 0, + 13, 0xFFB5, 0x3145, 0, + 13, 0xFFB6, 0x3146, 0, + 13, 0xFFB7, 0x3147, 0, + 13, 0xFFB8, 0x3148, 0, + 13, 0xFFB9, 0x3149, 0, + 13, 0xFFBA, 0x314A, 0, + 13, 0xFFBB, 0x314B, 0, + 13, 0xFFBC, 0x314C, 0, + 13, 0xFFBD, 0x314D, 0, + 13, 0xFFBE, 0x314E, 0, + 13, 0xFFC2, 0x314F, 0, + 13, 0xFFC3, 0x3150, 0, + 13, 0xFFC4, 0x3151, 0, + 13, 0xFFC5, 0x3152, 0, + 13, 0xFFC6, 0x3153, 0, + 13, 0xFFC7, 0x3154, 0, + 13, 0xFFCA, 0x3155, 0, + 13, 0xFFCB, 0x3156, 0, + 13, 0xFFCC, 0x3157, 0, + 13, 0xFFCD, 0x3158, 0, + 13, 0xFFCE, 0x3159, 0, + 13, 0xFFCF, 0x315A, 0, + 13, 0xFFD2, 0x315B, 0, + 13, 0xFFD3, 0x315C, 0, + 13, 0xFFD4, 0x315D, 0, + 13, 0xFFD5, 0x315E, 0, + 13, 0xFFD6, 0x315F, 0, + 13, 0xFFD7, 0x3160, 0, + 13, 0xFFDA, 0x3161, 0, + 13, 0xFFDB, 0x3162, 0, + 13, 0xFFDC, 0x3163, 0, + 12, 0xFFE0, 0x00A2, 0, + 12, 0xFFE1, 0x00A3, 0, + 12, 0xFFE2, 0x00AC, 0, + 12, 0xFFE3, 0x00AF, 0, + 12, 0xFFE4, 0x00A6, 0, + 12, 0xFFE5, 0x00A5, 0, + 12, 0xFFE6, 0x20A9, 0, + 13, 0xFFE8, 0x2502, 0, + 13, 0xFFE9, 0x2190, 0, + 13, 0xFFEA, 0x2191, 0, + 13, 0xFFEB, 0x2192, 0, + 13, 0xFFEC, 0x2193, 0, + 13, 0xFFED, 0x25A0, 0, + 13, 0xFFEE, 0x25CB, 0, + +}; + +static const Q_UINT16 di_00[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 5, 0, 10, 0, 0, 0, 0, 14, + 0, 0, 19, 23, 27, 32, 0, 0, + 36, 41, 45, 0, 49, 55, 61, 0, + 67, 72, 77, 82, 87, 92, 0, 97, + 102, 107, 112, 117, 122, 127, 132, 137, + 0, 142, 147, 152, 157, 162, 167, 0, + 0, 172, 177, 182, 187, 192, 0, 0, + 197, 202, 207, 212, 217, 222, 0, 227, + 232, 237, 242, 247, 252, 257, 262, 267, + 0, 272, 277, 282, 287, 292, 297, 0, + 0, 302, 307, 312, 317, 322, 0, 327, +}; + +static const Q_UINT16 di_01[] = { + 332, 337, 342, 347, 352, 357, 362, 367, + 372, 377, 382, 387, 392, 397, 402, 407, + 0, 0, 412, 417, 422, 427, 432, 437, + 442, 447, 452, 457, 462, 467, 472, 477, + 482, 487, 492, 497, 502, 507, 0, 0, + 512, 517, 522, 527, 532, 537, 542, 547, + 552, 0, 557, 562, 567, 572, 577, 582, + 0, 587, 592, 597, 602, 607, 612, 617, + 622, 0, 0, 627, 632, 637, 642, 647, + 652, 657, 0, 0, 662, 667, 672, 677, + 682, 687, 0, 0, 692, 697, 702, 707, + 712, 717, 722, 727, 732, 737, 742, 747, + 752, 757, 762, 767, 772, 777, 0, 0, + 782, 787, 792, 797, 802, 807, 812, 817, + 822, 827, 832, 837, 842, 847, 852, 857, + 862, 867, 872, 877, 882, 887, 892, 897, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 901, 906, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 911, + 916, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 921, 926, 931, 936, + 941, 946, 951, 956, 961, 966, 971, 976, + 981, 986, 991, 996, 1001, 1006, 1011, 1016, + 1021, 1026, 1031, 1036, 1041, 0, 1046, 1051, + 1056, 1061, 1066, 1071, 0, 0, 1076, 1081, + 1086, 1091, 1096, 1101, 1106, 1111, 1116, 1121, + 1126, 1131, 1136, 1141, 1146, 1151, 0, 0, + 1156, 1161, 1166, 1171, 1176, 1181, 1186, 1191, +}; + +static const Q_UINT16 di_02[] = { + 1196, 1201, 1206, 1211, 1216, 1221, 1226, 1231, + 1236, 1241, 1246, 1251, 1256, 1261, 1266, 1271, + 1276, 1281, 1286, 1291, 1296, 1301, 1306, 1311, + 1316, 1321, 1326, 1331, 0, 0, 1336, 1341, + 0, 0, 0, 0, 0, 0, 1346, 1351, + 1356, 1361, 1366, 1371, 1376, 1381, 1386, 1391, + 1396, 1401, 1406, 1411, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1416, 1420, 1424, 1428, 1432, 1436, 1440, 1444, + 1448, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1452, 1457, 1462, 1467, 1472, 1477, 0, 0, + 1482, 1486, 1490, 1494, 1498, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_03[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1502, 1506, 0, 1510, 1514, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1519, 0, 0, 0, + 0, 0, 1523, 0, 0, 0, 1528, 0, + 0, 0, 0, 0, 1532, 1537, 1542, 1547, + 1551, 1556, 1561, 0, 1566, 0, 1571, 1576, + 1581, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1586, 1591, 1596, 1601, 1606, 1611, + 1616, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1621, 1626, 1631, 1636, 1641, 0, + 1646, 1650, 1654, 1658, 1663, 1668, 1672, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1676, 1680, 1684, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_04[] = { + 1688, 1693, 0, 1698, 0, 0, 0, 1703, + 0, 0, 0, 0, 1708, 1713, 1718, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1723, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1728, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1733, 1738, 0, 1743, 0, 0, 0, 1748, + 0, 0, 0, 0, 1753, 1758, 1763, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1768, 1773, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1778, 1783, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1788, 1793, 1798, 1803, 0, 0, 1808, 1813, + 0, 0, 1818, 1823, 1828, 1833, 1838, 1843, + 0, 0, 1848, 1853, 1858, 1863, 1868, 1873, + 0, 0, 1878, 1883, 1888, 1893, 1898, 1903, + 1908, 1913, 1918, 1923, 1928, 1933, 0, 0, + 1938, 1943, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_05[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1948, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_06[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1953, 1958, 1963, 1968, 1973, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1978, 1983, 1988, + 1993, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1998, 0, 2003, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2008, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_07[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_09[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2013, 0, 0, 0, 0, 0, 0, + 0, 2018, 0, 0, 2023, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 2028, 2033, 2038, 2043, 2048, 2053, 2058, 2063, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2068, 2073, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2078, 2083, 0, 2088, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_0A[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2093, 0, 0, 2098, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2103, 2108, 2113, 0, 0, 2118, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_0B[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 2123, 0, 0, 2128, 2133, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2138, 2143, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2148, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2153, 2158, 2163, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_0C[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 2168, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 2173, 0, 0, 0, 0, 0, 0, 2178, + 2183, 0, 2188, 2193, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_0D[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2198, 2203, 2208, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2213, 0, 2218, 2223, 2228, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_0E[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2233, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2238, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2243, 2248, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_0F[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2253, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2257, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2262, 0, 0, + 0, 0, 2267, 0, 0, 0, 0, 2272, + 0, 0, 0, 0, 2277, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2282, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2287, 0, 2292, 2297, 2302, + 2307, 2312, 0, 0, 0, 0, 0, 0, + 0, 2317, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2322, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2327, 0, 0, + 0, 0, 2332, 0, 0, 0, 0, 2337, + 0, 0, 0, 0, 2342, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2347, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_10[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2352, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_1E[] = { + 2357, 2362, 2367, 2372, 2377, 2382, 2387, 2392, + 2397, 2402, 2407, 2412, 2417, 2422, 2427, 2432, + 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, + 2477, 2482, 2487, 2492, 2497, 2502, 2507, 2512, + 2517, 2522, 2527, 2532, 2537, 2542, 2547, 2552, + 2557, 2562, 2567, 2572, 2577, 2582, 2587, 2592, + 2597, 2602, 2607, 2612, 2617, 2622, 2627, 2632, + 2637, 2642, 2647, 2652, 2657, 2662, 2667, 2672, + 2677, 2682, 2687, 2692, 2697, 2702, 2707, 2712, + 2717, 2722, 2727, 2732, 2737, 2742, 2747, 2752, + 2757, 2762, 2767, 2772, 2777, 2782, 2787, 2792, + 2797, 2802, 2807, 2812, 2817, 2822, 2827, 2832, + 2837, 2842, 2847, 2852, 2857, 2862, 2867, 2872, + 2877, 2882, 2887, 2892, 2897, 2902, 2907, 2912, + 2917, 2922, 2927, 2932, 2937, 2942, 2947, 2952, + 2957, 2962, 2967, 2972, 2977, 2982, 2987, 2992, + 2997, 3002, 3007, 3012, 3017, 3022, 3027, 3032, + 3037, 3042, 3047, 3052, 3057, 3062, 3067, 3072, + 3077, 3082, 3087, 3092, 3097, 3102, 3107, 3112, + 3117, 3122, 3127, 3132, 0, 0, 0, 0, + 3137, 3142, 3147, 3152, 3157, 3162, 3167, 3172, + 3177, 3182, 3187, 3192, 3197, 3202, 3207, 3212, + 3217, 3222, 3227, 3232, 3237, 3242, 3247, 3252, + 3257, 3262, 3267, 3272, 3277, 3282, 3287, 3292, + 3297, 3302, 3307, 3312, 3317, 3322, 3327, 3332, + 3337, 3342, 3347, 3352, 3357, 3362, 3367, 3372, + 3377, 3382, 3387, 3392, 3397, 3402, 3407, 3412, + 3417, 3422, 3427, 3432, 3437, 3442, 3447, 3452, + 3457, 3462, 3467, 3472, 3477, 3482, 3487, 3492, + 3497, 3502, 3507, 3512, 3517, 3522, 3527, 3532, + 3537, 3542, 3547, 3552, 3557, 3562, 3567, 3572, + 3577, 3582, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_1F[] = { + 3587, 3592, 3597, 3602, 3607, 3612, 3617, 3622, + 3627, 3632, 3637, 3642, 3647, 3652, 3657, 3662, + 3667, 3672, 3677, 3682, 3687, 3692, 0, 0, + 3697, 3702, 3707, 3712, 3717, 3722, 0, 0, + 3727, 3732, 3737, 3742, 3747, 3752, 3757, 3762, + 3767, 3772, 3777, 3782, 3787, 3792, 3797, 3802, + 3807, 3812, 3817, 3822, 3827, 3832, 3837, 3842, + 3847, 3852, 3857, 3862, 3867, 3872, 3877, 3882, + 3887, 3892, 3897, 3902, 3907, 3912, 0, 0, + 3917, 3922, 3927, 3932, 3937, 3942, 0, 0, + 3947, 3952, 3957, 3962, 3967, 3972, 3977, 3982, + 0, 3987, 0, 3992, 0, 3997, 0, 4002, + 4007, 4012, 4017, 4022, 4027, 4032, 4037, 4042, + 4047, 4052, 4057, 4062, 4067, 4072, 4077, 4082, + 4087, 4092, 4096, 4101, 4105, 4110, 4114, 4119, + 4123, 4128, 4132, 4137, 4141, 4146, 0, 0, + 4150, 4155, 4160, 4165, 4170, 4175, 4180, 4185, + 4190, 4195, 4200, 4205, 4210, 4215, 4220, 4225, + 4230, 4235, 4240, 4245, 4250, 4255, 4260, 4265, + 4270, 4275, 4280, 4285, 4290, 4295, 4300, 4305, + 4310, 4315, 4320, 4325, 4330, 4335, 4340, 4345, + 4350, 4355, 4360, 4365, 4370, 4375, 4380, 4385, + 4390, 4395, 4400, 4405, 4410, 0, 4415, 4420, + 4425, 4430, 4435, 4440, 4444, 4449, 4454, 4458, + 4463, 4468, 4473, 4478, 4483, 0, 4488, 4493, + 4498, 4503, 4507, 4512, 4516, 4521, 4526, 4531, + 4536, 4541, 4546, 4551, 0, 0, 4555, 4560, + 4565, 4570, 4575, 4580, 0, 4584, 4589, 4594, + 4599, 4604, 4609, 4614, 4618, 4623, 4628, 4633, + 4638, 4643, 4648, 4653, 4657, 4662, 4667, 4671, + 0, 0, 4675, 4680, 4685, 0, 4690, 4695, + 4700, 4705, 4709, 4714, 4718, 4723, 4727, 0, +}; + +static const Q_UINT16 di_20[] = { + 4732, 4736, 4740, 4744, 4748, 4752, 4756, 4760, + 4764, 4768, 4772, 0, 0, 0, 0, 0, + 0, 4776, 0, 0, 0, 0, 0, 4780, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 4785, 4789, 4794, 0, + 0, 0, 0, 0, 0, 0, 0, 4800, + 0, 0, 0, 4804, 4809, 0, 4815, 4820, + 0, 0, 0, 0, 4826, 0, 4831, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4836, 4841, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4846, 0, 0, 0, 4850, 4854, 4858, 4862, + 4866, 4870, 4874, 4878, 4882, 4886, 4890, 4894, + 4898, 4902, 4906, 4910, 4914, 4918, 4922, 4926, + 4930, 4934, 4938, 4942, 4946, 4950, 4954, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4958, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_21[] = { + 4963, 4969, 4975, 4979, 0, 4984, 4990, 4996, + 0, 5000, 5005, 5009, 5013, 5017, 5021, 5025, + 5029, 5033, 5037, 5041, 0, 5045, 5049, 0, + 0, 5054, 5058, 5062, 5066, 5070, 0, 0, + 5074, 5079, 5085, 0, 5090, 0, 5094, 0, + 5098, 0, 5102, 5106, 5110, 5114, 0, 5118, + 5122, 5126, 0, 5130, 5134, 5138, 5142, 5146, + 5150, 5154, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5158, 5164, 5170, 5176, 5182, + 5188, 5194, 5200, 5206, 5212, 5218, 5224, 5230, + 5235, 5239, 5244, 5250, 5255, 5259, 5264, 5270, + 5277, 5282, 5286, 5291, 5297, 5301, 5305, 5309, + 5313, 5317, 5322, 5328, 5333, 5337, 5342, 5348, + 5355, 5360, 5364, 5369, 5375, 5379, 5383, 5387, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5391, 5396, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 5401, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 5406, 5411, 5416, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_22[] = { + 0, 0, 0, 0, 5421, 0, 0, 0, + 0, 5426, 0, 0, 5431, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5436, 0, 5441, 0, + 0, 0, 0, 0, 5446, 5451, 0, 5457, + 5462, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5468, 0, 0, 5473, 0, 0, 5478, + 0, 5483, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 5488, 0, 5493, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 5498, 5503, 5508, + 5513, 5518, 0, 0, 5523, 5528, 0, 0, + 5533, 5538, 0, 0, 0, 0, 0, 0, + 5543, 5548, 0, 0, 5553, 5558, 0, 0, + 5563, 5568, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5573, 5578, 5583, 5588, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 5593, 5598, 5603, 5608, 0, 0, 0, 0, + 0, 0, 5613, 5618, 5623, 5628, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_23[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5633, 5637, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_24[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 5641, 5645, 5649, 5653, 5657, 5661, 5665, 5669, + 5673, 5677, 5682, 5687, 5692, 5697, 5702, 5707, + 5712, 5717, 5722, 5727, 5732, 5738, 5744, 5750, + 5756, 5762, 5768, 5774, 5780, 5786, 5793, 5800, + 5807, 5814, 5821, 5828, 5835, 5842, 5849, 5856, + 5863, 5868, 5873, 5878, 5883, 5888, 5893, 5898, + 5903, 5908, 5914, 5920, 5926, 5932, 5938, 5944, + 5950, 5956, 5962, 5968, 5974, 5980, 5986, 5992, + 5998, 6004, 6010, 6016, 6022, 6028, 6034, 6040, + 6046, 6052, 6058, 6064, 6070, 6076, 6082, 6088, + 6094, 6100, 6106, 6112, 6118, 6124, 6130, 6134, + 6138, 6142, 6146, 6150, 6154, 6158, 6162, 6166, + 6170, 6174, 6178, 6182, 6186, 6190, 6194, 6198, + 6202, 6206, 6210, 6214, 6218, 6222, 6226, 6230, + 6234, 6238, 6242, 6246, 6250, 6254, 6258, 6262, + 6266, 6270, 6274, 6278, 6282, 6286, 6290, 6294, + 6298, 6302, 6306, 6310, 6314, 6318, 6322, 6326, + 6330, 6334, 6338, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_2E[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 6342, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 6346, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_2F[] = { + 6350, 6354, 6358, 6362, 6366, 6370, 6374, 6378, + 6382, 6386, 6390, 6394, 6398, 6402, 6406, 6410, + 6414, 6418, 6422, 6426, 6430, 6434, 6438, 6442, + 6446, 6450, 6454, 6458, 6462, 6466, 6470, 6474, + 6478, 6482, 6486, 6490, 6494, 6498, 6502, 6506, + 6510, 6514, 6518, 6522, 6526, 6530, 6534, 6538, + 6542, 6546, 6550, 6554, 6558, 6562, 6566, 6570, + 6574, 6578, 6582, 6586, 6590, 6594, 6598, 6602, + 6606, 6610, 6614, 6618, 6622, 6626, 6630, 6634, + 6638, 6642, 6646, 6650, 6654, 6658, 6662, 6666, + 6670, 6674, 6678, 6682, 6686, 6690, 6694, 6698, + 6702, 6706, 6710, 6714, 6718, 6722, 6726, 6730, + 6734, 6738, 6742, 6746, 6750, 6754, 6758, 6762, + 6766, 6770, 6774, 6778, 6782, 6786, 6790, 6794, + 6798, 6802, 6806, 6810, 6814, 6818, 6822, 6826, + 6830, 6834, 6838, 6842, 6846, 6850, 6854, 6858, + 6862, 6866, 6870, 6874, 6878, 6882, 6886, 6890, + 6894, 6898, 6902, 6906, 6910, 6914, 6918, 6922, + 6926, 6930, 6934, 6938, 6942, 6946, 6950, 6954, + 6958, 6962, 6966, 6970, 6974, 6978, 6982, 6986, + 6990, 6994, 6998, 7002, 7006, 7010, 7014, 7018, + 7022, 7026, 7030, 7034, 7038, 7042, 7046, 7050, + 7054, 7058, 7062, 7066, 7070, 7074, 7078, 7082, + 7086, 7090, 7094, 7098, 7102, 7106, 7110, 7114, + 7118, 7122, 7126, 7130, 7134, 7138, 7142, 7146, + 7150, 7154, 7158, 7162, 7166, 7170, 7174, 7178, + 7182, 7186, 7190, 7194, 7198, 7202, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_30[] = { + 7206, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 7210, 0, + 7214, 7218, 7222, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7226, 0, 7231, 0, + 7236, 0, 7241, 0, 7246, 0, 7251, 0, + 7256, 0, 7261, 0, 7266, 0, 7271, 0, + 7276, 0, 7281, 0, 0, 7286, 0, 7291, + 0, 7296, 0, 0, 0, 0, 0, 0, + 7301, 7306, 0, 7311, 7316, 0, 7321, 7326, + 0, 7331, 7336, 0, 7341, 7346, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7351, 0, 0, 0, + 0, 0, 0, 7356, 7361, 0, 7366, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7371, 0, 7376, 0, + 7381, 0, 7386, 0, 7391, 0, 7396, 0, + 7401, 0, 7406, 0, 7411, 0, 7416, 0, + 7421, 0, 7426, 0, 0, 7431, 0, 7436, + 0, 7441, 0, 0, 0, 0, 0, 0, + 7446, 7451, 0, 7456, 7461, 0, 7466, 7471, + 0, 7476, 7481, 0, 7486, 7491, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7496, 0, 0, 7501, + 7506, 7511, 7516, 0, 0, 0, 7521, 0, +}; + +static const Q_UINT16 di_31[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7526, 7530, 7534, 7538, 7542, 7546, 7550, + 7554, 7558, 7562, 7566, 7570, 7574, 7578, 7582, + 7586, 7590, 7594, 7598, 7602, 7606, 7610, 7614, + 7618, 7622, 7626, 7630, 7634, 7638, 7642, 7646, + 7650, 7654, 7658, 7662, 7666, 7670, 7674, 7678, + 7682, 7686, 7690, 7694, 7698, 7702, 7706, 7710, + 7714, 7718, 7722, 7726, 7730, 7734, 7738, 7742, + 7746, 7750, 7754, 7758, 7762, 7766, 7770, 7774, + 7778, 7782, 7786, 7790, 7794, 7798, 7802, 7806, + 7810, 7814, 7818, 7822, 7826, 7830, 7834, 7838, + 7842, 7846, 7850, 7854, 7858, 7862, 7866, 7870, + 7874, 7878, 7882, 7886, 7890, 7894, 7898, 0, + 0, 0, 7902, 7906, 7910, 7914, 7918, 7922, + 7926, 7930, 7934, 7938, 7942, 7946, 7950, 7954, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_32[] = { + 7958, 7964, 7970, 7976, 7982, 7988, 7994, 8000, + 8006, 8012, 8018, 8024, 8030, 8036, 8042, 8049, + 8056, 8063, 8070, 8077, 8084, 8091, 8098, 8105, + 8112, 8119, 8126, 8133, 8140, 0, 0, 0, + 8147, 8153, 8159, 8165, 8171, 8177, 8183, 8189, + 8195, 8201, 8207, 8213, 8219, 8225, 8231, 8237, + 8243, 8249, 8255, 8261, 8267, 8273, 8279, 8285, + 8291, 8297, 8303, 8309, 8315, 8321, 8327, 8333, + 8339, 8345, 8351, 8357, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 8363, 8367, 8371, 8375, 8379, 8383, 8387, 8391, + 8395, 8399, 8403, 8407, 8411, 8415, 8419, 8424, + 8429, 8434, 8439, 8444, 8449, 8454, 8459, 8464, + 8469, 8474, 8479, 8484, 0, 0, 0, 0, + 8489, 8493, 8497, 8501, 8505, 8509, 8513, 8517, + 8521, 8525, 8529, 8533, 8537, 8541, 8545, 8549, + 8553, 8557, 8561, 8565, 8569, 8573, 8577, 8581, + 8585, 8589, 8593, 8597, 8601, 8605, 8609, 8613, + 8617, 8621, 8625, 8629, 8633, 8637, 8641, 8645, + 8649, 8653, 8657, 8661, 8665, 8669, 8673, 8677, + 8681, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 8685, 8690, 8695, 8700, 8705, 8710, 8715, 8720, + 8725, 8730, 8736, 8742, 0, 0, 0, 0, + 8748, 8752, 8756, 8760, 8764, 8768, 8772, 8776, + 8780, 8784, 8788, 8792, 8796, 8800, 8804, 8808, + 8812, 8816, 8820, 8824, 8828, 8832, 8836, 8840, + 8844, 8848, 8852, 8856, 8860, 8864, 8868, 8872, + 8876, 8880, 8884, 8888, 8892, 8896, 8900, 8904, + 8908, 8912, 8916, 8920, 8924, 8928, 8932, 0, +}; + +static const Q_UINT16 di_33[] = { + 8936, 8943, 8950, 8957, 8963, 8970, 8976, 8982, + 8990, 8997, 9003, 9009, 9015, 9022, 9029, 9035, + 9041, 9046, 9052, 9059, 9066, 9071, 9079, 9088, + 9096, 9102, 9110, 9118, 9125, 9131, 9137, 9143, + 9150, 9158, 9165, 9171, 9177, 9183, 9188, 9193, + 9198, 9203, 9209, 9215, 9223, 9229, 9236, 9244, + 9250, 9255, 9260, 9268, 9275, 9283, 9289, 9297, + 9302, 9308, 9314, 9320, 9326, 9332, 9339, 9345, + 9350, 9356, 9362, 9368, 9375, 9381, 9387, 9393, + 9401, 9408, 9413, 9421, 9426, 9433, 9440, 9446, + 9452, 9458, 9465, 9470, 9476, 9483, 9488, 9496, + 9502, 9507, 9512, 9517, 9522, 9527, 9532, 9537, + 9542, 9547, 9552, 9558, 9564, 9570, 9576, 9582, + 9588, 9594, 9600, 9606, 9612, 9618, 9624, 9630, + 9636, 9642, 9648, 9653, 9658, 9664, 9669, 0, + 0, 0, 0, 9674, 9679, 9684, 9689, 9694, + 9701, 9706, 9711, 9716, 9721, 9726, 9731, 9736, + 9741, 9747, 9754, 9759, 9764, 9769, 9774, 9779, + 9784, 9789, 9795, 9801, 9807, 9813, 9818, 9823, + 9828, 9833, 9838, 9843, 9848, 9853, 9858, 9863, + 9869, 9875, 9880, 9886, 9892, 9898, 9903, 9909, + 9915, 9922, 9927, 9933, 9939, 9945, 9951, 9959, + 9968, 9973, 9978, 9983, 9988, 9993, 9998, 10003, + 10008, 10013, 10018, 10023, 10028, 10033, 10038, 10043, + 10048, 10053, 10058, 10065, 10070, 10075, 10080, 10087, + 10093, 10098, 10103, 10108, 10113, 10118, 10123, 10128, + 10133, 10138, 10143, 10149, 10154, 10159, 10165, 10171, + 10176, 10183, 10189, 10194, 10199, 10204, 0, 0, + 10209, 10214, 10219, 10224, 10229, 10234, 10239, 10244, + 10249, 10254, 10260, 10266, 10272, 10278, 10284, 10290, + 10296, 10302, 10308, 10314, 10320, 10326, 10332, 10338, + 10344, 10350, 10356, 10362, 10368, 10374, 10380, 0, +}; + +static const Q_UINT16 di_F9[] = { + 10386, 10390, 10394, 10398, 10402, 10406, 10410, 10414, + 10418, 10422, 10426, 10430, 10434, 10438, 10442, 10446, + 10450, 10454, 10458, 10462, 10466, 10470, 10474, 10478, + 10482, 10486, 10490, 10494, 10498, 10502, 10506, 10510, + 10514, 10518, 10522, 10526, 10530, 10534, 10538, 10542, + 10546, 10550, 10554, 10558, 10562, 10566, 10570, 10574, + 10578, 10582, 10586, 10590, 10594, 10598, 10602, 10606, + 10610, 10614, 10618, 10622, 10626, 10630, 10634, 10638, + 10642, 10646, 10650, 10654, 10658, 10662, 10666, 10670, + 10674, 10678, 10682, 10686, 10690, 10694, 10698, 10702, + 10706, 10710, 10714, 10718, 10722, 10726, 10730, 10734, + 10738, 10742, 10746, 10750, 10754, 10758, 10762, 10766, + 10770, 10774, 10778, 10782, 10786, 10790, 10794, 10798, + 10802, 10806, 10810, 10814, 10818, 10822, 10826, 10830, + 10834, 10838, 10842, 10846, 10850, 10854, 10858, 10862, + 10866, 10870, 10874, 10878, 10882, 10886, 10890, 10894, + 10898, 10902, 10906, 10910, 10914, 10918, 10922, 10926, + 10930, 10934, 10938, 10942, 10946, 10950, 10954, 10958, + 10962, 10966, 10970, 10974, 10978, 10982, 10986, 10990, + 10994, 10998, 11002, 11006, 11010, 11014, 11018, 11022, + 11026, 11030, 11034, 11038, 11042, 11046, 11050, 11054, + 11058, 11062, 11066, 11070, 11074, 11078, 11082, 11086, + 11090, 11094, 11098, 11102, 11106, 11110, 11114, 11118, + 11122, 11126, 11130, 11134, 11138, 11142, 11146, 11150, + 11154, 11158, 11162, 11166, 11170, 11174, 11178, 11182, + 11186, 11190, 11194, 11198, 11202, 11206, 11210, 11214, + 11218, 11222, 11226, 11230, 11234, 11238, 11242, 11246, + 11250, 11254, 11258, 11262, 11266, 11270, 11274, 11278, + 11282, 11286, 11290, 11294, 11298, 11302, 11306, 11310, + 11314, 11318, 11322, 11326, 11330, 11334, 11338, 11342, + 11346, 11350, 11354, 11358, 11362, 11366, 11370, 11374, + 11378, 11382, 11386, 11390, 11394, 11398, 11402, 11406, +}; + +static const Q_UINT16 di_FA[] = { + 11410, 11414, 11418, 11422, 11426, 11430, 11434, 11438, + 11442, 11446, 11450, 11454, 11458, 11462, 0, 0, + 11466, 0, 11470, 0, 0, 11474, 11478, 11482, + 11486, 11490, 11494, 11498, 11502, 11506, 11510, 0, + 11514, 0, 11518, 0, 0, 11522, 11526, 0, + 0, 0, 11530, 11534, 11538, 11542, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_FB[] = { + 11546, 11551, 11556, 11561, 11567, 11573, 11578, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 11583, 11588, 11593, 11598, 11603, + 0, 0, 0, 0, 0, 11608, 0, 11613, + 11618, 11622, 11626, 11630, 11634, 11638, 11642, 11646, + 11650, 11654, 11658, 11663, 11668, 11673, 11678, 11683, + 11688, 11693, 11698, 11703, 11708, 11713, 11718, 0, + 11723, 11728, 11733, 11738, 11743, 0, 11748, 0, + 11753, 11758, 0, 11763, 11768, 0, 11773, 11778, + 11783, 11788, 11793, 11798, 11803, 11808, 11813, 11818, + 11823, 11827, 11831, 11835, 11839, 11843, 11847, 11851, + 11855, 11859, 11863, 11867, 11871, 11875, 11879, 11883, + 11887, 11891, 11895, 11899, 11903, 11907, 11911, 11915, + 11919, 11923, 11927, 11931, 11935, 11939, 11943, 11947, + 11951, 11955, 11959, 11963, 11967, 11971, 11975, 11979, + 11983, 11987, 11991, 11995, 11999, 12003, 12007, 12011, + 12015, 12019, 12023, 12027, 12031, 12035, 12039, 12043, + 12047, 12051, 12055, 12059, 12063, 12067, 12071, 12075, + 12079, 12083, 12087, 12091, 12095, 12099, 12103, 12107, + 12111, 12115, 12119, 12123, 12127, 12131, 12135, 12139, + 12143, 12147, 12151, 12155, 12159, 12163, 12167, 12171, + 12175, 12179, 12183, 12187, 12191, 12195, 12199, 12203, + 12207, 12211, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 12215, 12219, 12223, 12227, 12231, + 12235, 12239, 12243, 12247, 12251, 12255, 12259, 12263, + 12267, 12271, 12275, 12279, 12283, 12287, 12291, 12295, + 12299, 12303, 12307, 12312, 12317, 12322, 12327, 12332, + 12337, 12342, 12347, 12352, 12357, 12362, 12367, 12372, + 12377, 12382, 12387, 12392, 12397, 12401, 12405, 12409, +}; + +static const Q_UINT16 di_FC[] = { + 12413, 12418, 12423, 12428, 12433, 12438, 12443, 12448, + 12453, 12458, 12463, 12468, 12473, 12478, 12483, 12488, + 12493, 12498, 12503, 12508, 12513, 12518, 12523, 12528, + 12533, 12538, 12543, 12548, 12553, 12558, 12563, 12568, + 12573, 12578, 12583, 12588, 12593, 12598, 12603, 12608, + 12613, 12618, 12623, 12628, 12633, 12638, 12643, 12648, + 12653, 12658, 12663, 12668, 12673, 12678, 12683, 12688, + 12693, 12698, 12703, 12708, 12713, 12718, 12723, 12728, + 12733, 12738, 12743, 12748, 12753, 12758, 12763, 12768, + 12773, 12778, 12783, 12788, 12793, 12798, 12803, 12808, + 12813, 12818, 12823, 12828, 12833, 12838, 12843, 12848, + 12853, 12858, 12863, 12868, 12873, 12878, 12883, 12889, + 12895, 12901, 12907, 12913, 12919, 12924, 12929, 12934, + 12939, 12944, 12949, 12954, 12959, 12964, 12969, 12974, + 12979, 12984, 12989, 12994, 12999, 13004, 13009, 13014, + 13019, 13024, 13029, 13034, 13039, 13044, 13049, 13054, + 13059, 13064, 13069, 13074, 13079, 13084, 13089, 13094, + 13099, 13104, 13109, 13114, 13119, 13124, 13129, 13134, + 13139, 13144, 13149, 13154, 13159, 13164, 13169, 13174, + 13179, 13184, 13189, 13194, 13199, 13204, 13209, 13214, + 13219, 13224, 13229, 13234, 13239, 13244, 13249, 13254, + 13259, 13264, 13269, 13274, 13279, 13284, 13289, 13294, + 13299, 13304, 13309, 13314, 13319, 13324, 13329, 13334, + 13339, 13344, 13349, 13354, 13359, 13364, 13369, 13374, + 13379, 13384, 13389, 13394, 13399, 13404, 13409, 13414, + 13419, 13424, 13429, 13434, 13439, 13444, 13449, 13454, + 13459, 13464, 13469, 13474, 13479, 13484, 13489, 13494, + 13499, 13504, 13509, 13514, 13519, 13524, 13529, 13534, + 13539, 13544, 13549, 13554, 13559, 13564, 13569, 13574, + 13579, 13584, 13589, 13594, 13599, 13604, 13609, 13614, + 13619, 13624, 13629, 13635, 13641, 13647, 13652, 13657, + 13662, 13667, 13672, 13677, 13682, 13687, 13692, 13697, +}; + +static const Q_UINT16 di_FD[] = { + 13702, 13707, 13712, 13717, 13722, 13727, 13732, 13737, + 13742, 13747, 13752, 13757, 13762, 13767, 13772, 13777, + 13782, 13787, 13792, 13797, 13802, 13807, 13812, 13817, + 13822, 13827, 13832, 13837, 13842, 13847, 13852, 13857, + 13862, 13867, 13872, 13877, 13882, 13887, 13892, 13897, + 13902, 13907, 13912, 13917, 13922, 13927, 13932, 13937, + 13942, 13947, 13952, 13957, 13962, 13967, 13972, 13977, + 13982, 13987, 13992, 13997, 14002, 14007, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 14012, 14018, 14024, 14030, 14036, 14042, 14048, 14054, + 14060, 14066, 14072, 14078, 14084, 14090, 14096, 14102, + 14108, 14114, 14120, 14126, 14132, 14138, 14144, 14150, + 14156, 14162, 14168, 14174, 14180, 14186, 14192, 14198, + 14204, 14210, 14216, 14222, 14228, 14234, 14240, 14246, + 14252, 14258, 14264, 14270, 14276, 14282, 14288, 14294, + 14300, 14306, 14312, 14318, 14324, 14330, 14336, 14342, + 14348, 14354, 14360, 14366, 14372, 14378, 14384, 14390, + 0, 0, 14396, 14402, 14408, 14414, 14420, 14426, + 14432, 14438, 14444, 14450, 14456, 14462, 14468, 14474, + 14480, 14486, 14492, 14498, 14504, 14510, 14516, 14522, + 14528, 14534, 14540, 14546, 14552, 14558, 14564, 14570, + 14576, 14582, 14588, 14594, 14600, 14606, 14612, 14618, + 14624, 14630, 14636, 14642, 14648, 14654, 14660, 14666, + 14672, 14678, 14684, 14690, 14696, 14702, 14708, 14714, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 14720, 14726, 14732, 14739, 14746, 14753, 14760, 14767, + 14774, 14781, 14787, 14808, 0, 0, 0, 0, +}; + +static const Q_UINT16 di_FE[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 14819, 14823, 14827, 14831, 14835, 14839, 14843, 14847, + 14851, 14855, 14859, 14863, 14867, 14871, 14875, 14879, + 14883, 14887, 14891, 14895, 14899, 0, 0, 0, + 0, 14903, 14907, 14911, 14915, 14919, 14923, 14927, + 14931, 14935, 14939, 0, 14943, 14947, 14951, 14955, + 14959, 14963, 14967, 14971, 14975, 14979, 14983, 14987, + 14991, 14995, 14999, 15003, 15007, 15011, 15015, 0, + 15019, 15023, 15027, 15031, 0, 0, 0, 0, + 15035, 15040, 15045, 0, 15050, 0, 15055, 15060, + 15065, 15070, 15075, 15080, 15085, 15090, 15095, 15100, + 15105, 15109, 15113, 15117, 15121, 15125, 15129, 15133, + 15137, 15141, 15145, 15149, 15153, 15157, 15161, 15165, + 15169, 15173, 15177, 15181, 15185, 15189, 15193, 15197, + 15201, 15205, 15209, 15213, 15217, 15221, 15225, 15229, + 15233, 15237, 15241, 15245, 15249, 15253, 15257, 15261, + 15265, 15269, 15273, 15277, 15281, 15285, 15289, 15293, + 15297, 15301, 15305, 15309, 15313, 15317, 15321, 15325, + 15329, 15333, 15337, 15341, 15345, 15349, 15353, 15357, + 15361, 15365, 15369, 15373, 15377, 15381, 15385, 15389, + 15393, 15397, 15401, 15405, 15409, 15413, 15417, 15421, + 15425, 15429, 15433, 15437, 15441, 15445, 15449, 15453, + 15457, 15461, 15465, 15469, 15473, 15477, 15481, 15485, + 15489, 15493, 15497, 15501, 15505, 15509, 15513, 15517, + 15521, 15525, 15529, 15533, 15537, 15541, 15545, 15549, + 15553, 15557, 15561, 15565, 15569, 15573, 15578, 15583, + 15588, 15593, 15598, 15603, 15608, 0, 0, 0, +}; + +static const Q_UINT16 di_FF[] = { + 0, 15613, 15617, 15621, 15625, 15629, 15633, 15637, + 15641, 15645, 15649, 15653, 15657, 15661, 15665, 15669, + 15673, 15677, 15681, 15685, 15689, 15693, 15697, 15701, + 15705, 15709, 15713, 15717, 15721, 15725, 15729, 15733, + 15737, 15741, 15745, 15749, 15753, 15757, 15761, 15765, + 15769, 15773, 15777, 15781, 15785, 15789, 15793, 15797, + 15801, 15805, 15809, 15813, 15817, 15821, 15825, 15829, + 15833, 15837, 15841, 15845, 15849, 15853, 15857, 15861, + 15865, 15869, 15873, 15877, 15881, 15885, 15889, 15893, + 15897, 15901, 15905, 15909, 15913, 15917, 15921, 15925, + 15929, 15933, 15937, 15941, 15945, 15949, 15953, 15957, + 15961, 15965, 15969, 15973, 15977, 15981, 15985, 0, + 0, 15989, 15993, 15997, 16001, 16005, 16009, 16013, + 16017, 16021, 16025, 16029, 16033, 16037, 16041, 16045, + 16049, 16053, 16057, 16061, 16065, 16069, 16073, 16077, + 16081, 16085, 16089, 16093, 16097, 16101, 16105, 16109, + 16113, 16117, 16121, 16125, 16129, 16133, 16137, 16141, + 16145, 16149, 16153, 16157, 16161, 16165, 16169, 16173, + 16177, 16181, 16185, 16189, 16193, 16197, 16201, 16205, + 16209, 16213, 16217, 16221, 16225, 16229, 16233, 16237, + 16241, 16245, 16249, 16253, 16257, 16261, 16265, 16269, + 16273, 16277, 16281, 16285, 16289, 16293, 16297, 16301, + 16305, 16309, 16313, 16317, 16321, 16325, 16329, 16333, + 16337, 16341, 16345, 16349, 16353, 16357, 16361, 0, + 0, 0, 16365, 16369, 16373, 16377, 16381, 16385, + 0, 0, 16389, 16393, 16397, 16401, 16405, 16409, + 0, 0, 16413, 16417, 16421, 16425, 16429, 16433, + 0, 0, 16437, 16441, 16445, 0, 0, 0, + 16449, 16453, 16457, 16461, 16465, 16469, 16473, 0, + 16477, 16481, 16485, 16489, 16493, 16497, 16501, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 * const decomposition_info[256] = { + di_00, di_01, di_02, di_03, di_04, di_05, di_06, di_07, + di_07, di_09, di_0A, di_0B, di_0C, di_0D, di_0E, di_0F, + di_10, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_1E, di_1F, + di_20, di_21, di_22, di_23, di_24, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_2E, di_2F, + di_30, di_31, di_32, di_33, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07, + di_07, di_F9, di_FA, di_FB, di_FC, di_FD, di_FE, di_FF, +}; +// 68080 bytes + +static const Q_UINT16 ligature_map [] = { + 0, + 12883, 12889, 12895, 12901, 12907, 12913, 15035, 15045, 15050, 15055, 15065, 15075, 15085, 15095, 0, + 5503, 0, + 5488, 0, + 5508, 0, + 67, 72, 77, 82, 87, 92, 332, 342, 352, 966, 1196, 1206, 1346, 2357, 3137, 3147, 0, + 2367, 2377, 2387, 0, + 97, 362, 372, 382, 392, 0, + 402, 2407, 2417, 2427, 2437, 2447, 0, + 102, 107, 112, 117, 412, 422, 432, 442, 452, 1216, 1226, 1356, 2477, 2487, 3257, 3267, 3277, 0, + 2507, 0, + 462, 472, 482, 492, 1076, 1146, 2517, 0, + 502, 1336, 2527, 2537, 2547, 2557, 2567, 0, + 122, 127, 132, 137, 512, 522, 532, 542, 552, 976, 1236, 1246, 2577, 3337, 3347, 0, + 567, 0, + 577, 1086, 2597, 2607, 2617, 0, + 587, 597, 607, 2627, 2647, 2657, 0, + 2667, 2677, 2687, 0, + 142, 627, 637, 647, 1156, 2697, 2707, 2717, 2727, 0, + 147, 152, 157, 162, 167, 662, 672, 682, 901, 986, 1096, 1256, 1266, 1386, 3357, 3367, 0, + 2777, 2787, 0, + 692, 702, 712, 1276, 1286, 2797, 2807, 2827, 0, + 722, 732, 742, 752, 1316, 2837, 2847, 0, + 762, 772, 1326, 2887, 2897, 2907, 2917, 0, + 172, 177, 182, 187, 782, 792, 802, 812, 822, 832, 911, 996, 1296, 1306, 2927, 2937, 2947, 3477, 3487, 0, + 2977, 2987, 0, + 842, 2997, 3007, 3017, 3027, 3037, 0, + 3047, 3057, 0, + 192, 852, 862, 1406, 3067, 3547, 3557, 3567, 3577, 0, + 867, 877, 887, 3077, 3087, 3097, 0, + 197, 202, 207, 212, 217, 222, 337, 347, 357, 971, 1201, 1211, 1351, 2362, 3142, 3152, 0, + 2372, 2382, 2392, 0, + 227, 367, 377, 387, 397, 0, + 407, 2412, 2422, 2432, 2442, 2452, 0, + 232, 237, 242, 247, 417, 427, 437, 447, 457, 1221, 1231, 1361, 2482, 2492, 3262, 3272, 3282, 0, + 2512, 0, + 467, 477, 487, 497, 1081, 1151, 2522, 0, + 507, 1341, 2532, 2542, 2552, 2562, 2572, 3107, 0, + 252, 257, 262, 267, 517, 527, 537, 547, 981, 1241, 1251, 2582, 3342, 3352, 0, + 572, 1126, 0, + 582, 1091, 2602, 2612, 2622, 0, + 592, 602, 612, 2632, 2652, 2662, 0, + 2672, 2682, 2692, 0, + 272, 632, 642, 652, 1161, 2702, 2712, 2722, 2732, 0, + 277, 282, 287, 292, 297, 667, 677, 687, 906, 991, 1101, 1261, 1271, 1391, 3362, 3372, 0, + 2782, 2792, 0, + 697, 707, 717, 1281, 1291, 2802, 2812, 2832, 0, + 727, 737, 747, 757, 1321, 2842, 2852, 0, + 767, 777, 1331, 2892, 2902, 2912, 2922, 3112, 0, + 302, 307, 312, 317, 787, 797, 807, 817, 827, 837, 916, 1001, 1301, 1311, 2932, 2942, 2952, 3482, 3492, 0, + 2982, 2992, 0, + 847, 3002, 3012, 3022, 3032, 3042, 3117, 0, + 3052, 3062, 0, + 322, 327, 857, 1411, 3072, 3122, 3552, 3562, 3572, 3582, 0, + 872, 882, 892, 3082, 3092, 3102, 0, + 1537, 4468, 4662, 0, + 3157, 3167, 3177, 3187, 0, + 1046, 0, + 1166, 0, + 1066, 1176, 0, + 2397, 0, + 3287, 3297, 3307, 3317, 0, + 2587, 0, + 3377, 3387, 3397, 3407, 0, + 1376, 2737, 2747, 0, + 1366, 0, + 1186, 0, + 1006, 1016, 1026, 1036, 0, + 3162, 3172, 3182, 3192, 0, + 1051, 0, + 1171, 0, + 1071, 1181, 0, + 2402, 0, + 3292, 3302, 3312, 3322, 0, + 2592, 0, + 3382, 3392, 3402, 3412, 0, + 1381, 2742, 2752, 0, + 1371, 0, + 1191, 0, + 1011, 1021, 1031, 1041, 0, + 3207, 3217, 3227, 3237, 0, + 3212, 3222, 3232, 3242, 0, + 2457, 2467, 0, + 2462, 2472, 0, + 2757, 2767, 0, + 2762, 2772, 0, + 2857, 0, + 2862, 0, + 2867, 0, + 2872, 0, + 2957, 0, + 2962, 0, + 2967, 0, + 2972, 0, + 3132, 0, + 3427, 3437, 3447, 3457, 3467, 0, + 3432, 3442, 3452, 3462, 3472, 0, + 3497, 3507, 3517, 3527, 3537, 0, + 3502, 3512, 3522, 3532, 3542, 0, + 1116, 0, + 1106, 0, + 1111, 0, + 1056, 0, + 1061, 0, + 2497, 0, + 2502, 0, + 1396, 0, + 1401, 0, + 1121, 0, + 1514, 0, + 1542, 3627, 3632, 4425, 4430, 4435, 4444, 0, + 1551, 3697, 3702, 4498, 0, + 1556, 3767, 3772, 4507, 4516, 0, + 1561, 1586, 3847, 3852, 4565, 4570, 4575, 0, + 1566, 3917, 3922, 4700, 0, + 4657, 0, + 1571, 1591, 3987, 4638, 4643, 4648, 0, + 1576, 4047, 4052, 4709, 4718, 0, + 4410, 0, + 4483, 0, + 1596, 3587, 3592, 4087, 4390, 4395, 4405, 4415, 0, + 1601, 3667, 3672, 4096, 0, + 1606, 3727, 3732, 4105, 4478, 4488, 0, + 1611, 1621, 3807, 3812, 4114, 4536, 4541, 4555, 0, + 1631, 3887, 3892, 4123, 0, + 4618, 4623, 0, + 1626, 1636, 3947, 3952, 4132, 4599, 4604, 4628, 0, + 1641, 4007, 4012, 4141, 4680, 4690, 0, + 1581, 4546, 4560, 0, + 1616, 4609, 4633, 0, + 4685, 0, + 1658, 1663, 0, + 1703, 0, + 1788, 1798, 0, + 1698, 0, + 1688, 1693, 1808, 0, + 1778, 1828, 0, + 1838, 0, + 1713, 1723, 1848, 1858, 0, + 1708, 0, + 1868, 0, + 1718, 1898, 1908, 1918, 0, + 1928, 0, + 1938, 0, + 1888, 0, + 1793, 1803, 0, + 1743, 0, + 1733, 1738, 1813, 0, + 1783, 1833, 0, + 1843, 0, + 1728, 1758, 1853, 1863, 0, + 1753, 0, + 1873, 0, + 1763, 1903, 1913, 1923, 0, + 1933, 0, + 1943, 0, + 1893, 0, + 1748, 0, + 1768, 0, + 1773, 0, + 1818, 0, + 1823, 0, + 1878, 0, + 1883, 0, + 11678, 11683, 11688, 0, + 11693, 11803, 0, + 11698, 0, + 11703, 0, + 11708, 0, + 11713, 11798, 0, + 11718, 0, + 11723, 0, + 11608, 11728, 0, + 11733, 0, + 11738, 11808, 0, + 11743, 0, + 11748, 0, + 11753, 0, + 11758, 0, + 11763, 0, + 11768, 11813, 0, + 11773, 0, + 11778, 0, + 11783, 0, + 11658, 11663, 11788, 0, + 11793, 0, + 11613, 0, + 15105, 0, + 15109, 15113, 0, + 15117, 15121, 0, + 15125, 15129, 0, + 15133, 15137, 0, + 12307, 12312, 12317, 12322, 12327, 12332, 12337, 12342, 12347, 12352, 12357, 12362, 12367, 12372, 12377, 12382, 12387, 12392, 12413, 12418, 12423, 12428, 12433, 12919, 12924, 12929, 12934, 12939, 12944, 13174, 13179, 13184, 13189, 13194, 13534, 13539, 15141, 15145, 15149, 15153, 0, + 14732, 14739, 1958, 1968, 14007, 14002, 1953, 15157, 15161, 0, + 14468, 14684, 12448, 12453, 12458, 12463, 12949, 12954, 12959, 12964, 12969, 12974, 13199, 13204, 13209, 13214, 13219, 13544, 13549, 12438, 12443, 15165, 15169, 15173, 15177, 0, + 15181, 15185, 0, + 14012, 14018, 14024, 14030, 14036, 14042, 14048, 14054, 14474, 14480, 14486, 14492, 14498, 14504, 13229, 13234, 13239, 13244, 13559, 13554, 12468, 12473, 12478, 12483, 12488, 12493, 12979, 12984, 12989, 12994, 12999, 13004, 13224, 15189, 15193, 15197, 15201, 0, + 12498, 12503, 12508, 12513, 13009, 13014, 13019, 13024, 13029, 13034, 13249, 13564, 13569, 15205, 15209, 15213, 15217, 0, + 14808, 14660, 14060, 14066, 14510, 14516, 14522, 12518, 12523, 13254, 13259, 13707, 13712, 13847, 13852, 15221, 15225, 15229, 15233, 0, + 14072, 14078, 14666, 13264, 13269, 13697, 13702, 13842, 13837, 12528, 12533, 15237, 15241, 15245, 15249, 0, + 12538, 12543, 12548, 13274, 13279, 13717, 13722, 13857, 13862, 15253, 15257, 15261, 15265, 0, + 15269, 15273, 0, + 12868, 15277, 15281, 0, + 14760, 12873, 15285, 15289, 0, + 15293, 15297, 0, + 14084, 14090, 14096, 14102, 14108, 14114, 14120, 14126, 14528, 14708, 13677, 13682, 13772, 13817, 13822, 13912, 13947, 13962, 13967, 13972, 12553, 12558, 12563, 12568, 13284, 13289, 13294, 13299, 13574, 13579, 15301, 15305, 15309, 15313, 0, + 14150, 14156, 14162, 14168, 14174, 14180, 14186, 14540, 13767, 13827, 13832, 13887, 13892, 13897, 13902, 13907, 13927, 13932, 13937, 13942, 13952, 13977, 13982, 13987, 13584, 13589, 13687, 13692, 13747, 13752, 13757, 13762, 15317, 15321, 15325, 15329, 0, + 14787, 14753, 14781, 14138, 14132, 14144, 14534, 14702, 14720, 12573, 12578, 13304, 13309, 13314, 13727, 13732, 13777, 13872, 13917, 13867, 15333, 15337, 15341, 15345, 0, + 14192, 14198, 14204, 14546, 13319, 13324, 13329, 13334, 13737, 13742, 13782, 13877, 13882, 13922, 12583, 12588, 12593, 12598, 15349, 15353, 15357, 15361, 0, + 14210, 14216, 14222, 14228, 13647, 13652, 13787, 13792, 13992, 13957, 12603, 12608, 13339, 15365, 15369, 15373, 15377, 0, + 12613, 13344, 13997, 15381, 15385, 15389, 15393, 0, + 14767, 14696, 14234, 14240, 14246, 14252, 14612, 12618, 12623, 13349, 13354, 13657, 13662, 13797, 13802, 15397, 15401, 15405, 15409, 0, + 14258, 14264, 14270, 13359, 13364, 13667, 13672, 13812, 13807, 12628, 12633, 15413, 15417, 15421, 15425, 0, + 13629, 13635, 13641, 15040, 15060, 15070, 15080, 15090, 15100, 0, + 14276, 14282, 14678, 12653, 12658, 12663, 13039, 13044, 13369, 13374, 13379, 13384, 12638, 12643, 12648, 15429, 15433, 15437, 15441, 0, + 14600, 14726, 14294, 14288, 14588, 12668, 12673, 12678, 12683, 13049, 13054, 13389, 13394, 15445, 15449, 15453, 15457, 0, + 14618, 14642, 14690, 12703, 12708, 12713, 12718, 12723, 13059, 13064, 13069, 13074, 13079, 13399, 13404, 13409, 13414, 13419, 13594, 13599, 12688, 12693, 12698, 15461, 15465, 15469, 15473, 0, + 14648, 14300, 14306, 14312, 14318, 14324, 14330, 14336, 14342, 14348, 14552, 14558, 14606, 14636, 12728, 12733, 12738, 12743, 12748, 12753, 13084, 13089, 13094, 13424, 13429, 13434, 13439, 13444, 13604, 15573, 15578, 15583, 15588, 15593, 15598, 15603, 15608, 15477, 15481, 15485, 15489, 0, + 14746, 14354, 14360, 14366, 14372, 14378, 14384, 14390, 14396, 14582, 14630, 14672, 12758, 12763, 12768, 12773, 12778, 12783, 13099, 13104, 13449, 13454, 13459, 13464, 15493, 15497, 15501, 15505, 0, + 14414, 14420, 14426, 14432, 14438, 14444, 14450, 14594, 14624, 14654, 14714, 13134, 13469, 13474, 13479, 13484, 13489, 13609, 13614, 12788, 12793, 12798, 12803, 12808, 12813, 13109, 13114, 13119, 13124, 13129, 15509, 15513, 15517, 15521, 0, + 14402, 14408, 12823, 12828, 12833, 13494, 13504, 13499, 12818, 15525, 15529, 15533, 15537, 0, + 14774, 1963, 15541, 15545, 0, + 12878, 13139, 12299, 12303, 15549, 15553, 0, + 14456, 14462, 14564, 14570, 14576, 12858, 12863, 13144, 13149, 13154, 13159, 13164, 13169, 13509, 13514, 13519, 13524, 13529, 13619, 13624, 1973, 12838, 12843, 12848, 12853, 15557, 15561, 15565, 15569, 0, + 11823, 11827, 0, + 12255, 0, + 11911, 11915, 11919, 11923, 0, + 11879, 11883, 11887, 11891, 0, + 11831, 11835, 11839, 11843, 0, + 11847, 11851, 11855, 11859, 0, + 11895, 11899, 11903, 11907, 0, + 11863, 11867, 11871, 11875, 0, + 11975, 11979, 11983, 11987, 0, + 11959, 11963, 11967, 11971, 0, + 11991, 11995, 11999, 12003, 0, + 12007, 12011, 12015, 12019, 0, + 12047, 12051, 0, + 12031, 12035, 0, + 12023, 12027, 0, + 12039, 12043, 0, + 12063, 12067, 0, + 12055, 12059, 0, + 11927, 11931, 11935, 11939, 0, + 11943, 11947, 11951, 11955, 0, + 12071, 12075, 12079, 12083, 0, + 12215, 12219, 12223, 12227, 0, + 12087, 12091, 12095, 12099, 0, + 12119, 12123, 12127, 12131, 0, + 12103, 12107, 12111, 12115, 0, + 12135, 12139, 0, + 12143, 12147, 12151, 12155, 0, + 12183, 12187, 12191, 12195, 0, + 12159, 12163, 0, + 2003, 12167, 12171, 12175, 12179, 0, + 12267, 12271, 0, + 12239, 12243, 0, + 12231, 12235, 0, + 12247, 12251, 0, + 12275, 12279, 0, + 12259, 12263, 0, + 12397, 12401, 12405, 12409, 0, + 12283, 12287, 12291, 12295, 0, + 2008, 12199, 12203, 0, + 12207, 12211, 0, + 1998, 0, + 2028, 0, + 2033, 0, + 2038, 0, + 2043, 0, + 2048, 0, + 2053, 0, + 2013, 0, + 2058, 0, + 2063, 0, + 2018, 0, + 2023, 0, + 2078, 0, + 2083, 0, + 2088, 0, + 2068, 2073, 0, + 2103, 0, + 2108, 0, + 2113, 0, + 2118, 0, + 2093, 0, + 2098, 0, + 2138, 0, + 2143, 0, + 2123, 2128, 2133, 0, + 2148, 0, + 2153, 2163, 0, + 2158, 0, + 2168, 0, + 2173, 0, + 2178, 2183, 2188, 0, + 2193, 0, + 2198, 2208, 0, + 2203, 0, + 2213, 2218, 2228, 0, + 2223, 0, + 2282, 0, + 2257, 0, + 2262, 0, + 2267, 0, + 2272, 0, + 2277, 0, + 2287, 2292, 2317, 0, + 2347, 0, + 2322, 0, + 2327, 0, + 2332, 0, + 2337, 0, + 2342, 0, + 2297, 0, + 2307, 0, + 2352, 0, + 2637, 0, + 2642, 0, + 2817, 0, + 2822, 0, + 2877, 0, + 2882, 0, + 3197, 3247, 0, + 3202, 3252, 0, + 3327, 0, + 3332, 0, + 3417, 0, + 3422, 0, + 3597, 3607, 3617, 4150, 0, + 3602, 3612, 3622, 4155, 0, + 4160, 0, + 4165, 0, + 4170, 0, + 4175, 0, + 4180, 0, + 4185, 0, + 3637, 3647, 3657, 4190, 0, + 3642, 3652, 3662, 4195, 0, + 4200, 0, + 4205, 0, + 4210, 0, + 4215, 0, + 4220, 0, + 4225, 0, + 3677, 3687, 0, + 3682, 3692, 0, + 3707, 3717, 0, + 3712, 3722, 0, + 3737, 3747, 3757, 4230, 0, + 3742, 3752, 3762, 4235, 0, + 4240, 0, + 4245, 0, + 4250, 0, + 4255, 0, + 4260, 0, + 4265, 0, + 3777, 3787, 3797, 4270, 0, + 3782, 3792, 3802, 4275, 0, + 4280, 0, + 4285, 0, + 4290, 0, + 4295, 0, + 4300, 0, + 4305, 0, + 3817, 3827, 3837, 0, + 3822, 3832, 3842, 0, + 3857, 3867, 3877, 0, + 3862, 3872, 3882, 0, + 3897, 3907, 0, + 3902, 3912, 0, + 3927, 3937, 0, + 3932, 3942, 0, + 3957, 3967, 3977, 0, + 3962, 3972, 3982, 0, + 3992, 3997, 4002, 0, + 4017, 4027, 4037, 4310, 0, + 4022, 4032, 4042, 4315, 0, + 4320, 0, + 4325, 0, + 4330, 0, + 4335, 0, + 4340, 0, + 4345, 0, + 4057, 4067, 4077, 4350, 0, + 4062, 4072, 4082, 4355, 0, + 4360, 0, + 4365, 0, + 4370, 0, + 4375, 0, + 4380, 0, + 4385, 0, + 4400, 0, + 4473, 0, + 4675, 0, + 4420, 0, + 4521, 4526, 4531, 0, + 4493, 0, + 4695, 0, + 4584, 4589, 4594, 0, + 5391, 0, + 5396, 0, + 5401, 0, + 5406, 0, + 5416, 0, + 5411, 0, + 5421, 0, + 5426, 0, + 5431, 0, + 5436, 0, + 5441, 0, + 5468, 0, + 5473, 0, + 5478, 0, + 5483, 0, + 5498, 0, + 5493, 0, + 5513, 0, + 5518, 0, + 5523, 0, + 5528, 0, + 5533, 0, + 5538, 0, + 5543, 0, + 5548, 0, + 5593, 0, + 5598, 0, + 5553, 0, + 5558, 0, + 5563, 0, + 5568, 0, + 5603, 0, + 5608, 0, + 5573, 0, + 5578, 0, + 5583, 0, + 5588, 0, + 5613, 0, + 5618, 0, + 5623, 0, + 5628, 0, + 7351, 0, + 7226, 0, + 7231, 0, + 7236, 0, + 7241, 0, + 7246, 0, + 7251, 0, + 7256, 0, + 7261, 0, + 7266, 0, + 7271, 0, + 7276, 0, + 7281, 0, + 7286, 0, + 7291, 0, + 7296, 0, + 7301, 7306, 0, + 7311, 7316, 0, + 7321, 7326, 0, + 7331, 7336, 0, + 7341, 7346, 0, + 7366, 0, + 7496, 0, + 7371, 0, + 7376, 0, + 7381, 0, + 7386, 0, + 7391, 0, + 7396, 0, + 7401, 0, + 7406, 0, + 7411, 0, + 7416, 0, + 7421, 0, + 7426, 0, + 7431, 0, + 7436, 0, + 7441, 0, + 7446, 7451, 0, + 7456, 7461, 0, + 7466, 7471, 0, + 7476, 7481, 0, + 7486, 7491, 0, + 7501, 0, + 7506, 0, + 7511, 0, + 7516, 0, + 7521, 0, + 11668, 11673, 0, + +}; + +static const Q_UINT16 li_00[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 18, 20, 0, + 0, 22, 39, 43, 49, 56, 74, 76, + 84, 92, 108, 110, 116, 123, 127, 137, + 154, 0, 157, 166, 174, 182, 202, 205, + 212, 215, 225, 0, 0, 0, 0, 0, + 0, 232, 249, 253, 259, 266, 284, 286, + 294, 303, 318, 321, 327, 334, 338, 348, + 365, 0, 368, 377, 385, 394, 414, 417, + 425, 428, 439, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 446, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 450, 0, 455, 457, 459, 462, + 0, 0, 464, 0, 0, 0, 0, 469, + 0, 0, 0, 0, 471, 476, 480, 0, + 482, 0, 0, 0, 484, 0, 0, 0, + 0, 0, 489, 0, 494, 496, 498, 501, + 0, 0, 503, 0, 0, 0, 0, 508, + 0, 0, 0, 0, 510, 515, 519, 0, + 521, 0, 0, 0, 523, 0, 0, 0, +}; + +static const Q_UINT16 li_01[] = { + 0, 0, 528, 533, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 538, 541, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 544, 547, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 550, 552, 0, 0, 0, 0, + 554, 556, 0, 0, 0, 0, 0, 0, + 558, 560, 562, 564, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 568, 574, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 580, + 586, 0, 0, 0, 0, 0, 0, 592, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 594, 596, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_02[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 598, 600, + 602, 604, 0, 0, 0, 0, 606, 608, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 610, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_03[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 612, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 614, 0, 0, 0, 622, 0, 627, + 0, 633, 0, 0, 0, 0, 0, 641, + 0, 646, 0, 0, 0, 648, 0, 0, + 0, 655, 0, 0, 661, 0, 663, 0, + 0, 665, 0, 0, 0, 674, 0, 679, + 0, 686, 0, 0, 0, 0, 0, 695, + 0, 700, 0, 0, 0, 703, 0, 0, + 0, 712, 719, 723, 0, 0, 727, 0, + 0, 0, 729, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_04[] = { + 0, 0, 0, 0, 0, 0, 732, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 734, 0, 0, 737, 0, 739, 743, 746, + 748, 0, 753, 0, 0, 0, 755, 0, + 0, 0, 0, 757, 0, 0, 0, 762, + 0, 0, 0, 764, 0, 766, 0, 0, + 768, 0, 0, 771, 0, 773, 777, 780, + 782, 0, 787, 0, 0, 0, 789, 0, + 0, 0, 0, 791, 0, 0, 0, 796, + 0, 0, 0, 798, 0, 800, 0, 0, + 0, 0, 0, 0, 0, 0, 802, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 804, 806, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 808, 810, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 812, 814, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_05[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 816, 820, 823, 825, 827, 829, 832, 0, + 834, 836, 839, 841, 844, 0, 846, 0, + 848, 850, 0, 852, 854, 0, 857, 859, + 861, 863, 867, 0, 0, 0, 0, 0, + 0, 0, 869, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_06[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 871, 873, 876, 879, 882, 885, 926, + 936, 962, 965, 1003, 1021, 1041, 1057, 1071, + 1074, 1078, 1083, 1086, 1121, 1158, 1183, 1206, + 1224, 1232, 1252, 0, 0, 0, 0, 0, + 1268, 1278, 1298, 1316, 1344, 1386, 1415, 1450, + 1464, 1469, 1476, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1506, 0, 0, 0, 0, 0, 1509, + 0, 1511, 1516, 1521, 0, 0, 1526, 1531, + 1536, 0, 0, 1541, 1546, 0, 1551, 1556, + 1561, 0, 0, 0, 1564, 1567, 1570, 0, + 0, 1573, 0, 0, 0, 0, 0, 0, + 1576, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1579, 0, 1584, 0, + 0, 1589, 0, 0, 0, 1594, 0, 1599, + 0, 1604, 0, 1609, 0, 0, 0, 0, + 0, 0, 1614, 1617, 0, 0, 1622, 0, + 1627, 1630, 0, 0, 0, 1636, 1639, 1642, + 1645, 1648, 0, 1651, 1654, 0, 0, 0, + 1659, 0, 1664, 1668, 0, 1671, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_07[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_09[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1673, 1675, 1677, + 0, 0, 0, 0, 1679, 0, 0, 0, + 0, 1681, 1683, 0, 0, 0, 0, 0, + 1685, 0, 0, 1687, 0, 0, 0, 1689, + 1691, 0, 0, 1693, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1695, 1697, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1699, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1701, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_0A[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1704, 1706, + 0, 0, 0, 0, 1708, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1710, 0, 0, 0, 0, + 0, 0, 1712, 0, 0, 0, 0, 0, + 1714, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_0B[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1716, 1718, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1720, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1724, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1726, 1729, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_0C[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1731, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1733, + 0, 0, 0, 0, 0, 0, 1735, 0, + 0, 0, 1739, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_0D[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1741, 1744, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1746, 0, 0, 1750, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_0F[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1752, 0, 1754, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1756, 0, 0, 0, + 0, 1758, 0, 0, 0, 0, 1760, 0, + 0, 0, 0, 1762, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1764, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1768, 0, 1770, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1772, 0, 0, 0, + 0, 1774, 0, 0, 0, 0, 1776, 0, + 0, 0, 0, 1778, 0, 0, 0, 0, + 0, 0, 1780, 1782, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_10[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1784, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_1E[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1786, 1788, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1790, 1792, 0, 0, 0, 0, + 0, 0, 1794, 1796, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1798, 1801, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1804, 1806, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1808, 1810, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_1F[] = { + 1812, 1817, 1822, 1824, 1826, 1828, 1830, 1832, + 1834, 1839, 1844, 1846, 1848, 1850, 1852, 1854, + 1856, 1859, 0, 0, 0, 0, 0, 0, + 1862, 1865, 0, 0, 0, 0, 0, 0, + 1868, 1873, 1878, 1880, 1882, 1884, 1886, 1888, + 1890, 1895, 1900, 1902, 1904, 1906, 1908, 1910, + 1912, 1916, 0, 0, 0, 0, 0, 0, + 1920, 1924, 0, 0, 0, 0, 0, 0, + 1928, 1931, 0, 0, 0, 0, 0, 0, + 1934, 1937, 0, 0, 0, 0, 0, 0, + 1940, 1944, 0, 0, 0, 0, 0, 0, + 0, 1948, 0, 0, 0, 0, 0, 0, + 1952, 1957, 1962, 1964, 1966, 1968, 1970, 1972, + 1974, 1979, 1984, 1986, 1988, 1990, 1992, 1994, + 1996, 0, 0, 0, 1998, 0, 0, 0, + 0, 0, 0, 0, 2000, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2002, 0, + 0, 0, 0, 0, 0, 0, 0, 2004, + 0, 0, 0, 0, 0, 0, 2008, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2010, 0, + 0, 0, 0, 0, 0, 0, 2012, 0, +}; + +static const Q_UINT16 li_21[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 2016, 0, 2018, 0, 2020, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 2022, 0, 2024, 0, 2026, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_22[] = { + 0, 0, 0, 2028, 0, 0, 0, 0, + 2030, 0, 0, 2032, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2034, 0, 2036, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2038, 0, 0, 0, + 0, 0, 0, 2040, 0, 2042, 0, 0, + 2044, 0, 0, 0, 0, 2046, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2048, 0, 0, 2050, 2052, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2054, 2056, 0, 0, 2058, 2060, + 0, 0, 2062, 2064, 2066, 2068, 0, 0, + 0, 0, 2070, 2072, 0, 0, 2074, 2076, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2078, 2080, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2082, 0, 0, 0, 0, 0, + 2084, 2086, 0, 2088, 0, 0, 0, 0, + 0, 0, 2090, 2092, 2094, 2096, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 li_30[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2098, 0, + 0, 0, 0, 2100, 0, 2102, 0, 2104, + 0, 2106, 0, 2108, 0, 2110, 0, 2112, + 0, 2114, 0, 2116, 0, 2118, 0, 2120, + 0, 2122, 0, 0, 2124, 0, 2126, 0, + 2128, 0, 0, 0, 0, 0, 0, 2130, + 0, 0, 2133, 0, 0, 2136, 0, 0, + 2139, 0, 0, 2142, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2145, 0, 0, + 0, 0, 0, 0, 0, 0, 2147, 0, + 0, 0, 0, 2149, 0, 2151, 0, 2153, + 0, 2155, 0, 2157, 0, 2159, 0, 2161, + 0, 2163, 0, 2165, 0, 2167, 0, 2169, + 0, 2171, 0, 0, 2173, 0, 2175, 0, + 2177, 0, 0, 0, 0, 0, 0, 2179, + 0, 0, 2182, 0, 0, 2185, 0, 0, + 2188, 0, 0, 2191, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2194, + 2196, 2198, 2200, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2202, 0, 0, +}; + +static const Q_UINT16 li_FB[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2204, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 * const ligature_info[256] = { + li_00, li_01, li_02, li_03, li_04, li_05, li_06, li_07, + li_07, li_09, li_0A, li_0B, li_0C, li_0D, li_07, li_0F, + li_10, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_1E, li_1F, + li_07, li_21, li_22, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_30, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07, + li_07, li_07, li_07, li_FB, li_07, li_07, li_07, li_07, +}; +// 16188 bytes + +static const Q_UINT8 dir_00[] = { + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 8, 7, 8, 9, 7, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 7, 7, 7, 8, + 9, 10, 10, 4, 4, 4, 10, 10, + 138, 138, 10, 4, 6, 4, 6, 3, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 6, 10, 138, 10, 138, 10, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 138, 10, 138, 10, 10, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 138, 10, 138, 10, 18, + 18, 18, 18, 18, 18, 7, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 6, 10, 4, 4, 4, 4, 10, 10, + 10, 10, 0, 138, 10, 10, 10, 10, + 4, 4, 2, 2, 10, 0, 10, 10, + 10, 2, 0, 138, 10, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_01[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_02[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 10, 10, 0, 0, 0, 0, 0, + 0, 0, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 0, 0, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 0, 0, 0, 0, 0, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_03[] = { + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 17, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 10, 0, + 0, 0, 0, 0, 10, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_04[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 17, 17, 17, 17, 0, + 17, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_05[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 0, 0, 0, 0, 0, + 0, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 0, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 0, 17, 17, 17, 1, 17, + 1, 17, 17, 1, 17, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_06[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 13, + 0, 13, 77, 77, 77, 77, 45, 77, + 45, 77, 45, 45, 45, 45, 45, 77, + 77, 77, 77, 45, 45, 45, 45, 45, + 45, 45, 45, 0, 0, 0, 0, 0, + 109, 45, 45, 45, 45, 45, 45, 45, + 77, 77, 45, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 4, 5, 5, 13, 0, 0, + 17, 13, 77, 77, 13, 77, 77, 77, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 77, 45, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 45, 77, 45, 77, + 45, 45, 77, 77, 13, 13, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 13, 13, 17, + 17, 10, 17, 17, 17, 17, 0, 0, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 45, 45, 45, 13, 13, 0, +}; + +static const Q_UINT8 dir_07[] = { + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 0, 18, + 77, 17, 45, 45, 45, 77, 77, 77, + 77, 77, 45, 45, 45, 45, 77, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 77, 45, 77, 45, 77, 0, 0, 0, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_09[] = { + 0, 17, 17, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, + 0, 17, 17, 17, 17, 17, 17, 17, + 17, 0, 0, 0, 0, 17, 0, 0, + 0, 17, 17, 17, 17, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 17, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, + 0, 17, 17, 17, 17, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 17, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_0A[] = { + 0, 0, 17, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, + 0, 17, 17, 0, 0, 0, 0, 17, + 17, 0, 0, 17, 17, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 17, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, + 0, 17, 17, 17, 17, 17, 0, 17, + 17, 0, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_0B[] = { + 0, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 17, + 0, 17, 17, 17, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_0C[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 17, 17, + 17, 0, 0, 0, 0, 0, 17, 17, + 17, 0, 17, 17, 17, 17, 0, 0, + 0, 0, 0, 0, 0, 17, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, + 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 0, 0, 17, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_0D[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 17, 17, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 0, 0, + 0, 0, 17, 17, 17, 0, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_0E[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 0, 0, 17, 17, 17, 17, + 17, 17, 17, 0, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 17, + 17, 17, 17, 17, 17, 17, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 0, 0, 17, 17, 17, 17, + 17, 17, 0, 17, 17, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 17, 17, 17, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_0F[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 17, + 0, 17, 10, 10, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 0, + 17, 17, 17, 17, 17, 0, 17, 17, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 17, 17, 17, 17, 17, 17, + 0, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_10[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 17, 17, + 17, 0, 17, 0, 0, 0, 17, 17, + 0, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_16[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 10, 10, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_17[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, + 17, 17, 17, 17, 17, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 17, 0, + 0, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 0, 0, 0, 0, + 0, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_18[] = { + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 18, 18, 18, 18, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_1F[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 10, 0, 10, + 10, 10, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 10, 10, 0, +}; + +static const Q_UINT8 dir_20[] = { + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 18, 18, 18, 0, 1, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 9, 7, 11, 14, 16, 12, 15, 9, + 4, 4, 4, 4, 4, 10, 10, 10, + 10, 138, 138, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 138, 138, 0, + 10, 10, 10, 10, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 18, 18, 18, 18, 18, 18, + 2, 0, 0, 0, 2, 2, 2, 2, + 2, 2, 4, 4, 10, 138, 138, 0, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 4, 4, 10, 138, 138, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_21[] = { + 10, 10, 0, 10, 10, 10, 10, 0, + 10, 10, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 0, 10, 10, + 10, 0, 0, 0, 0, 0, 10, 10, + 10, 10, 10, 10, 0, 10, 0, 10, + 0, 10, 0, 0, 0, 0, 4, 0, + 0, 0, 10, 0, 0, 0, 0, 0, + 0, 0, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_22[] = { + 10, 138, 138, 138, 138, 10, 10, 10, + 138, 138, 138, 138, 138, 138, 10, 10, + 10, 138, 4, 4, 10, 138, 138, 10, + 10, 10, 138, 138, 138, 138, 10, 138, + 138, 138, 138, 10, 138, 10, 138, 10, + 10, 10, 10, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 10, 10, 10, 10, + 10, 138, 10, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 10, 10, 10, + 10, 10, 138, 138, 138, 138, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 138, + 138, 10, 138, 10, 138, 138, 138, 138, + 138, 138, 138, 138, 10, 10, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 10, 10, 138, + 138, 138, 138, 10, 10, 10, 10, 10, + 138, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 138, 138, 10, 10, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, + 138, 10, 10, 10, 10, 10, 138, 138, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 138, 138, 138, 138, 138, 10, 10, + 138, 138, 10, 10, 10, 10, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 10, 10, + 138, 138, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_23[] = { + 10, 10, 10, 10, 10, 10, 10, 10, + 138, 138, 138, 138, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 138, 138, 10, 10, 10, 10, 10, 10, + 10, 138, 138, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 10, 0, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 0, 10, 10, + 10, 10, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_24[] = { + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_25[] = { + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_26[] = { + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 0, 0, 0, 0, + 0, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_27[] = { + 0, 10, 10, 10, 10, 0, 10, 10, + 10, 10, 0, 0, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 0, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 0, 10, 0, 10, + 10, 10, 10, 0, 0, 0, 10, 0, + 10, 10, 10, 10, 10, 10, 10, 0, + 0, 10, 10, 10, 10, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 0, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_28[] = { + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, +}; + +static const Q_UINT8 dir_2E[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 0, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_2F[] = { + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_30[] = { + 9, 10, 10, 10, 10, 0, 0, 0, + 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 10, 10, 138, 138, 138, 138, + 138, 138, 138, 138, 10, 10, 10, 10, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 17, 17, 17, 17, 17, + 10, 0, 0, 0, 0, 0, 10, 10, + 0, 0, 0, 0, 0, 0, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 17, 10, 10, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 10, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_A4[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 0, 0, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 0, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 0, 10, 10, 10, 0, 10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_FB[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 17, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 0, 1, 0, + 1, 1, 0, 1, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, +}; + +static const Q_UINT8 dir_FC[] = { + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, +}; + +static const Q_UINT8 dir_FD[] = { + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 0, 0, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 0, 0, 0, 0, +}; + +static const Q_UINT8 dir_FE[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 17, 17, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 0, 0, 0, + 0, 10, 10, 10, 10, 10, 10, 10, + 6, 10, 6, 0, 10, 6, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 4, + 10, 10, 4, 4, 10, 10, 10, 0, + 10, 4, 4, 10, 0, 0, 0, 0, + 13, 13, 13, 0, 13, 0, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 0, 0, 18, +}; + +static const Q_UINT8 dir_FF[] = { + 0, 10, 10, 4, 4, 4, 10, 10, + 10, 10, 10, 4, 6, 4, 6, 3, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 6, 10, 10, 10, 10, 10, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 10, 10, 10, 10, 10, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 10, 10, 10, 10, 0, + 0, 10, 10, 10, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 10, 10, 10, 4, 4, 0, + 10, 10, 10, 10, 10, 10, 10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 18, 18, 18, 10, 10, 0, 0, +}; + +static const Q_UINT8 * const direction_info[256] = { + dir_00, dir_01, dir_02, dir_03, dir_04, dir_05, dir_06, dir_07, + dir_01, dir_09, dir_0A, dir_0B, dir_0C, dir_0D, dir_0E, dir_0F, + dir_10, dir_01, dir_01, dir_01, dir_01, dir_01, dir_16, dir_17, + dir_18, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_1F, + dir_20, dir_21, dir_22, dir_23, dir_24, dir_25, dir_26, dir_27, + dir_28, dir_01, dir_01, dir_01, dir_01, dir_01, dir_2E, dir_2F, + dir_30, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_A4, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, + dir_01, dir_01, dir_01, dir_FB, dir_FC, dir_FD, dir_FE, dir_FF, +}; +// 26940 bytes + +#endif + +// END OF GENERATED DATA + +// This is generated too. Script? + +#ifndef QT_NO_UNICODETABLES + +static const Q_UINT16 case_0 [] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7a, 0, 0, 0, 0, 0, + 0, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5a, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x0, 0, 0, + 0, 0, 0x0, 0, 0, 0, 0, 0, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x0, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0x178, +}; + +static const Q_UINT16 case_1 [] = { + 0x101, 0x100, 0x103, 0x102, 0x105, 0x104, 0x107, 0x106, + 0x109, 0x108, 0x10b, 0x10a, 0x10d, 0x10c, 0x10f, 0x10e, + 0x111, 0x110, 0x113, 0x112, 0x115, 0x114, 0x117, 0x116, + 0x119, 0x118, 0x11b, 0x11a, 0x11d, 0x11c, 0x11f, 0x11e, + 0x121, 0x120, 0x123, 0x122, 0x125, 0x124, 0x127, 0x126, + 0x129, 0x128, 0x12b, 0x12a, 0x12d, 0x12c, 0x12f, 0x12e, + 0x69, 0x49, 0x133, 0x132, 0x135, 0x134, 0x137, 0x136, + 0x0, 0x13a, 0x139, 0x13c, 0x13b, 0x13e, 0x13d, 0x140, + 0x13f, 0x142, 0x141, 0x144, 0x143, 0x146, 0x145, 0x148, + 0x147, 0x0, 0x14b, 0x14a, 0x14d, 0x14c, 0x14f, 0x14e, + 0x151, 0x150, 0x153, 0x152, 0x155, 0x154, 0x157, 0x156, + 0x159, 0x158, 0x15b, 0x15a, 0x15d, 0x15c, 0x15f, 0x15e, + 0x161, 0x160, 0x163, 0x162, 0x165, 0x164, 0x167, 0x166, + 0x169, 0x168, 0x16b, 0x16a, 0x16d, 0x16c, 0x16f, 0x16e, + 0x171, 0x170, 0x173, 0x172, 0x175, 0x174, 0x177, 0x176, + 0xff, 0x17a, 0x179, 0x17c, 0x17b, 0x17e, 0x17d, 0x53, + 0x0, 0x253, 0x183, 0x182, 0x185, 0x184, 0x254, 0x188, + 0x187, 0x256, 0x257, 0x18c, 0x18b, 0x0, 0x1dd, 0x259, + 0x25b, 0x192, 0x191, 0x260, 0x263, 0x3d9, 0x269, 0x268, + 0x199, 0x198, 0x51, 0x0, 0x26f, 0x272, 0x0, 0x275, + 0x1a1, 0x1a0, 0x1a3, 0x1a2, 0x1a5, 0x1a4, 0x280, 0x1a8, + 0x1a7, 0x283, 0, 0x0, 0x1ad, 0x1ac, 0x288, 0x1b0, + 0x1af, 0x28a, 0x28b, 0x1b4, 0x1b3, 0x1b6, 0x1b5, 0x292, + 0x1b9, 0x1b8, 0x0, 0, 0x1bd, 0x1bc, 0, 0, + 0, 0, 0, 0, 0x1c6, 0, 0x1c4, 0x1c9, + 0, 0x1c7, 0x1cc, 0, 0x1ca, 0x1ce, 0x1cd, 0x1d0, + 0x1cf, 0x1d2, 0x1d1, 0x1d4, 0x1d3, 0x1d6, 0x1d5, 0x1d8, + 0x1d7, 0x1da, 0x1d9, 0x1dc, 0x1db, 0x18e, 0x1df, 0x1de, + 0x1e1, 0x1e0, 0x1e3, 0x1e2, 0x1e5, 0x1e4, 0x1e7, 0x1e6, + 0x1e9, 0x1e8, 0x1eb, 0x1ea, 0x1ed, 0x1ec, 0x1ef, 0x1ee, + 0x0, 0x1f3, 0, 0x1f1, 0x1f5, 0x1f4, 0, 0, + 0, 0, 0x1fb, 0x1fa, 0x1fd, 0x1fc, 0x1ff, 0x1fe, +}; + +static const Q_UINT16 case_2 [] = { + 0x201, 0x200, 0x203, 0x202, 0x205, 0x204, 0x207, 0x206, + 0x209, 0x208, 0x20b, 0x20a, 0x20d, 0x20c, 0x20f, 0x20e, + 0x211, 0x210, 0x213, 0x212, 0x215, 0x214, 0x217, 0x216, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x0, 0x0, 0x0, 0x181, 0x186, 0x0, 0x189, 0x18a, + 0x0, 0x18f, 0x0, 0x190, 0x0, 0x0, 0x0, 0x0, + 0x193, 0x0, 0x0, 0x194, 0x0, 0x0, 0x631, 0x579, + 0x197, 0x196, 0x0, 0x0, 0x0, 0x0, 0x0, 0x19c, + 0x0, 0x0, 0x19d, 0x0, 0x0, 0x19f, 0x0, 0x0, + 0x0, 0x0, 0x7e1, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x1a6, 0x0, 0x0, 0x1a9, 0x0, 0x0, 0x0, 0x0, + 0x1ae, 0x0, 0x1b1, 0x1b2, 0x0, 0xa21, 0x971, 0x0, + 0x0, 0x0, 0x1b7, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 case_3 [] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0x3ac, 0, + 0x3ad, 0x3ae, 0x3af, 0, 0x3cc, 0, 0x3cd, 0x3ce, + 0x0, 0x3b1, 0x3b2, 0x3b3, 0x3b4, 0x3b5, 0x3b6, 0x3b7, + 0x3b8, 0x3b9, 0x3ba, 0x3bb, 0x3bc, 0x3bd, 0x3be, 0x3bf, + 0x3c0, 0x3c1, 0, 0x3c3, 0x3c4, 0x3c5, 0x3c6, 0x3c7, + 0x3c8, 0x3c9, 0x3ca, 0x3cb, 0x386, 0x388, 0x389, 0x38a, + 0x0, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, + 0x398, 0x399, 0x39a, 0x39b, 0x39c, 0x39d, 0x39e, 0x39f, + 0x3a0, 0x3a1, 0x3a3, 0x3a3, 0x3a4, 0x3a5, 0x3a6, 0x3a7, + 0x3a8, 0x3a9, 0x3aa, 0x3ab, 0x38c, 0x38e, 0x38f, 0, + 0x392, 0x398, 0x0, 0x0, 0x0, 0x3a6, 0x3a0, 0, + 0, 0, 0x0, 0, 0x0, 0, 0x0, 0, + 0x0, 0, 0x3e3, 0x3e2, 0x3e5, 0x3e4, 0x3e7, 0x3e6, + 0x3e9, 0x3e8, 0x3eb, 0x3ea, 0x3ed, 0x3ec, 0x3ef, 0x3ee, + 0x39a, 0x3a1, 0x3a3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 case_4 [] = { + 0, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, + 0x458, 0x459, 0x45a, 0x45b, 0x45c, 0, 0x45e, 0x45f, + 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, + 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e, 0x43f, + 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447, + 0x448, 0x449, 0x44a, 0x44b, 0x44c, 0x44d, 0x44e, 0x44f, + 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, + 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e, 0x41f, + 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427, + 0x428, 0x429, 0x42a, 0x42b, 0x42c, 0x42d, 0x42e, 0x42f, + 0, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, + 0x408, 0x409, 0x40a, 0x40b, 0x40c, 0, 0x40e, 0x40f, + 0x461, 0x460, 0x463, 0x462, 0x465, 0x464, 0x467, 0x466, + 0x469, 0x468, 0x46b, 0x46a, 0x46d, 0x46c, 0x46f, 0x46e, + 0x471, 0x470, 0x473, 0x472, 0x475, 0x474, 0x477, 0x476, + 0x479, 0x478, 0x47b, 0x47a, 0x47d, 0x47c, 0x47f, 0x47e, + 0x481, 0x480, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x491, 0x490, 0x493, 0x492, 0x495, 0x494, 0x497, 0x496, + 0x499, 0x498, 0x49b, 0x49a, 0x49d, 0x49c, 0x49f, 0x49e, + 0x4a1, 0x4a0, 0x4a3, 0x4a2, 0x4a5, 0x4a4, 0x4a7, 0x4a6, + 0x4a9, 0x4a8, 0x4ab, 0x4aa, 0x4ad, 0x4ac, 0x4af, 0x4ae, + 0x4b1, 0x4b0, 0x4b3, 0x4b2, 0x4b5, 0x4b4, 0x4b7, 0x4b6, + 0x4b9, 0x4b8, 0x4bb, 0x4ba, 0x4bd, 0x4bc, 0x4bf, 0x4be, + 0, 0x4c2, 0x4c1, 0x4c4, 0x4c3, 0, 0, 0x4c8, + 0x4c7, 0, 0, 0x4cc, 0x4cb, 0, 0, 0, + 0x4d1, 0x4d0, 0x4d3, 0x4d2, 0x4d5, 0x4d4, 0x4d7, 0x4d6, + 0x4d9, 0x4d8, 0x4db, 0x4da, 0x4dd, 0x4dc, 0x4df, 0x4de, + 0x4e1, 0x4e0, 0x4e3, 0x4e2, 0x4e5, 0x4e4, 0x4e7, 0x4e6, + 0x4e9, 0x4e8, 0x4eb, 0x4ea, 0, 0, 0x4ef, 0x4ee, + 0x4f1, 0x4f0, 0x4f3, 0x4f2, 0x4f5, 0x4f4, 0, 0, + 0x4f9, 0x4f8, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 case_5 [] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x561, 0x562, 0x563, 0x564, 0x565, 0x566, 0x567, + 0x568, 0x569, 0x56a, 0x56b, 0x56c, 0x56d, 0x56e, 0x56f, + 0x570, 0x571, 0x572, 0x573, 0x574, 0x575, 0x576, 0x577, + 0x578, 0x579, 0x57a, 0x57b, 0x57c, 0x57d, 0x57e, 0x57f, + 0x580, 0x581, 0x582, 0x583, 0x584, 0x585, 0x586, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x531, 0x532, 0x533, 0x534, 0x535, 0x536, 0x537, + 0x538, 0x539, 0x53a, 0x53b, 0x53c, 0x53d, 0x53e, 0x53f, + 0x540, 0x541, 0x542, 0x543, 0x544, 0x545, 0x546, 0x547, + 0x548, 0x549, 0x54a, 0x54b, 0x54c, 0x54d, 0x54e, 0x54f, + 0x550, 0x551, 0x552, 0x553, 0x554, 0x555, 0x556, 0x0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 case_10 [] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4, 0x10d5, 0x10d6, 0x10d7, + 0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc, 0x10dd, 0x10de, 0x10df, + 0x10e0, 0x10e1, 0x10e2, 0x10e3, 0x10e4, 0x10e5, 0x10e6, 0x10e7, + 0x10e8, 0x10e9, 0x10ea, 0x10eb, 0x10ec, 0x10ed, 0x10ee, 0x10ef, + 0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 case_1e [] = { + 0x1e01, 0x1e00, 0x1e03, 0x1e02, 0x1e05, 0x1e04, 0x1e07, 0x1e06, + 0x1e09, 0x1e08, 0x1e0b, 0x1e0a, 0x1e0d, 0x1e0c, 0x1e0f, 0x1e0e, + 0x1e11, 0x1e10, 0x1e13, 0x1e12, 0x1e15, 0x1e14, 0x1e17, 0x1e16, + 0x1e19, 0x1e18, 0x1e1b, 0x1e1a, 0x1e1d, 0x1e1c, 0x1e1f, 0x1e1e, + 0x1e21, 0x1e20, 0x1e23, 0x1e22, 0x1e25, 0x1e24, 0x1e27, 0x1e26, + 0x1e29, 0x1e28, 0x1e2b, 0x1e2a, 0x1e2d, 0x1e2c, 0x1e2f, 0x1e2e, + 0x1e31, 0x1e30, 0x1e33, 0x1e32, 0x1e35, 0x1e34, 0x1e37, 0x1e36, + 0x1e39, 0x1e38, 0x1e3b, 0x1e3a, 0x1e3d, 0x1e3c, 0x1e3f, 0x1e3e, + 0x1e41, 0x1e40, 0x1e43, 0x1e42, 0x1e45, 0x1e44, 0x1e47, 0x1e46, + 0x1e49, 0x1e48, 0x1e4b, 0x1e4a, 0x1e4d, 0x1e4c, 0x1e4f, 0x1e4e, + 0x1e51, 0x1e50, 0x1e53, 0x1e52, 0x1e55, 0x1e54, 0x1e57, 0x1e56, + 0x1e59, 0x1e58, 0x1e5b, 0x1e5a, 0x1e5d, 0x1e5c, 0x1e5f, 0x1e5e, + 0x1e61, 0x1e60, 0x1e63, 0x1e62, 0x1e65, 0x1e64, 0x1e67, 0x1e66, + 0x1e69, 0x1e68, 0x1e6b, 0x1e6a, 0x1e6d, 0x1e6c, 0x1e6f, 0x1e6e, + 0x1e71, 0x1e70, 0x1e73, 0x1e72, 0x1e75, 0x1e74, 0x1e77, 0x1e76, + 0x1e79, 0x1e78, 0x1e7b, 0x1e7a, 0x1e7d, 0x1e7c, 0x1e7f, 0x1e7e, + 0x1e81, 0x1e80, 0x1e83, 0x1e82, 0x1e85, 0x1e84, 0x1e87, 0x1e86, + 0x1e89, 0x1e88, 0x1e8b, 0x1e8a, 0x1e8d, 0x1e8c, 0x1e8f, 0x1e8e, + 0x1e91, 0x1e90, 0x1e93, 0x1e92, 0x1e95, 0x1e94, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x1e60, 0, 0, 0, 0, + 0x1ea1, 0x1ea0, 0x1ea3, 0x1ea2, 0x1ea5, 0x1ea4, 0x1ea7, 0x1ea6, + 0x1ea9, 0x1ea8, 0x1eab, 0x1eaa, 0x1ead, 0x1eac, 0x1eaf, 0x1eae, + 0x1eb1, 0x1eb0, 0x1eb3, 0x1eb2, 0x1eb5, 0x1eb4, 0x1eb7, 0x1eb6, + 0x1eb9, 0x1eb8, 0x1ebb, 0x1eba, 0x1ebd, 0x1ebc, 0x1ebf, 0x1ebe, + 0x1ec1, 0x1ec0, 0x1ec3, 0x1ec2, 0x1ec5, 0x1ec4, 0x1ec7, 0x1ec6, + 0x1ec9, 0x1ec8, 0x1ecb, 0x1eca, 0x1ecd, 0x1ecc, 0x1ecf, 0x1ece, + 0x1ed1, 0x1ed0, 0x1ed3, 0x1ed2, 0x1ed5, 0x1ed4, 0x1ed7, 0x1ed6, + 0x1ed9, 0x1ed8, 0x1edb, 0x1eda, 0x1edd, 0x1edc, 0x1edf, 0x1ede, + 0x1ee1, 0x1ee0, 0x1ee3, 0x1ee2, 0x1ee5, 0x1ee4, 0x1ee7, 0x1ee6, + 0x1ee9, 0x1ee8, 0x1eeb, 0x1eea, 0x1eed, 0x1eec, 0x1eef, 0x1eee, + 0x1ef1, 0x1ef0, 0x1ef3, 0x1ef2, 0x1ef5, 0x1ef4, 0x1ef7, 0x1ef6, + 0x1ef9, 0x1ef8, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 case_1f [] = { + 0x1f08, 0x1f09, 0x1f0a, 0x1f0b, 0x1f0c, 0x1f0d, 0x1f0e, 0x1f0f, + 0x1f00, 0x1f01, 0x1f02, 0x1f03, 0x1f04, 0x1f05, 0x1f06, 0x1f07, + 0x1f18, 0x1f19, 0x1f1a, 0x1f1b, 0x1f1c, 0x1f1d, 0, 0, + 0x1f10, 0x1f11, 0x1f12, 0x1f13, 0x1f14, 0x1f15, 0, 0, + 0x1f28, 0x1f29, 0x1f2a, 0x1f2b, 0x1f2c, 0x1f2d, 0x1f2e, 0x1f2f, + 0x1f20, 0x1f21, 0x1f22, 0x1f23, 0x1f24, 0x1f25, 0x1f26, 0x1f27, + 0x1f38, 0x1f39, 0x1f3a, 0x1f3b, 0x1f3c, 0x1f3d, 0x1f3e, 0x1f3f, + 0x1f30, 0x1f31, 0x1f32, 0x1f33, 0x1f34, 0x1f35, 0x1f36, 0x1f37, + 0x1f48, 0x1f49, 0x1f4a, 0x1f4b, 0x1f4c, 0x1f4d, 0, 0, + 0x1f40, 0x1f41, 0x1f42, 0x1f43, 0x1f44, 0x1f45, 0, 0, + 0x0, 0x1f59, 0x0, 0x1f5b, 0x0, 0x1f5d, 0x0, 0x1f5f, + 0, 0x1f51, 0, 0x1f53, 0, 0x1f55, 0, 0x1f57, + 0x1f68, 0x1f69, 0x1f6a, 0x1f6b, 0x1f6c, 0x1f6d, 0x1f6e, 0x1f6f, + 0x1f60, 0x1f61, 0x1f62, 0x1f63, 0x1f64, 0x1f65, 0x1f66, 0x1f67, + 0x1fba, 0x1fbb, 0x1fc8, 0x1fc9, 0x1fca, 0x1fcb, 0x1fda, 0x1fdb, + 0x1ff8, 0x1ff9, 0x1fea, 0x1feb, 0x1ffa, 0x1ffb, 0, 0, + 0x1f88, 0x1f89, 0x1f8a, 0x1f8b, 0x1f8c, 0x1f8d, 0x1f8e, 0x1f8f, + 0x1f80, 0x1f81, 0x1f82, 0x1f83, 0x1f84, 0x1f85, 0x1f86, 0x1f87, + 0x1f98, 0x1f99, 0x1f9a, 0x1f9b, 0x1f9c, 0x1f9d, 0x1f9e, 0x1f9f, + 0x1f90, 0x1f91, 0x1f92, 0x1f93, 0x1f94, 0x1f95, 0x1f96, 0x1f97, + 0x1fa8, 0x1fa9, 0x1faa, 0x1fab, 0x1fac, 0x1fad, 0x1fae, 0x1faf, + 0x1fa0, 0x1fa1, 0x1fa2, 0x1fa3, 0x1fa4, 0x1fa5, 0x1fa6, 0x1fa7, + 0x1fb8, 0x1fb9, 0x0, 0x1fbc, 0x0, 0, 0x0, 0x0, + 0x1fb0, 0x1fb1, 0x1f70, 0x1f71, 0x1fb3, 0, 0x399, 0, + 0, 0, 0x0, 0x1fcc, 0x0, 0, 0x0, 0x0, + 0x1f72, 0x1f73, 0x1f74, 0x1f75, 0x1fc3, 0, 0, 0, + 0x1fd8, 0x1fd9, 0x0, 0x0, 0, 0, 0x0, 0x0, + 0x1fd0, 0x1fd1, 0x1f76, 0x1f77, 0, 0, 0, 0, + 0x1fe8, 0x1fe9, 0x0, 0x0, 0x0, 0x1fec, 0x0, 0x0, + 0x1fe0, 0x1fe1, 0x1f7a, 0x1f7b, 0x1fe5, 0, 0, 0, + 0, 0, 0x0, 0x1ffc, 0x0, 0, 0x0, 0x0, + 0x1f78, 0x1f79, 0x1f7c, 0x1f7d, 0x1ff3, 0, 0, 0, +}; + +static const Q_UINT16 case_20 [] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0x0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 case_21 [] = { + 0, 0, 0x0, 0, 0, 0, 0, 0x0, + 0, 0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0, 0x0, 0, 0, + 0x761, 0x0, 0x0, 0x0, 0x0, 0x0, 0, 0, + 0, 0, 0, 0, 0x0, 0, 0x0, 0, + 0x0, 0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0, 0x0, 0x0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 case_fb [] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 case_ff [] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, + 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, + 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, + 0xff58, 0xff59, 0xff5a, 0, 0, 0, 0, 0, + 0, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, + 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, + 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, + 0xff38, 0xff39, 0xff3a, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const Q_UINT16 * const case_info[256] = { + + case_0, case_1, case_2, case_3, case_4, case_5, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + case_10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, case_1e, case_1f, + case_20, case_21, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, case_fb, 0, 0, 0, case_ff, +}; + +static const Q_INT8 num_0 [] = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 2, 3, -1, -1, -1, -1, + -1, 1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, +}; + +static const Q_INT8 num_6 [] = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, -1, -1, -1, -1, -1, -1, +}; + +static const Q_INT8 num_9 [] = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, +}; + +static const Q_INT8 num_b [] = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1, + 2, 3, 4, 5, 6, 7, 8, 9, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, +}; + +static const Q_INT8 num_d [] = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, +}; + +static const Q_INT8 num_e [] = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, +}; + +static const Q_INT8 num_f [] = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, +}; + +static const Q_INT8 num_20 [] = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 0, -1, -1, -1, 4, 5, 6, 7, + 8, 9, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, +}; + +static const Q_INT8 num_ff [] = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, +}; + +static const Q_INT8 * const decimal_info[256] = { + num_0, 0, 0, 0, 0, 0, num_6, 0, + 0, num_9, num_9, num_b, num_9, num_d, num_e, num_f, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + num_20, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, num_ff, +}; + +static const Q_UINT16 symmetricPairs[] = { + 0x0028, 0x0029, 0x0029, 0x0028, 0x003C, 0x003E, 0x003E, 0x003C, + 0x005B, 0x005D, 0x005D, 0x005B, 0x007B, 0x007D, 0x007D, 0x007B, + 0x2045, 0x2046, 0x2046, 0x2045, 0x207D, 0x207E, 0x207E, 0x207D, + 0x208D, 0x208E, 0x208E, 0x208D, 0x3008, 0x3009, 0x3009, 0x3008, + 0x300A, 0x300B, 0x300B, 0x300A, 0x300C, 0x300D, 0x300D, 0x300C, + 0x300E, 0x300F, 0x300F, 0x300E, 0x3010, 0x3011, 0x3011, 0x3010, + 0x3014, 0x3015, 0x3015, 0x3014, 0x3016, 0x3017, 0x3017, 0x3016, + 0x3018, 0x3019, 0x3019, 0x3018, 0x301A, 0x301B, 0x301B, 0x301A, + 0xFD3E, 0xFD3F, 0xFD3F, 0xFD3E, 0xFE59, 0xFE5A, 0xFE5A, 0xFE59, + 0xFE5B, 0xFE5C, 0xFE5C, 0xFE5B, 0xFE5D, 0xFE5E, 0xFE5E, 0xFE5D, + 0xFF08, 0xFF09, 0xFF09, 0xFF08, 0xFF3B, 0xFF3D, 0xFF3D, 0xFF3B, + 0xFF5B, 0xFF5D, 0xFF5D, 0xFF5B, 0xFF62, 0xFF63, 0xFF63, 0xFF62, +}; + +static int symmetricPairsSize = + sizeof(symmetricPairs)/sizeof(symmetricPairs[0]); + +/* + * ---------------------------------------------------------------------- + * End of unicode tables + * ---------------------------------------------------------------------- + */ + +#endif + + +static int ucstrcmp( const QString &as, const QString &bs ) +{ + const QChar *a = as.unicode(); + const QChar *b = bs.unicode(); + if ( a == b ) + return 0; + if ( a == 0 ) + return 1; + if ( b == 0 ) + return -1; + int l=QMIN(as.length(),bs.length()); + while ( l-- && *a == *b ) + a++,b++; + if ( l==-1 ) + return ( as.length()-bs.length() ); + return a->unicode() - b->unicode(); +} + +static int ucstrncmp( const QChar *a, const QChar *b, int l ) +{ + while ( l-- && *a == *b ) + a++,b++; + if ( l==-1 ) + return 0; + return a->unicode() - b->unicode(); +} + +static int ucstrnicmp( const QChar *a, const QChar *b, int l ) +{ + while ( l-- && a->lower() == b->lower() ) + a++,b++; + if ( l==-1 ) + return 0; + QChar al = a->lower(); + QChar bl = b->lower(); + return al.unicode() - bl.unicode(); +} + +// NOT REVISED +/*! \class QCharRef qstring.h + \brief The QCharRef class is a helper class for QString. + + It provides the ability to work on characters in a QString in a natural + fashion. + + When you get an object of type QCharRef, you can assign to it, which + will operate on the string from which you got it. That is its whole + purpose in life. It becomes invalid once further modifications are + made to the string: If you want to keep it, copy it into a QChar. + + Most of the QChar member functions also exist in QCharRef. However, + they are not explicitly documented here. + + \sa QString::operator[]() QString::at() QChar +*/ + +/*! \class QChar qstring.h + +\brief The QChar class provides a light-weight Unicode character. + +Unicode characters are (so far) 16-bit entities without any markup or +structure. This class represents such an entity. It is rather +light-weight, so it can be used everywhere. Most compilers treat it +approximately like "short int". (In a few years, it may be necessary +to make QChar 32-bit, once more than 65536 Unicode code points have +been defined and come into use.) + +QChar provides a full complement of testing/classification functions, +conversion to and from other formats, from composed to decomposed +unicode, and will try to compare and case-convert if you ask it to. + +The classification functions include functions like those in ctype.h, +but operating on the full range of unicode characters. They all +return TRUE if the character is a certain type of character, and FALSE +otherwise. + +These functions are: isNull() (returns TRUE if the character is +U+0000), isPrint() (TRUE if the character is any sort of printable +character, including whitespace), isPunct() (any sort of punctation), +isMark() (Unicode Marks), isLetter (letters), isNumber() (any sort of +numeric characters), isLetterOrNumber(), and isDigit() (decimal digits). +All of these are wrappers around category(), which returns the +unicode-defined category of each character. + +QChar further provides direction(), which indicates the "natural" +writing direction of this character, joining(), which indicates how +this character joins with its neighbors (needed mostly for Arabic) +and finally mirrored(), which indicates whether this character needs +to be mirrored when it is printed in its unnatural writing +direction. + +Composed Unicode characters (like å) can be converted to +decomposed Unicode ("a" followed by "ring above") using +decomposition(). + +In Unicode, comparison is not necessarily possible, and case +conversion is at best very hard. Unicode, covering the "entire" +globe, also includes a globe-sized collection of case and sorting +problems. Qt tries, but not very hard: operator== and friends will do +comparison based purely on the numeric Unicode value (code point) of +the characters, and upper() and lower() will do case changes when the +character has a well-defined upper/lower-case equivalent. There is no +provision for locale-dependent case folding rules or comparison: These +functions are meant to be fast, so they can be used unambiguously in +data structures. + +The conversion functions include unicode() (to a scalar), latin1() (to +scalar, but converts all non-Latin1 characters to 0), row() (gives the +Unicode row), cell() (gives the unicode cell), digitValue() (gives the +integer value of any of the numerous digit characters), and a host of +constructors. + +\sa QString QCharRef \link unicode.html About Unicode \endlink +*/ + +/*! \enum QChar::Category + +This enum maps the Unicode character categories. The currently known +categories are:
      + +
    • \c NoCategory - used when Qt is dazed and confused and cannot +make sense of anything. + +
    • \c Mark_NonSpacing - (Mn) - + +
    • \c Mark_SpacingCombining - (Mc) - + +
    • \c Mark_Enclosing - (Me) - + +
    • \c Number_DecimalDigit - (Nd) - + +
    • \c Number_Letter - (Nl) - + +
    • \c Number_Other - (No) - + +
    • \c Separator_Space - (Zs) - + +
    • \c Separator_Line - (Zl) - + +
    • \c Separator_Paragraph - (Zp) - + +
    • \c Other_Control - (Cc) - + +
    • \c Other_Format - (Cf) - + +
    • \c Other_Surrogate - (Cs) - + +
    • \c Other_PrivateUse - (Co) - + +
    • \c Other_NotAssigned - (Cn) - + +
    • \c Letter_Uppercase - (Lu) - + +
    • \c Letter_Lowercase - (Ll) - + +
    • \c Letter_Titlecase - (Lt) - + +
    • \c Letter_Modifier - (Lm) - + +
    • \c Letter_Other - (Lo) - + +
    • \c Punctuation_Connector - (Pc) - + +
    • \c Punctuation_Dask - (Pd) - + +
    • \c Punctuation_Open - (Ps) - + +
    • \c Punctuation_Close - (Pe) - + +
    • \c Punctuation_InitialQuote - (Pi) - + +
    • \c Punctuation_FinalQuote - (Pf) - + +
    • \c Punctuation_Other - (Po) - + +
    • \c Symbol_Math - (Sm) - + +
    • \c Symbol_Currency - (Sc) - + +
    • \c Symbol_Modifier - (Sk) - + +
    • \c Symbol_Other - (So) - + +
    +*/ + +/*! \enum QChar::Direction + + This enum type defines the Unicode direction attributes. + See the Unicode Standard + for a description of the values. + + In order to conform to C/C++ naming conventions "Dir" is + prepended to the codes used in The Unicode Standard. +*/ + +/*! \enum QChar::Decomposition + + This enum type defines the Unicode decomposition attributes. + See the Unicode Standard + for a description of the values. +*/ + +/*! \enum QChar::Joining + + This enum type defines the Unicode decomposition attributes. + See the Unicode Standard + for a description of the values. +*/ + + + +/*! \fn QChar::QChar() + +Constructs a null QChar (one that isNull()). +*/ + + +/*! \fn QChar::QChar( char c ) + +Constructs a QChar corresponding to ASCII/Latin1 character \a c. +*/ + + +/*! \fn QChar::QChar( uchar c ) + +Constructs a QChar corresponding to ASCII/Latin1 character \a c. +*/ + + +/*! \fn QChar::QChar( uchar c, uchar r ) + +Constructs a QChar for Unicode cell \a c in row \a r. +*/ + + +/*! \fn QChar::QChar( const QChar& c ) + +Constructs a copy of \a c. This is a deep copy, if such a +light-weight object can be said to have deep copies. +*/ + + +/*! \fn QChar::QChar( ushort rc ) + +Constructs a QChar for the character with Unicode code point \a rc. +*/ + + +/*! \fn QChar::QChar( short rc ) + +Constructs a QChar for the character with Unicode code point \a rc. +*/ + + +/*! \fn QChar::QChar( uint rc ) + +Constructs a QChar for the character with Unicode code point \a rc. +*/ + + +/*! \fn QChar::QChar( int rc ) + +Constructs a QChar for the character with Unicode code point \a rc. +*/ + + +/*! \fn bool QChar::networkOrdered () + + Returns TRUE if this character is in network byte order (MSB first), + and FALSE if it is not. This is a platform-dependent property, so + we strongly advise against using this function in portable code. +*/ + + +/*! + \fn bool QChar::isNull() const + Returns TRUE if the characters is the unicode character 0x0000, + ie. ASCII NUL. +*/ + +/*! + \fn uchar QChar::cell () const + Returns the cell (least significant byte) of the Unicode character. +*/ +/*! + \fn uchar QChar::row () const + Returns the row (most significant byte) of the Unicode character. +*/ +/*! + \fn uchar& QChar::cell () + Returns a reference to the cell (least significant byte) of the Unicode character. +*/ +/*! + \fn uchar& QChar::row () + Returns a reference to the row (most significant byte) of the Unicode character. +*/ + +/*! + Returns whether the character is a printable character. This is + any character not of category Cc or Cn. Note that this gives no indication + of whether the character is available in some font. +*/ +bool QChar::isPrint() const +{ + Category c = category(); + return !(c == Other_Control || c == Other_NotAssigned); +} + +/*! + Returns whether the character is a separator + character (Separator_* categories). +*/ +bool QChar::isSpace() const +{ + if( !row() ) + if( cell() >= 9 && cell() <=13 ) return TRUE; + Category c = category(); + return c >= Separator_Space && c <= Separator_Paragraph; +} + +/*! + Returns whether the character is a mark (Mark_* categories). +*/ +bool QChar::isMark() const +{ + Category c = category(); + return c >= Mark_NonSpacing && c <= Mark_Enclosing; +} + +/*! + Returns whether the character is punctuation (Punctuation_* categories). +*/ +bool QChar::isPunct() const +{ + Category c = category(); + return (c >= Punctuation_Connector && c <= Punctuation_Other); +} + +/*! + Returns whether the character is a letter (Letter_* categories). +*/ +bool QChar::isLetter() const +{ + Category c = category(); + return (c >= Letter_Uppercase && c <= Letter_Other); +} + +/*! + Returns whether the character is a number (of any sort - Number_* categories). + + \sa isDigit() +*/ +bool QChar::isNumber() const +{ + Category c = category(); + return c >= Number_DecimalDigit && c <= Number_Other; +} + +/*! + Returns whether the character is a letter or number (Letter_* or Number_* categories). +*/ +bool QChar::isLetterOrNumber() const +{ + Category c = category(); + return (c >= Letter_Uppercase && c <= Letter_Other) + || (c >= Number_DecimalDigit && c <= Number_Other); +} + + +/*! + Returns whether the character is a decimal digit (Number_DecimalDigit). + */ +bool QChar::isDigit() const +{ + return (category() == Number_DecimalDigit); +} + +/*! + Returns the numeric value of the digit, or -1 if the character is not + a digit. +*/ +int QChar::digitValue() const +{ +#ifndef QT_NO_UNICODETABLES + const Q_INT8 *dec_row = decimal_info[row()]; + if( !dec_row ) + return -1; + return decimal_info[row()][cell()]; +#else + // ##### just latin1 + if ( rw != 0 || cl < '0' || cl > '9' ) + return -1; + else + return cl - '0'; +#endif +} + +/*! + Returns the character category. + + \sa Category +*/ +QChar::Category QChar::category() const +{ +#ifndef QT_NO_UNICODETABLES + return (Category)(unicode_info[row()][cell()]); +#else +// ### just ASCII + if ( rw == 0 ) { + return (Category)(ui_00[cell()]); + } + return Letter_Uppercase; //####### +#endif +} + +/*! + Returns the characters directionality. + + \sa Direction +*/ +QChar::Direction QChar::direction() const +{ +#ifndef QT_NO_UNICODETABLES + const Q_UINT8 *rowp = direction_info[row()]; + if(!rowp) return QChar::DirL; + return (Direction) ( *(rowp+cell()) &0x1f ); +#else + return DirL; +#endif +} + +/*! + This function is not supported (it may change to use Unicode + character classes). + + Returns information about the joining properties of the + character (needed for arabic). +*/ +QChar::Joining QChar::joining() const +{ +#ifndef QT_NO_UNICODETABLES + const Q_UINT8 *rowp = direction_info[row()]; + if ( !rowp ) + return QChar::OtherJoining; + return (Joining) ((*(rowp+cell()) >> 5) &0x3); +#else + return OtherJoining; +#endif +} + + +/*! + Returns whether the character is a mirrored character (one that + should be reversed if the text direction is reversed). +*/ +bool QChar::mirrored() const +{ +#ifndef QT_NO_UNICODETABLES + const Q_UINT8 *rowp = direction_info[row()]; + if ( !rowp ) + return FALSE; + return *(rowp+cell())>128; +#else + return FALSE; +#endif +} + +/*! + Returns the mirrored char if this character is a mirrored char, the char + itself otherwise +*/ +QChar QChar::mirroredChar() const +{ +#ifndef QT_NO_UNICODETABLES + if(!mirrored()) return *this; + + int i; + int c = unicode(); + for (i = 0; i < symmetricPairsSize; i += 2) { + if (symmetricPairs[i] == c) + return symmetricPairs[i+1]; + } + return 0; +#else + return *this; +#endif +} + +/*! + Decomposes a character into its parts. Returns QString::null if + no decomposition exists. +*/ +QString QChar::decomposition() const +{ +#ifndef QT_NO_UNICODETABLES + const Q_UINT16 *r = decomposition_info[row()]; + if(!r) return QString::null; + + Q_UINT16 pos = r[cell()]; + if(!pos) return QString::null; + pos+=2; + + QString s; + Q_UINT16 c; + while((c = decomposition_map[pos++]) != 0) s += QChar(c); + + return s; +#else + return null; +#endif +} + +/*! + Returns the tag defining the composition of the character. + Returns QChar::Single if no decomposition exists. +*/ +QChar::Decomposition QChar::decompositionTag() const +{ +#ifndef QT_NO_UNICODETABLES + const Q_UINT16 *r = decomposition_info[row()]; + if(!r) return QChar::Single; + + Q_UINT16 pos = r[cell()]; + if(!pos) return QChar::Single; + + return (QChar::Decomposition) decomposition_map[pos]; +#else + return Single; // ########### FIX eg. just latin1 +#endif +} + +/*! + Returns the lowercase equivalent if the character is uppercase, + or the character itself otherwise. +*/ +QChar QChar::lower() const +{ +#ifndef QT_NO_UNICODETABLES + if(category() != Letter_Uppercase) return *this; + Q_UINT16 lower = *(case_info[row()]+cell()); + if(lower == 0) return *this; + return lower; +#else + if (row()) + return *this; + else + return QChar(tolower(latin1())); +#endif +} + +/*! + Returns the uppercase equivalent if the character is lowercase, + or the character itself otherwise. +*/ +QChar QChar::upper() const +{ +#ifndef QT_NO_UNICODETABLES + if(category() != Letter_Lowercase) return *this; + Q_UINT16 upper = *(case_info[row()]+cell()); + if(upper == 0) return *this; + return upper; +#else + if (row()) + return *this; + else + return QChar(toupper(latin1())); +#endif +} + +/*! + \fn QChar::operator char() const + + Returns the Latin1 character equivalent to the QChar, + or 0. This is mainly useful for non-internationalized software. + + \sa unicode() +*/ + +/*! + \fn ushort QChar::unicode() const + + Returns the numeric Unicode value equal to the QChar. Normally, you + should use QChar objects as they are equivalent, but for some low-level + tasks (eg. indexing into an array of Unicode information), this function + is useful. +*/ + +/***************************************************************************** + Documentation of QChar related functions + *****************************************************************************/ + +/*! + \fn int operator==( QChar c1, QChar c2 ) + \relates QChar + + Returns TRUE if \a c1 and \a c2 are the same Unicode character. +*/ + +/*! + \fn int operator==( char ch, QChar c ) + \relates QChar + + Returns TRUE if \a c is the ASCII/Latin1 character \a ch. +*/ + +/*! + \fn int operator==( QChar c, char ch ) + \relates QChar + + Returns TRUE if \a c is the ASCII/Latin1 character \a ch. +*/ + +/*! + \fn int operator!=( QChar c1, QChar c2 ) + \relates QChar + + Returns TRUE if \a c1 and \a c2 are not the same Unicode character. +*/ + +/*! + \fn int operator!=( char ch, QChar c ) + \relates QChar + + Returns TRUE if \a c is not the ASCII/Latin1 character \a ch. +*/ + +/*! + \fn int operator!=( QChar c, char ch ) + \relates QChar + + Returns TRUE if \a c is not the ASCII/Latin1 character \a ch. +*/ + +/*! + \fn int operator<=( QChar c1, QChar c2 ) + \relates QChar + + Returns TRUE if the numeric Unicode value of \a c1 is less than that + of \a c2, or they are the same Unicode character. +*/ + +/*! + \fn int operator<=( QChar c, char ch ) + \relates QChar + + Returns TRUE if the numeric Unicode value of \a c is less than or + equal to that of the ASCII/Latin1 character \a ch. +*/ + +/*! + \fn int operator<=( char ch, QChar c ) + \relates QChar + + Returns TRUE if the numeric Unicode value of the ASCII/Latin1 + character \a ch is less than or equal to that of \a c. +*/ + +/*! + \fn int operator>=( QChar c1, QChar c2 ) + \relates QChar + + Returns TRUE if the numeric Unicode value of \a c1 is greater than that + of \a c2, or they are the same Unicode character. +*/ + +/*! + \fn int operator>=( QChar c, char ch ) + \relates QChar + + Returns TRUE if the numeric Unicode value of \a c is greater than or + equal to that of the ASCII/Latin1 character \a ch. +*/ + +/*! + \fn int operator>=( char ch, QChar c ) + \relates QChar + + Returns TRUE if the numeric Unicode value of the ASCII/Latin1 + character \a ch is greater than or equal to that of \a c. +*/ + +/*! + \fn int operator<( QChar c1, QChar c2 ) + \relates QChar + + Returns TRUE if the numeric Unicode value of \a c1 is less than that + of \a c2. +*/ + +/*! + \fn int operator<( QChar c, char ch ) + \relates QChar + + Returns TRUE if the numeric Unicode value of \a c is less than that + of the ASCII/Latin1 character \a ch. +*/ + +/*! + \fn int operator<( char ch, QChar c ) + \relates QChar + + Returns TRUE if the numeric Unicode value of the ASCII/Latin1 + character \a ch is less than that of \a c. +*/ + +/*! + \fn int operator>( QChar c1, QChar c2 ) + \relates QChar + + Returns TRUE if the numeric Unicode value of \a c1 is greater than + that of \a c2. +*/ + +/*! + \fn int operator>( QChar c, char ch ) + \relates QChar + + Returns TRUE if the numeric Unicode value of \a c is greater than + that of the ASCII/Latin1 character \a ch. +*/ + +/*! + \fn int operator>( char ch, QChar c ) + \relates QChar + + Returns TRUE if the numeric Unicode value of the ASCII/Latin1 + character \a ch is greater than that of \a c. +*/ + +#ifndef QT_NO_UNICODETABLES + +// small class used internally in QString::Compose() +class QLigature +{ +public: + QLigature( QChar c ); + + Q_UINT16 first() { cur = ligatures; return cur ? *cur : 0; } + Q_UINT16 next() { return cur && *cur ? *(cur++) : 0; } + Q_UINT16 current() { return cur ? *cur : 0; } + + int match(QString & str, unsigned int index); + QChar head(); + QChar::Decomposition tag(); + +private: + Q_UINT16 *ligatures; + Q_UINT16 *cur; +}; + +QLigature::QLigature( QChar c ) +{ + const Q_UINT16 *r = ligature_info[c.row()]; + if( !r ) + ligatures = 0; + else + { + const Q_UINT16 pos = r[c.cell()]; + ligatures = (Q_UINT16 *)&(ligature_map[pos]); + } + cur = ligatures; +} + +QChar QLigature::head() +{ + if(current()) + return QChar(decomposition_map[current()+1]); + + return QChar::null; +} + +QChar::Decomposition QLigature::tag() +{ + if(current()) + return (QChar::Decomposition) decomposition_map[current()]; + + return QChar::Canonical; +} + +int QLigature::match(QString & str, unsigned int index) +{ + unsigned int i=index; + + if(!current()) return 0; + + Q_UINT16 lig = current() + 2; + Q_UINT16 ch; + + while ((i < str.length()) && (ch = decomposition_map[lig])) { + if (str[(int)i] != QChar(ch)) + return 0; + i++; lig++; + } + + if (!decomposition_map[lig]) + { + return i-index; + } + return 0; +} + +#endif + +// this function is just used in QString::compose() +static inline bool format(QChar::Decomposition tag, QString & str, + int index, int len) +{ + unsigned int l = index + len; + unsigned int r = index; + + bool left = FALSE, right = FALSE; + + left = ((l < str.length()) && + ((str[(int)l].joining() == QChar::Dual) || + (str[(int)l].joining() == QChar::Right))); + if (r > 0) { + r--; + //printf("joining(right) = %d\n", str[(int)r].joining()); + right = (str[(int)r].joining() == QChar::Dual); + } + + + switch (tag) { + case QChar::Medial: + return (left & right); + case QChar::Initial: + return (left && !right); + case QChar::Final: + return (right);// && !left); + case QChar::Isolated: + default: + return (!right && !left); + } +} // format() + +/* + QString::compose() and visual() were developed by Gordon Tisher + , with input from Lars Knoll , + who developed the unicode data tables. +*/ +/*! + Note that this function is not supported in Qt 2.0, and is merely + for experimental and illustrative purposes. It is mainly of interest + to those experimenting with Arabic and other composition-rich texts. + + Applies possible ligatures to a QString, useful when composition-rich + text requires rendering with glyph-poor fonts, but also + makes compositions such as QChar(0x0041) ('A') and QChar(0x0308) + (Unicode accent diaresis) giving QChar(0x00c4) (German A Umlaut). +*/ +void QString::compose() +{ +#ifndef QT_NO_UNICODETABLES + unsigned int index=0, len; + unsigned int cindex = 0; + + QChar code, head; + + QArray dia; + + QString composed = *this; + + while (index < length()) { + code = at(index); + //printf("\n\nligature for 0x%x:\n", code.unicode()); + QLigature ligature(code); + ligature.first(); + while(ligature.current()) { + if ((len = ligature.match(*this, index)) != 0) { + head = ligature.head(); + unsigned short code = head.unicode(); + // we exclude Arabic presentation forms A and a few + // other ligatures, which are undefined in most fonts + if(!(code > 0xfb50 && code < 0xfe80) && + !(code > 0xfb00 && code < 0xfb2a)) { + // joining info is only needed for arabic + if (format(ligature.tag(), *this, index, len)) { + //printf("using ligature 0x%x, len=%d\n",code,len); + // replace letter + composed.replace(cindex, len, QChar(head)); + index += len-1; + // we continue searching in case we have a final + // form because medial ones are preferred. + if ( len != 1 || ligature.tag() !=QChar::Final ) + break; + } + } + } + ligature.next(); + } + cindex++; + index++; + } + *this = composed; +#endif +} + +static QChar LRM ((ushort)0x200e); +static QChar RLM ((ushort)0x200f); +static QChar LRE ((ushort)0x202a); +static QChar RLE ((ushort)0x202b); +static QChar RLO ((ushort)0x202e); +static QChar LRO ((ushort)0x202d); +static QChar PDF ((ushort)0x202c); + +#if 0 +static inline bool is_arabic(unsigned short x) { + return (((x >= 0x0600) && (x <= 0x07bf)) || + ((x >= 0xfb50) && (x <= 0xfdff)) || + ((x >= 0xfe70) && (x <= 0xfeff))); +} +#endif + +static inline bool is_neutral(unsigned short dir) { + return ((dir == QChar::DirB) || + (dir == QChar::DirS) || + (dir == QChar::DirWS) || + (dir == QChar::DirON) || + (dir == QChar::DirNSM)); +} + +/*! + This function returns the basic directionality of the string (QChar::DirR for + right to left and QChar::DirL for left to right). Useful to find the right + alignment. + */ +QChar::Direction QString::basicDirection() +{ +#ifndef QT_NO_UNICODETABLES + // find base direction + unsigned int pos = 0; + while ((pos < length()) && + (at(pos) != RLE) && + (at(pos) != LRE) && + (at(pos) != RLO) && + (at(pos) != LRO) && + (at(pos).direction() > 1) && + (at(pos).direction() != QChar::DirAL)) // not R and not L + pos++; + + if ((at(pos).direction() == QChar::DirR) || + (at(pos).direction() == QChar::DirAL) || + (at(pos) == RLE) || + (at(pos) == RLO)) + return QChar::DirR; +#endif + + return QChar::DirL; +} + +#ifndef QT_NO_UNICODETABLES +// reverses part of the QChar array to get visual ordering +// called from QString::visual() +// +static unsigned int reverse( QString &chars, unsigned char *level, + unsigned int a, unsigned int b) +{ + unsigned int c = a; + unsigned char lev = level[c]; + + while ((c < b) && (level[c] >= lev)) { + if (level[c] > lev) + c = reverse(chars, level, c, b); + c++; + } + + if (lev > 0) { + QChar temp; + unsigned int d = a, e = c-1; + while (d < e) { + temp = chars[(int)d]; + chars[(int)d] = chars[(int)e]; + chars[(int)e] = temp; + + d++; e--; + } + } + + return c; +} + +// small class used for the ordering algorithm in QString::visual() +class QBidiState { +public: + unsigned char level; + signed char override; + + QBidiState(unsigned char l, signed char o) : level(l), override(o) {}; +}; + +// matrix for resolving neutral types + +#define NEG1 (QChar::Direction)(-1) + +static QChar::Direction resolv[5][5] = +{ + { NEG1, QChar::DirR, QChar::DirL, QChar::DirEN, QChar::DirAN }, + { QChar::DirR, QChar::DirR, NEG1, QChar::DirR, QChar::DirR }, + { QChar::DirL, NEG1, QChar::DirL, QChar::DirL, NEG1 }, + { QChar::DirEN, QChar::DirR, QChar::DirL, QChar::DirEN, QChar::DirR }, + { QChar::DirAN, QChar::DirR, NEG1, NEG1, QChar::DirAN } +}; + +#endif + +/*! + This function returns the QString ordered visually. Useful for + painting the string or when transforming to a visually ordered + encoding. +*/ +QString QString::visual(int index, int len) +{ +#ifndef QT_NO_UNICODETABLES + // #### This needs much more optimizing - it is called for + // #### every text operation. + + unsigned char *level; + QChar::Direction *dir; + unsigned char base = 0; + + unsigned int l = length(); + + // check bounds + if (len == -1) + len = length()-index; + if ((uint)index > l) + return QString::null; + + // find base direction + unsigned int pos = 0; + while ((pos < length()) && + (at(pos) != RLE) && + (at(pos) != LRE) && + (at(pos) != RLO) && + (at(pos) != LRO) && + (at(pos).direction() > 1) && + (at(pos).direction() != QChar::DirAL) + ) // not R and not L + pos++; + + if ((pos < length()) && + ((at(pos).direction() == QChar::DirR) || + (at(pos).direction() == QChar::DirAL) || + (at(pos) == RLE) || + (at(pos) == RLO))) + base = 1; + + // is there any BiDi char at all? + if ( base == 0 && pos == l ) { + return mid(index, len); + } + + + level = new uchar[l]; + dir = new QChar::Direction[l]; + + // explicit override pass + //unsigned int code_count = 0; + + QStack stack; + stack.setAutoDelete(TRUE); + + unsigned char clevel = base; + signed char override = -1; + + for (pos = 0; pos < l; pos++) { + + if (at(pos) == RLE) { + //code_count++; + stack.push(new QBidiState(clevel, override)); + if (clevel < 254) + clevel += 1 + clevel % 2; + override = -1; + } + else if (at(pos) == LRE) { + //code_count++; + stack.push(new QBidiState(clevel, override)); + if (clevel < 254) + clevel += 2 - clevel % 2; + override = -1; + } + else if (at(pos) == RLO) { + //code_count++; + stack.push(new QBidiState(clevel, override)); + if (clevel < 254) + clevel += 1 + clevel % 2; + override = QChar::DirR; + } + else if (at(pos) == LRO) { + //code_count++; + stack.push(new QBidiState(clevel, override)); + if (clevel < 254) + clevel += 2 - clevel % 2; + override = QChar::DirL; + } + else if (at(pos) == PDF) { + //code_count++; + if (!stack.isEmpty()) { + override = stack.top()->override; + clevel = stack.top()->level; + stack.remove(); + } + } + + // TODO: catch block separators (newlines, paras, etc.) + + level[pos] = clevel; + if (override != -1) + dir[pos] = (QChar::Direction) override; + else + dir[pos] = at(pos).direction(); + } + + // weak type pass + for (pos = 0; pos < l; pos++) { + + int i; + + switch (at(pos).direction()) { + case QChar::DirEN: + i = pos-1; + while ((i >= 0) && + !(at(i).direction() == QChar::DirAN) && + !(at(i).direction() == QChar::DirAL) && + !(at(i).direction() == QChar::DirB)) + i--; + + if ((i >= 0) && + ((at(i).direction() == QChar::DirAN) || + (at(i).direction() == QChar::DirAL))) + dir[pos] = QChar::DirAN; + + break; + case QChar::DirES: + case QChar::DirCS: + if ((pos > 0) && (pos < l-1) && + (dir[pos-1] == dir[pos+1])) + dir[pos] = dir[pos-1]; + else + dir[pos] = QChar::DirON; + + break; + case QChar::DirET: + if (((pos > 0) && (dir[pos-1] == QChar::DirEN)) || + ((pos < l-1) && (dir[pos+1] == QChar::DirEN))) + dir[pos] = QChar::DirEN; + else + dir[pos] = QChar::DirON; + + break; + case QChar::DirAL: + dir[pos] = QChar::DirR; + break; + default: + break; + } + } + + // neutral type pass + for (pos = 0; pos < l; pos++) { + QChar::Direction left,right; // declaring l here shadowed previous l + + if (is_neutral(dir[pos])) { + if (pos > 0) + left = dir[pos-1]; + else + left = (base == 0 ? QChar::DirL : QChar::DirR); + + int i = pos; + + while ((i < (int)l-1) && is_neutral(dir[i+1])) + i++; + + if (i < (int)l-1) + right = dir[i+1]; + else + right = (base == 0 ? QChar::DirL : QChar::DirR); + + for (int j=pos; j <= i; j++) { + int a = 1, b = 1; + while ((a < 5) && (left != resolv[0][a])) + a++; + while ((b < 5) && (right != resolv[0][b])) + b++; + if ((a == 5) || (b == 5)) + dir[j] = (base == 0 ? QChar::DirL : QChar::DirR); + else + dir[j] = resolv[a][b]; + + if (dir[j] == (QChar::Direction)(-1)) + dir[j] = (base == 0 ? QChar::DirL : QChar::DirR); + } + } + } + + // implicit level pass + QChar::Direction prec = (base == 0 ? QChar::DirL : QChar::DirR); + + for (pos = 0; pos < l; pos++) { + if (level[pos] % 2) { + switch (dir[pos]) { + case QChar::DirL: + case QChar::DirAN: + case QChar::DirEN: + level[pos] += 1; + break; + default: + break; + } + } else { + switch (dir[pos]) { + case QChar::DirL: + // do nothing + break; + case QChar::DirR: + level[pos] += 1; + break; + case QChar::DirEN: + if (prec == QChar::DirL) + continue; + // fall through + case QChar::DirAN: + level[pos] += 2; + break; + default: + break; + } + } + + prec = dir[pos]; + } + + // now do the work! + QString ret(*this); + reverse(ret, level, index, index+len); + + delete [] level; + delete [] dir; + + return ret; +#else + return mid(index,len); +#endif +} + + + +// These macros are used for efficient allocation of QChar strings. +// IMPORTANT! If you change these, make sure you also change the +// "delete unicode" statement in ~QStringData() in qstring.h correspondingly! + +#define QT_ALLOC_QCHAR_VEC( N ) (QChar*) new char[ sizeof(QChar)*( N ) ] +#define QT_DELETE_QCHAR_VEC( P ) delete[] ((char*)( P )) + + +/*! + This utility function converts the 8-bit string + \a ba to Unicode, returning the result. + + The caller is responsible for deleting the return value with delete[]. +*/ + +QChar* QString::asciiToUnicode( const QByteArray& ba, uint* len ) +{ + if ( ba.isNull() ) { + *len = 0; + return 0; + } + int l = 0; + while ( l < (int)ba.size() && ba[l] ) + l++; + char* str = ba.data(); + QChar *uc = new QChar[ l ]; // Can't use macro, since function is public + QChar *result = uc; + if ( len ) + *len = l; + while (l--) + *uc++ = *str++; + return result; +} + +static QChar* internalAsciiToUnicode( const QByteArray& ba, uint* len ) +{ + if ( ba.isNull() ) { + *len = 0; + return 0; + } + int l = 0; + while ( l < (int)ba.size() && ba[l] ) + l++; + char* str = ba.data(); + QChar *uc = QT_ALLOC_QCHAR_VEC( l ); + QChar *result = uc; + if ( len ) + *len = l; + while (l--) + *uc++ = *str++; + return result; +} + +/*! + This utility function converts the NUL-terminated 8-bit string + \a str to Unicode, returning the result and setting \a len to + the length of the Unicode string. + + The caller is responsible for deleting the return value with delete[]. +*/ + +QChar* QString::asciiToUnicode( const char *str, uint* len, uint maxlen ) +{ + QChar* result = 0; + uint l = 0; + if ( str ) { + if ( maxlen != (uint)-1 ) { + while ( l < maxlen && str[l] ) + l++; + } else { + // Faster? + l = qstrlen(str); + } + QChar *uc = new QChar[ l ]; // Can't use macro since function is public + result = uc; + uint i = l; + while ( i-- ) + *uc++ = *str++; + } + if ( len ) + *len = l; + return result; +} + +static QChar* internalAsciiToUnicode( const char *str, uint* len, + uint maxlen = (uint)-1 ) +{ + QChar* result = 0; + uint l = 0; + if ( str ) { + if ( maxlen != (uint)-1 ) { + while ( l < maxlen && str[l] ) + l++; + } else { + // Faster? + l = qstrlen(str); + } + QChar *uc = QT_ALLOC_QCHAR_VEC( l ); + result = uc; + uint i = l; + while ( i-- ) + *uc++ = *str++; + } + if ( len ) + *len = l; + return result; +} + +/*! + This utility function converts \a l 16-bit characters from + \a uc to ASCII, returning a NUL-terminated string. + + The caller is responsible for deleting the string with delete[]. +*/ +char* QString::unicodeToAscii(const QChar *uc, uint l) +{ + if (!uc) { + return 0; + } + char *a = new char[l+1]; + char *result = a; + while (l--) + *a++ = *uc++; + *a = '\0'; + return result; +} + +static uint computeNewMax( uint len ) +{ + if (len >= 0x80000000) + return len; + + uint newMax = 4; + while ( newMax < len ) + newMax *= 2; + // try to save some memory + if ( newMax >= 1024 * 1024 && len <= newMax - (newMax >> 2) ) + newMax -= newMax >> 2; + return newMax; +} + +/*! + Returns the QString as a zero terminated array of unsigned shorts + if the string is not null; otherwise returns zero. + + The result remains valid so long as one unmodified + copy of the source string exists. + */ +const unsigned short *QString::ucs2() const +{ + if ( ! d->unicode ) + return 0; + unsigned int len = d->len; + if ( d->maxl < len + 1 ) { + // detach, grow or shrink + uint newMax = computeNewMax( len + 1 ); + QChar* nd = QT_ALLOC_QCHAR_VEC( newMax ); + if ( nd ) { + if ( d->unicode ) + memcpy( nd, d->unicode, sizeof(QChar)*len ); + ((QString *)this)->deref(); + ((QString *)this)->d = new QStringData( nd, len, newMax ); + } + } + d->unicode[len] = 0; + return (unsigned short *) d->unicode; +} + +/*! + Constructs a string that is a deep copy of \a str, interpreted as a + UCS2 encoded, zero terminated, Unicode string. + + If \a str is 0, then a null string is created. + \sa isNull() + */ +QString QString::fromUcs2( const unsigned short *str ) +{ + if ( !str ) { + return QString::null; + } else { + int length = 0; + while ( str[length] != 0 ) + length++; + QChar* uc = QT_ALLOC_QCHAR_VEC( length ); + memcpy( uc, str, length*sizeof(QChar) ); + return QString( new QStringData( uc, length, length ), TRUE ); + } +} + + +/***************************************************************************** + QString member functions + *****************************************************************************/ + +/*! + \class QString qstring.h + + \brief The QString class provides an abstraction of Unicode text and + the classic C null-terminated char array (char*). + + \ingroup tools + \ingroup shared + + QString uses \link shclass.html implicit sharing\endlink, and so it + is very efficient and easy to use. + + In all QString methods that take const char* parameters, + the const char* is interpreted as a classic C-style + 0-terminated ASCII string. It is legal for the const + char* parameter to be 0. The results are undefined if the + const char* string is not 0-terminated. Functions that + copy classic C strings into a QString will not copy the terminating + 0-character. The QChar array of the QString (as returned by + unicode()) is not terminated by a null. + + A QString that has not been assigned to anything is \a null, i.e. both + the length and data pointer is 0. A QString that references the empty + string ("", a single '\0' char) is \a empty. Both null and empty + QStrings are legal parameters to the methods. Assigning const char + * 0 to QString gives a null QString. + + Note that if you find that you are mixing usage of QCString, QString, + and QByteArray, this causes lots of unnecessary copying and might + indicate that the true nature of the data you are dealing with is + uncertain. If the data is NUL-terminated 8-bit data, use QCString; + if it is unterminated (ie. contains NULs) 8-bit data, use QByteArray; + if it is text, use QString. + + \sa QChar \link shclass.html Shared classes\endlink +*/ + +Q_EXPORT QStringData *QString::shared_null = 0; +//QT_STATIC_CONST_IMPL QString QString::null; +QT_STATIC_CONST_IMPL QChar QChar::null; +QT_STATIC_CONST_IMPL QChar QChar::replacement((ushort)0xfffd); +QT_STATIC_CONST_IMPL QChar QChar::byteOrderMark((ushort)0xfeff); +QT_STATIC_CONST_IMPL QChar QChar::byteOrderSwapped((ushort)0xfffe); +QT_STATIC_CONST_IMPL QChar QChar::nbsp((ushort)0x00a0); + +#if defined(_CC_MSVC_) && _MSC_VER <= 1300 +const QString::Null QString::null; +#else +const QString::Null QString::null = { }; +#endif + + +QStringData* QString::makeSharedNull() +{ + return shared_null=new QStringData; +} + +// Uncomment this to get some useful statistics. +// #define Q2HELPER(x) x + +#ifdef Q2HELPER +static int stat_construct_charstar=0; +static int stat_construct_charstar_size=0; +static int stat_construct_null=0; +static int stat_construct_int=0; +static int stat_construct_int_size=0; +static int stat_construct_ba=0; +static int stat_get_ascii=0; +static int stat_get_ascii_size=0; +static int stat_copy_on_write=0; +static int stat_copy_on_write_size=0; +static int stat_fast_copy=0; +Q_EXPORT void qt_qstring_stats() +{ + qDebug("construct_charstar = %d (%d chars)", stat_construct_charstar, stat_construct_charstar_size); + qDebug("construct_null = %d", stat_construct_null); + qDebug("construct_int = %d (%d chars)", stat_construct_int, stat_construct_int_size); + qDebug("construct_ba = %d", stat_construct_ba); + qDebug("get_ascii = %d (%d chars)", stat_get_ascii, stat_get_ascii_size); + qDebug("copy_on_write = %d (%d chars)", stat_copy_on_write, stat_copy_on_write_size); + qDebug("fast_copy = %d", stat_fast_copy); +} +#else +#define Q2HELPER(x) +#endif + +/*! + \fn QString::QString() + + Constructs a null string. + \sa isNull() +*/ + +/*! + Constructs a string containing the one character \a ch. +*/ +QString::QString( QChar ch ) +{ + d = new QStringData( QT_ALLOC_QCHAR_VEC( 1 ), 1, 1 ); + d->unicode[0] = ch; +} + +/*! + Constructs an implicitly-shared copy of \a s. +*/ +QString::QString( const QString &s ) : + d(s.d) +{ + Q2HELPER(stat_fast_copy++) + d->ref(); +} + +/*! + Private function. + + Constructs a string with preallocated space for \a size characters. + + The string is empty. + + \sa isNull() +*/ + +QString::QString( int size, bool /*dummy*/ ) +{ + if ( size ) { + Q2HELPER(stat_construct_int++) + int l = size; + Q2HELPER(stat_construct_int_size+=l) + QChar* uc = QT_ALLOC_QCHAR_VEC( l ); + d = new QStringData( uc, 0, l ); + } else { + Q2HELPER(stat_construct_null++) + d = shared_null ? shared_null : (shared_null=new QStringData); + d->ref(); + } +} + +/*! + Constructs a string that is a deep copy of \a ba interpreted as + a classic C string. +*/ + +QString::QString( const QByteArray& ba ) +{ + Q2HELPER(stat_construct_ba++) + uint l; + QChar *uc = internalAsciiToUnicode(ba,&l); + d = new QStringData(uc,l,l); +} + +QString::QString( const QCString& ba ) +{ + //Q2HELPER(stat_construct_ba++) + //uint l; + //QChar *uc = internalAsciiToUnicode(ba,&l); + //d = new QStringData(uc,l,l); + Q2HELPER(stat_fast_copy++) + QString s = QString::fromUtf8(ba.data(),ba.length()); + d = s.d; + d->ref(); +} + +/*! + Constructs a string that is a deep copy of the + first \a length QChar in the array \a unicode. + + If \a unicode and \a length are 0, a null string is created. + + If only \a unicode is 0, the string is empty, but has + \a length characters of space preallocated - QString expands + automatically anyway, but this may speed some cases up a little. + + \sa isNull() +*/ + +QString::QString( const QChar* unicode, uint length ) +{ + if ( !unicode && !length ) { + d = shared_null ? shared_null : makeSharedNull(); + d->ref(); + } else { + QChar* uc = QT_ALLOC_QCHAR_VEC( length ); + if ( unicode ) + memcpy(uc, unicode, length*sizeof(QChar)); + d = new QStringData(uc,unicode ? length : 0,length); + } +} + +/*! + Constructs a string that is a deep copy of \a str, interpreted as a + classic C string. + + If \a str is 0 a null string is created. + + This is a cast constructor, but it is perfectly safe: converting a Latin1 + const char* to QString preserves all the information. + You can disable this constructor by + defining QT_NO_CAST_ASCII when you compile your applications. + You can also make QString objects by using setLatin1()/fromLatin1(), or + fromLocal8Bit(), fromUtf8(), or whatever encoding is appropriate for + the 8-bit data you have. + + \sa isNull() +*/ + +QString::QString( const char *str ) +{ + //Q2HELPER(stat_construct_charstar++) + //uint l; + //QChar *uc = internalAsciiToUnicode(str,&l); + //Q2HELPER(stat_construct_charstar_size+=l) + //d = new QStringData(uc,l,l); + Q2HELPER(stat_fast_copy++) + QString s = QString::fromUtf8(str); + d = s.d; + d->ref(); +} + + +/*! \fn QString::~QString() + +Destroys the string and frees the "real" string, if this was the last +copy of that string. +*/ + + +/*! + Deallocates any space reserved solely by this QString. +*/ + +void QString::real_detach() +{ + setLength( length() ); +} + +void QString::deref() +{ + if ( d->deref() ) { + if ( d == shared_null ) + shared_null = 0; + delete d; + d = 0; // helps debugging + } +} + +void QStringData::deleteSelf() +{ + delete this; +} + +/*! + \fn QString& QString::operator=( QChar c ) + Sets the string to contain just the single character \a c. +*/ + +/*! + \fn QString& QString::operator=( char c ) + Sets the string to contain just the single character \a c. +*/ + +/*! + Assigns a shallow copy of \a s to this string and returns a + reference to this string. +*/ +QString &QString::operator=( const QString &s ) +{ + Q2HELPER(stat_fast_copy++) + s.d->ref(); + deref(); + d = s.d; + return *this; +} + +/*! + Assigns a deep copy of \a cs, interpreted as a classic C string, to + this string and returns a reference to this string. +*/ +QString &QString::operator=( const QCString& cs ) +{ + return setLatin1(cs); +} + + +/*! + Assigns a deep copy of \a str, interpreted as a classic C string, + to this string and returns a reference to this string. + + If \a str is 0 a null string is created. + + \sa isNull() +*/ +QString &QString::operator=( const char *str ) +{ + return setLatin1(str); +} + + +/*! + \fn bool QString::isNull() const + + Returns TRUE if the string is null. + A null string is also an empty string. + + Example: + \code + QString a; // a.unicode() == 0, a.length() == 0 + QString b = ""; // b.unicode() == "", b.length() == 0 + a.isNull(); // TRUE, because a.unicode() == 0 + a.isEmpty(); // TRUE, because a.length() == 0 + b.isNull(); // FALSE, because b.unicode() != 0 + b.isEmpty(); // TRUE, because b.length() == 0 + \endcode + + \sa isEmpty(), length() +*/ + +/*! + \fn bool QString::isEmpty() const + + Returns TRUE if the string is empty, i.e. if length() == 0. + An empty string is not always a null string. + + See example in isNull(). + + \sa isNull(), length() +*/ + +/*! + \fn uint QString::length() const + + Returns the length of the string. + + Null strings and empty strings have zero length. + + \sa isNull(), isEmpty() +*/ + +/*! + Truncates the string at position \a newLen if newLen is less than the + current length . Otherwise, nothing happens. + + Example: + \code + QString s = "truncate this string"; + s.truncate( 5 ); // s == "trunc" + \endcode + + In Qt 1.x, it was possible to "truncate" a string to a longer + length. This is no longer possible. + +*/ + +void QString::truncate( uint newLen ) +{ + if ( newLen < d->len ) + setLength( newLen ); +} + +/*### Make this public in 3.0 + Ensures that at least \a newLen characters are allocated, and + sets the length to \a newLen. This function always detaches the + string from other references to the same data. Any new space + allocated is \e not defined. + + If \a newLen is 0, this string becomes empty, unless this string is + null, in which case it remains null. + + \sa truncate(), isNull(), isEmpty() +*/ + +void QString::setLength( uint newLen ) +{ + if ( d->count != 1 || newLen > d->maxl || // detach, grow, or + ( newLen*4 < d->maxl && d->maxl > 4 ) ) { // shrink + Q2HELPER(stat_copy_on_write++) + Q2HELPER(stat_copy_on_write_size+=d->len) + uint newMax = 4; + while ( newMax < newLen ) + newMax *= 2; + QChar* nd = QT_ALLOC_QCHAR_VEC( newMax ); + uint len = QMIN( d->len, newLen ); + if ( d->unicode ) + memcpy( nd, d->unicode, sizeof(QChar)*len ); + deref(); + d = new QStringData( nd, newLen, newMax ); + } else { + d->len = newLen; + d->dirtyascii = 1; + } +} + +/*! Returns a string equal to this one, but with the lowest-numbered + occurrence of \c %i (for a positive integer i) replaced by \a a. + + \code + label.setText( tr("Rename %1 to %2?").arg(oldName).arg(newName) ); + \endcode + + \a fieldwidth is the minimum amount of space \a a is padded to. A + positive value produces right-aligned text, while a negative value + produces left aligned text. + + \warning Using arg() for constructing "real" sentences + programmatically is likely to lead to translation problems. + Inserting objects like numbers or file names is fairly safe. + + \warning Relying on spaces to create alignment is prone to lead to + translation problems. + + If there is no \c %i pattern, a warning message (qWarning()) is + printed and the text as appended at the end of the string. This is + error recovery and should not occur in correct code. + + \sa QObject::tr() +*/ +QString QString::arg(const QString& a, int fieldwidth) const +{ + int pos, len; + QString r = *this; + + if ( !findArg( pos, len ) ) { + qWarning( "QString::arg(): Argument missing: %s, %s", + (const char *)this, (const char *)a ); + // Make sure the text at least appears SOMEWHERE + r += ' '; + pos = r.length(); + len = 0; + } + + r.replace( pos, len, a ); + if ( fieldwidth < 0 ) { + QString s; + while ( (uint)-fieldwidth > a.length() ) { + s += ' '; + fieldwidth++; + } + r.insert( pos + a.length(), s ); + } else if ( fieldwidth ) { + QString s; + while ( (uint)fieldwidth > a.length() ) { + s += ' '; + fieldwidth--; + } + r.insert( pos, s ); + } + + return r; +} + + +/*! \overload + + \a a is expressed in to \a base notation, which is decimal by + default and must be in the range 2-36 inclusive. +*/ +QString QString::arg(long a, int fieldwidth, int base) const +{ + return arg( QString::number( a, base ), fieldwidth ); +} + +/*! \overload + + \a a is expressed in to \a base notation, which is decimal by + default and must be in the range 2-36 inclusive. +*/ +QString QString::arg(ulong a, int fieldwidth, int base) const +{ + return arg( QString::number( a, base ), fieldwidth ); +} + +/*! + \overload QString QString::arg(int a, int fieldwidth, int base) const + + \a a is expressed in to \a base notation, which is decimal by + default and must be in the range 2-36 inclusive. + +*/ + +/*! + \overload QString QString::arg(uint a, int fieldwidth, int base) const + + \a a is expressed in to \a base notation, which is decimal by + default and must be in the range 2-36 inclusive. +*/ + +/*! + \overload QString QString::arg(short a, int fieldwidth, int base) const + + \a a is expressed in to \a base notation, which is decimal by + default and must be in the range 2-36 inclusive. +*/ + +/*! + \overload QString QString::arg(ushort a, int fieldwidth, int base) const + + \a a is expressed in to \a base notation, which is decimal by + default and must be in the range 2-36 inclusive. +*/ + + +/*! \overload + + \a a is assumed to be in the Latin1 character set. +*/ +QString QString::arg(char a, int fieldwidth) const +{ + QString c; + c += a; + return arg( c, fieldwidth ); +} + +/*! \overload +*/ +QString QString::arg(QChar a, int fieldwidth) const +{ + QString c; + c += a; + return arg( c, fieldwidth ); +} + +/*! \overload + + \a is formatted according to the \a fmt format specified, which is + 'g' by default and can be any of 'f', 'F', 'e', 'E', 'g' or 'G', all + of which have the same meaning as for sprintf(). \a prec determines + the precision, just as for number() and sprintf(). +*/ +QString QString::arg(double a, int fieldwidth, char fmt, int prec) const +{ + return arg( QString::number( a, fmt, prec ), fieldwidth ); +} + + +/*! + Just 1-digit arguments. +*/ +bool QString::findArg(int& pos, int& len) const +{ + char lowest=0; + for (uint i=0; i= '0' && dig <= '9' ) { + if ( !lowest || dig < lowest ) { + lowest = dig; + pos = i; + len = 2; + } + } + } + } + return lowest != 0; +} + +/*! + Safely builds a formatted string from a format string and an + arbitrary list of arguments. The format string supports all + the escape sequences of printf() in the standard C library. + + The %s escape sequence expects a utf8() encoded string. + The format string \e cformat is expected to be in latin1. If you need a unicode + format string, use QString::arg() instead. For typesafe + string building, with full Unicode support, you can use QTextOStream + like this: + + \code + QString str; + QString s = ...; + int x = ...; + QTextOStream(&str) << s << " : " << x; + \endcode + + For \link QObject::tr() translations,\endlink especially if the + strings contains more than one escape sequence, you should consider + using the arg() function instead. This allows the order of the + replacements to be controlled by the translator, and has Unicode + support. + + \sa arg() +*/ + +QString &QString::sprintf( const char* cformat, ... ) +{ + va_list ap; + va_start( ap, cformat ); + + if ( !cformat || !*cformat ) { + // Qt 1.x compat + *this = QString::fromLatin1( "" ); + return *this; + } + QString format = QString::fromLatin1( cformat ); + + static QRegExp *escape = 0; + if (!escape) + escape = new QRegExp( "%#?0?-? ?\\+?'?[0-9*]*\\.?[0-9*]*h?l?L?q?Z?" ); + + QString result; + uint last = 0; + + int len = 0; + int pos; + while ( 1 ) { + pos = escape->match( cformat, last, &len ); + // Non-escaped text + if ( pos > (int)last ) + result += format.mid(last,pos-last); + if ( pos < 0 ) { + // The rest + if ( last < format.length() ) + result += format.mid(last); + break; + } + last = pos + len + 1; + + // Escape + QString f = format.mid( pos, len ); + uint width, decimals; + int params = 0; + int wpos = f.find('*'); + if ( wpos >= 0 ) { + params++; + width = va_arg( ap, int ); + if ( f.find('*', wpos + 1) >= 0 ) { + decimals = va_arg( ap, int ); + params++; + } else { + decimals = 0; + } + } else { + decimals = width = 0; + } + QString replacement; + if ( format[pos+len] == 's' || + format[pos+len] == 'S' || + format[pos+len] == 'c' ) + { + bool rightjust = ( f.find('-') < 0 ); + // Yes, %-5s really means left adjust in sprintf + + if ( wpos < 0 ) { + QRegExp num( "[0-9]+" ); + QRegExp dot( "\\." ); + int nlen; + int p = num.match( f.data(), 0, &nlen ); + int q = dot.match( f.data(), 0 ); + if ( q < 0 || (p < q && p >= 0) ) + width = f.mid( p, nlen ).toInt(); + if ( q >= 0 ) { + p = num.match( f.data(), q ); + // "decimals" is used to specify string truncation + if ( p >= 0 ) + decimals = f.mid( p, nlen ).toInt(); + } + } + + if ( format[pos+len] == 's' ) { +#ifndef QT_NO_TEXTCODEC + QString s = QString::fromUtf8(va_arg(ap, char*)); +#else + QString s = QString::fromLatin1(va_arg(ap, char*)); +#endif + if ( decimals <= 0 ) + replacement = s; + else + replacement = s.left(decimals); + } else { + int ch = va_arg(ap, int); + replacement = QChar((ushort)ch); + } + if ( replacement.length() < width ) { + replacement = rightjust + ? replacement.rightJustify(width) + : replacement.leftJustify(width); + } + } else if ( format[pos+len] == '%' ) { + replacement = '%'; + } else if ( format[pos+len] == 'n' ) { + int* n = va_arg(ap, int*); + *n = result.length(); + } else { + char in[64], out[330] = ""; + strncpy(in,f.latin1(),63); + char fch = format[pos+len].latin1(); + in[f.length()] = fch; + switch ( fch ) { + case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': { + int value = va_arg(ap, int); + switch (params) { + case 0: ::sprintf( out, in, value ); break; + case 1: ::sprintf( out, in, width, value ); break; + case 2: ::sprintf( out, in, width, decimals, value ); break; + } + } break; + case 'e': case 'E': case 'f': case 'g': case 'G': { + double value = va_arg(ap, double); + switch (params) { + case 0: ::sprintf( out, in, value ); break; + case 1: ::sprintf( out, in, width, value ); break; + case 2: ::sprintf( out, in, width, decimals, value ); break; + } + } break; + case 'p': { + void* value = va_arg(ap, void*); + switch (params) { + case 0: ::sprintf( out, in, value ); break; + case 1: ::sprintf( out, in, width, value ); break; + case 2: ::sprintf( out, in, width, decimals, value ); break; + } + } break; + } + replacement = QString::fromLatin1(out); + } + result += replacement; + } + *this = result; + + va_end( ap ); + return *this; +} + +/*! + Fills the string with \a len characters of value \a c. + + If \a len is negative, the current string length is used. +*/ + +void QString::fill( QChar c, int len ) +{ + if ( len < 0 ) + len = length(); + if ( len == 0 ) { + *this = ""; + } else { + deref(); + QChar * nd = QT_ALLOC_QCHAR_VEC( len ); + d = new QStringData(nd,len,len); + while (len--) *nd++ = c; + } +} + + +/*! + \fn QString QString::copy() const + + \obsolete + + Returns a deep copy of this string. + + Doing this is redundant in Qt 2.x, since QString is implicitly + shared, and so will automatically be deeply copied as necessary. +*/ + +/*! + Finds the first occurrence of the character \a c, starting at + position \a index. If \a index is -1, the search starts at the + last character; if -2, at the next to last character; etc. + + The search is case sensitive if \a cs is TRUE, or case insensitive + if \a cs is FALSE. + + Returns the position of \a c, or -1 if \a c could not be found. +*/ + +int QString::find( QChar c, int index, bool cs ) const +{ + if ( index < 0 ) + index += length(); + if ( (uint)index >= length() ) // index outside string + return -1; + register const QChar *uc; + uc = unicode()+index; + int n = length()-index; + if ( cs ) { + while ( n-- && *uc != c ) + uc++; + } else { + c = c.lower(); + while ( n-- && uc->lower() != c ) + uc++; + } + if ( uint(uc - unicode()) >= length() ) + return -1; + return (int)(uc - unicode()); +} + +/*! + Finds the first occurrence of the string \a str, starting at position + \a index. If \a index is -1, the search starts at the last character; + if -2, at the next to last character; etc. + + The search is case sensitive if \a cs is TRUE, or case insensitive if + \a cs is FALSE. + + Returns the position of \a str, or -1 if \a str could not be found. +*/ + +int QString::find( const QString& str, int index, bool cs ) const +{ + /* + We use some weird hashing for efficiency's sake. Instead of + comparing strings, we compare the hash value of str with that of + a part of this QString. Only if that matches, we call ucstrncmp + or ucstrnicmp. + + The hash value of a string is the sum of the cells of its + QChars. + */ + if ( index < 0 ) + index += length(); + int lstr = str.length(); + int lthis = length() - index; + if ( (uint)lthis > length() ) + return -1; + int delta = lthis - lstr; + if ( delta < 0 ) + return -1; + + const QChar *uthis = unicode() + index; + const QChar *ustr = str.unicode(); + uint hthis = 0; + uint hstr = 0; + int i; + if ( cs ) { + for ( i = 0; i < lstr; i++ ) { + hthis += uthis[i].cell(); + hstr += ustr[i].cell(); + } + i = 0; + while ( TRUE ) { + if ( hthis == hstr && ucstrncmp(uthis + i, ustr, lstr) == 0 ) + return index + i; + if ( i == delta ) + return -1; + hthis += uthis[i + lstr].cell(); + hthis -= uthis[i].cell(); + i++; + } + } else { + for ( i = 0; i < lstr; i++ ) { + hthis += uthis[i].lower().cell(); + hstr += ustr[i].lower().cell(); + } + i = 0; + while ( TRUE ) { + if ( hthis == hstr && ucstrnicmp(uthis + i, ustr, lstr) == 0 ) + return index + i; + if ( i == delta ) + return -1; + hthis += uthis[i + lstr].lower().cell(); + hthis -= uthis[i].lower().cell(); + i++; + } + } +#if defined(Q_SPURIOUS_NON_VOID_WARNING) + return -1; +#endif +} + +/*! + \fn int QString::findRev( const char* str, int index ) const + + Equivalent to findRev(QString(str), index). +*/ + +/*! + \fn int QString::find( const char* str, int index ) const + + Equivalent to find(QString(str), index). +*/ + +/*! + Finds the first occurrence of the character \a c, starting at + position \a index and searching backwards. If \a index is -1, + the search starts at the last character; if -2, at the next to + last character; etc. + + The search is case sensitive if \a cs is TRUE, or case insensitive if \a + cs is FALSE. + + Returns the position of \a c, or -1 if \a c could not be found. +*/ + +int QString::findRev( QChar c, int index, bool cs ) const +{ + QString t( c ); + return findRev( t, index, cs ); +} + +/*! + Finds the first occurrence of the string \a str, starting at + position \a index and searching backwards. If \a index is -1, + the search starts at the last character; -2, at the next to last + character; etc. + + The search is case sensitive if \a cs is TRUE, or case insensitive if \e + cs is FALSE. + + Returns the position of \a str, or -1 if \a str could not be found. +*/ + +int QString::findRev( const QString& str, int index, bool cs ) const +{ + /* + See QString::find() for explanations. + */ + int lthis = length(); + if ( index < 0 ) + index += lthis; + + int lstr = str.length(); + int delta = lthis - lstr; + if ( index < 0 || index > lthis || delta < 0 ) + return -1; + if ( index > delta ) + index = delta; + + const QChar *uthis = unicode(); + const QChar *ustr = str.unicode(); + uint hthis = 0; + uint hstr = 0; + int i; + if ( cs ) { + for ( i = 0; i < lstr; i++ ) { + hthis += uthis[index + i].cell(); + hstr += ustr[i].cell(); + } + i = index; + while ( TRUE ) { + if ( hthis == hstr && ucstrncmp(uthis + i, ustr, lstr) == 0 ) + return i; + if ( i == 0 ) + return -1; + i--; + hthis -= uthis[i + lstr].cell(); + hthis += uthis[i].cell(); + } + } else { + for ( i = 0; i < lstr; i++ ) { + hthis += uthis[index + i].lower().cell(); + hstr += ustr[i].lower().cell(); + } + i = index; + while ( TRUE ) { + if ( hthis == hstr && ucstrnicmp(uthis + i, ustr, lstr) == 0 ) + return i; + if ( i == 0 ) + return -1; + i--; + hthis -= uthis[i + lstr].lower().cell(); + hthis += uthis[i].lower().cell(); + } + } +#if defined(Q_SPURIOUS_NON_VOID_WARNING) + return -1; +#endif +} + + +/*! + Returns the number of times the character \a c occurs in the string. + + The match is case sensitive if \a cs is TRUE, or case insensitive if \a cs + is FALSE. +*/ + +int QString::contains( QChar c, bool cs ) const +{ + int count = 0; + const QChar *uc = unicode(); + if ( !uc ) + return 0; + int n = length(); + if ( cs ) { // case sensitive + while ( n-- ) + if ( *uc++ == c ) + count++; + } else { // case insensitive + c = c.lower(); + while ( n-- ) { + if ( uc->lower() == c ) + count++; + uc++; + } + } + return count; +} + +/*! + \overload +*/ +int QString::contains( const char* str, bool cs ) const +{ + return contains(QString(str),cs); +} + +/*! + \overload int QString::contains (char c, bool cs) const +*/ + +/*! + \overload int QString::find (char c, int index, bool cs) const + +*/ + +/*! + \overload int QString::findRev (char c, int index, bool cs) const + +*/ + +/*! + Returns the number of times \a str occurs in the string. + + The match is case sensitive if \a cs is TRUE, or case insensitive if \e + cs is FALSE. + + This function counts overlapping substrings, for example, "banana" + contains two occurrences of "ana". + + \sa findRev() +*/ + +int QString::contains( const QString &str, bool cs ) const +{ + int count = 0; + const QChar *uc = unicode(); + if ( !uc ) + return 0; + int len = str.length(); + int n = length(); + while ( n-- ) { // counts overlapping strings + // ### Doesn't account for length of this - searches over "end" + if ( cs ) { + if ( ucstrncmp( uc, str.unicode(), len ) == 0 ) + count++; + } else { + if ( ucstrnicmp(uc, str.unicode(), len) == 0 ) + count++; + } + uc++; + } + return count; +} + +/*! + Returns a substring that contains the \a len leftmost characters + of the string. + + The whole string is returned if \a len exceeds the length of the + string. + + + Example: + \code + QString s = "Pineapple"; + QString t = s.left( 4 ); // t == "Pine" + \endcode + + \sa right(), mid(), isEmpty() +*/ + +QString QString::left( uint len ) const +{ + if ( isEmpty() ) { + return QString(); + } else if ( len == 0 ) { // ## just for 1.x compat: + return QString::fromLatin1(""); + } else if ( len > length() ) { + return *this; + } else { + QString s( len, TRUE ); + memcpy( s.d->unicode, d->unicode, len*sizeof(QChar) ); + s.d->len = len; + return s; + } +} + +/*! + Returns a substring that contains the \a len rightmost characters + of the string. + + The whole string is returned if \a len exceeds the length of the + string. + + Example: + \code + QString s = "Pineapple"; + QString t = s.right( 5 ); // t == "apple" + \endcode + + \sa left(), mid(), isEmpty() +*/ + +QString QString::right( uint len ) const +{ + if ( isEmpty() ) { + return QString(); + } else if ( len == 0 ) { // ## just for 1.x compat: + return QString::fromLatin1(""); + } else { + uint l = length(); + if ( len > l ) + len = l; + QString s( len, TRUE ); + memcpy( s.d->unicode, d->unicode+(l-len), len*sizeof(QChar) ); + s.d->len = len; + return s; + } +} + +/*! + Returns a substring that contains the \a len characters of this + string, starting at position \a index. + + Returns a null string if the string is empty or \a index is out + of range. Returns the whole string from \a index if \a index+len exceeds + the length of the string. + + Example: + \code + QString s = "Five pineapples"; + QString t = s.mid( 5, 4 ); // t == "pine" + \endcode + + \sa left(), right() +*/ + +QString QString::mid( uint index, uint len ) const +{ + uint slen = length(); + if ( isEmpty() || index >= slen ) { + return QString(); + } else if ( len == 0 ) { // ## just for 1.x compat: + return QString::fromLatin1(""); + } else { + if ( len > slen-index ) + len = slen - index; + if ( index == 0 && len == length() ) + return *this; + register const QChar *p = unicode()+index; + QString s( len, TRUE ); + memcpy( s.d->unicode, p, len*sizeof(QChar) ); + s.d->len = len; + return s; + } +} + +/*! + Returns a string of length \a width that contains this + string and padded by the \a fill character. + + If the length of the string exceeds \a width and \a truncate is FALSE, + then the returned string is a copy of the string. + If the length of the string exceeds \a width and \a truncate is TRUE, + then the returned string is a left(\a width). + + Example: + \code + QString s("apple"); + QString t = s.leftJustify(8, '.'); // t == "apple..." + \endcode + + \sa rightJustify() +*/ + +QString QString::leftJustify( uint width, QChar fill, bool truncate ) const +{ + QString result; + int len = length(); + int padlen = width - len; + if ( padlen > 0 ) { + result.setLength(len+padlen); + if ( len ) + memcpy( result.d->unicode, unicode(), sizeof(QChar)*len ); + QChar* uc = result.d->unicode + len; + while (padlen--) + *uc++ = fill; + } else { + if ( truncate ) + result = left( width ); + else + result = *this; + } + return result; +} + +/*! + Returns a string of length \a width that contains pad + characters followed by the string. + + If the length of the string exceeds \a width and \a truncate is FALSE, + then the returned string is a copy of the string. + If the length of the string exceeds \a width and \a truncate is TRUE, + then the returned string is a left(\a width). + + Example: + \code + QString s("pie"); + QString t = s.rightJustify(8, '.'); // t == ".....pie" + \endcode + + \sa leftJustify() +*/ + +QString QString::rightJustify( uint width, QChar fill, bool truncate ) const +{ + QString result; + int len = length(); + int padlen = width - len; + if ( padlen > 0 ) { + result.setLength( len+padlen ); + QChar* uc = result.d->unicode; + while (padlen--) + *uc++ = fill; + if ( len ) + memcpy( uc, unicode(), sizeof(QChar)*len ); + } else { + if ( truncate ) + result = left( width ); + else + result = *this; + } + return result; +} + +/*! + Returns a new string that is the string converted to lower case. + + Example: + \code + QString s("TeX"); + QString t = s.lower(); // t == "tex" + \endcode + + \sa upper() +*/ + +QString QString::lower() const +{ + QString s(*this); + int l=length(); + if ( l ) { + s.real_detach(); // could do this only when we find a change + register QChar *p=s.d->unicode; + if ( p ) { + while ( l-- ) { + *p = p->lower(); + p++; + } + } + } + return s; +} + +/*! + Returns a new string that is the string converted to upper case. + + Example: + \code + QString s("TeX"); + QString t = s.upper(); // t == "TEX" + \endcode + + \sa lower() +*/ + +QString QString::upper() const +{ + QString s(*this); + int l=length(); + if ( l ) { + s.real_detach(); // could do this only when we find a change + register QChar *p=s.d->unicode; + if ( p ) { + while ( l-- ) { + *p = p->upper(); + p++; + } + } + } + return s; +} + + +/*! + Returns a new string that has white space removed from the start and the end. + + White space means any character for which QChar::isSpace() returns + TRUE. This includes ASCII characters 9 (TAB), 10 (LF), 11 (VT), 12 + (FF), 13 (CR), and 32 (Space). + + Example: + \code + QString s = " space "; + QString t = s.stripWhiteSpace(); // t == "space" + \endcode + + \sa simplifyWhiteSpace() +*/ + +QString QString::stripWhiteSpace() const +{ + if ( isEmpty() ) // nothing to do + return *this; + if ( !at(0).isSpace() && !at(length()-1).isSpace() ) + return *this; + + register const QChar *s = unicode(); + QString result = fromLatin1(""); + + int start = 0; + int end = length() - 1; + while ( start<=end && s[start].isSpace() ) // skip white space from start + start++; + if ( start > end ) { // only white space + return result; + } + while ( end && s[end].isSpace() ) // skip white space from end + end--; + int l = end - start + 1; + result.setLength( l ); + if ( l ) + memcpy( result.d->unicode, &s[start], sizeof(QChar)*l ); + return result; +} + + +/*! + Returns a new string that has white space removed from the start and the end, + plus any sequence of internal white space replaced with a single space + (ASCII 32). + + White space means any character for which QChar::isSpace() returns + TRUE. This includes ASCII characters 9 (TAB), 10 (LF), 11 (VT), 12 + (FF), 13 (CR), and 32 (Space). + + \code + QString s = " lots\t of\nwhite space "; + QString t = s.simplifyWhiteSpace(); // t == "lots of white space" + \endcode + + \sa stripWhiteSpace() +*/ + +QString QString::simplifyWhiteSpace() const +{ + if ( isEmpty() ) // nothing to do + return *this; + QString result; + result.setLength( length() ); + const QChar *from = unicode(); + const QChar *fromend = from+length(); + int outc=0; + QChar *to = result.d->unicode; + while ( TRUE ) { + while ( from!=fromend && from->isSpace() ) + from++; + while ( from!=fromend && !from->isSpace() ) + to[outc++] = *from++; + if ( from!=fromend ) + to[outc++] = ' '; + else + break; + } + if ( outc > 0 && to[outc-1] == ' ' ) + outc--; + result.truncate( outc ); + return result; +} + + +/*! + Insert \a s into the string before position \a index. + + If \a index is beyond the end of the string, the string is extended with + spaces (ASCII 32) to length \a index and \a s is then appended. + + \code + QString s = "I like fish"; + s.insert( 2, "don't "); // s == "I don't like fish" + s = "x"; + s.insert( 3, "yz" ); // s == "x yz" + \endcode +*/ + +QString &QString::insert( uint index, const QString &s ) +{ + // the sub function takes care of &s == this case. + return insert( index, s.unicode(), s.length() ); +} + +/*! + Insert \a len units of QChar data from \a s into the string before + position \a index. +*/ + +QString &QString::insert( uint index, const QChar* s, uint len ) +{ + if ( len == 0 ) + return *this; + uint olen = length(); + int nlen = olen + len; + + int df = s - d->unicode; // ### pointer subtraction, cast down to int + if ( df >= 0 && (uint)df < d->maxl ) { + // Part of me - take a copy. + QChar *tmp = QT_ALLOC_QCHAR_VEC( len ); + memcpy(tmp,s,len*sizeof(QChar)); + insert(index,tmp,len); + QT_DELETE_QCHAR_VEC( tmp ); + return *this; + } + + if ( index >= olen ) { // insert after end of string + setLength( len+index ); + int n = index-olen; + QChar* uc = d->unicode+olen; + while (n--) + *uc++ = ' '; + memcpy( d->unicode+index, s, sizeof(QChar)*len ); + } else { // normal insert + setLength( nlen ); + memmove( d->unicode+index+len, unicode()+index, + sizeof(QChar)*(olen-index) ); + memcpy( d->unicode+index, s, sizeof(QChar)*len ); + } + return *this; +} + +/*! + Insert \a c into the string at (before) position \a index and returns + a reference to the string. + + If \a index is beyond the end of the string, the string is extended with + spaces (ASCII 32) to length \a index and \a c is then appended. + + Example: + \code + QString s = "Ys"; + s.insert( 1, 'e' ); // s == "Yes" + s.insert( 3, '!'); // s == "Yes!" + \endcode + + \sa remove(), replace() +*/ + +QString &QString::insert( uint index, QChar c ) // insert char +{ + QString s( c ); + return insert( index, s ); +} + +/*! + \overload QString& QString::insert( uint index, char c ) +*/ + +/*! + \fn QString &QString::prepend( const QString &s ) + + Prepend \a s to the string. Equivalent to insert(0,s). + + \sa insert() +*/ + +/*! + \fn QString& QString::prepend( char ch ) + Prepends \a ch to the string and returns a reference to the result. + + \sa insert() + */ + +/*! + \fn QString& QString::prepend( QChar ch ) + Prepends \a ch to the string and returns a reference to the result. + + \sa insert() + */ + + +/*! + Removes \a len characters starting at position \a index from the + string and returns a reference to the string. + + If \a index is too big, nothing happens. If \a index is valid, but + \a len is too large, the rest of the string is removed. + + \code + QString s = "Montreal"; + s.remove( 1, 4 ); + // s == "Meal" + \endcode + + \sa insert(), replace() +*/ + +QString &QString::remove( uint index, uint len ) +{ + uint olen = length(); + if ( index + len >= olen ) { // range problems + if ( index < olen ) { // index ok + setLength( index ); + } + } else if ( len != 0 ) { + real_detach(); + memmove( d->unicode+index, d->unicode+index+len, + sizeof(QChar)*(olen-index-len) ); + setLength( olen-len ); + } + return *this; +} + +/*! + Replaces \a len characters starting at position \a index from the + string with \a s, and returns a reference to the string. + + If \a index is too big, nothing is deleted and \a s is inserted at the + end of the string. If \a index is valid, but \a len is too large, \e + str replaces the rest of the string. + + \code + QString s = "Say yes!"; + s.replace( 4, 3, "NO" ); // s == "Say NO!" + \endcode + + \sa insert(), remove() +*/ + +QString &QString::replace( uint index, uint len, const QString &s ) +{ + return replace( index, len, s.unicode(), s.length() ); +} + + +/*! + Replaces \a len characters starting at position \a index by + \a slen units ot QChar data from \a s, and returns a reference to the string. + + \sa insert(), remove() +*/ + +QString &QString::replace( uint index, uint len, const QChar* s, uint slen ) +{ + if ( len == slen && index + len <= length() ) { + // Optimized common case: replace without size change + real_detach(); + memcpy( d->unicode+index, s, len*sizeof(QChar) ); + } else { + int df = s - d->unicode; // ### pointer subtraction, cast down to int + if ( df >= 0 && (uint)df < d->maxl ) { + // Part of me - take a copy. + QChar *tmp = QT_ALLOC_QCHAR_VEC( slen ); + memcpy(tmp,s,slen*sizeof(QChar)); + replace(index,len,tmp,slen); + QT_DELETE_QCHAR_VEC( tmp ); + return *this; + } + + remove( index, len ); + insert( index, s, slen ); + } + return *this; +} + + + +/*! + Finds the first occurrence of the regular expression \a rx, starting at + position \a index. If \a index is -1, the search starts at the last + character; if -2, at the next to last character; etc. + + Returns the position of the next match, or -1 if \a rx was not found. + + \sa findRev() replace() contains() +*/ + +int QString::find( const QRegExp &rx, int index ) const +{ + if ( index < 0 ) + index += length(); + return rx.match( data(), index ); +} + +/*! + Finds the first occurrence of the regular expression \a rx, starting at + position \a index and searching backwards. If \a index is -1, the + search starts at the last character; if -2, at the next to last + character; etc. + + Returns the position of the next match (backwards), or -1 if \a rx was not + found. + + \sa find() +*/ + +int QString::findRev( const QRegExp &rx, int index ) const +{ + if ( index < 0 ) // neg index ==> start from end + index += length(); + if ( (uint)index > length() ) // bad index + return -1; + while( index >= 0 ) { + if ( rx.match( data(), index ) == index ) + return index; + index--; + } + return -1; +} + +/*! + Counts the number of overlapping occurrences of \a rx in the string. + + Example: + \code + QString s = "banana and panama"; + QRegExp r = QRegExp("a[nm]a", TRUE, FALSE); + s.contains( r ); // 4 matches + \endcode + + \sa find() findRev() +*/ + +int QString::contains( const QRegExp &rx ) const +{ + if ( isEmpty() ) + return rx.match( data() ) < 0 ? 0 : 1; + int count = 0; + int index = -1; + int len = length(); + while ( index < len-1 ) { // count overlapping matches + index = rx.match( data(), index+1 ); + if ( index < 0 ) + break; + count++; + } + return count; +} + + +/*! + Replaces every occurrence of \a rx in the string with \a str. + Returns a reference to the string. + + Examples: + \code + QString s = "banana"; + s.replace( QRegExp("a.*a"), "" ); // becomes "b" + + QString s = "banana"; + s.replace( QRegExp("^[bn]a"), " " ); // becomes " nana" + + QString s = "banana"; + s.replace( QRegExp("^[bn]a"), "" ); // NOTE! becomes "" + \endcode + + \sa find() findRev() +*/ + +QString &QString::replace( const QRegExp &rx, const QString &str ) +{ + if ( isEmpty() ) + return *this; + int index = 0; + int slen = str.length(); + int len; + while ( index < (int)length() ) { + index = rx.match( data(), index, &len, FALSE ); + if ( index >= 0 ) { + replace( index, len, str ); + index += slen; + if ( !len ) + break; // Avoid infinite loop on 0-length matches, e.g. [a-z]* + } + else + break; + } + return *this; +} + +static bool +ok_in_base( QChar c, int base ) +{ + if ( base <= 10 ) + return c.isDigit() && c.digitValue() < base; + else + return c.isDigit() || (c >= 'a' && c < char('a'+base-10)) + || (c >= 'A' && c < char('A'+base-10)); +} + +/*! + Returns the string converted to a long value. + + If \a ok is non-null, \a *ok is set to TRUE if there are no + conceivable errors, and FALSE if the string is not a number at all, or if + it has trailing garbage. +*/ + +long QString::toLong( bool *ok, int base ) const +{ + const QChar *p = unicode(); + long val=0; + int l = length(); + const long max_mult = INT_MAX / base; + bool is_ok = FALSE; + int neg = 0; + if ( !p ) + goto bye; + while ( l && p->isSpace() ) // skip leading space + l--,p++; + if ( l && *p == '-' ) { + l--; + p++; + neg = 1; + } else if ( *p == '+' ) { + l--; + p++; + } + + // NOTE: toULong() code is similar + if ( !l || !ok_in_base(*p,base) ) + goto bye; + while ( l && ok_in_base(*p,base) ) { + l--; + int dv; + if ( p->isDigit() ) { + dv = p->digitValue(); + } else { + if ( *p >= 'a' && *p <= 'z' ) + dv = *p - 'a' + 10; + else + dv = *p - 'A' + 10; + } + if ( val > max_mult || (val == max_mult && dv > (INT_MAX%base)+neg) ) + goto bye; + val = base*val + dv; + p++; + } + if ( neg ) + val = -val; + while ( l && p->isSpace() ) // skip trailing space + l--,p++; + if ( !l ) + is_ok = TRUE; +bye: + if ( ok ) + *ok = is_ok; + return is_ok ? val : 0; +} + +/*! + Returns the string converted to an unsigned long + value. + + If \a ok is non-null, \a *ok is set to TRUE if there are no + conceivable errors, and FALSE if the string is not a number at all, + or if it has trailing garbage. +*/ + +ulong QString::toULong( bool *ok, int base ) const +{ + const QChar *p = unicode(); + ulong val=0; + int l = length(); + const ulong max_mult = 429496729; // UINT_MAX/10, rounded down + bool is_ok = FALSE; + if ( !p ) + goto bye; + while ( l && p->isSpace() ) // skip leading space + l--,p++; + if ( *p == '+' ) + l--,p++; + + // NOTE: toLong() code is similar + if ( !l || !ok_in_base(*p,base) ) + goto bye; + while ( l && ok_in_base(*p,base) ) { + l--; + uint dv; + if ( p->isDigit() ) { + dv = p->digitValue(); + } else { + if ( *p >= 'a' && *p <= 'z' ) + dv = *p - 'a' + 10; + else + dv = *p - 'A' + 10; + } + if ( val > max_mult || (val == max_mult && dv > (UINT_MAX%base)) ) + goto bye; + val = base*val + dv; + p++; + } + + while ( l && p->isSpace() ) // skip trailing space + l--,p++; + if ( !l ) + is_ok = TRUE; +bye: + if ( ok ) + *ok = is_ok; + return is_ok ? val : 0; +} + +/*! + Returns the string converted to a short value. + + If \a ok is non-null, \a *ok is set to TRUE if there are no + conceivable errors, and FALSE if the string is not a number at all, or if + it has trailing garbage. +*/ + +short QString::toShort( bool *ok, int base ) const +{ + long v = toLong( ok, base ); + if ( ok && *ok && (v < -32768 || v > 32767) ) { + *ok = FALSE; + v = 0; + } + return (short)v; +} + +/*! + Returns the string converted to an unsigned short value. + + If \a ok is non-null, \a *ok is set to TRUE if there are no + conceivable errors, and FALSE if the string is not a number at all, or if + it has trailing garbage. +*/ + +ushort QString::toUShort( bool *ok, int base ) const +{ + ulong v = toULong( ok, base ); + if ( ok && *ok && (v > 65535) ) { + *ok = FALSE; + v = 0; + } + return (ushort)v; +} + + +/*! + Returns the string converted to a int value. + + \code + QString str("FF"); + bool ok; + int hex = str.toInt( &ok, 16 ); // will return 255, and ok set to TRUE + int dec = str.toInt( &ok, 10 ); // will return 0, and ok set to FALSE + \endcode + + If \a ok is non-null, \a *ok is set to TRUE if there are no + conceivable errors, and FALSE if the string is not a number at all, + or if it has trailing garbage. +*/ + +int QString::toInt( bool *ok, int base ) const +{ + return (int)toLong( ok, base ); +} + +/*! + Returns the string converted to an unsigned int value. + + If \a ok is non-null, \a *ok is set to TRUE if there are no + conceivable errors, and FALSE if the string is not a number at all, + or if it has trailing garbage. +*/ + +uint QString::toUInt( bool *ok, int base ) const +{ + return (uint)toULong( ok, base ); +} + +/*! + Returns the string converted to a double value. + + If \a ok is non-null, \a *ok is set to TRUE if there are no conceivable + errors, and FALSE if the string is not a number at all, or if it has + trailing garbage. +*/ + +double QString::toDouble( bool *ok ) const +{ + char *end; + + QCString a = latin1(); + // Just latin1() is not sufficient, since U0131 would look like '1'. + for (uint i=0; ilen; i++) + if ( d->unicode[i].row() ) + a[(int)i]='z'; + + double val = strtod( a.data() ? a.data() : "", &end ); + if ( ok ) + *ok = ( a && *a && ( end == 0 || *end == '\0' ) ); + return val; +} + +/*! + Returns the string converted to a float value. + + If \a ok is non-null, \a *ok is set to TRUE if there are no + conceivable errors, and FALSE if the string is not a number at all, + or if it has trailing garbage. +*/ + +float QString::toFloat( bool *ok ) const +{ + return (float)toDouble( ok ); +} + + +/*! + Sets the string to the printed value of \a n and returns a + reference to the string. + + The value is converted to \a base notation (default is decimal). + The base must be a value from 2 to 36. +*/ + +QString &QString::setNum( long n, int base ) +{ +#if defined(CHECK_RANGE) + if ( base < 2 || base > 36 ) { + qWarning( "QString::setNum: Invalid base %d", base ); + base = 10; + } +#endif + char charbuf[65*sizeof(QChar)]; + QChar *buf = (QChar*)charbuf; + QChar *p = &buf[64]; + int len = 0; + bool neg; + if ( n < 0 ) { + neg = TRUE; + if ( n == INT_MIN ) { + // Cannot always negate this special case + QString s1, s2; + s1.setNum(n/base); + s2.setNum((-(n+base))%base); + *this = s1 + s2; + return *this; + } + n = -n; + } else { + neg = FALSE; + } + do { + *--p = "0123456789abcdefghijklmnopqrstuvwxyz"[((int)(n%base))]; + n /= base; + len++; + } while ( n ); + if ( neg ) { + *--p = '-'; + len++; + } + return setUnicode( p, len ); +} + +/*! + Sets the string to the printed unsigned value of \a n and + returns a reference to the string. + + The value is converted to \a base notation (default is decimal). + The base must be a value from 2 to 36. +*/ + +QString &QString::setNum( ulong n, int base ) +{ +#if defined(CHECK_RANGE) + if ( base < 2 || base > 36 ) { + qWarning( "QString::setNum: Invalid base %d", base ); + base = 10; + } +#endif + char charbuf[65*sizeof(QChar)]; + QChar *buf = (QChar*)charbuf; + QChar *p = &buf[64]; + int len = 0; + do { + *--p = "0123456789abcdefghijklmnopqrstuvwxyz"[((int)(n%base))]; + n /= base; + len++; + } while ( n ); + return setUnicode(p,len); +} + +/*! + \fn QString &QString::setNum( int n, int base ) + Sets the string to the printed value of \a n and returns a reference + to the string. +*/ + +/*! + \fn QString &QString::setNum( uint n, int base ) + Sets the string to the printed unsigned value of \a n and returns a + reference to the string. +*/ + +/*! + \fn QString &QString::setNum( short n, int base ) + Sets the string to the printed value of \a n and returns a reference + to the string. +*/ + +/*! + \fn QString &QString::setNum( ushort n, int base ) + Sets the string to the printed unsigned value of \a n and returns a + reference to the string. +*/ + +/*! Sets the string to the printed value of \a n, formatted in the \a f + format with \a prec precision, and returns a reference to the + string. + + \a f can be 'f', 'F', 'e', 'E', 'g' or 'G', all of which have the + same meaning as for sprintf(). +*/ + +QString &QString::setNum( double n, char f, int prec ) +{ +#if defined(CHECK_RANGE) + if ( !(f=='f' || f=='F' || f=='e' || f=='E' || f=='g' || f=='G') ) { + qWarning( "QString::setNum: Invalid format char '%c'", f ); + f = 'f'; + } +#endif + char format[20]; + char buf[120]; // enough for 99 precision? + char *fs = format; // generate format string + *fs++ = '%'; // "%.l" + if ( prec >= 0 ) { + if ( prec > 99 ) // buf big enough for precision? + prec = 99; + *fs++ = '.'; + if ( prec >= 10 ) { + *fs++ = prec / 10 + '0'; + *fs++ = prec % 10 + '0'; + } else { + *fs++ = prec + '0'; + } + } + *fs++ = 'l'; + *fs++ = f; + *fs = '\0'; + ::sprintf( buf, format, n ); + return setLatin1(buf); +} + +/*! + \overload QString &QString::setNum( float n, char f, int prec ) +*/ + + +/*! + A convenience factory function that returns a string representation + of the number \a n. + + \sa setNum() + */ +QString QString::number( long n, int base ) +{ + QString s; + s.setNum( n, base ); + return s; +} + +/*! + A convenience factory function that returns a string representation + of the number \a n. + + \sa setNum() + */ +QString QString::number( ulong n, int base ) +{ + QString s; + s.setNum( n, base ); + return s; +} + +/*! + A convenience factory function that returns a string representation + of the number \a n. + + \sa setNum() + */ +QString QString::number( int n, int base ) +{ + QString s; + s.setNum( n, base ); + return s; +} + +/*! + A convenience factory function that returns a string representation + of the number \a n. + + \sa setNum() + */ +QString QString::number( uint n, int base ) +{ + QString s; + s.setNum( n, base ); + return s; +} + +/*! + This static function returns the printed value of \a n, formatted in the + \a f format with \a prec precision. + + \a f can be 'f', 'F', 'e', 'E', 'g' or 'G', all of which have the + same meaning as for sprintf(). + + \sa setNum() + */ +QString QString::number( double n, char f, int prec ) +{ + QString s; + s.setNum( n, f, prec ); + return s; +} + + +/*! \obsolete + + Sets the character at position \a index to \a c and expands the + string if necessary, filling with spaces. + + This method is redundant in Qt 2.x, because operator[] will expand + the string as necessary. +*/ + +void QString::setExpand( uint index, QChar c ) +{ + int spaces = index - d->len; + at(index) = c; + while (spaces-->0) + d->unicode[--index]=' '; +} + + +/*! + \fn const char* QString::data() const + + \obsolete + + Returns a pointer to a 0-terminated classic C string. + + In Qt 1.x, this returned a char* allowing direct manipulation of the + string as a sequence of bytes. In Qt 2.x where QString is a Unicode + string, char* conversion constructs a temporary string, and hence + direct character operations are meaningless. +*/ + +/*! + \fn bool QString::operator!() const + Returns TRUE if it is a null string, otherwise FALSE. Thus + you can write: + +\code + QString name = getName(); + if ( !name ) + name = "Rodney"; +\endcode + + Note that if you say: + +\code + QString name = getName(); + if ( name ) + doSomethingWith(name); +\endcode + + Then this will call operator const char*(), which will do what + you want, but rather inefficiently - you may wish to define the macro + QT_NO_ASCII_CAST when writing code which you wish to strictly remain + Unicode-clean. + + When you want the above semantics, use !isNull() + or even !!: + +\code + QString name = getName(); + if ( !!name ) + doSomethingWith(name); +\endcode +*/ + + +/*! + \fn QString& QString::append( const QString& str ) + Appends \a str to the string and returns a reference to the result. + Equivalent to operator+=(). + */ + +/*! + \fn QString& QString::append( char ch ) + Appends \a ch to the string and returns a reference to the result. + Equivalent to operator+=(). + */ + +/*! + \fn QString& QString::append( QChar ch ) + Appends \a ch to the string and returns a reference to the result. + Equivalent to operator+=(). + */ + +/*! + Appends \a str to the string and returns a reference to the string. +*/ +QString& QString::operator+=( const QString &str ) +{ + uint len1 = length(); + uint len2 = str.length(); + if ( len2 ) { + setLength(len1+len2); + memcpy( d->unicode+len1, str.unicode(), sizeof(QChar)*len2 ); + } else if ( isNull() && !str.isNull() ) { // ## just for 1.x compat: + *this = fromLatin1(""); + } + return *this; +} + +/*! + Appends \a c to the string and returns a reference to the string. +*/ + +QString &QString::operator+=( QChar c ) +{ + setLength(length()+1); + d->unicode[length()-1] = c; + return *this; +} + +/*! + Appends \a c to the string and returns a reference to the string. +*/ + +QString &QString::operator+=( char c ) +{ + setLength(length()+1); + d->unicode[length()-1] = c; + return *this; +} + + + +/*! \fn char QChar::latin1() const + + Returns a latin-1 copy of this character, if this character is in + the latin-1 character set. If not, this function returns 0. +*/ + + +/*! + Returns a Latin-1 representation of the string. Note that the returned + value is undefined if the string contains non-Latin-1 characters. If you + want to convert strings into formats other than Unicode, see the + QTextCodec classes. + + This function is mainly useful for boot-strapping legacy code to + use Unicode. + + The result remains valid so long as one unmodified + copy of the source string exists. + + \sa utf8(), local8Bit() +*/ +const char* QString::latin1() const +{ + if ( d->ascii ) { + if ( d->dirtyascii ) + delete [] d->ascii; + else + return d->ascii; + } + Q2HELPER(stat_get_ascii++) + Q2HELPER(stat_get_ascii_size+=d->len) + static QTextCodec* codec = QTextCodec::codecForMib(106); + if (codec) // we use utf8 coding also for latin1 if possible + { + QCString utf8str(codec->fromUnicode(*this)); + d->ascii = new char[utf8str.length()+1]; + if (utf8str.isEmpty()) + { + d->ascii[0]='\0'; // make empty string + } + else // copy string + { + qstrcpy(d->ascii,utf8str.data()); + } + } + else // fall back to latin1 + { + d->ascii = unicodeToAscii( d->unicode, d->len ); + } + QCString utf8str(utf8()); + d->dirtyascii = 0; + return d->ascii; +} + +/*! \obsolete + + This functions simply calls latin1() and returns the result. +*/ +const char* QString::ascii() const +{ + return latin1(); +} + +#ifndef QT_NO_TEXTCODEC +/*! + Returns the string encoded in UTF8 format. + + See QTextCodec for more diverse coding/decoding of Unicode strings. + + \sa QString::fromUtf8(), local8Bit(), latin1() +*/ +QCString QString::utf8() const +{ + static QTextCodec* codec = QTextCodec::codecForMib(106); + return codec + ? codec->fromUnicode(*this) + : QCString(latin1()); +} + +/*! + Returns the unicode string decoded from the + first \a len bytes of \a utf8. If \a len is -1 (the default), the + length of \a utf8 is used. If trailing partial characters are in + \a utf8, they are ignored. + + See QTextCodec for more diverse coding/decoding of Unicode strings. +*/ +QString QString::fromUtf8(const char* utf8, int len) +{ + static QTextCodec* codec = QTextCodec::codecForMib(106); + if ( len < 0 ) len = qstrlen(utf8); + return codec + ? codec->toUnicode(utf8, len) + : QString::fromLatin1(utf8, len); +} +#endif // QT_NO_TEXTCODEC +/*! + Creates a QString from Latin1 text. This is the same as the + QString(const char*) constructor, but you can make that constructor + invisible if you compile with the define QT_NO_CAST_ASCII, in which + case you can explicitly create a QString from Latin-1 text using + this function. +*/ +QString QString::fromLatin1(const char* chars, int len) +{ + uint l; + QChar *uc; + if ( len < 0 ) { + uc = internalAsciiToUnicode(chars,&l); + } else { + uc = internalAsciiToUnicode(chars,&l,len); + } + return QString(new QStringData(uc,l,l), TRUE); +} + +/*! + \fn const QChar* QString::unicode() const + + Returns the Unicode representation of the string. The result + remains valid until the string is modified. +*/ + +/*! + Returns the string encoded in a locale-specific format. On X11, this + is the QTextCodec::codecForLocale(). On Windows, it is a system-defined + encoding. + + See QTextCodec for more diverse coding/decoding of Unicode strings. + + \sa QString::fromLocal8Bit(), latin1(), utf8() +*/ + + +QCString QString::local8Bit() const +{ +#ifdef QT_NO_TEXTCODEC + return latin1(); +#else +#ifdef _WS_X11_ + static QTextCodec* codec = QTextCodec::codecForLocale(); + return codec + ? codec->fromUnicode(*this) + : QCString(latin1()); +#endif +#ifdef _WS_MAC_ + static QTextCodec* codec = QTextCodec::codecForLocale(); + return codec + ? codec->fromUnicode(*this) + : QCString(latin1()); +#endif +#ifdef _WS_WIN_ + return qt_winQString2MB( *this ); +#endif +#ifdef _WS_QWS_ + return utf8(); // ##### if there is ANY 8 bit format supported? +#endif +#endif +} + +/*! + Returns the unicode string decoded from the + first \a len bytes of \a local8Bit. If \a len is -1 (the default), the + length of \a local8Bit is used. If trailing partial characters are in + \a local8Bit, they are ignored. + + \a local8Bit is assumed to be encoded in a locale-specific format. + + See QTextCodec for more diverse coding/decoding of Unicode strings. +*/ +QString QString::fromLocal8Bit(const char* local8Bit, int len) +{ +#ifdef QT_NO_TEXTCODEC + return fromLatin1( local8Bit, len ); +#else + + if ( !local8Bit ) + return QString::null; +#ifdef _WS_X11_ + static QTextCodec* codec = QTextCodec::codecForLocale(); + if ( len < 0 ) len = qstrlen(local8Bit); + return codec + ? codec->toUnicode(local8Bit, len) + : QString::fromLatin1(local8Bit,len); +#endif +#ifdef _WS_MAC_ + static QTextCodec* codec = QTextCodec::codecForLocale(); + if ( len < 0 ) len = qstrlen(local8Bit); + return codec + ? codec->toUnicode(local8Bit, len) + : QString::fromLatin1(local8Bit,len); +#endif +// Should this be OS_WIN32? +#ifdef _WS_WIN_ + if ( len >= 0 ) { + QCString s(local8Bit,len+1); + return qt_winMB2QString(s); + } + return qt_winMB2QString( local8Bit ); +#endif +#ifdef _WS_QWS_ + return fromUtf8(local8Bit,len); +#endif +#endif // QT_NO_TEXTCODEC +} + +/*! + \fn QString::operator const char *() const + + Returns latin1(). Be sure to see the warnings documented there. + Note that for new code which you wish to be strictly Unicode-clean, + you can define the macro QT_NO_ASCII_CAST when compiling your code + to hide this function so that automatic casts are not done. This + has the added advantage that you catch the programming error + described under operator!(). +*/ + +/*! + \fn QChar QString::at( uint ) const + + Returns the character at \a i, or 0 if \a i is beyond the length + of the string. + + Note: If this QString is not const or const&, the non-const at() + will be used instead, which will expand the string if \a i is beyond + the length of the string. +*/ + +/*! + \fn QChar QString::constref(uint i) const + Equivalent to at(i), this returns the QChar at \a i by value. + + \sa ref() +*/ + +/*! + \fn QChar& QString::ref(uint i) + Returns the QChar at \a i by reference. + + \sa constref() +*/ + +/*! + \fn QChar QString::operator[](int) const + + Returns the character at \a i, or QChar::null if \a i is beyond the + length of the string. + + Note: If this QString is not const or const&, the non-const operator[] + will be used instead, which will expand the string if \a i is beyond + the length of the string. +*/ + +/*! + \fn QCharRef QString::operator[](int) + + Returns an object that references the character at \a i. + This reference + can then be assigned to, or otherwise used immediately, but + becomes invalid once further modifications are made to the string. + The QCharRef internal class can be used much like a constant QChar, but + if you assign to it, you change the original string (which enlarges + and detaches itself). You will get compilation errors if you try to + use the result as anything but a QChar. +*/ + +/*! + \fn QCharRef QString::at( uint i ) + Returns a reference to the character at \a i, expanding + the string with QChar::null if necessary. The resulting reference + can then be assigned to, or otherwise used immediately, but + becomes invalid once further modifications are made to the string. +*/ + +/*! + Internal chunk of code to handle the + uncommon cases of at() above. +*/ +void QString::subat( uint i ) +{ + uint olen = d->len; + if ( i >= olen ) { + setLength( i+1 ); // i is index; i+1 is needed length + for ( uint j=olen; j<=i; j++ ) + d->unicode[j] = QChar::null; + } else { + // Just be sure to detach + real_detach(); + } +} + + +/*! + Resizes the string to \a len unicode characters and copies \a unicode + into the string. If \a unicode is null, nothing is copied, but the + string is resized to \a len anyway. If \a len is zero, the string + becomes a \link isNull() null\endlink string. + + \sa setLatin1(), isNull() +*/ + +QString& QString::setUnicode( const QChar *unicode, uint len ) +{ + if ( len == 0 ) { // set to null string + if ( d != shared_null ) { // beware of nullstring being set to nullstring + deref(); + d = shared_null ? shared_null : makeSharedNull(); + d->ref(); + } + } else if ( d->count != 1 || len > d->maxl || + ( len*4 < d->maxl && d->maxl > 4 ) ) { // detach, grown or shrink + Q2HELPER(stat_copy_on_write++) + Q2HELPER(stat_copy_on_write_size+=d->len) + uint newMax = 4; + while ( newMax < len ) + newMax *= 2; + QChar* nd = QT_ALLOC_QCHAR_VEC( newMax ); + if ( unicode ) + memcpy( nd, unicode, sizeof(QChar)*len ); + deref(); + d = new QStringData( nd, len, newMax ); + } else { + d->len = len; + d->dirtyascii = 1; + if ( unicode ) + memcpy( d->unicode, unicode, sizeof(QChar)*len ); + } + return *this; +} + +/*! + Resizes the string to \a len unicode characters and copies + \a unicode_as_ushorts into the string (on some X11 client + platforms this will involve a byte-swapping pass). + + If \a unicode is null, nothing is copied, but the + string is resized to \a len anyway. If \a len is zero, the string + becomes a \link isNull() null\endlink string. + + \sa setLatin1(), isNull() +*/ +QString& QString::setUnicodeCodes( const ushort* unicode_as_ushorts, uint len ) +{ + setUnicode((const QChar*)unicode_as_ushorts, len); + QChar t(0x1234); + if ( unicode_as_ushorts && *((ushort*)&t) == 0x3412 ) { + // Need to byteswap + char* b = (char*)d->unicode; + while ( len-- ) { + char c = b[0]; + b[0] = b[1]; + b[1] = c; + b += sizeof(QChar); + } + } + return *this; +} + + +/*! + Sets this string to \a str, interpreted as a classic Latin 1 C string. + If the \a len argument is negative (default), it is set to strlen(str). + + If \a str is 0 a null string is created. If \a str is "" an empty + string is created. + + \sa isNull(), isEmpty() +*/ + +QString &QString::setLatin1( const char *str, int len ) +{ + if ( str == 0 ) + return setUnicode(0,0); + if ( len < 0 ) + len = qstrlen(str); + if ( len == 0 ) { // won't make a null string + deref(); + uint l; + QChar *uc = internalAsciiToUnicode(str,&l); + d = new QStringData(uc,l,l); + } else { + setUnicode( 0, len ); // resize but not copy + QChar *p = d->unicode; + while ( len-- ) + *p++ = *str++; + } + return *this; +} + + +/*! + \fn int QString::compare (const QString & s1, const QString & s2) + + Compare \a s1 to \a s2 returning an integer less than, equal to, or + greater than zero if s1 is, respectively, lexically less than, equal to, + or greater than s2. +*/ + +/*! + Compares this string to \a s, returning an integer less than, equal to, or + greater than zero if it is, respectively, lexically less than, equal to, + or greater than \a s. +*/ +int QString::compare( const QString& s ) const +{ + return ucstrcmp(*this,s); +} + +bool operator==( const QString &s1, const QString &s2 ) +{ + return (s1.length() == s2.length()) && s1.isNull() == s2.isNull() && + (memcmp((char*)s1.unicode(),(char*)s2.unicode(), + s1.length()*sizeof(QChar)) ==0); +} + +bool operator!=( const QString &s1, const QString &s2 ) +{ return !(s1==s2); } + +bool operator<( const QString &s1, const QString &s2 ) +{ return ucstrcmp(s1,s2) < 0; } + +bool operator<=( const QString &s1, const QString &s2 ) +{ return ucstrcmp(s1,s2) <= 0; } + +bool operator>( const QString &s1, const QString &s2 ) +{ return ucstrcmp(s1,s2) > 0; } + +bool operator>=( const QString &s1, const QString &s2 ) +{ return ucstrcmp(s1,s2) >= 0; } + + +bool operator==( const QString &s1, const char *s2 ) +{ return s1==QString(s2); } + +bool operator==( const char *s1, const QString &s2 ) +{ return QString(s1)==s2; } + +bool operator!=( const QString &s1, const char *s2 ) +{ return !(s1==s2); } + +bool operator!=( const char *s1, const QString &s2 ) +{ return !(s1==s2); } + +bool operator<( const QString &s1, const char *s2 ) +{ return ucstrcmp(s1,s2) < 0; } + +bool operator<( const char *s1, const QString &s2 ) +{ return ucstrcmp(s1,s2) < 0; } + +bool operator<=( const QString &s1, const char *s2 ) +{ return ucstrcmp(s1,s2) <= 0; } + +bool operator<=( const char *s1, const QString &s2 ) +{ return ucstrcmp(s1,s2) <= 0; } + +bool operator>( const QString &s1, const char *s2 ) +{ return ucstrcmp(s1,s2) > 0; } + +bool operator>( const char *s1, const QString &s2 ) +{ return ucstrcmp(s1,s2) > 0; } + +bool operator>=( const QString &s1, const char *s2 ) +{ return ucstrcmp(s1,s2) >= 0; } + +bool operator>=( const char *s1, const QString &s2 ) +{ return ucstrcmp(s1,s2) >= 0; } + + +/***************************************************************************** + Documentation for QString related functions + *****************************************************************************/ + +/*! + \fn bool operator==( const QString &s1, const QString &s2 ) + \relates QString + Returns TRUE if the two strings are equal, or FALSE if they are different. + A null string is different from an empty, non-null string. + + Equivalent to qstrcmp(s1,s2) == 0. +*/ + +/*! + \fn bool operator==( const QString &s1, const char *s2 ) + \relates QString + Returns TRUE if the two strings are equal, or FALSE if they are different. + + Equivalent to qstrcmp(s1,s2) == 0. +*/ + +/*! + \fn bool operator==( const char *s1, const QString &s2 ) + \relates QString + Returns TRUE if the two strings are equal, or FALSE if they are different. + + Equivalent to qstrcmp(s1,s2) == 0. +*/ + +/*! + \fn bool operator!=( const QString &s1, const QString &s2 ) + \relates QString + Returns TRUE if the two strings are different, or FALSE if they are equal. + + Equivalent to qstrcmp(s1,s2) != 0. +*/ + +/*! + \fn bool operator!=( const QString &s1, const char *s2 ) + \relates QString + Returns TRUE if the two strings are different, or FALSE if they are equal. + + Equivalent to qstrcmp(s1,s2) != 0. +*/ + +/*! + \fn bool operator!=( const char *s1, const QString &s2 ) + \relates QString + Returns TRUE if the two strings are different, or FALSE if they are equal. + + Equivalent to qstrcmp(s1,s2) != 0. +*/ + +/*! + \fn bool operator<( const QString &s1, const char *s2 ) + \relates QString + Returns TRUE if \a s1 is alphabetically less than \a s2, otherwise FALSE. + + Equivalent to qstrcmp(s1,s2) \< 0. +*/ + +/*! + \fn bool operator<( const char *s1, const QString &s2 ) + \relates QString + Returns TRUE if \a s1 is alphabetically less than \a s2, otherwise FALSE. + + Equivalent to qstrcmp(s1,s2) \< 0. +*/ + +/*! + \fn bool operator<=( const QString &s1, const char *s2 ) + \relates QString + Returns TRUE if \a s1 is alphabetically less than or equal to \a s2, + otherwise FALSE. + + Equivalent to qstrcmp(s1,s2) \<= 0. +*/ + +/*! + \fn bool operator<=( const char *s1, const QString &s2 ) + \relates QString + Returns TRUE if \a s1 is alphabetically less than or equal to \a s2, + otherwise FALSE. + + Equivalent to qstrcmp(s1,s2) \<= 0. +*/ + +/*! + \fn bool operator>( const QString &s1, const char *s2 ) + \relates QString + Returns TRUE if \a s1 is alphabetically greater than \a s2, otherwise FALSE. + + Equivalent to qstrcmp(s1,s2) \> 0. +*/ + +/*! + \fn bool operator>( const char *s1, const QString &s2 ) + \relates QString + Returns TRUE if \a s1 is alphabetically greater than \a s2, otherwise FALSE. + + Equivalent to qstrcmp(s1,s2) \> 0. +*/ + +/*! + \fn bool operator>=( const QString &s1, const char *s2 ) + \relates QString + Returns TRUE if \a s1 is alphabetically greater than or equal to \a s2, + otherwise FALSE. + + Equivalent to qstrcmp(s1,s2) \>= 0. +*/ + +/*! + \fn bool operator>=( const char *s1, const QString &s2 ) + \relates QString + Returns TRUE if \a s1 is alphabetically greater than or equal to \a s2, + otherwise FALSE. + + Equivalent to qstrcmp(s1,s2) \>= 0. +*/ + +/*! + \fn QString operator+( const QString &s1, const QString &s2 ) + \relates QString + Returns the concatenated string of s1 and s2. +*/ + +/*! + \fn QString operator+( const QString &s1, const char *s2 ) + \relates QString + Returns the concatenated string of s1 and s2. +*/ + +/*! + \fn QString operator+( const char *s1, const QString &s2 ) + \relates QString + Returns the concatenated string of s1 and s2. +*/ + +/*! + \fn QString operator+( const QString &s, char c ) + \relates QString + Returns the concatenated string of s and c. +*/ + +/*! + \fn QString operator+( char c, const QString &s ) + \relates QString + Returns the concatenated string of c and s. +*/ + + +/***************************************************************************** + QString stream functions + *****************************************************************************/ +#ifndef QT_NO_DATASTREAM +/*! + \relates QString + Writes a string to the stream. + + \sa \link datastreamformat.html Format of the QDataStream operators \endlink +*/ + +QDataStream &operator<<( QDataStream &s, const QString &str ) +{ + if ( s.version() == 1 ) { + QCString l( str.latin1() ); + s << l; + } + else { + const char* ub = (const char*)str.unicode(); + if ( ub || s.version() < 3 ) { + if ( QChar::networkOrdered() == + (s.byteOrder()==QDataStream::BigEndian) ) { + s.writeBytes( ub, sizeof(QChar)*str.length() ); + } else { + static const uint auto_size = 1024; + char t[auto_size]; + char *b; + if ( str.length()*sizeof(QChar) > auto_size ) { + b = new char[str.length()*sizeof(QChar)]; + } else { + b = t; + } + int l = str.length(); + char *c=b; + while ( l-- ) { + *c++ = ub[1]; + *c++ = ub[0]; + ub+=sizeof(QChar); + } + s.writeBytes( b, sizeof(QChar)*str.length() ); + if ( str.length()*sizeof(QChar) > auto_size ) + delete [] b; + } + } else { + // write null marker + s << (Q_UINT32)0xffffffff; + } + } + return s; +} + +/*! + \relates QString + Reads a string from the stream. + + \sa \link datastreamformat.html Format of the QDataStream operators \endlink +*/ + +QDataStream &operator>>( QDataStream &s, QString &str ) +{ +#ifdef QT_QSTRING_UCS_4 +#if defined(_CC_GNU_) +#warning "operator>> not working properly" +#endif +#endif + if ( s.version() == 1 ) { + QCString l; + s >> l; + str = QString( l ); + } + else { + Q_UINT32 bytes; + s >> bytes; // read size of string + if ( bytes == 0xffffffff ) { // null string + str = QString::null; + } else if ( bytes > 0 ) { // not empty + str.setLength( bytes/2 ); + char* b = (char*)str.d->unicode; + s.readRawBytes( b, bytes ); + if ( QChar::networkOrdered() != + (s.byteOrder()==QDataStream::BigEndian) ) { + bytes /= 2; + while ( bytes-- ) { + char c = b[0]; + b[0] = b[1]; + b[1] = c; + b += 2; + } + } + } else { + str = ""; + } + } + return s; +} +#endif // QT_NO_DATASTREAM + +/***************************************************************************** + QConstString member functions + *****************************************************************************/ + +/*! + \class QConstString qstring.h + \brief A QString which uses constant Unicode data. + + In order to minimize copying, highly optimized applications can use + QConstString to provide a QString-compatible object from existing + Unicode data. It is then the user's responsibility to make sure + that the Unicode data must exist for the entire lifetime of the + QConstString object. +*/ + +/*! + Constructs a QConstString that uses the first \a length Unicode + characters in the array \a unicode. Any attempt to modify + copies of the string will cause it to create a copy of the + data, thus it remains forever unmodified. + + Note that \a unicode is \e not \e copied. The caller \e must be + able to guarantee that \a unicode will not be deleted or + modified. Since that is generally not the case with \c const strings + (they are references), this constructor demands a non-const pointer + even though it never modifies \a unicode. +*/ +QConstString::QConstString( QChar* unicode, uint length ) : + QString(new QStringData(unicode, length, length),TRUE) +{ +} + +/*! + Destroys the QConstString, creating a copy of the data if + other strings are still using it. +*/ +QConstString::~QConstString() +{ + if ( d->count > 1 ) { + QChar* cp = QT_ALLOC_QCHAR_VEC( d->len ); + memcpy( cp, d->unicode, d->len*sizeof(QChar) ); + d->unicode = cp; + } else { + d->unicode = 0; + } + + // The original d->unicode is now unlinked. +} + +/*! + \fn const QString& QConstString::string() const + + Returns a constant string referencing the data passed during + construction. +*/ + +/*! + Returns whether the strings starts with \a s, or not. + */ +bool QString::startsWith( const QString& s ) const +{ + for ( int i =0; i < (int) s.length(); i++ ) { + if ( i >= (int) length() || d->unicode[i] != s[i] ) + return FALSE; + } + return TRUE; +} + + + +#if defined(_OS_WIN32_) + +#include + +/*! + Returns a static Windows TCHAR* from a QString, possibly adding NUL. + + The lifetime of the return value is until the next call to this function. +*/ +const void* qt_winTchar(const QString& str_in, bool addnul) +{ + // So that the return value lives long enough. + static QString str; + str = str_in; + +#ifdef UNICODE + static uint buflen = 256; + static TCHAR *buf = new TCHAR[buflen]; + + const QChar* uc = str.unicode(); + +#define EXTEND if (str.length() > buflen) { delete buf; buf = new TCHAR[buflen=str.length()+1]; } + +#if defined(_WS_X11_) || defined(_OS_WIN32_BYTESWAP_) + EXTEND + for ( int i=str.length(); i--; ) + buf[i] = uc[i].row() << 8 | uc[i].cell(); + if ( addnul ) + buf[str.length()] = 0; +#else + // Same endianness of TCHAR + if ( addnul ) { + EXTEND + memcpy(buf,uc,sizeof(TCHAR)*str.length()); + buf[str.length()] = 0; + } else { + return uc; + } +#endif + return buf; +#undef EXTEND + +#else + return str.latin1(); +#endif +} + +/*! + Makes a new null terminated Windows TCHAR* from a QString. +*/ +void* qt_winTchar_new(const QString& str) +{ + TCHAR* result = new TCHAR[str.length()+1]; + memcpy(result, qt_winTchar(str,FALSE), sizeof(TCHAR)*str.length()); + result[str.length()] = 0; + return result; +} + +/*! + Makes a QString from a Windows TCHAR*. +*/ +QString qt_winQString(void* tc) +{ +#ifdef UNICODE + + int len=0; + while ( ((TCHAR*)tc)[len] ) + len++; +#if defined(_WS_X11_) || defined(_OS_WIN32_BYTESWAP_) + QString r; + for ( int i=0; i>8); + return r; +#else + // Same endianness of TCHAR + return QString((QChar*)tc,len); +#endif +#undef EXTEND +#else + return (TCHAR*)tc; +#endif +} + +QCString qt_winQString2MB( const QString& s, int uclen ) +{ + if ( uclen < 0 ) + uclen = s.length(); + if ( uclen == 0 ) + return QCString(); + BOOL used_def; + int bufSize=4096; + QCString mb(bufSize); + int len; + while ( !(len=WideCharToMultiByte(CP_ACP, 0, (const WCHAR*)s.unicode(), uclen, + mb.data(), bufSize-1, 0, &used_def)) ) + { + int r = GetLastError(); + if ( r == ERROR_INSUFFICIENT_BUFFER ) { + bufSize=1+WideCharToMultiByte( CP_ACP, 0, + (const WCHAR*)s.unicode(), uclen, + 0, 0, 0, &used_def); + mb.resize(bufSize); + // and try again... + } else { + // Fail. + qWarning("WideCharToMultiByte cannot convert multibyte text (error %d): %s (UTF8)", + r, s.utf8().data()); + break; + } + } + mb[len]='\0'; + return mb; +} + +// WATCH OUT: mblen must include the NUL (or just use -1) +QString qt_winMB2QString( const char* mb, int mblen ) +{ + if ( !mb || !mblen ) + return QString::null; + const int wclen_auto = 4096; + WCHAR wc_auto[wclen_auto]; + int wclen = wclen_auto; + WCHAR *wc = wc_auto; + int len; + while ( !(len=MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, + mb, mblen, wc, wclen )) ) + { + int r = GetLastError(); + if ( r == ERROR_INSUFFICIENT_BUFFER ) { + if ( wc != wc_auto ) { + qWarning("Size changed in MultiByteToWideChar"); + break; + } else { + wclen = MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, + mb, mblen, 0, 0 ); + wc = new WCHAR[wclen]; + // and try again... + } + } else { + // Fail. + qWarning("MultiByteToWideChar cannot convert multibyte text"); + break; + } + } + if ( len <= 0 ) + return QString::null; + QString s( (QChar*)wc, len-1 ); // len-1: we don't want terminator + if ( wc != wc_auto ) + delete [] wc; + return s; +} + + +#endif // _OS_WIN32_ Index: branches/xZenu/src/util/doxygen/qtools/qvector.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qvector.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qvector.h (revision 1322) @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** +** Definition of QVector template/macro class +** +** Created : 930907 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QVECTOR_H +#define QVECTOR_H + +#ifndef QT_H +#include "qgvector.h" +#endif // QT_H + + +template class QVector : public QGVector +{ +public: + QVector() {} + QVector( uint size ) : QGVector(size) {} + QVector( const QVector &v ) : QGVector(v) {} + ~QVector() { clear(); } + QVector &operator=(const QVector &v) + { return (QVector&)QGVector::operator=(v); } + type **data() const { return (type **)QGVector::data(); } + uint size() const { return QGVector::size(); } + uint count() const { return QGVector::count(); } + bool isEmpty() const { return QGVector::count() == 0; } + bool isNull() const { return QGVector::size() == 0; } + bool resize( uint size ) { return QGVector::resize(size); } + bool insert( uint i, const type *d){ return QGVector::insert(i,(Item)d); } + bool remove( uint i ) { return QGVector::remove(i); } + type *take( uint i ) { return (type *)QGVector::take(i); } + void clear() { QGVector::clear(); } + bool fill( const type *d, int size=-1 ) + { return QGVector::fill((Item)d,size);} + void sort() { QGVector::sort(); } + int bsearch( const type *d ) const{ return QGVector::bsearch((Item)d); } + int findRef( const type *d, uint i=0 ) const + { return QGVector::findRef((Item)d,i);} + int find( const type *d, uint i= 0 ) const + { return QGVector::find((Item)d,i); } + uint containsRef( const type *d ) const + { return QGVector::containsRef((Item)d); } + uint contains( const type *d ) const + { return QGVector::contains((Item)d); } + type *operator[]( int i ) const { return (type *)QGVector::at(i); } + type *at( uint i ) const { return (type *)QGVector::at(i); } + void toList( QGList *list ) const { QGVector::toList(list); } +private: + void deleteItem( Item d ) { if ( del_item ) delete (type *)d; } +}; + + +#endif // QVECTOR_H Index: branches/xZenu/src/util/doxygen/qtools/qstack.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qstack.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qstack.h (revision 1322) @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** +** Definition of QStack template/macro class +** +** Created : 920917 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QSTACK_H +#define QSTACK_H + +#ifndef QT_H +#include "qglist.h" +#endif // QT_H + + +template class QStack : private QGList +{ +public: + QStack() {} + QStack( const QStack &s ) : QGList(s) {} + ~QStack() { clear(); } + QStack &operator=(const QStack &s) + { return (QStack&)QGList::operator=(s); } + bool autoDelete() const { return QCollection::autoDelete(); } + void setAutoDelete( bool del ) { QCollection::setAutoDelete(del); } + uint count() const { return QGList::count(); } + bool isEmpty() const { return QGList::count() == 0; } + void push( const type *d ) { QGList::insertAt(0,Item(d)); } + type *pop() { return (type *)QGList::takeFirst(); } + bool remove() { return QGList::removeFirst(); } + void clear() { QGList::clear(); } + type *bottom() const { return (type *)QGList::clast(); } + type *top() const { return (type *)QGList::cfirst(); } + operator type *() const { return (type *)QGList::cfirst(); } + type *current() const { return (type *)QGList::cfirst(); } +private: + void deleteItem( Item d ) { if ( del_item ) delete (type *)d; } +}; + + +#endif // QSTACK_H Index: branches/xZenu/src/util/doxygen/qtools/qshared.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qshared.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qshared.h (revision 1322) @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** +** Definition of QShared struct +** +** Created : 940112 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QSHARED_H +#define QSHARED_H + +#ifndef QT_H +#include "qglobal.h" +#endif // QT_H + + +struct QShared +{ + QShared() { count = 1; } + void ref() { count++; } + bool deref() { return !--count; } + uint count; +}; + + +#endif // QSHARED_H Index: branches/xZenu/src/util/doxygen/qtools/qstrvec.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qstrvec.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qstrvec.h (revision 1322) @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** +** Definition of QStrVec and QStrIVec classes +** +** Created : 931203 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QSTRVEC_H +#define QSTRVEC_H + +#ifndef QT_H +#include "qstring.h" +#include "qvector.h" +#include "qdatastream.h" +#endif // QT_H + + +#if defined(Q_TEMPLATEDLL) +template class Q_EXPORT QVector +#endif + +typedef QVector QStrVecBase; + + +class Q_EXPORT QStrVec : public QStrVecBase +{ +public: + QStrVec() { dc = TRUE; } + QStrVec( uint size, bool deepc = TRUE ) : QStrVecBase(size) {dc=deepc;} + ~QStrVec() { clear(); } +private: + Item newItem( Item d ) { return dc ? qstrdup( (const char*)d ) : d; } + void deleteItem( Item d ) { if ( dc ) delete[] (char*)d; } + int compareItems( Item s1, Item s2 ) + { return qstrcmp((const char*)s1, + (const char*)s2); } +#ifndef QT_NO_DATASTREAM + QDataStream &read( QDataStream &s, Item &d ) + { s >> (char *&)d; return s; } + QDataStream &write( QDataStream &s, Item d ) const + { return s << (const char*)d; } +#endif + bool dc; +}; + + +class Q_EXPORT QStrIVec : public QStrVec // case insensitive string vec +{ +public: + QStrIVec() {} + QStrIVec( uint size, bool dc = TRUE ) : QStrVec( size, dc ) {} + ~QStrIVec() { clear(); } +private: + int compareItems( Item s1, Item s2 ) + { return qstricmp((const char*)s1, + (const char*)s2); } +}; + + +#endif // QSTRVEC_H Index: branches/xZenu/src/util/doxygen/qtools/scstring.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/scstring.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/scstring.cpp (revision 1322) @@ -0,0 +1,798 @@ +/****************************************************************************** + * + * Copyright (C) 1997-2004 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +// with this switch you can choose between the original qcstring implementation, +// which implicitly shares data so copying is faster, but requires at least 12 bytes, and +// the new implementation in this file, which has a smaller footprint (only 4 bytes for +// an empty string), but always copies strings. +#define SMALLSTRING + +#include "qcstring.h" +#ifndef SMALLSTRING +#include "qcstring.cpp" +#else +#define SCString QCString + +#include +#include +#include +#include +#include +#include +#include + + +SCString::SCString(int size) +{ + if (size>0) + { + m_data = (char *)malloc(size); + if (m_data) + { + if (size>1) memset(m_data,' ',size-1); + m_data[size-1]='\0'; + } + } + else + { + m_data=0; + } +} + +SCString::SCString( const SCString &s ) +{ + duplicate(s); +} + +SCString::SCString( const char *str ) +{ + duplicate(str); +} + +SCString::SCString( const char *str, uint maxlen ) +{ + uint l; + if (str && ( l = QMIN(qstrlen(str),maxlen) )) + { + m_data=(char *)malloc(l+1); + strncpy(m_data,str,l+1); + m_data[l]='\0'; + } + else + { + m_data=0; + } +} + +SCString::~SCString() +{ + if (m_data) free(m_data); + m_data=0; +} + +SCString &SCString::assign( const char *str ) +{ + if (m_data==str) return *this; + if (m_data) free(m_data); + duplicate(str); + return *this; +} + +bool SCString::resize( uint newlen ) +{ + if (newlen==0) + { + if (m_data) { free(m_data); m_data=0; } + return TRUE; + } + if (m_data==0) // newlen>0 + { + m_data = (char *)malloc(newlen); + } + else + { + m_data = (char *)realloc(m_data,newlen); + } + if (m_data==0) return FALSE; + m_data[newlen-1]='\0'; + return TRUE; +} + +bool SCString::fill( char c, int len ) +{ + uint l=length(); + if (len<0) len=l; + if ((uint)len!=l) + { + if (m_data) free(m_data); + if (len>0) + { + m_data=(char *)malloc(len+1); + if (m_data==0) return FALSE; + m_data[len]='\0'; + } + else + { + m_data=0; + } + } + if (len>0) + { + uint i; + for (i=0;i<(uint)len;i++) m_data[i]=c; + } + return TRUE; +} + +SCString &SCString::sprintf( const char *format, ... ) +{ + va_list ap; + va_start( ap, format ); + uint l = length(); + const uint minlen=4095; + if (llen ) // index outside string + return -1; + register const char *d; + if ( cs ) // case sensitive + { + d = strchr( m_data+index, c ); + } + else + { + d = m_data+index; + c = tolower( (uchar) c ); + while ( *d && tolower((uchar) *d) != c ) + d++; + if ( !*d && c ) // not found + d = 0; + } + return d ? (int)(d - m_data) : -1; +} + +int SCString::find( const char *str, int index, bool cs ) const +{ + uint l = length(); + if ( m_data==0 || (uint)index > l ) // index outside string + return -1; + if ( !str ) // no search string + return -1; + if ( !*str ) // zero-length search string + return index; + register const char *d; + if ( cs ) // case sensitive + { + d = strstr( m_data+index, str ); + } + else // case insensitive + { + d = m_data+index; + int len = qstrlen( str ); + while ( *d ) + { + if ( qstrnicmp(d, str, len) == 0 ) + break; + d++; + } + if ( !*d ) // not found + d = 0; + } + return d ? (int)(d - m_data) : -1; +} + +int SCString::find( const QCString &str, int index, bool cs ) const +{ + return find(str.data(),index,cs); +} + +int SCString::find( const QRegExp &rx, int index ) const +{ + QString d = QString::fromLatin1( m_data ); + return d.find( rx, index ); +} + +int SCString::findRev( char c, int index, bool cs) const +{ + const char *b = m_data; + const char *d; + uint len = length(); + if ( b == 0 ) return -1; // empty string + if ( index < 0 ) // neg index ==> start from end + { + if ( len == 0 ) return -1; + if ( cs ) + { + d = strrchr( b, c ); + return d ? (int)(d - b) : -1; + } + index = len; + } + else if ( (uint)index > len ) // bad index + { + return -1; + } + d = b+index; + if ( cs ) // case sensitive + { + while ( d >= b && *d != c ) + d--; + } + else // case insensitive + { + c = tolower( (uchar) c ); + while ( d >= b && tolower((uchar) *d) != c ) + d--; + } + return d >= b ? (int)(d - b) : -1; +} + +int SCString::findRev( const char *str, int index, bool cs) const +{ + int slen = qstrlen(str); + uint len = length(); + if ( index < 0 ) // neg index ==> start from end + index = len-slen; + else if ( (uint)index > len ) // bad index + return -1; + else if ( (uint)(index + slen) > len ) // str would be too long + index = len - slen; + if ( index < 0 ) + return -1; + + register char *d = m_data + index; + if ( cs ) // case sensitive + { + for ( int i=index; i>=0; i-- ) + if ( qstrncmp(d--,str,slen)==0 ) + return i; + } + else // case insensitive + { + for ( int i=index; i>=0; i-- ) + if ( qstrnicmp(d--,str,slen)==0 ) + return i; + } + return -1; + +} + +int SCString::findRev( const QRegExp &rx, int index ) const +{ + QString d = QString::fromLatin1( m_data ); + return d.findRev( rx, index ); +} + +int SCString::contains( char c, bool cs ) const +{ + int count = 0; + char *d = m_data; + if ( !d ) + return 0; + if ( cs ) // case sensitive + { + while ( *d ) + if ( *d++ == c ) + count++; + } + else // case insensitive + { + c = tolower( (uchar) c ); + while ( *d ) { + if ( tolower((uchar) *d) == c ) + count++; + d++; + } + } + return count; +} + +int SCString::contains( const char *str, bool cs ) const +{ + int count = 0; + char *d = data(); + if ( !d ) + return 0; + int len = qstrlen( str ); + while ( *d ) // counts overlapping strings + { + if ( cs ) + { + if ( qstrncmp( d, str, len ) == 0 ) + count++; + } + else + { + if ( qstrnicmp(d, str, len) == 0 ) + count++; + } + d++; + } + return count; +} + +int SCString::contains( const QRegExp &rx ) const +{ + QString d = QString::fromLatin1( m_data ); + return d.contains( rx ); +} + +SCString SCString::left( uint len ) const +{ + if ( isEmpty() ) + { + return SCString(); + } + else if ( len >= length() ) + { + return *this; + } + else + { + SCString s( len+1 ); + strncpy( s.data(), m_data, len ); + *(s.data()+len) = '\0'; + return s; + } +} + +SCString SCString::right( uint len ) const +{ + if ( isEmpty() ) + { + return SCString(); + } + else + { + uint l = length(); + if ( len > l ) len = l; + char *p = m_data + (l - len); + return SCString( p ); + } +} + +SCString SCString::mid( uint index, uint len) const +{ + uint slen = length(); + if ( len == 0xffffffff ) len = slen-index; + if ( isEmpty() || index >= slen ) + { + return SCString(); + } + else + { + register char *p = data()+index; + SCString s( len+1 ); + strncpy( s.data(), p, len ); + *(s.data()+len) = '\0'; + return s; + } +} + +SCString SCString::lower() const +{ + SCString s( m_data ); + register char *p = s.data(); + if ( p ) + { + while ( *p ) + { + *p = tolower((uchar) *p); + p++; + } + } + return s; +} + +SCString SCString::upper() const +{ + SCString s( m_data ); + register char *p = s.data(); + if ( p ) { + while ( *p ) { + *p = toupper((uchar)*p); + p++; + } + } + return s; +} + +SCString SCString::stripWhiteSpace() const +{ + if ( isEmpty() ) // nothing to do + return *this; + + register char *s = m_data; + int reslen = length(); + if ( !isspace((uchar) s[0]) && !isspace((uchar) s[reslen-1]) ) + return *this; // returns a copy + + SCString result(s); + s = result.data(); + int start = 0; + int end = reslen - 1; + while ( isspace((uchar) s[start]) ) // skip white space from start + start++; + if ( s[start] == '\0' ) + { // only white space + return SCString(); + } + while ( end && isspace((uchar) s[end]) ) // skip white space from end + end--; + end -= start - 1; + memmove( result.data(), &s[start], end ); + result.resize( end + 1 ); + return result; +} + +SCString SCString::simplifyWhiteSpace() const +{ + if ( isEmpty() ) // nothing to do + return *this; + + SCString result( length()+1 ); + char *from = data(); + char *to = result.data(); + char *first = to; + while ( TRUE ) + { + while ( *from && isspace((uchar) *from) ) + from++; + while ( *from && !isspace((uchar)*from) ) + *to++ = *from++; + if ( *from ) + *to++ = 0x20; // ' ' + else + break; + } + if ( to > first && *(to-1) == 0x20 ) + to--; + *to = '\0'; + result.resize( (int)((long)to - (long)result.data()) + 1 ); + return result; +} + +SCString &SCString::insert( uint index, const char *s ) +{ + int len = qstrlen(s); + if ( len == 0 ) + return *this; + uint olen = length(); + int nlen = olen + len; + if ( index >= olen ) // insert after end of string + { + m_data = (char *)realloc(m_data,nlen+index-olen+1); + if ( m_data ) + { + memset( m_data+olen, ' ', index-olen ); + memcpy( m_data+index, s, len+1 ); + } + } + else if ( (m_data = (char *)realloc(m_data,nlen+1)) ) // normal insert + { + memmove( m_data+index+len, m_data+index, olen-index+1 ); + memcpy( m_data+index, s, len ); + } + return *this; +} + +SCString &SCString::insert( uint index, char c ) // insert char +{ + char buf[2]; + buf[0] = c; + buf[1] = '\0'; + return insert( index, buf ); +} + +SCString& SCString::operator+=( const char *str ) +{ + if ( !str ) return *this; // nothing to append + uint len1 = length(); + uint len2 = qstrlen(str); + char *newData = (char *)realloc( m_data, len1 + len2 + 1 ); + if (newData) + { + m_data = newData; + memcpy( m_data + len1, str, len2 + 1 ); + } + return *this; +} + +SCString &SCString::operator+=( char c ) +{ + uint len = length(); + char *newData = (char *)realloc( m_data, length()+2 ); + if (newData) + { + m_data = newData; + m_data[len] = c; + m_data[len+1] = '\0'; + } + return *this; +} + +SCString &SCString::remove( uint index, uint len ) +{ + uint olen = length(); + if ( index + len >= olen ) // range problems + { + if ( index < olen ) // index ok + { + resize( index+1 ); + } + } + else if ( len != 0 ) + { + memmove( m_data+index, m_data+index+len, olen-index-len+1 ); + resize( olen-len+1 ); + } + return *this; +} + +SCString &SCString::replace( uint index, uint len, const char *s ) +{ + remove( index, len ); + insert( index, s ); + return *this; +} + +SCString &SCString::replace( const QRegExp &rx, const char *str ) +{ + QString d = QString::fromLatin1( m_data ); + QString r = QString::fromLatin1( str ); + d.replace( rx, r ); + return assign(d.ascii()); +} + +long SCString::toLong( bool *ok ) const +{ + QString s(m_data); + return s.toLong(ok); +} + +ulong SCString::toULong( bool *ok ) const +{ + QString s(m_data); + return s.toULong(ok); +} + +short SCString::toShort( bool *ok ) const +{ + QString s(m_data); + return s.toShort(ok); +} + +ushort SCString::toUShort( bool *ok ) const +{ + QString s(m_data); + return s.toUShort(ok); +} + +int SCString::toInt( bool *ok ) const +{ + QString s(m_data); + return s.toInt(ok); +} + +uint SCString::toUInt( bool *ok ) const +{ + QString s(m_data); + return s.toUInt(ok); +} + +SCString &SCString::setNum( long n ) +{ + char buf[20]; + register char *p = &buf[19]; + bool neg; + if ( n < 0 ) + { + neg = TRUE; + n = -n; + } + else + { + neg = FALSE; + } + *p = '\0'; + do + { + *--p = ((int)(n%10)) + '0'; + n /= 10; + } while ( n ); + if ( neg ) *--p = '-'; + operator=( p ); + return *this; +} + +SCString &SCString::setNum( ulong n ) +{ + char buf[20]; + register char *p = &buf[19]; + *p = '\0'; + do + { + *--p = ((int)(n%10)) + '0'; + n /= 10; + } while ( n ); + operator=( p ); + return *this; +} + +void SCString::msg_index( uint index ) +{ +#if defined(CHECK_RANGE) + qWarning( "SCString::at: Absolute index %d out of range", index ); +#else + Q_UNUSED( index ) +#endif +} + +bool SCString::stripPrefix(const char *prefix) +{ + if (prefix==0) return FALSE; + uint plen = qstrlen(prefix); + if (m_data && qstrncmp(prefix,m_data,plen)==0) // prefix matches + { + uint len = qstrlen(m_data); + uint newlen = len-plen+1; + qmemmove(m_data,m_data+plen,newlen); + resize(newlen); + return TRUE; + } + return FALSE; +} + +//--------------------------------------------------------------------------- + +void *qmemmove( void *dst, const void *src, uint len ) +{ + register char *d; + register char *s; + if ( dst > src ) { + d = (char *)dst + len - 1; + s = (char *)src + len - 1; + while ( len-- ) + *d-- = *s--; + } else if ( dst < src ) { + d = (char *)dst; + s = (char *)src; + while ( len-- ) + *d++ = *s++; + } + return dst; +} + +char *qstrdup( const char *str ) +{ + if ( !str ) + return 0; + char *dst = new char[strlen(str)+1]; + CHECK_PTR( dst ); + return strcpy( dst, str ); +} + +char *qstrncpy( char *dst, const char *src, uint len ) +{ + if ( !src ) + return 0; + strncpy( dst, src, len ); + if ( len > 0 ) + dst[len-1] = '\0'; + return dst; +} + +int qstricmp( const char *str1, const char *str2 ) +{ + register const uchar *s1 = (const uchar *)str1; + register const uchar *s2 = (const uchar *)str2; + int res; + uchar c; + if ( !s1 || !s2 ) + return s1 == s2 ? 0 : (int)((long)s2 - (long)s1); + for ( ; !(res = (c=tolower(*s1)) - tolower(*s2)); s1++, s2++ ) + if ( !c ) // strings are equal + break; + return res; +} + +int qstrnicmp( const char *str1, const char *str2, uint len ) +{ + register const uchar *s1 = (const uchar *)str1; + register const uchar *s2 = (const uchar *)str2; + int res; + uchar c; + if ( !s1 || !s2 ) + return (int)((long)s2 - (long)s1); + for ( ; len--; s1++, s2++ ) { + if ( (res = (c=tolower(*s1)) - tolower(*s2)) ) + return res; + if ( !c ) // strings are equal + break; + } + return 0; +} + +#ifndef QT_NO_DATASTREAM + +QDataStream &operator<<( QDataStream &s, const QByteArray &a ) +{ + return s.writeBytes( a.data(), a.size() ); +} + +QDataStream &operator>>( QDataStream &s, QByteArray &a ) +{ + Q_UINT32 len; + s >> len; // read size of array + if ( len == 0 || s.eof() ) { // end of file reached + a.resize( 0 ); + return s; + } + if ( !a.resize( (uint)len ) ) { // resize array +#if defined(CHECK_NULL) + qWarning( "QDataStream: Not enough memory to read QByteArray" ); +#endif + len = 0; + } + if ( len > 0 ) // not null array + s.readRawBytes( a.data(), (uint)len ); + return s; +} + +QDataStream &operator<<( QDataStream &s, const SCString &str ) +{ + return s.writeBytes( str.data(), str.size() ); +} + +QDataStream &operator>>( QDataStream &s, SCString &str ) +{ + Q_UINT32 len; + s >> len; // read size of string + if ( len == 0 || s.eof() ) { // end of file reached + str.resize( 0 ); + return s; + } + if ( !str.resize( (uint)len )) {// resize string +#if defined(CHECK_NULL) + qWarning( "QDataStream: Not enough memory to read QCString" ); +#endif + len = 0; + } + if ( len > 0 ) // not null array + s.readRawBytes( str.data(), (uint)len ); + return s; +} + +#endif //QT_NO_DATASTREAM + + + +#endif Index: branches/xZenu/src/util/doxygen/qtools/qthread.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qthread.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qthread.h (revision 1322) @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTHREAD_H +#define QTHREAD_H + +class QThreadPrivate; + +class QThread +{ + public: + explicit QThread(); + virtual ~QThread(); + + bool isFinished() const; + bool isRunning() const; + + void start(); + void terminate(); + void wait(); + void setStackSize(unsigned int stackSize); + unsigned int stackSize() const; + static int idealThreadCount(); + +protected: + // events + virtual void started() {} + virtual void finished() {} + virtual void terminated() {} + + // main loop + virtual void run() {} + +private: + QThreadPrivate *d; + friend class QThreadPrivate; +}; + +#endif // QTHREAD_H Index: branches/xZenu/src/util/doxygen/qtools/qmap.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qmap.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qmap.cpp (revision 1322) @@ -0,0 +1,254 @@ +/**************************************************************************** +** +** +** Implementation of QMap +** +** Created : 990406 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qmap.h" + +typedef QMapNodeBase* NodePtr; +typedef QMapNodeBase Node; + + +void QMapPrivateBase::rotateLeft( NodePtr x, NodePtr& root) +{ + NodePtr y = x->right; + x->right = y->left; + if (y->left !=0) + y->left->parent = x; + y->parent = x->parent; + if (x == root) + root = y; + else if (x == x->parent->left) + x->parent->left = y; + else + x->parent->right = y; + y->left = x; + x->parent = y; +} + + +void QMapPrivateBase::rotateRight( NodePtr x, NodePtr& root ) +{ + NodePtr y = x->left; + x->left = y->right; + if (y->right != 0) + y->right->parent = x; + y->parent = x->parent; + if (x == root) + root = y; + else if (x == x->parent->right) + x->parent->right = y; + else + x->parent->left = y; + y->right = x; + x->parent = y; +} + + +void QMapPrivateBase::rebalance( NodePtr x, NodePtr& root) +{ + x->color = Node::Red; + while ( x != root && x->parent->color == Node::Red ) { + if ( x->parent == x->parent->parent->left ) { + NodePtr y = x->parent->parent->right; + if (y && y->color == Node::Red) { + x->parent->color = Node::Black; + y->color = Node::Black; + x->parent->parent->color = Node::Red; + x = x->parent->parent; + } else { + if (x == x->parent->right) { + x = x->parent; + rotateLeft( x, root ); + } + x->parent->color = Node::Black; + x->parent->parent->color = Node::Red; + rotateRight (x->parent->parent, root ); + } + } else { + NodePtr y = x->parent->parent->left; + if ( y && y->color == Node::Red ) { + x->parent->color = Node::Black; + y->color = Node::Black; + x->parent->parent->color = Node::Red; + x = x->parent->parent; + } else { + if (x == x->parent->left) { + x = x->parent; + rotateRight( x, root ); + } + x->parent->color = Node::Black; + x->parent->parent->color = Node::Red; + rotateLeft( x->parent->parent, root ); + } + } + } + root->color = Node::Black; +} + + +NodePtr QMapPrivateBase::removeAndRebalance( NodePtr z, NodePtr& root, + NodePtr& leftmost, + NodePtr& rightmost ) +{ + NodePtr y = z; + NodePtr x; + NodePtr x_parent; + if (y->left == 0) { + x = y->right; + } else { + if (y->right == 0) + x = y->left; + else + { + y = y->right; + while (y->left != 0) + y = y->left; + x = y->right; + } + } + if (y != z) { + z->left->parent = y; + y->left = z->left; + if (y != z->right) { + x_parent = y->parent; + if (x) + x->parent = y->parent; + y->parent->left = x; + y->right = z->right; + z->right->parent = y; + } else { + x_parent = y; + } + if (root == z) + root = y; + else if (z->parent->left == z) + z->parent->left = y; + else + z->parent->right = y; + y->parent = z->parent; + // Swap the colors + Node::Color c = y->color; + y->color = z->color; + z->color = c; + y = z; + } else { + x_parent = y->parent; + if (x) + x->parent = y->parent; + if (root == z) + root = x; + else if (z->parent->left == z) + z->parent->left = x; + else + z->parent->right = x; + if ( leftmost == z ) { + if (z->right == 0) + leftmost = z->parent; + else + leftmost = x->minimum(); + } + if (rightmost == z) { + if (z->left == 0) + rightmost = z->parent; + else + rightmost = x->maximum(); + } + } + if (y->color != Node::Red) { + while (x != root && (x == 0 || x->color == Node::Black)) { + if (x == x_parent->left) { + NodePtr w = x_parent->right; + if (w->color == Node::Red) { + w->color = Node::Black; + x_parent->color = Node::Red; + rotateLeft(x_parent, root); + w = x_parent->right; + } + if ((w->left == 0 || w->left->color == Node::Black) && + (w->right == 0 || w->right->color == Node::Black)) { + w->color = Node::Red; + x = x_parent; + x_parent = x_parent->parent; + } else { + if (w->right == 0 || w->right->color == Node::Black) { + if (w->left) + w->left->color = Node::Black; + w->color = Node::Red; + rotateRight(w, root); + w = x_parent->right; + } + w->color = x_parent->color; + x_parent->color = Node::Black; + if (w->right) + w->right->color = Node::Black; + rotateLeft(x_parent, root); + break; + } + } else { + NodePtr w = x_parent->left; + if (w->color == Node::Red) { + w->color = Node::Black; + x_parent->color = Node::Red; + rotateRight(x_parent, root); + w = x_parent->left; + } + if ((w->right == 0 || w->right->color == Node::Black) && + (w->left == 0 || w->left->color == Node::Black)) { + w->color = Node::Red; + x = x_parent; + x_parent = x_parent->parent; + } else { + if (w->left == 0 || w->left->color == Node::Black) { + if (w->right) + w->right->color = Node::Black; + w->color = Node::Red; + rotateLeft(w, root); + w = x_parent->left; + } + w->color = x_parent->color; + x_parent->color = Node::Black; + if (w->left) + w->left->color = Node::Black; + rotateRight(x_parent, root); + break; + } + } + } + if (x) + x->color = Node::Black; + } + return y; +} Index: branches/xZenu/src/util/doxygen/qtools/qvaluelist.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qvaluelist.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qvaluelist.h (revision 1322) @@ -0,0 +1,449 @@ +/**************************************************************************** +** +** +** Definition of QValueList class +** +** Created : 990406 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QVALUELIST_H +#define QVALUELIST_H + +#ifndef QT_H +#include "qshared.h" +#include "qdatastream.h" +#endif // QT_H + +#if defined(_CC_MSVC_) +#pragma warning(disable:4284) // "return type for operator -> is not a UDT" +#endif + +template +class Q_EXPORT QValueListNode +{ +public: + QValueListNode( const T& t ) : data( t ) { } + QValueListNode() { } +#if defined(Q_TEMPLATEDLL) + // Workaround MS bug in memory de/allocation in DLL vs. EXE + virtual ~QValueListNode() { } +#endif + + QValueListNode* next; + QValueListNode* prev; + T data; +}; + +template +class Q_EXPORT QValueListIterator +{ + public: + /** + * Typedefs + */ + typedef QValueListNode* NodePtr; + + /** + * Variables + */ + NodePtr node; + + /** + * Functions + */ + QValueListIterator() : node( 0 ) {} + QValueListIterator( NodePtr p ) : node( p ) {} + QValueListIterator( const QValueListIterator& it ) : node( it.node ) {} + + bool operator==( const QValueListIterator& it ) const { return node == it.node; } + bool operator!=( const QValueListIterator& it ) const { return node != it.node; } + const T& operator*() const { return node->data; } + T& operator*() { return node->data; } + + // Compilers are too dumb to understand this for QValueList + //T* operator->() const { return &(node->data); } + + QValueListIterator& operator++() { + node = node->next; + return *this; + } + + QValueListIterator operator++(int) { + QValueListIterator tmp = *this; + node = node->next; + return tmp; + } + + QValueListIterator& operator--() { + node = node->prev; + return *this; + } + + QValueListIterator operator--(int) { + QValueListIterator tmp = *this; + node = node->prev; + return tmp; + } +}; + +template +class Q_EXPORT QValueListConstIterator +{ + public: + /** + * Typedefs + */ + typedef QValueListNode* NodePtr; + + /** + * Variables + */ + NodePtr node; + + /** + * Functions + */ + QValueListConstIterator() : node( 0 ) {} + QValueListConstIterator( NodePtr p ) : node( p ) {} + QValueListConstIterator( const QValueListConstIterator& it ) : node( it.node ) {} + QValueListConstIterator( const QValueListIterator& it ) : node( it.node ) {} + + bool operator==( const QValueListConstIterator& it ) const { return node == it.node; } + bool operator!=( const QValueListConstIterator& it ) const { return node != it.node; } + const T& operator*() const { return node->data; } + + // Compilers are too dumb to understand this for QValueList + //const T* operator->() const { return &(node->data); } + + QValueListConstIterator& operator++() { + node = node->next; + return *this; + } + + QValueListConstIterator operator++(int) { + QValueListConstIterator tmp = *this; + node = node->next; + return tmp; + } + + QValueListConstIterator& operator--() { + node = node->prev; + return *this; + } + + QValueListConstIterator operator--(int) { + QValueListConstIterator tmp = *this; + node = node->prev; + return tmp; + } +}; + +template +class Q_EXPORT QValueListPrivate : public QShared +{ +public: + /** + * Typedefs + */ + typedef QValueListIterator Iterator; + typedef QValueListConstIterator ConstIterator; + typedef QValueListNode Node; + typedef QValueListNode* NodePtr; + + /** + * Functions + */ + QValueListPrivate() { node = new Node; node->next = node->prev = node; nodes = 0; } + QValueListPrivate( const QValueListPrivate& _p ) : QShared() { + node = new Node; node->next = node->prev = node; nodes = 0; + Iterator b( _p.node->next ); + Iterator e( _p.node ); + Iterator i( node ); + while( b != e ) + insert( i, *b++ ); + } + + void derefAndDelete() // ### hack to get around hp-cc brain damage + { + if ( deref() ) + delete this; + } + +#if defined(Q_TEMPLATEDLL) + // Workaround MS bug in memory de/allocation in DLL vs. EXE + virtual +#endif + ~QValueListPrivate() { + NodePtr p = node->next; + while( p != node ) { + NodePtr x = p->next; + delete p; + p = x; + } + delete node; + } + + Iterator insert( Iterator it, const T& x ) { + NodePtr p = new Node( x ); + p->next = it.node; + p->prev = it.node->prev; + it.node->prev->next = p; + it.node->prev = p; + nodes++; + return p; + } + + Iterator remove( Iterator it ) { + ASSERT ( it.node != node ); + NodePtr next = it.node->next; + NodePtr prev = it.node->prev; + prev->next = next; + next->prev = prev; + delete it.node; + nodes--; + return Iterator( next ); + } + + NodePtr find( NodePtr start, const T& x ) const { + ConstIterator first( start ); + ConstIterator last( node ); + while( first != last) { + if ( *first == x ) + return first.node; + ++first; + } + return last.node; + } + + int findIndex( NodePtr start, const T& x ) const { + ConstIterator first( start ); + ConstIterator last( node ); + int pos = 0; + while( first != last) { + if ( *first == x ) + return pos; + ++first; + ++pos; + } + return -1; + } + + uint contains( const T& x ) const { + uint result = 0; + Iterator first = Iterator( node->next ); + Iterator last = Iterator( node ); + while( first != last) { + if ( *first == x ) + ++result; + ++first; + } + return result; + } + + void remove( const T& x ) { + Iterator first = Iterator( node->next ); + Iterator last = Iterator( node ); + while( first != last) { + if ( *first == x ) + first = remove( first ); + else + ++first; + } + } + + NodePtr at( uint i ) const { + ASSERT( i <= nodes ); + NodePtr p = node->next; + for( uint x = 0; x < i; ++x ) + p = p->next; + return p; + } + + void clear() { + nodes = 0; + NodePtr p = node->next; + while( p != node ) { + NodePtr next = p->next; + delete p; + p = next; + } + node->next = node->prev = node; + } + + NodePtr node; + uint nodes; +}; + +template +class Q_EXPORT QValueList +{ +public: + /** + * Typedefs + */ + typedef QValueListIterator Iterator; + typedef QValueListConstIterator ConstIterator; + typedef T ValueType; + + /** + * API + */ + QValueList() { sh = new QValueListPrivate; } + QValueList( const QValueList& l ) { sh = l.sh; sh->ref(); } + ~QValueList() { sh->derefAndDelete(); } + + QValueList& operator= ( const QValueList& l ) + { + l.sh->ref(); + sh->derefAndDelete(); + sh = l.sh; + return *this; + } + + QValueList operator+ ( const QValueList& l ) const + { + QValueList l2( *this ); + for( ConstIterator it = l.begin(); it != l.end(); ++it ) + l2.append( *it ); + return l2; + } + + QValueList& operator+= ( const QValueList& l ) + { + for( ConstIterator it = l.begin(); it != l.end(); ++it ) + append( *it ); + return *this; + } + + bool operator== ( const QValueList& l ) const + { + if ( count() != l.count() ) + return FALSE; + ConstIterator it2 = begin(); + ConstIterator it = l.begin(); + for( ; it != l.end(); ++it, ++it2 ) + if ( !( *it == *it2 ) ) + return FALSE; + return TRUE; + } + + bool operator!= ( const QValueList& l ) const { return !( *this == l ); } + + Iterator begin() { detach(); return Iterator( sh->node->next ); } + ConstIterator begin() const { return ConstIterator( sh->node->next ); } + Iterator end() { detach(); return Iterator( sh->node ); } + ConstIterator end() const { return ConstIterator( sh->node ); } + Iterator fromLast() { detach(); return Iterator( sh->node->prev ); } + ConstIterator fromLast() const { return ConstIterator( sh->node->prev ); } + + bool isEmpty() const { return ( sh->nodes == 0 ); } + + Iterator insert( Iterator it, const T& x ) { detach(); return sh->insert( it, x ); } + + Iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } + Iterator prepend( const T& x ) { detach(); return sh->insert( begin(), x ); } + + Iterator remove( Iterator it ) { detach(); return sh->remove( it ); } + void remove( const T& x ) { detach(); sh->remove( x ); } + + T& first() { detach(); return sh->node->next->data; } + const T& first() const { return sh->node->next->data; } + T& last() { detach(); return sh->node->prev->data; } + const T& last() const { return sh->node->prev->data; } + + T& operator[] ( uint i ) { detach(); return sh->at(i)->data; } + const T& operator[] ( uint i ) const { return sh->at(i)->data; } + Iterator at( uint i ) { detach(); return Iterator( sh->at(i) ); } + ConstIterator at( uint i ) const { return ConstIterator( sh->at(i) ); } + Iterator find ( const T& x ) { detach(); return Iterator( sh->find( sh->node->next, x) ); } + ConstIterator find ( const T& x ) const { return ConstIterator( sh->find( sh->node->next, x) ); } + Iterator find ( Iterator it, const T& x ) { detach(); return Iterator( sh->find( it.node, x ) ); } + ConstIterator find ( ConstIterator it, const T& x ) const { return ConstIterator( sh->find( it.node, x ) ); } + int findIndex( const T& x ) const { return sh->findIndex( sh->node->next, x) ; } + uint contains( const T& x ) const { return sh->contains( x ); } + + uint count() const { return sh->nodes; } + + void clear() { if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new QValueListPrivate; } } + + + QValueList& operator+= ( const T& x ) + { + append( x ); + return *this; + } + QValueList& operator<< ( const T& x ) + { + append( x ); + return *this; + } + + +protected: + /** + * Helpers + */ + void detach() { if ( sh->count > 1 ) { sh->deref(); sh = new QValueListPrivate( *sh ); } } + + /** + * Variables + */ + QValueListPrivate* sh; +}; + +#ifndef QT_NO_DATASTREAM +template +inline QDataStream& operator>>( QDataStream& s, QValueList& l ) +{ + l.clear(); + Q_UINT32 c; + s >> c; + for( Q_UINT32 i = 0; i < c; ++i ) + { + T t; + s >> t; + l.append( t ); + } + return s; +} + +template +inline QDataStream& operator<<( QDataStream& s, const QValueList& l ) +{ + s << (Q_UINT32)l.count(); + QValueListConstIterator it = l.begin(); + for( ; it != l.end(); ++it ) + s << *it; + return s; +} +#endif // QT_NO_DATASTREAM +#endif // QVALUELIST_H Index: branches/xZenu/src/util/doxygen/qtools/qgvector.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgvector.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgvector.h (revision 1322) @@ -0,0 +1,120 @@ +/**************************************************************************** +** +** +** Definition of QGVector class +** +** Created : 930907 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QGVECTOR_H +#define QGVECTOR_H + +#ifndef QT_H +#include "qcollection.h" +#endif // QT_H + + +class Q_EXPORT QGVector : public QCollection // generic vector +{ +friend class QGList; // needed by QGList::toVector +public: +#ifndef QT_NO_DATASTREAM + QDataStream &read( QDataStream & ); // read vector from stream + QDataStream &write( QDataStream & ) const; // write vector to stream +#endif + virtual int compareItems( Item, Item ); + +protected: + QGVector(); // create empty vector + QGVector( uint size ); // create vector with nullptrs + QGVector( const QGVector &v ); // make copy of other vector + ~QGVector(); + + QGVector &operator=( const QGVector &v ); // assign from other vector + + Item *data() const { return vec; } + uint size() const { return len; } + uint count() const { return numItems; } + + bool insert( uint index, Item ); // insert item at index + bool remove( uint index ); // remove item + Item take( uint index ); // take out item + + void clear(); // clear vector + bool resize( uint newsize ); // resize vector + + bool fill( Item, int flen ); // resize and fill vector + + void sort(); // sort vector + int bsearch( Item ) const; // binary search (when sorted) + + int findRef( Item, uint index ) const; // find exact item in vector + int find( Item, uint index ) const; // find equal item in vector + uint containsRef( Item ) const; // get number of exact matches + uint contains( Item ) const; // get number of equal matches + + Item at( uint index ) const // return indexed item + { +#if defined(CHECK_RANGE) + if ( index >= len ) + warningIndexRange( index ); +#endif + return vec[index]; + } + + bool insertExpand( uint index, Item ); // insert, expand if necessary + + void toList( QGList * ) const; // put items in list + +#ifndef QT_NO_DATASTREAM + virtual QDataStream &read( QDataStream &, Item & ); + virtual QDataStream &write( QDataStream &, Item ) const; +#endif +private: + Item *vec; + uint len; + uint numItems; + + static void warningIndexRange( uint ); +}; + + +/***************************************************************************** + QGVector stream functions + *****************************************************************************/ + +#ifndef QT_NO_DATASTREAM +Q_EXPORT QDataStream &operator>>( QDataStream &, QGVector & ); +Q_EXPORT QDataStream &operator<<( QDataStream &, const QGVector & ); +#endif + +#endif // QGVECTOR_H Index: branches/xZenu/src/util/doxygen/qtools/qbuffer.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qbuffer.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qbuffer.h (revision 1322) @@ -0,0 +1,98 @@ +/**************************************************************************** +** +** +** Definition of QBuffer class +** +** Created : 930812 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QBUFFER_H +#define QBUFFER_H + +#ifndef QT_H +#include "qiodevice.h" +#include "qstring.h" +#endif // QT_H + + +class Q_EXPORT QBuffer : public QIODevice +{ +public: + QBuffer(); + QBuffer( QByteArray ); + ~QBuffer(); + + QByteArray buffer() const; + bool setBuffer( QByteArray ); + + bool open( int ); + void close(); + void flush(); + + uint size() const; + int at() const; + bool at( int ); + + int readBlock( char *p, uint ); + int writeBlock( const char *p, uint ); + int readLine( char *p, uint ); + + int getch(); + int putch( int ); + int ungetch( int ); + +protected: + QByteArray a; + +private: + uint a_len; + uint a_inc; + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + QBuffer( const QBuffer & ); + QBuffer &operator=( const QBuffer & ); +#endif +}; + + +inline QByteArray QBuffer::buffer() const +{ return a; } + +inline uint QBuffer::size() const +{ return a.size(); } + +inline int QBuffer::at() const +{ return ioIndex; } + + +#endif // QBUFFER_H Index: branches/xZenu/src/util/doxygen/qtools/qgcache.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgcache.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgcache.h (revision 1322) @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** +** Definition of QGCache and QGCacheIterator classes +** +** Created : 950208 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QGCACHE_H +#define QGCACHE_H + +#ifndef QT_H +#include "qcollection.h" +#include "qglist.h" +#include "qgdict.h" +#endif // QT_H + + +class QCList; // internal classes +class QCListIt; +class QCDict; + + +class Q_EXPORT QGCache : public QCollection // generic LRU cache +{ +friend class QGCacheIterator; +protected: + enum KeyType { StringKey, AsciiKey, IntKey, PtrKey }; + // identical to QGDict's, but PtrKey is not used at the moment + + QGCache( int maxCost, uint size, KeyType kt, bool caseSensitive, + bool copyKeys ); + QGCache( const QGCache & ); // not allowed, calls fatal() + ~QGCache(); + QGCache &operator=( const QGCache & ); // not allowed, calls fatal() + + uint count() const { return ((QGDict*)dict)->count(); } + uint size() const { return ((QGDict*)dict)->size(); } + int maxCost() const { return mCost; } + int totalCost() const { return tCost; } + void setMaxCost( int maxCost ); + void clear(); + + bool insert_string( const QString &key, QCollection::Item, + int cost, int priority ); + bool insert_other( const char *key, QCollection::Item, + int cost, int priority ); + bool remove_string( const QString &key ); + bool remove_other( const char *key ); + QCollection::Item take_string( const QString &key ); + QCollection::Item take_other( const char *key ); + + QCollection::Item find_string( const QString &key, bool ref=TRUE ) const; + QCollection::Item find_other( const char *key, bool ref=TRUE ) const; + + void statistics() const; + +private: + bool makeRoomFor( int cost, int priority = -1 ); + KeyType keytype; + QCList *lruList; + QCDict *dict; + int mCost; + int tCost; + bool copyk; +}; + + +class Q_EXPORT QGCacheIterator // generic cache iterator +{ +protected: + QGCacheIterator( const QGCache & ); + QGCacheIterator( const QGCacheIterator & ); + ~QGCacheIterator(); + QGCacheIterator &operator=( const QGCacheIterator & ); + + uint count() const; + bool atFirst() const; + bool atLast() const; + QCollection::Item toFirst(); + QCollection::Item toLast(); + + QCollection::Item get() const; + QString getKeyString() const; + const char *getKeyAscii() const; + long getKeyInt() const; + + QCollection::Item operator()(); + QCollection::Item operator++(); + QCollection::Item operator+=( uint ); + QCollection::Item operator--(); + QCollection::Item operator-=( uint ); + +protected: + QCListIt *it; // iterator on cache list +}; + + +#endif // QGCACHE_H Index: branches/xZenu/src/util/doxygen/qtools/qsortedlist.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qsortedlist.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qsortedlist.doc (revision 1322) @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** +** QSortedList documentation +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + + +/***************************************************************************** + QSortedList documentation + *****************************************************************************/ + +/*! + \class QSortedList qsortedlist.h + \brief The QSortedList class provides a list sorted by operator< and operator== + + \ingroup collection + \ingroup tools + + If you want to sort a QList you have to reimplement the + QGList::compareItems() method. If the elements of your list support + operator<() and operator==() then you can use QSortedList instead. + Its compareItems() calls operator<() and operator==() and returns an + appropriate result. + + Otherwise, this is as QList. + + \sa QList, \link collection.html Collection Classes\endlink +*/ + + +/*! + \fn QSortedList::QSortedList() + Constructs an empty list. +*/ + +/*! + \fn QSortedList::QSortedList( const QSortedList &list ) + Constructs a copy of \e list. + + Each item in \e list is copied to this new list. +*/ + +/*! + \fn QSortedList::~QSortedList() + Removes all items from the list and destroys the list. + + All list iterators that access this list will be reset. +*/ + +/*! + \fn QSortedList& QSortedList::operator=(const QSortedList& list) + Assigns \e list to this list and returns a reference to this list. + + This list is first cleared, then each item in \e list is + appended to this list. Only the pointers are copied + (shallow copy), unless newItem() has been reimplemented(). +*/ + +/*! + \fn int QSortedList::compareItems( QCollection::Item s1, QCollection::Item s2 ) + + \reimp + + This reimplementation uses operator< and operator== to compare. +*/ Index: branches/xZenu/src/util/doxygen/qtools/qlist.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qlist.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qlist.h (revision 1322) @@ -0,0 +1,139 @@ +/**************************************************************************** +** +** +** Definition of QList template/macro class +** +** Created : 920701 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QLIST_H +#define QLIST_H + +#ifndef QT_H +#include "qglist.h" +#endif // QT_H + + +template class Q_EXPORT QList : public QGList +{ +public: + QList() {} + QList( const QList &l ) : QGList(l) {} + ~QList() { clear(); } + QList &operator=(const QList &l) + { return (QList&)QGList::operator=(l); } + bool operator==( const QList &list ) const + { return QGList::operator==( list ); } + uint count() const { return QGList::count(); } + bool isEmpty() const { return QGList::count() == 0; } + bool insert( uint i, const type *d){ return QGList::insertAt(i,(QCollection::Item)d); } + void inSort( const type *d ) { QGList::inSort((QCollection::Item)d); } + void prepend( const type *d ) { QGList::insertAt(0,(QCollection::Item)d); } + void append( const type *d ) { QGList::append((QCollection::Item)d); } + bool remove( uint i ) { return QGList::removeAt(i); } + bool remove() { return QGList::remove((QCollection::Item)0); } + bool remove( const type *d ) { return QGList::remove((QCollection::Item)d); } + bool removeRef( const type *d ) { return QGList::removeRef((QCollection::Item)d); } + void removeNode( QLNode *n ) { QGList::removeNode(n); } + bool removeFirst() { return QGList::removeFirst(); } + bool removeLast() { return QGList::removeLast(); } + type *take( uint i ) { return (type *)QGList::takeAt(i); } + type *take() { return (type *)QGList::take(); } + type *takeNode( QLNode *n ) { return (type *)QGList::takeNode(n); } + void clear() { QGList::clear(); } + void sort() { QGList::sort(); } + int find( const type *d ) { return QGList::find((QCollection::Item)d); } + int findNext( const type *d ) { return QGList::find((QCollection::Item)d,FALSE); } + int findRef( const type *d ) { return QGList::findRef((QCollection::Item)d); } + int findNextRef( const type *d ){ return QGList::findRef((QCollection::Item)d,FALSE);} + uint contains( const type *d ) const { return QGList::contains((QCollection::Item)d); } + uint containsRef( const type *d ) const + { return QGList::containsRef((QCollection::Item)d); } + type *at( uint i ) { return (type *)QGList::at(i); } + int at() const { return QGList::at(); } + type *current() const { return (type *)QGList::get(); } + QLNode *currentNode() const { return QGList::currentNode(); } + type *getFirst() const { return (type *)QGList::cfirst(); } + type *getLast() const { return (type *)QGList::clast(); } + type *first() { return (type *)QGList::first(); } + type *last() { return (type *)QGList::last(); } + type *next() { return (type *)QGList::next(); } + type *prev() { return (type *)QGList::prev(); } + void toVector( QGVector *vec )const{ QGList::toVector(vec); } +private: + void deleteItem( QCollection::Item d ); +}; + +#if defined(Q_DELETING_VOID_UNDEFINED) +template<> inline void QList::deleteItem( QCollection::Item ) +{ +} +#endif + +template inline void QList::deleteItem( QCollection::Item d ) +{ + if ( del_item ) delete (type *)d; +} + + +template class Q_EXPORT QListIterator : public QGListIterator +{ +public: + QListIterator(const QList &l) :QGListIterator((QGList &)l) {} + ~QListIterator() {} + uint count() const { return list->count(); } + bool isEmpty() const { return list->count() == 0; } + bool atFirst() const { return QGListIterator::atFirst(); } + bool atLast() const { return QGListIterator::atLast(); } + type *toFirst() { return (type *)QGListIterator::toFirst(); } + type *toLast() { return (type *)QGListIterator::toLast(); } + operator type *() const { return (type *)QGListIterator::get(); } + type *operator*() { return (type *)QGListIterator::get(); } + + // No good, since QList (ie. QStrList fails... + // + // MSVC++ gives warning + // Sunpro C++ 4.1 gives error + // type *operator->() { return (type *)QGListIterator::get(); } + + type *current() const { return (type *)QGListIterator::get(); } + type *operator()() { return (type *)QGListIterator::operator()();} + type *operator++() { return (type *)QGListIterator::operator++(); } + type *operator+=(uint j) { return (type *)QGListIterator::operator+=(j);} + type *operator--() { return (type *)QGListIterator::operator--(); } + type *operator-=(uint j) { return (type *)QGListIterator::operator-=(j);} + QListIterator& operator=(const QListIterator&it) + { QGListIterator::operator=(it); return *this; } +}; + + +#endif // QLIST_H Index: branches/xZenu/src/util/doxygen/qtools/qintdict.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qintdict.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qintdict.doc (revision 1322) @@ -0,0 +1,475 @@ +/**************************************************************************** +** +** +** QIntDict and QIntDictIterator class documentation +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + + +/***************************************************************************** + QIntDict documentation + *****************************************************************************/ + +/*! + \class QIntDict qintdict.h + \brief The QIntDict class is a template class that provides a dictionary based on \c long keys. + + \ingroup collection + \ingroup tools + + QIntDict is implemented as a template class. Define a + template instance QIntDict\ to create a dictionary that operates on + pointers to X, or X*. + + A dictionary is a collection that associates an item with a key. + The key is used for inserting and looking up an item. QIntDict has + \c long keys. + + The dictionary has very fast insertion and lookup. + + Example: + \code + #include + #include + + void main() + { + QIntDict dict; // maps long ==> char* + + dict.insert( 33, "France" ); + dict.insert( 7, "Russia" ); + dict.insert( 49, "Norway" ); + + printf( "%s\n", dict[49] ); + printf( "%s\n", dict[33] ); + printf( "%s\n", dict[7] ); + + if ( !dict[39] ) + printf( "39 not defined\n" ); + } + \endcode + + Program output: + \code + Norway + France + Russia + 39 not defined + \endcode + + The dictionary in our example maps \c long keys to \c char* items. + QIntDict implements the \link operator[] [] operator\endlink to lookup + an item. + + QIntDict is implemented by QGDict as a hash array with a fixed number of + entries. Each array entry points to a singly linked list of buckets, in + which the dictionary items are stored. + + When an item is inserted with a key, the key is converted (hashed) to + an integer index into the hash array using the \c mod operation. The + item is inserted before the first bucket in the list of buckets. + + Looking up an item is normally very fast. The key is again hashed to an + array index. Then QIntDict scans the list of buckets and returns the item + found or null if the item was not found. You cannot insert null pointers + into a dictionary. + + The size of the hash array is very important. In order to get good + performance, you should use a suitably large \link primes.html prime + number\endlink. Suitable means equal to or larger than the maximum + expected number of dictionary items. + + Items with equal keys are allowed. When inserting two items with the + same key, only the last inserted item will be visible (last in, first out) + until it is removed. + + Example: + \code + #include + #include + + void main() + { + QIntDict dict; // maps long ==> char* + + dict.insert( 7, "Russia" ); + dict.insert( 7, "USSR" ); + + printf( "%s\n", dict[7] ); + dict.remove( 7 ); // Gorbie was here + printf( "%s\n", dict[7] ); + } + \endcode + + Program output: + \code + USSR + Russia + \endcode + + The QIntDictIterator class can traverse the dictionary contents, but only + in an arbitrary order. Multiple iterators may independently traverse the + same dictionary. + + Calling setAutoDelete(TRUE) for a dictionary tells it to delete items + that are removed . The default is to not delete items when they are + removed. + + When inserting an item into a dictionary, only the pointer is copied, not + the item itself. This is called a shallow copy. It is possible to make the + dictionary copy all of the item's data (known as a deep copy) when an + item is inserted. insert() calls the virtual function + QCollection::newItem() for the item to be inserted. + Inherit a dictionary and reimplement it if you want deep copies. + + When removing a dictionary item, the virtual function + QCollection::deleteItem() is called. QIntDict's default implementation + is to delete the item if auto-deletion is enabled. + + \sa QIntDictIterator, QDict, QAsciiDict, QPtrDict, + \link collection.html Collection Classes\endlink +*/ + + +/*! + \fn QIntDict::QIntDict( int size ) + Constructs a dictionary using an internal hash array with the size + \e size. + + Setting \e size to a suitably large \link primes.html prime number\endlink + (equal to or greater than the expected number of entries) makes the hash + distribution better and hence the loopup faster. +*/ + +/*! + \fn QIntDict::QIntDict( const QIntDict &dict ) + Constructs a copy of \e dict. + + Each item in \e dict are inserted into this dictionary. + Only the pointers are copied (shallow copy). +*/ + +/*! + \fn QIntDict::~QIntDict() + Removes all items from the dictionary and destroys it. + + All iterators that access this dictionary will be reset. + + \sa setAutoDelete() +*/ + +/*! + \fn QIntDict &QIntDict::operator=(const QIntDict &dict) + Assigns \e dict to this dictionary and returns a reference to this + dictionary. + + This dictionary is first cleared, then each item in \e dict is inserted + into this dictionary. + Only the pointers are copied (shallow copy), unless newItem() has been + reimplemented. +*/ + +/*! + \fn uint QIntDict::count() const + Returns the number of items in the dictionary. + \sa isEmpty() +*/ + +/*! + \fn uint QIntDict::size() const + Returns the size of the internal hash array (as specified in the + constructor). + \sa count() +*/ + +/*! + \fn void QIntDict::resize( uint newsize ) + Changes the size of the hashtable the \a newsize. + The contents of the dictionary are preserved, + but all iterators on the dictionary become invalid. +*/ + +/*! + \fn bool QIntDict::isEmpty() const + Returns TRUE if the dictionary is empty, i.e. count() == 0. Returns FALSE + otherwise. + \sa count() +*/ + +/*! + \fn void QIntDict::insert( long key, const type *item ) + Inserts the \e key with the \e item into the dictionary. + + The key does not have to be a unique dictionary key. If multiple items + are inserted with the same key, only the last item will be visible. + + Null items are not allowed. + + \sa replace() +*/ + +/*! + \fn void QIntDict::replace( long key, const type *item ) + Replaces an item which has a key equal to \e key with \e item. + + If the item does not already exist, it will be inserted. + + Null items are not allowed. + + Equivalent to: + \code + QIntDict dict; + ... + if ( dict.find(key) ) + dict.remove( key ); + dict.insert( key, item ); + \endcode + + If there are two or more items with equal keys, then the last inserted + of these will be replaced. + + \sa insert() +*/ + +/*! + \fn bool QIntDict::remove( long key ) + Removes the item associated with \e key from the dictionary. + Returns TRUE if successful, or FALSE if the key does not exist in the + dictionary. + + If there are two or more items with equal keys, then the last inserted + of these will be removed. + + The removed item is deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + All dictionary iterators that refer to the removed item will be set to + point to the next item in the dictionary traversing order. + + \sa take(), clear(), setAutoDelete() +*/ + +/*! + \fn type *QIntDict::take( long key ) + Takes the item associated with \e key out of the dictionary without + deleting it (even if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled). + + If there are two or more items with equal keys, then the last inserted + of these will be taken. + + Returns a pointer to the item taken out, or null if the key does not + exist in the dictionary. + + All dictionary iterators that refer to the taken item will be set to + point to the next item in the dictionary traversing order. + + \sa remove(), clear(), setAutoDelete() +*/ + +/*! + \fn void QIntDict::clear() + Removes all items from the dictionary. + + The removed items are deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + All dictionary iterators that access this dictionary will be reset. + + \sa remove(), take(), setAutoDelete() +*/ + +/*! + \fn type *QIntDict::find( long key ) const + Returns the item associated with \e key, or null if the key does not + exist in the dictionary. + + This function uses an internal hashing algorithm to optimize lookup. + + If there are two or more items with equal keys, then the last inserted + of these will be found. + + Equivalent to the [] operator. + + \sa operator[]() +*/ + +/*! + \fn type *QIntDict::operator[]( long key ) const + Returns the item associated with \e key, or null if the key does not + exist in the dictionary. + + This function uses an internal hashing algorithm to optimize lookup. + + If there are two or more items with equal keys, then the last inserted + of these will be found. + + Equivalent to the find() function. + + \sa find() +*/ + +/*! + \fn void QIntDict::statistics() const + Debugging-only function that prints out the dictionary distribution + using qDebug(). +*/ + + +/***************************************************************************** + QIntDictIterator documentation + *****************************************************************************/ + +/*! + \class QIntDictIterator qintdict.h + \brief The QIntDictIterator class provides an iterator for QIntDict collections. + + \ingroup collection + \ingroup tools + + QIntDictIterator is implemented as a template class. + Define a template instance QIntDictIterator\ to create a + dictionary iterator that operates on QIntDict\ (dictionary of X*). + + Example: + \code + #include + #include + + void main() + { + QIntDict dict; // maps long ==> char* + + dict.insert( 33, "France" ); + dict.insert( 7, "Russia" ); + dict.insert( 49, "Norway" ); + + QIntDictIterator it( dict ); // iterator for dict + + while ( it.current() ) { + printf( "%d -> %s\n", it.currentKey(), it.current() ); + ++it; + } + } + \endcode + + Program output: + \code + 7 -> Russia + 49 -> Norway + 33 -> France + \endcode + + Note that the traversal order is arbitrary, you are not guaranteed the + order above. + + Multiple iterators may independently traverse the same dictionary. + A QIntDict knows about all iterators that are operating on the dictionary. + When an item is removed from the dictionary, QIntDict update all + iterators that are referring the removed item to point to the next item + in the traversing order. + + \sa QIntDict, \link collection.html Collection Classes\endlink +*/ + +/*! + \fn QIntDictIterator::QIntDictIterator( const QIntDict &dict ) + Constructs an iterator for \e dict. The current iterator item is + set to point on the first item in the \e dict. +*/ + +/*! + \fn QIntDictIterator::~QIntDictIterator() + Destroys the iterator. +*/ + +/*! + \fn uint QIntDictIterator::count() const + Returns the number of items in the dictionary this iterator operates on. + \sa isEmpty() +*/ + +/*! + \fn bool QIntDictIterator::isEmpty() const + Returns TRUE if the dictionary is empty, i.e. count() == 0. Returns FALSE + otherwise. + \sa count() +*/ + +/*! + \fn type *QIntDictIterator::toFirst() + Sets the current iterator item to point to the first item in the + dictionary and returns a pointer to the item. + If the dictionary is empty it sets the current item to null and + returns null. +*/ + +/*! + \fn QIntDictIterator::operator type *() const + Cast operator. Returns a pointer to the current iterator item. + Same as current(). +*/ + +/*! + \fn type *QIntDictIterator::current() const + Returns a pointer to the current iterator item. +*/ + +/*! + \fn long QIntDictIterator::currentKey() const + Returns the key for the current iterator item. +*/ + +/*! + \fn type *QIntDictIterator::operator()() + Makes the succeeding item current and returns the original current item. + + If the current iterator item was the last item in the dictionary or if it + was null, null is returned. +*/ + +/*! + \fn type *QIntDictIterator::operator++() + Prefix ++ makes the succeeding item current and returns the new current + item. + + If the current iterator item was the last item in the dictionary or if it + was null, null is returned. +*/ + +/*! + \fn type *QIntDictIterator::operator+=( uint jump ) + Sets the current item to the item \e jump positions after the current item, + and returns a pointer to that item. + + If that item is beyond the last item or if the dictionary is empty, + it sets the current item to null and returns null. +*/ Index: branches/xZenu/src/util/doxygen/qtools/qgeneric.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgeneric.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgeneric.h (revision 1322) @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** +** Macros for pasting tokens; utilized by our generic classes +** +** Created : 920529 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QGENERIC_H +#define QGENERIC_H + +#error "do not include qgeneric.h any more" + +#endif // QGENERIC_H Index: branches/xZenu/src/util/doxygen/qtools/qtextcodec.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qtextcodec.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qtextcodec.cpp (revision 1322) @@ -0,0 +1,2071 @@ +/**************************************************************************** +** +** +** Implementation of QTextCodec class +** +** Created : 981015 +** +** Copyright (C)1998-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qtextcodec.h" +#ifndef QT_NO_TEXTCODEC + +#include "qlist.h" +#ifndef QT_NO_CODECS +#include "qutfcodec.h" +//#include "qgbkcodec.h" +//#include "qeucjpcodec.h" +//#include "qjiscodec.h" +//#include "qsjiscodec.h" +//#include "qeuckrcodec.h" +//#include "qbig5codec.h" +//#include "qrtlcodec.h" +//#include "qtsciicodec.h" +#endif + +#include "qfile.h" +#include "qstrlist.h" +#include "qstring.h" + +#include +#include +#include + + +static QList * all = 0; +static bool destroying_is_ok; // starts out as 0 + +/*! Deletes all the created codecs. + + \warning Do not call this function. + + QApplication calls this just before exiting, to delete any + QTextCodec objects that may be lying around. Since various other + classes hold pointers to QTextCodec objects, it is not safe to call + this function earlier. + + If you are using the utility classes (like QString) but not using + QApplication, calling this function at the very end of your + application can be helpful to chasing down memory leaks, as + QTextCodec objects will not show up. +*/ + +void QTextCodec::deleteAllCodecs() +{ + if ( !all ) + return; + + destroying_is_ok = TRUE; + QList * ball = all; + all = 0; + ball->clear(); + delete ball; + destroying_is_ok = FALSE; +} + + +static void setupBuiltinCodecs(); + + +static void realSetup() +{ +#if defined(CHECK_STATE) + if ( destroying_is_ok ) + qWarning( "creating new codec during codec cleanup" ); +#endif + all = new QList; + all->setAutoDelete( TRUE ); + setupBuiltinCodecs(); +} + + +static inline void setup() +{ + if ( !all ) + realSetup(); +} + + +class QTextStatelessEncoder: public QTextEncoder { + const QTextCodec* codec; +public: + QTextStatelessEncoder(const QTextCodec*); + QCString fromUnicode(const QString& uc, int& lenInOut); +}; + + +class QTextStatelessDecoder : public QTextDecoder { + const QTextCodec* codec; +public: + QTextStatelessDecoder(const QTextCodec*); + QString toUnicode(const char* chars, int len); +}; + +QTextStatelessEncoder::QTextStatelessEncoder(const QTextCodec* c) : + codec(c) +{ +} + + +QCString QTextStatelessEncoder::fromUnicode(const QString& uc, int& lenInOut) +{ + return codec->fromUnicode(uc,lenInOut); +} + + +QTextStatelessDecoder::QTextStatelessDecoder(const QTextCodec* c) : + codec(c) +{ +} + + +QString QTextStatelessDecoder::toUnicode(const char* chars, int len) +{ + return codec->toUnicode(chars,len); +} + + + +// NOT REVISED +/*! + \class QTextCodec qtextcodec.h + \brief Provides conversion between text encodings. + + By making objects of subclasses of QTextCodec, support for + new text encodings can be added to Qt. + + The abstract virtual functions describe the encoder to the + system and the coder is used as required in the different + text file formats supported QTextStream and, under X11 for the + locale-specific character input and output (under Windows NT + codecs are not needed for GUI I/O since the system works + with Unicode already, and Windows 95/98 has built-in convertors + for the 8-bit local encoding). + + More recently created QTextCodec objects take precedence + over earlier ones. + + To add support for another 8-bit encoding to Qt, make a subclass + or QTextCodec and implement at least the following methods: +
    +
    \c const char* name() const +
    Return the official name for the encoding. +
    \c int mibEnum() const +
    Return the MIB enum for the encoding if it is listed in the + + IANA character-sets encoding file. +
    + If the encoding is multi-byte then it will have "state"; that is, + the interpretation of some bytes will be dependent on some preceding + bytes. For such an encoding, you will need to implement +
    +
    \c QTextDecoder* makeDecoder() const +
    Return a QTextDecoder that remembers incomplete multibyte + sequence prefixes or other required state. +
    + If the encoding does \e not require state, you should implement: +
    +
    \c QString toUnicode(const char* chars, int len) const +
    Converts \e len characters from \e chars to Unicode. +
    + The base QTextCodec class has default implementations of the above + two functions, but they are mutually recursive, so you must + re-implement at least one of them, or both for improved efficiency. + + For conversion from Unicode to 8-bit encodings, it is rarely necessary + to maintain state. However, two functions similar to the two above + are used for encoding: +
    +
    \c QTextEncoder* makeEncoder() const +
    Return a QTextDecoder. +
    \c QCString fromUnicode(const QString& uc, int& lenInOut ) const; +
    Converts \e lenInOut characters (of type QChar) from the start + of the string \a uc, returning a QCString result, and also returning + the \link QCString::length() length\endlink + of the result in lenInOut. +
    + Again, these are mutually recursive so only one needs to be implemented, + or both if better efficiency is possible. + + Finally, you must implement: +
    +
    \c int heuristicContentMatch(const char* chars, int len) const +
    Gives a value indicating how likely it is that \e len characters + from \e chars are in the encoding. +
    + A good model for this function is the + QWindowsLocalCodec::heuristicContentMatch function found in the Qt sources. + + A QTextCodec subclass might have improved performance if you also + re-implement: +
    +
    \c bool canEncode( QChar ) const +
    Test if a Unicode character can be encoded. +
    \c bool canEncode( const QString& ) const +
    Test if a string of Unicode characters can be encoded. +
    \c int heuristicNameMatch(const char* hint) const +
    Test if a possibly non-standard name is referring to the codec. +
    +*/ + + +/*! + Constructs a QTextCodec, making it of highest precedence. + The QTextCodec should always be constructed on the heap + (with new), and once constructed it becomes the responsibility + of Qt to delete it (which is done at QApplication destruction). +*/ +QTextCodec::QTextCodec() +{ + setup(); + all->insert(0,this); +} + + +/*! + Destructs the QTextCodec. Note that you should not delete + codecs yourself - once created they become the responsibility + of Qt to delete. +*/ +QTextCodec::~QTextCodec() +{ + if ( !destroying_is_ok ) + qWarning("QTextCodec::~QTextCodec() called by application"); + if ( all ) + all->remove( this ); +} + + +/*! + Returns a value indicating how likely this decoder is + for decoding some format that has the given name. + + A good match returns a positive number around + the length of the string. A bad match is negative. + + The default implementation calls simpleHeuristicNameMatch() + with the name of the codec. +*/ +int QTextCodec::heuristicNameMatch(const char* hint) const +{ + return simpleHeuristicNameMatch(name(),hint); +} + + +// returns a string cotnaining the letters and numbers from input, +// with a space separating run of a character class. e.g. "iso8859-1" +// becomes "iso 8859 1" +static QString lettersAndNumbers( const char * input ) +{ + QString result; + QChar c; + + while( input && *input ) { + c = *input; + if ( c.isLetter() || c.isNumber() ) + result += c.lower(); + if ( input[1] ) { + // add space at character class transition, except + // transition from upper-case to lower-case letter + QChar n( input[1] ); + if ( c.isLetter() && n.isLetter() ) { + if ( c == c.lower() && n == n.upper() ) + result += ' '; + } else if ( c.category() != n.category() ) { + result += ' '; + } + } + input++; + } + return result.simplifyWhiteSpace(); +} + +/*! + A simple utility function for heuristicNameMatch() - it + does some very minor character-skipping + so that almost-exact matches score high. +*/ +int QTextCodec::simpleHeuristicNameMatch(const char* name, const char* hint) +{ + // if they're the same, return a perfect score. + if ( name && hint && qstrcmp( name, hint ) == 0 ) + return qstrlen( hint ); + + // if the letters and numbers are the same, we have an "almost" + // perfect match. + QString h( lettersAndNumbers( hint ) ); + QString n( lettersAndNumbers( name ) ); + if ( h == n ) + return qstrlen( hint )-1; + + if ( h.stripWhiteSpace() == n.stripWhiteSpace() ) + return qstrlen( hint )-2; + + // could do some more here, but I don't think it's worth it + + return 0; +} + + +/*! + Returns the QTextCodec \a i places from the more recently + inserted, or NULL if there is no such QTextCodec. Thus, + codecForIndex(0) returns the most recently created QTextCodec. +*/ +QTextCodec* QTextCodec::codecForIndex(int i) +{ + setup(); + return (uint)i >= all->count() ? 0 : all->at(i); +} + + +/*! + Returns the QTextCodec which matches the + \link QTextCodec::mibEnum() MIBenum\endlink \a mib. +*/ +QTextCodec* QTextCodec::codecForMib(int mib) +{ + setup(); + QListIterator i(*all); + QTextCodec* result; + for ( ; (result=i); ++i ) { + if ( result->mibEnum()==mib ) + break; + } + return result; +} + + + + + +#ifdef _OS_WIN32_ +class QWindowsLocalCodec: public QTextCodec +{ +public: + QWindowsLocalCodec(); + ~QWindowsLocalCodec(); + + QString toUnicode(const char* chars, int len) const; + QCString fromUnicode(const QString& uc, int& lenInOut ) const; + + const char* name() const; + int mibEnum() const; + + int heuristicContentMatch(const char* chars, int len) const; +}; + +QWindowsLocalCodec::QWindowsLocalCodec() +{ +} + +QWindowsLocalCodec::~QWindowsLocalCodec() +{ +} + + +QString QWindowsLocalCodec::toUnicode(const char* chars, int len) const +{ + if ( len == 1 && chars ) { // Optimization; avoids allocation + char c[2]; + c[0] = *chars; + c[1] = 0; + return qt_winMB2QString( c, 2 ); + } + if ( len < 0 ) + return qt_winMB2QString( chars ); + QCString s(chars,len+1); + return qt_winMB2QString(s); +} + +QCString QWindowsLocalCodec::fromUnicode(const QString& uc, int& lenInOut ) const +{ + QCString r = qt_winQString2MB( uc, lenInOut ); + lenInOut = r.length(); + return r; +} + + +const char* QWindowsLocalCodec::name() const +{ + return "System"; +} + +int QWindowsLocalCodec::mibEnum() const +{ + return 0; +} + + +int QWindowsLocalCodec::heuristicContentMatch(const char* chars, int len) const +{ + // ### Not a bad default implementation? + QString t = toUnicode(chars,len); + int l = t.length(); + QCString mb = fromUnicode(t,l); + int i=0; + while ( i < len ) + if ( chars[i] == mb[i] ) + i++; + return i; +} + +#else + +/* locale names mostly copied from XFree86 */ +static const char * const iso8859_2locales[] = { + "croatian", "cs", "cs_CS", "cs_CZ","cz", "cz_CZ", "czech", "hr", + "hr_HR", "hu", "hu_HU", "hungarian", "pl", "pl_PL", "polish", "ro", + "ro_RO", "rumanian", "serbocroatian", "sh", "sh_SP", "sh_YU", "sk", + "sk_SK", "sl", "sl_CS", "sl_SI", "slovak", "slovene", "sr_SP", 0 }; + +static const char * const iso8859_3locales[] = { + "eo", 0 }; + +static const char * const iso8859_4locales[] = { + "ee", "ee_EE", "lt", "lt_LT", "lv", "lv_LV", 0 }; + +static const char * const iso8859_5locales[] = { + "bg", "bg_BG", "bulgarian", "mk", "mk_MK", + "sp", "sp_YU", 0 }; + +static const char * const iso8859_6locales[] = { + "ar_AA", "ar_SA", "arabic", 0 }; + +static const char * const iso8859_7locales[] = { + "el", "el_GR", "greek", 0 }; + +static const char * const iso8859_8locales[] = { + "hebrew", "he", "he_IL", "iw", "iw_IL", 0 }; + +static const char * const iso8859_9locales[] = { + "tr", "tr_TR", "turkish", 0 }; + +static const char * const iso8859_15locales[] = { + "fr", "fi", "french", "finnish", "et", "et_EE", 0 }; + +static const char * const koi8_ulocales[] = { + "uk", "uk_UA", "ru_UA", "ukrainian", 0 }; + +static const char * const tis_620locales[] = { + "th", "th_TH", "thai", 0 }; + + +static bool try_locale_list( const char * const locale[], const char * lang ) +{ + int i; + for( i=0; locale[i] && qstrcmp(locale[i], lang); i++ ) + { } + return locale[i] != 0; +} + +// For the probably_koi8_locales we have to look. the standard says +// these are 8859-5, but almsot all Russion users uses KOI8-R and +// incorrectly set $LANG to ru_RU. We'll check tolower() to see what +// tolower() thinks ru_RU means. + +// If you read the history, it seems that many Russians blame ISO and +// Peristroika for the confusion. +// +// The real bug is that some programs break if the user specifies +// ru_RU.KOI8-R. + +static const char * const probably_koi8_rlocales[] = { + "ru", "ru_SU", "ru_RU", "russian", 0 }; + +// this means ANY of these locale aliases. if they're aliases for +// different locales, the code breaks. +static QTextCodec * ru_RU_codec = 0; + +static QTextCodec * ru_RU_hack( const char * i ) { + if ( ! ru_RU_codec ) { + QCString origlocale = setlocale( LC_CTYPE, i ); + // unicode koi8r latin5 name + // 0x044E 0xC0 0xEE CYRILLIC SMALL LETTER YU + // 0x042E 0xE0 0xCE CYRILLIC CAPITAL LETTER YU + int latin5 = tolower( 0xCE ); + int koi8r = tolower( 0xE0 ); + if ( koi8r == 0xC0 && latin5 != 0xEE ) { + ru_RU_codec = QTextCodec::codecForName( "KOI8-R" ); + } else if ( koi8r != 0xC0 && latin5 == 0xEE ) { + ru_RU_codec = QTextCodec::codecForName( "ISO 8859-5" ); + } else { + // something else again... let's assume... *throws dice* + ru_RU_codec = QTextCodec::codecForName( "KOI8-R" ); + qWarning( "QTextCodec: using KOI8-R, probe failed (%02x %02x %s)", + koi8r, latin5, i ); + } + setlocale( LC_CTYPE, origlocale.data() ); + } + return ru_RU_codec; +} + +#endif + +static QTextCodec * localeMapper = 0; + +void qt_set_locale_codec( QTextCodec *codec ) +{ + localeMapper = codec; +} + +/*! Returns a pointer to the codec most suitable for this locale. */ + +QTextCodec* QTextCodec::codecForLocale() +{ + if ( localeMapper ) + return localeMapper; + + setup(); + +#ifdef _OS_WIN32_ + localeMapper = new QWindowsLocalCodec; +#else + // Very poorly defined and followed standards causes lots of code + // to try to get all the cases... + + char * lang = qstrdup( getenv("LANG") ); + + char * p = lang ? strchr( lang, '.' ) : 0; + if ( !p || *p != '.' ) { + // Some versions of setlocale return encoding, others not. + char *ctype = qstrdup( setlocale( LC_CTYPE, 0 ) ); + // Some Linux distributions have broken locales which will return + // "C" for LC_CTYPE + if ( qstrcmp( ctype, "C" ) == 0 ) { + delete [] ctype; + } else { + if ( lang ) + delete [] lang; + lang = ctype; + p = lang ? strchr( lang, '.' ) : 0; + } + } + + if( p && *p == '.' ) { + // if there is an encoding and we don't know it, we return 0 + // User knows what they are doing. Codecs will believe them. + localeMapper = codecForName( lang ); + if ( !localeMapper ) { + // Use or codec disagree. + localeMapper = codecForName( p+1 ); + } + } + if ( !localeMapper || !(p && *p == '.') ) { + // if there is none, we default to 8859-1 + // We could perhaps default to 8859-15. + if ( try_locale_list( iso8859_2locales, lang ) ) + localeMapper = codecForName( "ISO 8859-2" ); + else if ( try_locale_list( iso8859_3locales, lang ) ) + localeMapper = codecForName( "ISO 8859-3" ); + else if ( try_locale_list( iso8859_4locales, lang ) ) + localeMapper = codecForName( "ISO 8859-4" ); + else if ( try_locale_list( iso8859_5locales, lang ) ) + localeMapper = codecForName( "ISO 8859-5" ); + else if ( try_locale_list( iso8859_6locales, lang ) ) + localeMapper = codecForName( "ISO 8859-6-I" ); + else if ( try_locale_list( iso8859_7locales, lang ) ) + localeMapper = codecForName( "ISO 8859-7" ); + else if ( try_locale_list( iso8859_8locales, lang ) ) + localeMapper = codecForName( "ISO 8859-8-I" ); + else if ( try_locale_list( iso8859_9locales, lang ) ) + localeMapper = codecForName( "ISO 8859-9" ); + else if ( try_locale_list( iso8859_15locales, lang ) ) + localeMapper = codecForName( "ISO 8859-15" ); + else if ( try_locale_list( tis_620locales, lang ) ) + localeMapper = codecForName( "ISO 8859-11" ); + else if ( try_locale_list( koi8_ulocales, lang ) ) + localeMapper = codecForName( "KOI8-U" ); + else if ( try_locale_list( probably_koi8_rlocales, lang ) ) + localeMapper = ru_RU_hack( lang ); + else if (!lang || !(localeMapper = codecForName(lang) )) + localeMapper = codecForName( "ISO 8859-1" ); + } + delete[] lang; +#endif + + return localeMapper; +} + + +/*! + Searches all installed QTextCodec objects, returning the one + which best matches given name. Returns NULL if no codec has + a match closeness above \a accuracy. + + \sa heuristicNameMatch() +*/ +QTextCodec* QTextCodec::codecForName(const char* hint, int accuracy) +{ + setup(); + QListIterator i(*all); + QTextCodec* result = 0; + int best=accuracy; + for ( QTextCodec* cursor; (cursor=i); ++i ) { + int s = cursor->heuristicNameMatch(hint); + if ( s > best ) { + best = s; + result = cursor; + } + } + return result; +} + + +/*! + Searches all installed QTextCodec objects, returning the one + which most recognizes the given content. May return 0. + + Note that this is often a poor choice, since character + encodings often use most of the available character sequences, + and so only by linguistic analysis could a true match be made. + + \sa heuristicContentMatch() +*/ +QTextCodec* QTextCodec::codecForContent(const char* chars, int len) +{ + setup(); + QListIterator i(*all); + QTextCodec* result = 0; + int best=0; + for ( QTextCodec* cursor; (cursor=i); ++i ) { + int s = cursor->heuristicContentMatch(chars,len); + if ( s > best ) { + best = s; + result = cursor; + } + } + return result; +} + + +/*! + \fn const char* QTextCodec::name() const + Subclasses of QTextCodec must reimplement this function. It returns + the name of the encoding supported by the subclass. When choosing + a name for an encoding, consider these points: +
      +
    • On X11, heuristicNameMatch( const char * hint ) + is used to test if a the QTextCodec + can convert between Unicode and the encoding of a font + with encoding \e hint, such as "iso8859-1" for Latin-1 fonts, + "koi8-r" for Russian KOI8 fonts. + The default algorithm of heuristicNameMatch() uses name(). +
    • Some applications may use this function to present + encodings to the end user. +
    +*/ + +/*! + \fn int QTextCodec::mibEnum() const + + Subclasses of QTextCodec must reimplement this function. It returns the + MIBenum (see + + the IANA character-sets encoding file for more information). + It is important that each QTextCodec subclass return the correct unique + value for this function. +*/ + + +/*! + \fn int QTextCodec::heuristicContentMatch(const char* chars, int len) const + + Subclasses of QTextCodec must reimplement this function. It examines + the first \a len bytes of \a chars and returns a value indicating how + likely it is that the string is a prefix of text encoded in the + encoding of the subclass. Any negative return value indicates that the text + is detectably not in the encoding (eg. it contains undefined characters). + A return value of 0 indicates that the text should be decoded with this + codec rather than as ASCII, but there + is no particular evidence. The value should range up to \a len. Thus, + most decoders will return -1, 0, or -\a len. + + The characters are not null terminated. + + \sa codecForContent(). +*/ + + +/*! + Creates a QTextDecoder which stores enough state to decode chunks + of char* data to create chunks of Unicode data. The default implementation + creates a stateless decoder, which is sufficient for only the simplest + encodings where each byte corresponds to exactly one Unicode character. + + The caller is responsible for deleting the returned object. +*/ +QTextDecoder* QTextCodec::makeDecoder() const +{ + return new QTextStatelessDecoder(this); +} + + +/*! + Creates a QTextEncoder which stores enough state to encode chunks + of Unicode data as char* data. The default implementation + creates a stateless encoder, which is sufficient for only the simplest + encodings where each Unicode character corresponds to exactly one char. + + The caller is responsible for deleting the returned object. +*/ +QTextEncoder* QTextCodec::makeEncoder() const +{ + return new QTextStatelessEncoder(this); +} + + +/*! + Subclasses of QTextCodec must reimplement this function or + makeDecoder(). It converts the first \a len characters of \a chars + to Unicode. + + The default implementation makes a decoder with makeDecoder() and + converts the input with that. Note that the default makeDecoder() + implementation makes a decoder that simply calls + this function, hence subclasses \e must reimplement one function or + the other to avoid infinite recursion. +*/ +QString QTextCodec::toUnicode(const char* chars, int len) const +{ + QTextDecoder* i = makeDecoder(); + QString result = i->toUnicode(chars,len); + delete i; + return result; +} + + +/*! + Subclasses of QTextCodec must reimplement either this function or + makeEncoder(). It converts the first \a lenInOut characters of \a + uc from Unicode to the encoding of the subclass. If \a lenInOut + is negative or too large, the length of \a uc is used instead. + + The value returned is the property of the caller, which is + responsible for deleting it with "delete []". The length of the + resulting Unicode character sequence is returned in \a lenInOut. + + The default implementation makes an encoder with makeEncoder() and + converts the input with that. Note that the default makeEncoder() + implementation makes an encoder that simply calls + this function, hence subclasses \e must reimplement one function or + the other to avoid infinite recursion. +*/ + +QCString QTextCodec::fromUnicode(const QString& uc, int& lenInOut) const +{ + QTextEncoder* i = makeEncoder(); + QCString result = i->fromUnicode(uc, lenInOut); + delete i; + return result; +} + +/*! + \overload QCString QTextCodec::fromUnicode(const QString& uc) const +*/ +QCString QTextCodec::fromUnicode(const QString& uc) const +{ + int l = uc.length(); + return fromUnicode(uc,l); +} + +/*! + \overload QString QTextCodec::toUnicode(const QByteArray& a, int len) const +*/ +QString QTextCodec::toUnicode(const QByteArray& a, int len) const +{ + int l = a.size(); + if( l > 0 && a.data()[l - 1] == '\0' ) l--; + l = QMIN( l, len ); + return toUnicode( a.data(), l ); +} + +/*! + \overload QString QTextCodec::toUnicode(const QByteArray& a) const +*/ +QString QTextCodec::toUnicode(const QByteArray& a) const +{ + int l = a.size(); + if( l > 0 && a.data()[l - 1] == '\0' ) l--; + return toUnicode( a.data(), l ); +} + +/*! + \overload QString QTextCodec::toUnicode(const char* chars) const +*/ +QString QTextCodec::toUnicode(const char* chars) const +{ + return toUnicode(chars,qstrlen(chars)); +} + +/*! + Returns TRUE if the unicode character \a ch can be fully encoded + with this codec. The default implementation tests if the result of + toUnicode(fromUnicode(ch)) is the original \a ch. Subclasses may be + able to improve the efficiency. +*/ +bool QTextCodec::canEncode( QChar ch ) const +{ + return toUnicode(fromUnicode(ch)) == ch; +} + +/*! + Returns TRUE if the unicode string \a s can be fully encoded + with this codec. The default implementation tests if the result of + toUnicode(fromUnicode(s)) is the original \a s. Subclasses may be + able to improve the efficiency. +*/ +bool QTextCodec::canEncode( const QString& s ) const +{ + return toUnicode(fromUnicode(s)) == s; +} + + + +/*! + \class QTextEncoder qtextcodec.h + \brief State-based encoder + + A QTextEncoder converts Unicode into another format, remembering + any state that is required between calls. + + \sa QTextCodec::makeEncoder() +*/ + +/*! + Destructs the encoder. +*/ +QTextEncoder::~QTextEncoder() +{ +} +/*! + \fn QCString QTextEncoder::fromUnicode(const QString& uc, int& lenInOut) + + Converts \a lenInOut characters (not bytes) from \a uc, producing + a QCString. \a lenInOut will also be set to the + \link QCString::length() length\endlink of the result (in bytes). + + The encoder is free to record state to use when subsequent calls are + made to this function (for example, it might change modes with escape + sequences if needed during the encoding of one string, then assume that + mode applies when a subsequent call begins). +*/ + +/*! + \class QTextDecoder qtextcodec.h + \brief State-based decoder + + A QTextEncoder converts a text format into Unicode, remembering + any state that is required between calls. + + \sa QTextCodec::makeEncoder() +*/ + + +/*! + Destructs the decoder. +*/ +QTextDecoder::~QTextDecoder() +{ +} + +/*! + \fn QString QTextDecoder::toUnicode(const char* chars, int len) + + Converts the first \a len bytes at \a chars to Unicode, returning the + result. + + If not all characters are used (eg. only part of a multi-byte + encoding is at the end of the characters), the decoder remembers + enough state to continue with the next call to this function. +*/ + +#define CHAINED 0xffff + +struct QMultiByteUnicodeTable { + // If multibyte, ignore unicode and index into multibyte + // with the next character. + QMultiByteUnicodeTable() : unicode(0xfffd), multibyte(0) { } + + ~QMultiByteUnicodeTable() + { + if ( multibyte ) + delete [] multibyte; + } + + ushort unicode; + QMultiByteUnicodeTable* multibyte; +}; + +#ifndef QT_NO_CODECS +static int getByte(char* &cursor) +{ + int byte = 0; + if ( *cursor ) { + if ( cursor[1] == 'x' ) + byte = strtol(cursor+2,&cursor,16); + else if ( cursor[1] == 'd' ) + byte = strtol(cursor+2,&cursor,10); + else + byte = strtol(cursor+2,&cursor,8); + } + return byte&0xff; +} + +class QTextCodecFromIOD; + +class QTextCodecFromIODDecoder : public QTextDecoder { + const QTextCodecFromIOD* codec; + QMultiByteUnicodeTable* mb; +public: + QTextCodecFromIODDecoder(const QTextCodecFromIOD* c); + QString toUnicode(const char* chars, int len); +}; + +class QTextCodecFromIOD : public QTextCodec { + friend class QTextCodecFromIODDecoder; + + QCString n; + + // If from_unicode_page[row()][cell()] is 0 and from_unicode_page_multibyte, + // use from_unicode_page_multibyte[row()][cell()] as string. + char** from_unicode_page; + char*** from_unicode_page_multibyte; + char unkn; + + // Only one of these is used + ushort* to_unicode; + QMultiByteUnicodeTable* to_unicode_multibyte; + int max_bytes_per_char; + QStrList aliases; + + bool stateless() const { return !to_unicode_multibyte; } + +public: + QTextCodecFromIOD(QIODevice* iod) + { + from_unicode_page = 0; + to_unicode_multibyte = 0; + to_unicode = 0; + from_unicode_page_multibyte = 0; + max_bytes_per_char = 1; + + const int maxlen=100; + char line[maxlen]; + char esc='\\'; + char comm='%'; + bool incmap = FALSE; + while (iod->readLine(line,maxlen) > 0) { + if (0==qstrnicmp(line,"",15)) + n = line+15; + else if (0==qstrnicmp(line," ",14)) + esc = line[14]; + else if (0==qstrnicmp(line," ",15)) + comm = line[15]; + else if (line[0]==comm && 0==qstrnicmp(line+1," alias ",7)) { + aliases.append(line+8); + } else if (0==qstrnicmp(line,"CHARMAP",7)) { + if (!from_unicode_page) { + from_unicode_page = new char*[256]; + for (int i=0; i<256; i++) + from_unicode_page[i]=0; + } + if (!to_unicode) { + to_unicode = new ushort[256]; + } + incmap = TRUE; + } else if (0==qstrnicmp(line,"END CHARMAP",11)) + break; + else if (incmap) { + char* cursor = line; + int byte=0,unicode=-1; + ushort* mb_unicode=0; + const int maxmb=8; // more -> we'll need to improve datastructures + char mb[maxmb+1]; + int nmb=0; + + while (*cursor) { + if (cursor[0]=='<' && cursor[1]=='U' && + cursor[2]>='0' && cursor[2]<='9' && + cursor[3]>='0' && cursor[3]<='9') { + + unicode = strtol(cursor+2,&cursor,16); + + } else if (*cursor==esc) { + + byte = getByte(cursor); + + if ( *cursor == esc ) { + if ( !to_unicode_multibyte ) { + to_unicode_multibyte = + new QMultiByteUnicodeTable[256]; + for (int i=0; i<256; i++) { + to_unicode_multibyte[i].unicode = + to_unicode[i]; + to_unicode_multibyte[i].multibyte = 0; + } + delete [] to_unicode; + to_unicode = 0; + } + QMultiByteUnicodeTable* mbut = + to_unicode_multibyte+byte; + mb[nmb++] = byte; + while ( nmb < maxmb && *cursor == esc ) { + // Always at least once + + mbut->unicode = CHAINED; + byte = getByte(cursor); + mb[nmb++] = byte; + if (!mbut->multibyte) { + mbut->multibyte = + new QMultiByteUnicodeTable[256]; + } + mbut = mbut->multibyte+byte; + mb_unicode = & mbut->unicode; + } + + if ( nmb > max_bytes_per_char ) + max_bytes_per_char = nmb; + } + } else { + cursor++; + } + } + + if (unicode >= 0 && unicode <= 0xffff) + { + QChar ch((ushort)unicode); + if (!from_unicode_page[ch.row()]) { + from_unicode_page[ch.row()] = new char[256]; + for (int i=0; i<256; i++) + from_unicode_page[ch.row()][i]=0; + } + if ( mb_unicode ) { + from_unicode_page[ch.row()][ch.cell()] = 0; + if (!from_unicode_page_multibyte) { + from_unicode_page_multibyte = new char**[256]; + for (int i=0; i<256; i++) + from_unicode_page_multibyte[i]=0; + } + if (!from_unicode_page_multibyte[ch.row()]) { + from_unicode_page_multibyte[ch.row()] = new char*[256]; + for (int i=0; i<256; i++) + from_unicode_page_multibyte[ch.row()][i] = 0; + } + mb[nmb++] = 0; + from_unicode_page_multibyte[ch.row()][ch.cell()] + = qstrdup(mb); + *mb_unicode = unicode; + } else { + from_unicode_page[ch.row()][ch.cell()] = (char)byte; + if ( to_unicode ) + to_unicode[byte] = unicode; + else + to_unicode_multibyte[byte].unicode = unicode; + } + } else { + } + } + } + n = n.stripWhiteSpace(); + + unkn = '?'; // ##### Might be a bad choice. + } + + ~QTextCodecFromIOD() + { + if ( from_unicode_page ) { + for (int i=0; i<256; i++) + if (from_unicode_page[i]) + delete [] from_unicode_page[i]; + } + if ( from_unicode_page_multibyte ) { + for (int i=0; i<256; i++) + if (from_unicode_page_multibyte[i]) + for (int j=0; j<256; j++) + if (from_unicode_page_multibyte[i][j]) + delete [] from_unicode_page_multibyte[i][j]; + } + if ( to_unicode ) + delete [] to_unicode; + if ( to_unicode_multibyte ) + delete [] to_unicode_multibyte; + } + + bool ok() const + { + return !!from_unicode_page; + } + + QTextDecoder* makeDecoder() const + { + if ( stateless() ) + return QTextCodec::makeDecoder(); + else + return new QTextCodecFromIODDecoder(this); + } + + const char* name() const + { + return n; + } + + int mibEnum() const + { + return 0; // #### Unknown. + } + + int heuristicContentMatch(const char*, int) const + { + return 0; + } + + int heuristicNameMatch(const char* hint) const + { + int bestr = QTextCodec::heuristicNameMatch(hint); + QStrListIterator it(aliases); + char* a; + while ((a=it.current())) { + ++it; + int r = simpleHeuristicNameMatch(a,hint); + if (r > bestr) + bestr = r; + } + return bestr; + } + + QString toUnicode(const char* chars, int len) const + { + const uchar* uchars = (const uchar*)chars; + QString result; + QMultiByteUnicodeTable* multibyte=to_unicode_multibyte; + if ( multibyte ) { + while (len--) { + QMultiByteUnicodeTable& mb = multibyte[*uchars]; + if ( mb.multibyte ) { + // Chained multi-byte + multibyte = mb.multibyte; + } else { + result += QChar(mb.unicode); + multibyte=to_unicode_multibyte; + } + uchars++; + } + } else { + while (len--) + result += QChar(to_unicode[*uchars++]); + } + return result; + } + + QCString fromUnicode(const QString& uc, int& lenInOut) const + { + if (lenInOut > (int)uc.length()) + lenInOut = uc.length(); + int rlen = lenInOut*max_bytes_per_char; + QCString rstr(rlen); + char* cursor = rstr.data(); + char* s=0; + int l = lenInOut; + int lout = 0; + for (int i=0; ito_unicode_multibyte; +} + +QString QTextCodecFromIODDecoder::toUnicode(const char* chars, int len) +{ + const uchar* uchars = (const uchar*)chars; + QString result; + while (len--) { + QMultiByteUnicodeTable& t = mb[*uchars]; + if ( t.multibyte ) { + // Chained multi-byte + mb = t.multibyte; + } else { + if ( t.unicode ) + result += QChar(t.unicode); + mb=codec->to_unicode_multibyte; + } + uchars++; + } + return result; +} + +/*! + Reads a POSIX2 charmap definition from \a iod. + The parser recognizes the following lines: +
    +   <code_set_name> name
    +   <escape_char> character
    +   % alias alias
    +   CHARMAP
    +   <token> /xhexbyte <Uunicode> ...
    +   <token> /ddecbyte <Uunicode> ...
    +   <token> /octbyte <Uunicode> ...
    +   <token> /any/any... <Uunicode> ...
    +   END CHARMAP
    +
    + + The resulting QTextCodec is returned (and also added to the + global list of codecs). The name() of the result is taken + from the code_set_name. + + Note that a codec constructed in this way uses much more memory + and is slower than a hand-written QTextCodec subclass, since + tables in code are in memory shared by all applications simultaneously + using Qt. + + \sa loadCharmapFile() +*/ +QTextCodec* QTextCodec::loadCharmap(QIODevice* iod) +{ + QTextCodecFromIOD* r = new QTextCodecFromIOD(iod); + if ( !r->ok() ) { + delete r; + r = 0; + } + return r; +} + +/*! + A convenience function for loadCharmap(). +*/ +QTextCodec* QTextCodec::loadCharmapFile(QString filename) +{ + QFile f(filename); + if (f.open(IO_ReadOnly)) { + QTextCodecFromIOD* r = new QTextCodecFromIOD(&f); + if ( !r->ok() ) + delete r; + else + return r; + } + return 0; +} +#endif //QT_NO_CODECS + + +/*! + Returns a string representing the current language. +*/ + +const char* QTextCodec::locale() +{ + static QCString lang; + if ( lang.isEmpty() ) { + lang = getenv( "LANG" ); //########Windows?? + if ( lang.isEmpty() ) + lang = "C"; + } + return lang; +} + + + +#ifndef QT_NO_CODECS + +class QSimpleTextCodec: public QTextCodec +{ +public: + QSimpleTextCodec( int ); + ~QSimpleTextCodec(); + + QString toUnicode(const char* chars, int len) const; + QCString fromUnicode(const QString& uc, int& lenInOut ) const; + + const char* name() const; + int mibEnum() const; + + int heuristicContentMatch(const char* chars, int len) const; + + int heuristicNameMatch(const char* hint) const; + +private: + int forwardIndex; +}; + + +#define LAST_MIB 2259 + +static struct { + const char * cs; + int mib; + Q_UINT16 values[128]; +} unicodevalues[] = { + // from RFC 1489, ftp://ftp.isi.edu/in-notes/rfc1489.txt + { "KOI8-R", 2084, + { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, + 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, + 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248, + 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, + 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, + 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E, + 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, + 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9, + 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, + 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, + 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, + 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A, + 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, + 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, + 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, + 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A } }, + // /**/ - The BULLET OPERATOR is confused. Some people think + // it should be 0x2022 (BULLET). + + // from RFC 2319, ftp://ftp.isi.edu/in-notes/rfc2319.txt + { "KOI8-U", 2088, + { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, + 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, + 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248, + 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, + 0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457, + 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x0491, 0x255D, 0x255E, + 0x255F, 0x2560, 0x2561, 0x0401, 0x0404, 0x2563, 0x0406, 0x0407, + 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x0490, 0x256C, 0x00A9, + 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, + 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, + 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, + 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A, + 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, + 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, + 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, + 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A } }, + + // next bits generated from tables on the Unicode 2.0 CD. we can + // use these tables since this is part of the transition to using + // unicode everywhere in qt. + + // $ for A in 8 9 A B C D E F ; do for B in 0 1 2 3 4 5 6 7 8 9 A B C D E F ; do echo 0x${A}${B} 0xFFFD ; done ; done > /tmp/digits ; for a in 8859-* ; do ( awk '/^0x[89ABCDEF]/{ print $1, $2 }' < $a ; cat /tmp/digits ) | sort | uniq -w4 | cut -c6- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/$a ; done + + // then I inserted the files manually. + { "ISO 8859-2", 5, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7, + 0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B, + 0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7, + 0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C, + 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E, + 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, + 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF, + 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F, + 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, + 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9} }, + { "ISO 8859-3", 6, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0xFFFD, 0x0124, 0x00A7, + 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0xFFFD, 0x017B, + 0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7, + 0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0xFFFD, 0x017C, + 0x00C0, 0x00C1, 0x00C2, 0xFFFD, 0x00C4, 0x010A, 0x0108, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0xFFFD, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7, + 0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0xFFFD, 0x00E4, 0x010B, 0x0109, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0xFFFD, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7, + 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9} }, + { "ISO 8859-4", 7, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7, + 0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF, + 0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7, + 0x00B8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014A, 0x017E, 0x014B, + 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x012A, + 0x0110, 0x0145, 0x014C, 0x0136, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x0168, 0x016A, 0x00DF, + 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B, + 0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9} }, + { "ISO 8859-5", 8, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, + 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F, + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, + 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, + 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F} }, + { "ISO 8859-6-I", 82, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x060C, 0x00AD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0x061B, 0xFFFD, 0xFFFD, 0xFFFD, 0x061F, + 0xFFFD, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, + 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F, + 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, + 0x0638, 0x0639, 0x063A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, + 0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F, + 0x0650, 0x0651, 0x0652, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} }, + { "ISO 8859-7", 10, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x2018, 0x2019, 0x00A3, 0xFFFD, 0xFFFD, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0xFFFD, 0x2015, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x00B7, + 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F, + 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0xFFFD, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, + 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, + 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, + 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, + 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, + 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0xFFFD} }, + { "ISO 8859-8-I", 85, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0xFFFD, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x203E, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x2017, + 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, + 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, + 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, + 0x05E8, 0x05E9, 0x05EA, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} }, + { "ISO 8859-9", 12, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF} }, + { "ISO 8859-10", 13, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0104, 0x0112, 0x0122, 0x012A, 0x0128, 0x0136, 0x00A7, + 0x013B, 0x0110, 0x0160, 0x0166, 0x017D, 0x00AD, 0x016A, 0x014A, + 0x00B0, 0x0105, 0x0113, 0x0123, 0x012B, 0x0129, 0x0137, 0x00B7, + 0x013C, 0x0111, 0x0161, 0x0167, 0x017E, 0x2015, 0x016B, 0x014B, + 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x00CF, + 0x00D0, 0x0145, 0x014C, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x0168, + 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, + 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x00EF, + 0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169, + 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138} }, + { "ISO 8859-13", 109, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x201D, 0x00A2, 0x00A3, 0x00A4, 0x201E, 0x00A6, 0x00A7, + 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x201C, 0x00B5, 0x00B6, 0x00B7, + 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6, + 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, + 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B, + 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, + 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF, + 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, + 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C, + 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, + 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x2019} }, + { "ISO 8859-14", 110, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x1E02, 0x1E03, 0x00A3, 0x010A, 0x010B, 0x1E0A, 0x00A7, + 0x1E80, 0x00A9, 0x1E82, 0x1E0B, 0x1EF2, 0x00AD, 0x00AE, 0x0178, + 0x1E1E, 0x1E1F, 0x0120, 0x0121, 0x1E40, 0x1E41, 0x00B6, 0x1E56, + 0x1E81, 0x1E57, 0x1E83, 0x1E60, 0x1EF3, 0x1E84, 0x1E85, 0x1E61, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x0174, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x1E6A, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x0176, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x0175, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x1E6B, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x0177, 0x00FF} }, + { "ISO 8859-15", 111, + { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7, + 0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x017D, 0x00B5, 0x00B6, 0x00B7, + 0x017E, 0x00B9, 0x00BA, 0x00BB, 0x0152, 0x0153, 0x0178, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF} }, + + // next bits generated again from tables on the Unicode 3.0 CD. + + // $ for a in CP* ; do ( awk '/^0x[89ABCDEF]/{ print $1, $2 }' < $a ) | sort | sed -e 's/#UNDEF.*$/0xFFFD/' | cut -c6- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/$a ; done + + { "CP 874", 0, //### what is the mib? + { 0x20AC, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x2026, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07, + 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F, + 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17, + 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F, + 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27, + 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F, + 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37, + 0x0E38, 0x0E39, 0x0E3A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0E3F, + 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47, + 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F, + 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, + 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} }, + { "CP 1250", 2250, + { 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021, + 0xFFFD, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0xFFFD, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A, + 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B, + 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C, + 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E, + 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, + 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF, + 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F, + 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, + 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9} }, + { "CP 1251", 2251, + { 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, + 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, + 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0xFFFD, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F, + 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, + 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407, + 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, + 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457, + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F} }, + { "CP 1252", 2252, + { 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0x017D, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0xFFFD, 0x017E, 0x0178, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF} }, + { "CP 1253", 2253, + { 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0xFFFD, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7, + 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F, + 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0xFFFD, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, + 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, + 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, + 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, + 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, + 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0xFFFD} }, + { "CP 1254", 2254, + { 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0xFFFD, 0xFFFD, 0x0178, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF} }, + { "CP 1255", 2255, + { 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x02DC, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7, + 0x05B8, 0x05B9, 0xFFFD, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF, + 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3, + 0x05F4, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, + 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, + 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, + 0x05E8, 0x05E9, 0x05EA, 0xFFFD, 0xFFFD, 0x200E, 0x200F, 0xFFFD} }, + { "CP 1256", 2256, + { 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688, + 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA, + 0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F, + 0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, + 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F, + 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7, + 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643, + 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF, + 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7, + 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2} }, + { "CP 1257", 2257, + { 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021, + 0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0x00A8, 0x02C7, 0x00B8, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0xFFFD, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0x00AF, 0x02DB, 0xFFFD, + 0x00A0, 0xFFFD, 0x00A2, 0x00A3, 0x00A4, 0xFFFD, 0x00A6, 0x00A7, + 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6, + 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, + 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B, + 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, + 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF, + 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, + 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C, + 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, + 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9} }, + { "CP 1258", 2258, + { 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0xFFFD, 0x2039, 0x0152, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x02DC, 0x2122, 0xFFFD, 0x203A, 0x0153, 0xFFFD, 0xFFFD, 0x0178, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x0300, 0x00CD, 0x00CE, 0x00CF, + 0x0110, 0x00D1, 0x0309, 0x00D3, 0x00D4, 0x01A0, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x01AF, 0x0303, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF, + 0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF} }, + + // this one is generated from the charmap file located in /usr/share/i18n/charmaps + // on most Linux distributions. The thai character set tis620 is byte by byte equivalent + // to iso8859-11, so we name it 8859-11 here, but recognise the name tis620 too. + + // $ for A in 8 9 A B C D E F ; do for B in 0 1 2 3 4 5 6 7 8 9 A B C D E F ; do echo x${A}${B} 0xFFFD ; done ; done > /tmp/digits ; ( cut -c25- < TIS-620 ; cat /tmp/digits ) | awk '/^x[89ABCDEF]/{ print $1, $2 }' | sed -e 's///' | sort | uniq -w4 | cut -c5- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/tis-620 + { "ISO 8859-11", 2259, // Thai character set mib enum taken from tis620 (which is byte by byte equivalent) + { 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07, + 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F, + 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17, + 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F, + 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27, + 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F, + 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37, + 0x0E38, 0x0E39, 0x0E3A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0E3F, + 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47, + 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F, + 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, + 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} }, + + // change LAST_MIB if you add more, and edit unicodevalues in + // kernel/qpsprinter.cpp too. +}; + + +static const QSimpleTextCodec * reverseOwner = 0; +static QArray * reverseMap = 0; + + +QSimpleTextCodec::QSimpleTextCodec( int i ) + : QTextCodec(), forwardIndex( i ) +{ +} + + +QSimpleTextCodec::~QSimpleTextCodec() +{ + if ( reverseOwner == this ) { + delete reverseMap; + reverseMap = 0; + reverseOwner = 0; + } +} + +// what happens if strlen(chars) 127 ) + uc[i] = unicodevalues[forwardIndex].values[c[i]-128]; + else + uc[i] = c[i]; + } + return r; +} + + +QCString QSimpleTextCodec::fromUnicode(const QString& uc, int& len ) const +{ + if ( reverseOwner != this ) { + int m = 0; + int i = 0; + while( i < 128 ) { + if ( unicodevalues[forwardIndex].values[i] > m && + unicodevalues[forwardIndex].values[i] < 0xfffd ) + m = unicodevalues[forwardIndex].values[i]; + i++; + } + m++; + if ( !reverseMap ) + reverseMap = new QArray( m ); + if ( m > (int)(reverseMap->size()) ) + reverseMap->resize( m ); + for( i = 0; i < 128 && i < m; i++ ) + (*reverseMap)[i] = (char)i; + for( ;i < m; i++ ) + (*reverseMap)[i] = '?'; + for( i=128; i<256; i++ ) { + int u = unicodevalues[forwardIndex].values[i-128]; + if ( u < m ) + (*reverseMap)[u] = (char)(unsigned char)(i); + } + reverseOwner = this; + } + if ( len <0 || len > (int)uc.length() ) + len = uc.length(); + QCString r( len+1 ); + int i = len; + int u; + const QChar* ucp = uc.unicode(); + char* rp = r.data(); + char* rmp = reverseMap->data(); + int rmsize = (int) reverseMap->size(); + while( i-- ) + { + u = ucp->unicode(); + *rp++ = u < 128 ? u : (( u < rmsize ) ? (*(rmp+u)) : '?' ); + ucp++; + } + r[len] = 0; + return r; +} + + +const char* QSimpleTextCodec::name() const +{ + return unicodevalues[forwardIndex].cs; +} + + +int QSimpleTextCodec::mibEnum() const +{ + return unicodevalues[forwardIndex].mib; +} + +int QSimpleTextCodec::heuristicNameMatch(const char* hint) const +{ + if ( hint[0]=='k' ) { + // Help people with messy fonts + if ( QCString(hint) == "koi8-1" ) + return QTextCodec::heuristicNameMatch("koi8-r")-1; + if ( QCString(hint) == "koi8-ru" ) + return QTextCodec::heuristicNameMatch("koi8-r")-1; + } else if ( hint[0] == 't' && QCString(name()) == "ISO 8859-11" ) { + // 8859-11 and tis620 are byte by bute equivalent + int i = simpleHeuristicNameMatch("tis620-0", hint); + if( !i ) + i = simpleHeuristicNameMatch("tis-620", hint); + if( i ) return i; + } + return QTextCodec::heuristicNameMatch(hint); +} + +int QSimpleTextCodec::heuristicContentMatch(const char* chars, int len) const +{ + if ( len<1 || !chars ) + return -1; + int i = 0; + const uchar * c = (const unsigned char *)chars; + int r = 0; + while( i= 128 ) { + if ( unicodevalues[forwardIndex].values[(*c)-128] == 0xfffd ) + return -1; + } + if ( (*c >= ' ' && *c < 127) || + *c == '\n' || *c == '\t' || *c == '\r' ) + r++; + i++; + c++; + } + if ( mibEnum()==4 ) + r+=1; + return r; +} + + +#endif // QT_NO_CODECS + +class QLatin1Codec: public QTextCodec +{ +public: + QLatin1Codec(); + ~QLatin1Codec(); + + QString toUnicode(const char* chars, int len) const; + QCString fromUnicode(const QString& uc, int& lenInOut ) const; + + const char* name() const; + int mibEnum() const; + + int heuristicContentMatch(const char* chars, int len) const; + + int heuristicNameMatch(const char* hint) const; + +private: + int forwardIndex; +}; + + +QLatin1Codec::QLatin1Codec() + : QTextCodec() +{ +} + + +QLatin1Codec::~QLatin1Codec() +{ +} + +// what happens if strlen(chars) (int)uc.length() ) + len = uc.length(); + QCString r( len+1 ); + int i = 0; + const QChar *ch = uc.unicode(); + while ( i < len ) { + r[i] = ch->row() ? '?' : ch->cell(); + i++; + ch++; + } + r[len] = 0; + return r; +} + + +const char* QLatin1Codec::name() const +{ + return "ISO 8859-1"; +} + + +int QLatin1Codec::mibEnum() const +{ + return 4; +} + +int QLatin1Codec::heuristicNameMatch(const char* hint) const +{ + return QTextCodec::heuristicNameMatch(hint); +} + +int QLatin1Codec::heuristicContentMatch(const char* chars, int len) const +{ + if ( len<1 || !chars ) + return -1; + int i = 0; + const uchar * c = (const unsigned char *)chars; + int r = 0; + while( i= 0x80 && *c < 0xa0 ) + return -1; + if ( (*c >= ' ' && *c < 127) || + *c == '\n' || *c == '\t' || *c == '\r' ) + r++; + i++; + c++; + } + return r; +} + + +static void setupBuiltinCodecs() +{ + (void)new QLatin1Codec; + +#ifndef QT_NO_CODECS + int i = 0; + do { + (void)new QSimpleTextCodec( i ); + } while( unicodevalues[i++].mib != LAST_MIB ); + + //(void)new QEucJpCodec; + //(void)new QSjisCodec; + //(void)new QJisCodec; + //(void)new QEucKrCodec; + //(void)new QGbkCodec; + //(void)new QBig5Codec; + (void)new QUtf8Codec; + (void)new QUtf16Codec; + //(void)new QHebrewCodec; + //(void)new QArabicCodec; + //(void)new QTsciiCodec; +#endif // QT_NO_CODECS +} + +#endif // QT_NO_TEXTCODEC Index: branches/xZenu/src/util/doxygen/qtools/qarray.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qarray.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qarray.h (revision 1322) @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** +** Definition of QArray template/macro class +** +** Created : 930906 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QARRAY_H +#define QARRAY_H + +#ifndef QT_H +#include "qgarray.h" +#endif // QT_H + + +template class Q_EXPORT 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 &a ) : QGArray(a) {} + ~QArray() {} + QArray &operator=(const QArray &a) + { return (QArray&)QGArray::assign(a); } + type *data() const { return (type *)QGArray::data(); } + uint nrefs() const { return QGArray::nrefs(); } + uint size() const { return QGArray::size()/sizeof(type); } + uint count() const { return size(); } + bool isEmpty() const { return QGArray::size() == 0; } + bool isNull() const { return QGArray::data() == 0; } + bool resize( uint size ) { return QGArray::resize(size*sizeof(type)); } + bool truncate( uint pos ) { return QGArray::resize(pos*sizeof(type)); } + bool fill( const type &d, int size = -1 ) + { return QGArray::fill((char*)&d,size,sizeof(type) ); } + void detach() { QGArray::detach(); } + QArray copy() const + { QArray tmp; return tmp.duplicate(*this); } + QArray& assign( const QArray& a ) + { return (QArray&)QGArray::assign(a); } + QArray& assign( const type *a, uint n ) + { return (QArray&)QGArray::assign((char*)a,n*sizeof(type)); } + QArray& duplicate( const QArray& a ) + { return (QArray&)QGArray::duplicate(a); } + QArray& duplicate( const type *a, uint n ) + { return (QArray&)QGArray::duplicate((char*)a,n*sizeof(type)); } + QArray& setRawData( const type *a, uint n ) + { return (QArray&)QGArray::setRawData((char*)a, + n*sizeof(type)); } + void resetRawData( const type *a, uint n ) + { QGArray::resetRawData((char*)a,n*sizeof(type)); } + int find( const type &d, uint i=0 ) const + { return QGArray::find((char*)&d,i,sizeof(type)); } + int contains( const type &d ) const + { return QGArray::contains((char*)&d,sizeof(type)); } + void sort() { QGArray::sort(sizeof(type)); } + int bsearch( const type &d ) const + { return QGArray::bsearch((const char*)&d,sizeof(type)); } + type& operator[]( int i ) const + { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } + type& at( uint i ) const + { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } + operator const type*() const { return (const type *)QGArray::data(); } + bool operator==( const QArray &a ) const { return isEqual(a); } + bool operator!=( const QArray &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(); } +}; + + +#endif // QARRAY_H Index: branches/xZenu/src/util/doxygen/qtools/qmutex_win32.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qmutex_win32.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qmutex_win32.cpp (revision 1322) @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "qmutex.h" +#include "qmutex_p.h" + +QMutexPrivate::QMutexPrivate() + : contenders(0) +{ + event = CreateEvent(0, FALSE, FALSE, 0); + if (!event) + qWarning("QMutexPrivate::QMutexPrivate: Cannot create event"); +} + +QMutexPrivate::~QMutexPrivate() +{ + CloseHandle(event); +} + +void QMutexPrivate::wait() +{ + WaitForSingleObject(event, INFINITE); +} + +void QMutexPrivate::wakeUp() +{ + SetEvent(event); +} + +//---------------------------------------------------------------------- + +class QCriticalSection +{ + public: + QCriticalSection() { InitializeCriticalSection(§ion); } + ~QCriticalSection() { DeleteCriticalSection(§ion); } + void lock() { EnterCriticalSection(§ion); } + void unlock() { LeaveCriticalSection(§ion); } + + private: + CRITICAL_SECTION section; +}; + +static QCriticalSection qAtomicCriticalSection; + +bool QAtomicInt::testAndSet(int expectedValue,int newValue) +{ + bool returnValue = false; + qAtomicCriticalSection.lock(); + if (m_value == expectedValue) + { + m_value = newValue; + returnValue = true; + } + qAtomicCriticalSection.unlock(); + return returnValue; +} + +int QAtomicInt::fetchAndAdd(int valueToAdd) +{ + int returnValue; + qAtomicCriticalSection.lock(); + returnValue = m_value; + m_value += valueToAdd; + qAtomicCriticalSection.unlock(); + return returnValue; +} + Index: branches/xZenu/src/util/doxygen/qtools/qgarray.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgarray.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgarray.cpp (revision 1322) @@ -0,0 +1,747 @@ +/**************************************************************************** +** +** +** Implementation of QGArray class +** +** Created : 930906 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#define QGARRAY_CPP +#include "qgarray.h" +#include "qstring.h" +#include + +#define USE_MALLOC // comment to use new/delete + +#undef NEW +#undef DELETE + +#if defined(USE_MALLOC) +#define NEW(type,size) ((type*)malloc(size*sizeof(type))) +#define DELETE(array) (free((char*)array)) +#else +#define NEW(type,size) (new type[size]) +#define DELETE(array) (delete[] array) +#define DONT_USE_REALLOC // comment to use realloc() +#endif + + +// NOT REVISED +/*! + \class QShared qshared.h + \brief The QShared struct is internally used for implementing shared classes. + + It only contains a reference count and member functions to increment and + decrement it. + + Shared classes normally have internal classes that inherit QShared and + add the shared data. + + \sa \link shclass.html Shared Classes\endlink +*/ + + +/*! + \class QGArray qgarray.h + \brief The QGArray class is an internal class for implementing the QArray class. + + QGArray is a strictly internal class that acts as base class for the + QArray template array. + + It contains an array of bytes and has no notion of an array element. +*/ + + +/*! + \internal + Constructs a null array. +*/ + +QGArray::QGArray() +{ + shd = newData(); + CHECK_PTR( shd ); +} + +/*! + \internal + Dummy constructor; does not allocate any data. + + This constructor does not initialize any array data so subclasses + must do it. The intention is to make the code more efficient. +*/ + +QGArray::QGArray( int, int ) +{ +} + +/*! + \internal + Constructs an array with room for \e size bytes. +*/ + +QGArray::QGArray( int size ) +{ + if ( size < 0 ) { +#if defined(CHECK_RANGE) + qWarning( "QGArray: Cannot allocate array with negative length" ); +#endif + size = 0; + } + shd = newData(); + CHECK_PTR( shd ); + if ( size == 0 ) // zero length + return; + shd->data = NEW(char,size); + CHECK_PTR( shd->data ); + shd->len = size; +} + +/*! + \internal + Constructs a shallow copy of \e a. +*/ + +QGArray::QGArray( const QGArray &a ) +{ + shd = a.shd; + shd->ref(); +} + +/*! + \internal + Dereferences the array data and deletes it if this was the last + reference. +*/ + +QGArray::~QGArray() +{ + if ( shd && shd->deref() ) { // delete when last reference + if ( shd->data ) // is lost + DELETE(shd->data); + deleteData( shd ); + } +} + + +/*! + \fn QGArray &QGArray::operator=( const QGArray &a ) + \internal + Assigns a shallow copy of \e a to this array and returns a reference to + this array. Equivalent to assign(). +*/ + +/*! + \fn void QGArray::detach() + \internal + Detaches this array from shared array data. +*/ + +/*! + \fn char *QGArray::data() const + \internal + Returns a pointer to the actual array data. +*/ + +/*! + \fn uint QGArray::nrefs() const + \internal + Returns the reference count. +*/ + +/*! + \fn uint QGArray::size() const + \internal + Returns the size of the array, in bytes. +*/ + + +/*! + \internal + Returns TRUE if this array is equal to \e a, otherwise FALSE. + The comparison is bitwise, of course. +*/ + +bool QGArray::isEqual( const QGArray &a ) const +{ + if ( size() != a.size() ) // different size + return FALSE; + if ( data() == a.data() ) // has same data + return TRUE; + return (size() ? memcmp( data(), a.data(), size() ) : 0) == 0; +} + + +/*! + \internal + Resizes the array to \e newsize bytes. +*/ + +bool QGArray::resize( uint newsize ) +{ + if ( newsize == shd->len ) // nothing to do + return TRUE; + if ( newsize == 0 ) { // remove array + duplicate( 0, 0 ); + return TRUE; + } + if ( shd->data ) { // existing data +#if defined(DONT_USE_REALLOC) + char *newdata = NEW(char,newsize); // manual realloc + memcpy( newdata, shd->data, QMIN(shd->len,newsize) ); + DELETE(shd->data); + shd->data = newdata; +#else + shd->data = (char *)realloc( shd->data, newsize ); +#endif + } else { + shd->data = NEW(char,newsize); + } + CHECK_PTR( shd->data ); + if ( !shd->data ) // no memory + return FALSE; + shd->len = newsize; + return TRUE; +} + +/*! + \internal + Fills the array with the repeated occurrences of \e d, which is + \e sz bytes long. + If \e len is specified as different from -1, then the array will be + resized to \e len*sz before it is filled. + + Returns TRUE if successful, or FALSE if the memory cannot be allocated + (only when \e len != -1). + + \sa resize() +*/ + +bool QGArray::fill( const char *d, int len, uint sz ) +{ + if ( len < 0 ) + len = shd->len/sz; // default: use array length + else if ( !resize( len*sz ) ) + return FALSE; + if ( sz == 1 ) // 8 bit elements + memset( data(), *d, len ); + else if ( sz == 4 ) { // 32 bit elements + register Q_INT32 *x = (Q_INT32*)data(); + Q_INT32 v = *((Q_INT32*)d); + while ( len-- ) + *x++ = v; + } else if ( sz == 2 ) { // 16 bit elements + register Q_INT16 *x = (Q_INT16*)data(); + Q_INT16 v = *((Q_INT16*)d); + while ( len-- ) + *x++ = v; + } else { // any other size elements + register char *x = data(); + while ( len-- ) { // more complicated + memcpy( x, d, sz ); + x += sz; + } + } + return TRUE; +} + +/*! + \internal + Shallow copy. Dereference the current array and references the data + contained in \e a instead. Returns a reference to this array. + \sa operator=() +*/ + +QGArray &QGArray::assign( const QGArray &a ) +{ + a.shd->ref(); // avoid 'a = a' + if ( shd->deref() ) { // delete when last reference + if ( shd->data ) // is lost + DELETE(shd->data); + deleteData( shd ); + } + shd = a.shd; + return *this; +} + +/*! + \internal + Shallow copy. Dereference the current array and references the + array data \e d, which contains \e len bytes. + Returns a reference to this array. + + Do not delete \e d later, because QGArray takes care of that. +*/ + +QGArray &QGArray::assign( const char *d, uint len ) +{ + if ( shd->count > 1 ) { // disconnect this + shd->count--; + shd = newData(); + CHECK_PTR( shd ); + } else { + if ( shd->data ) + DELETE(shd->data); + } + shd->data = (char *)d; + shd->len = len; + return *this; +} + +/*! + \internal + Deep copy. Dereference the current array and obtains a copy of the data + contained in \e a instead. Returns a reference to this array. + \sa assign(), operator=() +*/ + +QGArray &QGArray::duplicate( const QGArray &a ) +{ + if ( a.shd == shd ) { // a.duplicate(a) ! + if ( shd->count > 1 ) { + shd->count--; + register array_data *n = newData(); + CHECK_PTR( n ); + if ( (n->len=shd->len) ) { + n->data = NEW(char,n->len); + CHECK_PTR( n->data ); + if ( n->data ) + memcpy( n->data, shd->data, n->len ); + } else { + n->data = 0; + } + shd = n; + } + return *this; + } + char *oldptr = 0; + if ( shd->count > 1 ) { // disconnect this + shd->count--; + shd = newData(); + CHECK_PTR( shd ); + } else { // delete after copy was made + oldptr = shd->data; + } + if ( a.shd->len ) { // duplicate data + shd->data = NEW(char,a.shd->len); + CHECK_PTR( shd->data ); + if ( shd->data ) + memcpy( shd->data, a.shd->data, a.shd->len ); + } else { + shd->data = 0; + } + shd->len = a.shd->len; + if ( oldptr ) + DELETE(oldptr); + return *this; +} + +/*! + \internal + Deep copy. Dereferences the current array and obtains a copy of the + array data \e d instead. Returns a reference to this array. + \sa assign(), operator=() +*/ + +QGArray &QGArray::duplicate( const char *d, uint len ) +{ + char *data; + if ( d == 0 || len == 0 ) { + data = 0; + len = 0; + } else { + if ( shd->count == 1 && shd->len == len ) { + memcpy( shd->data, d, len ); // use same buffer + return *this; + } + data = NEW(char,len); + CHECK_PTR( data ); + memcpy( data, d, len ); + } + if ( shd->count > 1 ) { // detach + shd->count--; + shd = newData(); + CHECK_PTR( shd ); + } else { // just a single reference + if ( shd->data ) + DELETE(shd->data); + } + shd->data = data; + shd->len = len; + return *this; +} + +/*! + \internal + Resizes this array to \e len bytes and copies the \e len bytes at + address \e into it. + + \warning This function disregards the reference count mechanism. If + other QGArrays reference the same data as this, all will be updated. +*/ + +void QGArray::store( const char *d, uint len ) +{ // store, but not deref + resize( len ); + memcpy( shd->data, d, len ); +} + + +/*! + \fn array_data *QGArray::sharedBlock() const + \internal + Returns a pointer to the shared array block. + + \warning + + Do not use this function. Using it is begging for trouble. We dare + not remove it, for fear of breaking code, but we \e strongly + discourage new use of it. +*/ + +/*! + \fn void QGArray::setSharedBlock( array_data *p ) + \internal + Sets the shared array block to \e p. + + \warning + + Do not use this function. Using it is begging for trouble. We dare + not remove it, for fear of breaking code, but we \e strongly + discourage new use of it. +*/ + + +/*! + \internal + Sets raw data and returns a reference to the array. + + Dereferences the current array and sets the new array data to \e d and + the new array size to \e len. Do not attempt to resize or re-assign the + array data when raw data has been set. + Call resetRawData(d,len) to reset the array. + + Setting raw data is useful because it set QArray data without allocating + memory or copying data. + + Example of intended use: + \code + static uchar bindata[] = { 231, 1, 44, ... }; + QByteArray a; + a.setRawData( bindata, sizeof(bindata) ); // a points to bindata + QDataStream s( a, IO_ReadOnly ); // open on a's data + s >> ; // read raw bindata + s.close(); + a.resetRawData( bindata, sizeof(bindata) ); // finished + \endcode + + Example of misuse (do not do this): + \code + static uchar bindata[] = { 231, 1, 44, ... }; + QByteArray a, b; + a.setRawData( bindata, sizeof(bindata) ); // a points to bindata + a.resize( 8 ); // will crash + b = a; // will crash + a[2] = 123; // might crash + // forget to resetRawData - will crash + \endcode + + \warning If you do not call resetRawData(), QGArray will attempt to + deallocate or reallocate the raw data, which might not be too good. + Be careful. +*/ + +QGArray &QGArray::setRawData( const char *d, uint len ) +{ + duplicate( 0, 0 ); // set null data + shd->data = (char *)d; + shd->len = len; + return *this; +} + +/*! + \internal + Resets raw data. + + The arguments must be the data and length that were passed to + setRawData(). This is for consistency checking. +*/ + +void QGArray::resetRawData( const char *d, uint len ) +{ + if ( d != shd->data || len != shd->len ) { +#if defined(CHECK_STATE) + qWarning( "QGArray::resetRawData: Inconsistent arguments" ); +#endif + return; + } + shd->data = 0; + shd->len = 0; +} + + +/*! + \internal + Finds the first occurrence of \e d in the array from position \e index, + where \e sz is the size of the \e d element. + + Note that \e index is given in units of \e sz, not bytes. + + This function only compares whole cells, not bytes. +*/ + +int QGArray::find( const char *d, uint index, uint sz ) const +{ + index *= sz; + if ( index >= shd->len ) { +#if defined(CHECK_RANGE) + qWarning( "QGArray::find: Index %d out of range", index/sz ); +#endif + return -1; + } + register uint i; + uint ii; + switch ( sz ) { + case 1: { // 8 bit elements + register char *x = data() + index; + char v = *d; + for ( i=index; ilen; i++ ) { + if ( *x++ == v ) + break; + } + ii = i; + } + break; + case 2: { // 16 bit elements + register Q_INT16 *x = (Q_INT16*)(data() + index); + Q_INT16 v = *((Q_INT16*)d); + for ( i=index; ilen; i+=2 ) { + if ( *x++ == v ) + break; + } + ii = i/2; + } + break; + case 4: { // 32 bit elements + register Q_INT32 *x = (Q_INT32*)(data() + index); + Q_INT32 v = *((Q_INT32*)d); + for ( i=index; ilen; i+=4 ) { + if ( *x++ == v ) + break; + } + ii = i/4; + } + break; + default: { // any size elements + for ( i=index; ilen; i+=sz ) { + if ( memcmp( d, &shd->data[i], sz ) == 0 ) + break; + } + ii = i/sz; + } + break; + } + return ilen ? (int)ii : -1; +} + +/*! + \internal + Returns the number of occurrences of \e d in the array, where \e sz is + the size of the \e d element. + + This function only compares whole cells, not bytes. +*/ + +int QGArray::contains( const char *d, uint sz ) const +{ + register uint i = shd->len; + int count = 0; + switch ( sz ) { + case 1: { // 8 bit elements + register char *x = data(); + char v = *d; + while ( i-- ) { + if ( *x++ == v ) + count++; + } + } + break; + case 2: { // 16 bit elements + register Q_INT16 *x = (Q_INT16*)data(); + Q_INT16 v = *((Q_INT16*)d); + i /= 2; + while ( i-- ) { + if ( *x++ == v ) + count++; + } + } + break; + case 4: { // 32 bit elements + register Q_INT32 *x = (Q_INT32*)data(); + Q_INT32 v = *((Q_INT32*)d); + i /= 4; + while ( i-- ) { + if ( *x++ == v ) + count++; + } + } + break; + default: { // any size elements + for ( i=0; ilen; i+=sz ) { + if ( memcmp(d, &shd->data[i], sz) == 0 ) + count++; + } + } + break; + } + return count; +} + +static int cmp_item_size = 0; + +#if defined(Q_C_CALLBACKS) +extern "C" { +#endif + +static int cmp_arr( const void *n1, const void *n2 ) +{ + return ( n1 && n2 ) ? memcmp( n1, n2, cmp_item_size ) + : (int)((long)n1 - (long)n2); + // Qt 3.0: Add a virtual compareItems() method and call that instead +} + +#if defined(Q_C_CALLBACKS) +} +#endif + +/*! + \internal + + Sort the array. +*/ + +void QGArray::sort( uint sz ) +{ + int numItems = size() / sz; + if ( numItems < 2 ) + return; + cmp_item_size = sz; + qsort( shd->data, numItems, sz, cmp_arr ); +} + +/*! + \internal + + Binary search; assumes sorted array +*/ + +int QGArray::bsearch( const char *d, uint sz ) const +{ + int numItems = size() / sz; + if ( !numItems ) + return -1; + cmp_item_size = sz; + char* r = (char*)::bsearch( d, shd->data, numItems, sz, cmp_arr ); + if ( !r ) + return -1; + while( (r >= shd->data + sz) && (cmp_arr( r - sz, d ) == 0) ) + r -= sz; // search to first of equal elements; bsearch is undef + return (int)(( r - shd->data ) / sz); +} + + +/*! + \fn char *QGArray::at( uint index ) const + \internal + Returns a pointer to the byte at offset \e index in the array. +*/ + +/*! + \internal + Expand the array if necessary, and copies (the first part of) its + contents from the \e index*zx bytes at \e d. + + Returns TRUE if the operation succeeds, FALSE if it runs out of + memory. + + \warning This function disregards the reference count mechanism. If + other QGArrays reference the same data as this, all will be changed. +*/ + +bool QGArray::setExpand( uint index, const char *d, uint sz ) +{ + index *= sz; + if ( index >= shd->len ) { + if ( !resize( index+sz ) ) // no memory + return FALSE; + } + memcpy( data() + index, d, sz ); + return TRUE; +} + + +/*! + \internal + Prints a warning message if at() or [] is given a bad index. +*/ + +void QGArray::msg_index( uint index ) +{ +#if defined(CHECK_RANGE) + qWarning( "QGArray::at: Absolute index %d out of range", index ); +#else + Q_UNUSED( index ) +#endif +} + + +/*! + \internal + Returns a new shared array block. +*/ + +QGArray::array_data * QGArray::newData() +{ + return new array_data; +} + + +/*! + \internal + Deletes the shared array block. +*/ + +void QGArray::deleteData( array_data *p ) +{ + delete p; + p = 0; +} Index: branches/xZenu/src/util/doxygen/qtools/qcollection.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qcollection.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qcollection.cpp (revision 1322) @@ -0,0 +1,182 @@ +/**************************************************************************** +** +** +** Implementation of base class for all collection classes +** +** Created : 920820 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qcollection.h" + +// NOT REVISED +/*! + \class QCollection qcollection.h + \brief The QCollection class is the base class of all Qt collections. + + \ingroup collection + \ingroup tools + + The QCollection class is an abstract base class for the Qt \link + collection.html collection classes\endlink QDict, QList etc. via QGDict, + QGList etc. + + A QCollection knows only about the number of objects in the + collection and the deletion strategy (see setAutoDelete()). + + A collection is implemented using the \c Item (generic collection + item) type, which is a \c void*. The template classes that create + the real collections cast the \c Item to the required type. + + \sa \link collection.html Collection Classes\endlink +*/ + + +/*! \enum QCollection::Item + + This type is the generic "item" in a QCollection. +*/ + + +/*! + \fn QCollection::QCollection() + + Constructs a collection. The constructor is protected because + QCollection is an abstract class. +*/ + +/*! + \fn QCollection::QCollection( const QCollection & source ) + + Constructs a copy of \a source with autoDelete() set to FALSE. The + constructor is protected because QCollection is an abstract class. + + Note that if \a source has autoDelete turned on, copying it is a + good way to get memory leaks, reading freed memory, or both. +*/ + +/*! + \fn QCollection::~QCollection() + Destroys the collection. The destructor is protected because QCollection + is an abstract class. +*/ + + +/*! + \fn bool QCollection::autoDelete() const + Returns the setting of the auto-delete option (default is FALSE). + \sa setAutoDelete() +*/ + +/*! + \fn void QCollection::setAutoDelete( bool enable ) + + Sets the auto-delete option of the collection. + + Enabling auto-delete (\e enable is TRUE) will delete objects that + are removed from the collection. This can be useful if the + collection has the only reference to the objects. (Note that the + object can still be copied using the copy constructor - copying such + objects is a good way to get memory leaks, reading freed memory or + both.) + + Disabling auto-delete (\e enable is FALSE) will \e not delete objects + that are removed from the collection. This is useful if the objects + are part of many collections. + + The default setting is FALSE. + + \sa autoDelete() +*/ + + +/*! + \fn virtual uint QCollection::count() const + Returns the number of objects in the collection. +*/ + +/*! + \fn virtual void QCollection::clear() + Removes all objects from the collection. The objects will be deleted + if auto-delete has been enabled. + \sa setAutoDelete() +*/ + + +/*! + Virtual function that creates a copy of an object that is about to + be inserted into the collection. + + The default implementation returns the \e d pointer, i.e. no copy + is made. + + This function is seldom reimplemented in the collection template + classes. It is not common practice to make a copy of something + that is being inserted. + + \sa deleteItem() +*/ + +QCollection::Item QCollection::newItem( Item d ) +{ + return d; // just return reference +} + +/*! + Virtual function that deletes an item that is about to be removed from + the collection. + + The default implementation deletes \e d pointer if and only if + auto-delete has been enabled. + + This function is always reimplemented in the collection template + classes. + + \warning If you reimplement this function you must also reimplement + the destructor and call the virtual function clear() from your + destructor. This is due to the way virtual functions and + destructors work in C++: virtual functions in derived classes cannot + be called from a destructor. If you do not do this your + deleteItem() function will not be called when the container is + destructed. + + \sa newItem(), setAutoDelete() +*/ + +void QCollection::deleteItem( Item d ) +{ + if ( del_item ) +#if defined(Q_DELETING_VOID_UNDEFINED) + delete (char *)d; // default operation +#else + delete d; // default operation +#endif +} Index: branches/xZenu/src/util/doxygen/qtools/README =================================================================== --- branches/xZenu/src/util/doxygen/qtools/README (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/README (revision 1322) @@ -0,0 +1,4 @@ +This directory contains a small subset of Troll-Tech's Qt library +The subset is enough to build the doxygen executable, but lacks many of +the features found in the Qt library. See http://www.trolltech.com +for the full package. Index: branches/xZenu/src/util/doxygen/qtools/qptrdict.doc =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qptrdict.doc (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qptrdict.doc (revision 1322) @@ -0,0 +1,486 @@ +/**************************************************************************** +** +** +** QPtrDict and QPtrDictIterator class documentation +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + + +/***************************************************************************** + QPtrDict documentation + *****************************************************************************/ + +/*! + \class QPtrDict qptrdict.h + \brief The QPtrDict class is a template class that provides a dictionary based on \c void* keys. + + \ingroup collection + \ingroup tools + + QPtrDict is implemented as a template class. Define a + template instance QPtrDict\ to create a dictionary that operates on + pointers to X, or X*. + + A dictionary is a collection that associates an item with a key. + The key is used for inserting and looking up an item. QPtrDict has + \c void* keys. + + The dictionary has very fast insertion and lookup. + + Example: + \code + #include + #include + + void main() + { + int *a = new int[12]; + int *b = new int[10]; + int *c = new int[18]; + int *d = new int[13]; + + QPtrDict dict; // maps void* -> char* + + dict.insert( a, "a is int[12]" ); // describe pointers + dict.insert( b, "b is int[10]" ); + dict.insert( c, "c is int[18]" ); + + printf( "%s\n", dict[a] ); // print descriptions + printf( "%s\n", dict[b] ); + printf( "%s\n", dict[c] ); + + if ( !dict[d] ) + printf( "d not in dictionary\n" ); + } + \endcode + + Program output: + \code + a is int[12] + b is int[10] + c is int[18] + d not in dictionary + \endcode + + The dictionary in our example maps \c int* keys to \c char* items. + QPtrDict implements the \link operator[] [] operator\endlink to lookup + an item. + + QPtrDict is implemented by QGDict as a hash array with a fixed number of + entries. Each array entry points to a singly linked list of buckets, in + which the dictionary items are stored. + + When an item is inserted with a key, the key is converted (hashed) to + an integer index into the hash array using the \c mod operation. The + item is inserted before the first bucket in the list of buckets. + + Looking up an item is normally very fast. The key is again hashed to an + array index. Then QPtrDict scans the list of buckets and returns the item + found or null if the item was not found. You cannot insert null pointers + into a dictionary. + + The size of the hash array is very important. In order to get good + performance, you should use a suitably large \link primes.html prime + number\endlink. Suitable means equal to or larger than the maximum + expected number of dictionary items. + + Items with equal keys are allowed. When inserting two items with the + same key, only the last inserted item will be visible (last in, first out) + until it is removed. + + Example: + \code + #include + #include + + void main() + { + QPtrDict dict; // maps char* ==> char* + + double *ptr = new double[28]; + dict.insert( ptr, "first" ); + dict.insert( ptr, "second" ); + + printf( "%s\n", dict[ptr] ); + dict.remove( ptr ); + printf( "%s\n", dict[ptr] ); + } + \endcode + + Program output: + \code + second + first + \endcode + + The QPtrDictIterator class can traverse the dictionary contents, but only + in an arbitrary order. Multiple iterators may independently traverse the + same dictionary. + + Calling setAutoDelete(TRUE) for a dictionary tells it to delete items + that are removed . The default is to not delete items when they are + removed. + + When inserting an item into a dictionary, only the pointer is copied, not + the item itself. This is called a shallow copy. It is possible to make the + dictionary copy all of the item's data (known as a deep copy) when an + item is inserted. insert() calls the virtual function + QCollection::newItem() for the item to be inserted. + Inherit a dictionary and reimplement it if you want deep copies. + + When removing a dictionary item, the virtual function + QCollection::deleteItem() is called. QPtrDict's default implementation + is to delete the item if auto-deletion is enabled. + + \sa QPtrDictIterator, QDict, QAsciiDict, QIntDict, + \link collection.html Collection Classes\endlink +*/ + + +/*! + \fn QPtrDict::QPtrDict( int size ) + Constructs a dictionary using an internal hash array with the size + \e size. + + Setting \e size to a suitably large \link primes.html prime number\endlink + (equal to or greater than the expected number of entries) makes the hash + distribution better and hence the loopup faster. +*/ + +/*! + \fn QPtrDict::QPtrDict( const QPtrDict &dict ) + Constructs a copy of \e dict. + + Each item in \e dict are inserted into this dictionary. + Only the pointers are copied (shallow copy). +*/ + +/*! + \fn QPtrDict::~QPtrDict() + Removes all items from the dictionary and destroys it. + + All iterators that access this dictionary will be reset. + + \sa setAutoDelete() +*/ + +/*! + \fn QPtrDict &QPtrDict::operator=(const QPtrDict &dict) + Assigns \e dict to this dictionary and returns a reference to this + dictionary. + + This dictionary is first cleared, then each item in \e dict is inserted + into this dictionary. + Only the pointers are copied (shallow copy), unless newItem() has been + reimplemented(). +*/ + +/*! + \fn uint QPtrDict::count() const + Returns the number of items in the dictionary. + \sa isEmpty() +*/ + +/*! + \fn uint QPtrDict::size() const + Returns the size of the internal hash array (as specified in the + constructor). + \sa count() +*/ + +/*! + \fn void QPtrDict::resize( uint newsize ) + Changes the size of the hashtable the \a newsize. + The contents of the dictionary are preserved, + but all iterators on the dictionary become invalid. +*/ + +/*! + \fn bool QPtrDict::isEmpty() const + Returns TRUE if the dictionary is empty, i.e. count() == 0. Returns FALSE + otherwise. + \sa count() +*/ + +/*! + \fn void QPtrDict::insert( void *key, const type *item ) + Inserts the \e key with the \e item into the dictionary. + + The key does not have to be a unique dictionary key. If multiple items + are inserted with the same key, only the last item will be visible. + + Null items are not allowed. + + \sa replace() +*/ + +/*! + \fn void QPtrDict::replace( void *key, const type *item ) + Replaces an item which has a key equal to \e key with \e item. + + If the item does not already exist, it will be inserted. + + Null items are not allowed. + + Equivalent to: + \code + QPtrDict dict; + ... + if ( dict.find(key) ) + dict.remove( key ); + dict.insert( key, item ); + \endcode + + If there are two or more items with equal keys, then the last inserted + of these will be replaced. + + \sa insert() +*/ + +/*! + \fn bool QPtrDict::remove( void *key ) + Removes the item associated with \e key from the dictionary. + Returns TRUE if successful, or FALSE if the key does not exist in the + dictionary. + + If there are two or more items with equal keys, then the last inserted + of these will be removed. + + The removed item is deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + All dictionary iterators that refer to the removed item will be set to + point to the next item in the dictionary traversing order. + + \sa take(), clear(), setAutoDelete() +*/ + +/*! + \fn type *QPtrDict::take( void *key ) + Takes the item associated with \e key out of the dictionary without + deleting it (even if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled). + + If there are two or more items with equal keys, then the last inserted + of these will be taken. + + Returns a pointer to the item taken out, or null if the key does not + exist in the dictionary. + + All dictionary iterators that refer to the taken item will be set to + point to the next item in the dictionary traversing order. + + \sa remove(), clear(), setAutoDelete() +*/ + +/*! + \fn void QPtrDict::clear() + Removes all items from the dictionary. + + The removed items are deleted if \link QCollection::setAutoDelete() + auto-deletion\endlink is enabled. + + All dictionary iterators that access this dictionary will be reset. + + \sa remove(), take(), setAutoDelete() +*/ + +/*! + \fn type *QPtrDict::find( void *key ) const + Returns the item associated with \e key, or null if the key does not + exist in the dictionary. + + This function uses an internal hashing algorithm to optimize lookup. + + If there are two or more items with equal keys, then the last inserted + of these will be found. + + Equivalent to the [] operator. + + \sa operator[]() +*/ + +/*! + \fn type *QPtrDict::operator[]( void *key ) const + Returns the item associated with \e key, or null if the key does not + exist in the dictionary. + + This function uses an internal hashing algorithm to optimize lookup. + + If there are two or more items with equal keys, then the last inserted + of these will be found. + + Equivalent to the find() function. + + \sa find() +*/ + +/*! + \fn void QPtrDict::statistics() const + Debugging-only function that prints out the dictionary distribution + using qDebug(). +*/ + + +/***************************************************************************** + QPtrDictIterator documentation + *****************************************************************************/ + +/*! + \class QPtrDictIterator qptrdict.h + \brief The QPtrDictIterator class provides an iterator for QPtrDict collections. + + \ingroup collection + \ingroup tools + + QPtrDictIterator is implemented as a template class. + Define a template instance QPtrDictIterator\ to create a + dictionary iterator that operates on QPtrDict\ (dictionary of X*). + + Example: + \code + #include + #include + + void main() + { + int *a = new int[12]; + int *b = new int[10]; + int *c = new int[18]; + int *d = new int[13]; + + QPtrDict dict; // maps void* -> char* + + dict.insert( a, "a is int[12]" ); // describe pointers + dict.insert( b, "b is int[10]" ); + dict.insert( c, "c is int[18]" ); + + QPtrDictIterator it( dict ); // iterator for dict + + while ( it.current() ) { + printf( "%x -> %s\n", it.currentKey(), it.current() ); + ++it; + } + } + \endcode + + Program output: + \code + 804a788 -> a is int[12] + 804a7f0 -> c is int[18] + 804a7c0 -> b is int[10] + \endcode + + Note that the traversal order is arbitrary, you are not guaranteed the + order above. + + Multiple iterators may independently traverse the same dictionary. + A QPtrDict knows about all iterators that are operating on the dictionary. + When an item is removed from the dictionary, QPtrDict update all + iterators that are referring the removed item to point to the next item + in the traversing order. + + \sa QPtrDict, \link collection.html Collection Classes\endlink +*/ + +/*! + \fn QPtrDictIterator::QPtrDictIterator( const QPtrDict &dict ) + Constructs an iterator for \e dict. The current iterator item is + set to point on the first item in the \e dict. +*/ + +/*! + \fn QPtrDictIterator::~QPtrDictIterator() + Destroys the iterator. +*/ + +/*! + \fn uint QPtrDictIterator::count() const + Returns the number of items in the dictionary this iterator operates on. + \sa isEmpty() +*/ + +/*! + \fn bool QPtrDictIterator::isEmpty() const + Returns TRUE if the dictionary is empty, i.e. count() == 0. Returns FALSE + otherwise. + \sa count() +*/ + +/*! + \fn type *QPtrDictIterator::toFirst() + Sets the current iterator item to point to the first item in the + dictionary and returns a pointer to the item. + If the dictionary is empty it sets the current item to null and + returns null. +*/ + +/*! + \fn QPtrDictIterator::operator type *() const + Cast operator. Returns a pointer to the current iterator item. + Same as current(). +*/ + +/*! + \fn type *QPtrDictIterator::current() const + Returns a pointer to the current iterator item. +*/ + +/*! + \fn void *QPtrDictIterator::currentKey() const + Returns the key for the current iterator item. +*/ + +/*! + \fn type *QPtrDictIterator::operator()() + Makes the succeeding item current and returns the original current item. + + If the current iterator item was the last item in the dictionary or if it + was null, null is returned. +*/ + +/*! + \fn type *QPtrDictIterator::operator++() + Prefix ++ makes the succeeding item current and returns the new current + item. + + If the current iterator item was the last item in the dictionary or if it + was null, null is returned. +*/ + +/*! + \fn type *QPtrDictIterator::operator+=( uint jump ) + Sets the current item to the item \e jump positions after the current item, + and returns a pointer to that item. + + If that item is beyond the last item or if the dictionary is empty, + it sets the current item to null and returns null. +*/ Index: branches/xZenu/src/util/doxygen/qtools/qfileinfo.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qfileinfo.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qfileinfo.h (revision 1322) @@ -0,0 +1,138 @@ +/**************************************************************************** +** +** +** Definition of QFileInfo class +** +** Created : 950628 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QFILEINFO_H +#define QFILEINFO_H + +#ifndef QT_H +#include "qfile.h" +#include "qdatetime.h" +#endif // QT_H + + +class QDir; +struct QFileInfoCache; + + +class Q_EXPORT QFileInfo // file information class +{ +public: + enum PermissionSpec { + ReadUser = 0400, WriteUser = 0200, ExeUser = 0100, + ReadGroup = 0040, WriteGroup = 0020, ExeGroup = 0010, + ReadOther = 0004, WriteOther = 0002, ExeOther = 0001 }; + + QFileInfo(); + QFileInfo( const QString &file ); + QFileInfo( const QFile & ); +#ifndef QT_NO_DIR + QFileInfo( const QDir &, const QString &fileName ); +#endif + QFileInfo( const QFileInfo & ); + ~QFileInfo(); + + QFileInfo &operator=( const QFileInfo & ); + + void setFile( const QString &file ); + void setFile( const QFile & ); +#ifndef QT_NO_DIR + void setFile( const QDir &, const QString &fileName ); +#endif + bool exists() const; + void refresh() const; + bool caching() const; + void setCaching( bool ); + + QString filePath() const; + QString fileName() const; +#ifndef QT_NO_DIR //### + QString absFilePath() const; +#endif + QString baseName() const; + QString extension( bool complete = TRUE ) const; + +#ifndef QT_NO_DIR //### + QString dirPath( bool absPath = FALSE ) const; +#endif +#ifndef QT_NO_DIR + QDir dir( bool absPath = FALSE ) const; +#endif + bool isReadable() const; + bool isWritable() const; + bool isExecutable() const; + +#ifndef QT_NO_DIR //### + bool isRelative() const; + bool convertToAbs(); +#endif + + bool isFile() const; + bool isDir() const; + bool isSymLink() const; + + QString readLink() const; + + QString owner() const; + uint ownerId() const; + QString group() const; + uint groupId() const; + + bool permission( int permissionSpec ) const; + + uint size() const; + + QDateTime lastModified() const; + QDateTime lastRead() const; + +private: + void doStat() const; + static void slashify( QString & ); + static void makeAbs( QString & ); + + QString fn; + QFileInfoCache *fic; + bool cache; +}; + + +inline bool QFileInfo::caching() const +{ + return cache; +} + + +#endif // QFILEINFO_H Index: branches/xZenu/src/util/doxygen/qtools/qtextstream.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qtextstream.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qtextstream.cpp (revision 1322) @@ -0,0 +1,2237 @@ +/**************************************************************************** +** +** +** Implementation of QTextStream class +** +** Created : 940922 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qtextstream.h" + +#ifndef QT_NO_TEXTSTREAM +#include "qtextcodec.h" +#include "qregexp.h" +#include "qbuffer.h" +#include "qfile.h" +#include +#include +#include + +#if defined(_OS_WIN32_) +#include +#endif + +// NOT REVISED +/*! + \class QTextStream qtextstream.h + + \brief The QTextStream class provides basic functions for reading and + writing text using a QIODevice. + + \ingroup io + + \define endl + \define bin + \define oct + \define dec + \define hex + \define flush + \define ws + + The text stream class has a functional interface that is very + similar to that of the standard C++ iostream class. The difference + between iostream and QTextStream is that our stream operates on a + QIODevice, which is easily subclassed, while iostream operates on + FILE * pointers, which can not be subclassed. + + Qt provides several global functions similar to the ones in iostream: +
      +
    • \c bin sets the QTextStream to read/write binary numbers +
    • \c oct sets the QTextStream to read/write octal numbers +
    • \c dec sets the QTextStream to read/write decimal numbers +
    • \c hex sets the QTextStream to read/write hexadecimal numbers +
    • \c endl forces a line break +
    • \c flush forces the QIODevice to flush any buffered data +
    • \c ws eats any available white space (on input) +
    • \c reset resets the QTextStream to its default mode (see reset()). +
    + + \warning By default, QTextStream will automatically detect whether + integers in the stream are in decimal, octal, hexadecimal or binary + format when reading from the stream. In particular, a leading '0' + signifies octal, ie. the sequence "0100" will be interpreted as + 64. + + The QTextStream class reads and writes text and it is not + appropriate for dealing with binary data (but QDataStream is). + + By default output of Unicode text (ie. QString) is done using the + local 8-bit encoding. This can be changed using the setEncoding() + method. For input, the QTextStream will auto-detect standard + Unicode "byte order marked" text files, but otherwise the local + 8-bit encoding is used. + + \sa QDataStream +*/ + +/* + \class QTSManip qtextstream.h + + \brief The QTSManip class is an internal helper class for the + QTextStream. + + It is generally a very bad idea to use this class directly in + application programs. + + \internal + + This class makes it possible to give the QTextStream function objects + with arguments, like this: + \code + QTextStream cout( stdout, IO_WriteOnly ); + cout << setprecision( 8 ); // QTSManip used here! + cout << 3.14159265358979323846; + \endcode + + The setprecision() function returns a QTSManip object. + The QTSManip object contains a pointer to a member function in + QTextStream and an integer argument. + When serializing a QTSManip into a QTextStream, the function + is executed with the argument. +*/ + +/*! \fn QTSManip::QTSManip (QTSMFI m, int a) + + Constructs a QTSManip object which will call \a m (a member function + in QTextStream which accepts a single int) with argument \a a when + QTSManip::exec() is called. Used internally in e.g. endl: + + \code + s << "some text" << endl << "more text"; + \endcode +*/ + +/*! \fn void QTSManip::exec (QTextStream& s) + + Calls the member function specified in the constructor, for object + \a s. Used internally in e.g. endl: + + \code + s << "some text" << endl << "more text"; + \endcode +*/ + + +/***************************************************************************** + QTextStream member functions + *****************************************************************************/ + +#if defined(CHECK_STATE) +#undef CHECK_STREAM_PRECOND +#define CHECK_STREAM_PRECOND if ( !dev ) { \ + qWarning( "QTextStream: No device" ); \ + return *this; } +#else +#define CHECK_STREAM_PRECOND +#endif + + +#define I_SHORT 0x0010 +#define I_INT 0x0020 +#define I_LONG 0x0030 +#define I_TYPE_MASK 0x00f0 + +#define I_BASE_2 QTS::bin +#define I_BASE_8 QTS::oct +#define I_BASE_10 QTS::dec +#define I_BASE_16 QTS::hex +#define I_BASE_MASK (QTS::bin | QTS::oct | QTS::dec | QTS::hex) + +#define I_SIGNED 0x0100 +#define I_UNSIGNED 0x0200 +#define I_SIGN_MASK 0x0f00 + + +static const QChar QEOF = QChar((ushort)0xffff); //guaranteed not to be a character. + +const int QTextStream::basefield = I_BASE_MASK; +const int QTextStream::adjustfield = ( QTextStream::left | + QTextStream::right | + QTextStream::internal ); +const int QTextStream::floatfield = ( QTextStream::scientific | + QTextStream::fixed ); + + +class QTextStreamPrivate { +public: +#ifndef QT_NO_TEXTCODEC + QTextStreamPrivate() : decoder( 0 ), sourceType( NotSet ) {} + ~QTextStreamPrivate() { delete decoder; } + QTextDecoder *decoder; //??? +#else + QTextStreamPrivate() : sourceType( NotSet ) {} + ~QTextStreamPrivate() { } +#endif + QString ungetcBuf; + + enum SourceType { NotSet, IODevice, String, ByteArray, File }; + SourceType sourceType; +}; + + +// skips whitespace and returns the first non-whitespace character +QChar QTextStream::eat_ws() +{ + QChar c; + do { c = ts_getc(); } while ( c != QEOF && ts_isspace(c) ); + return c; +} + +void QTextStream::init() +{ + // ### ungetcBuf = QEOF; + dev = 0; // no device set + fstrm = owndev = FALSE; + mapper = 0; + d = new QTextStreamPrivate; + doUnicodeHeader = TRUE; //default to autodetect + latin1 = TRUE; // ### should use local? + internalOrder = QChar::networkOrdered(); //default to network order +} + +/*! + Constructs a data stream that has no IO device. +*/ + +QTextStream::QTextStream() +{ + init(); + setEncoding( Locale ); //### + reset(); + d->sourceType = QTextStreamPrivate::NotSet; +} + +/*! + Constructs a text stream that uses the IO device \a iod. +*/ + +QTextStream::QTextStream( QIODevice *iod ) +{ + init(); + setEncoding( Locale ); //### + dev = iod; // set device + reset(); + d->sourceType = QTextStreamPrivate::IODevice; +} + +// TODO: use special-case handling of this case in QTextStream, and +// simplify this class to only deal with QChar or QString data. +class QStringBuffer : public QIODevice { +public: + QStringBuffer( QString* str ); + ~QStringBuffer(); + bool open( int m ); + void close(); + void flush(); + uint size() const; + int at() const; + bool at( int pos ); + int readBlock( char *p, uint len ); + int writeBlock( const char *p, uint len ); + int getch(); + int putch( int ch ); + int ungetch( int ch ); +protected: + QString* s; + +private: // Disabled copy constructor and operator= + QStringBuffer( const QStringBuffer & ); + QStringBuffer &operator=( const QStringBuffer & ); +}; + + +QStringBuffer::QStringBuffer( QString* str ) +{ + s = str; +} + +QStringBuffer::~QStringBuffer() +{ +} + + +bool QStringBuffer::open( int m ) +{ + if ( !s ) { +#if defined(CHECK_STATE) + qWarning( "QStringBuffer::open: No string" ); +#endif + return FALSE; + } + if ( isOpen() ) { // buffer already open +#if defined(CHECK_STATE) + qWarning( "QStringBuffer::open: Buffer already open" ); +#endif + return FALSE; + } + setMode( m ); + if ( m & IO_Truncate ) { // truncate buffer + s->truncate( 0 ); + } + if ( m & IO_Append ) { // append to end of buffer + ioIndex = s->length()*sizeof(QChar); + } else { + ioIndex = 0; + } + setState( IO_Open ); + setStatus( 0 ); + return TRUE; +} + +void QStringBuffer::close() +{ + if ( isOpen() ) { + setFlags( IO_Direct ); + ioIndex = 0; + } +} + +void QStringBuffer::flush() +{ +} + +uint QStringBuffer::size() const +{ + return s ? s->length()*sizeof(QChar) : 0; +} + +int QStringBuffer::at() const +{ + return ioIndex; +} + +bool QStringBuffer::at( int pos ) +{ +#if defined(CHECK_STATE) + if ( !isOpen() ) { + qWarning( "QStringBuffer::at: Buffer is not open" ); + return FALSE; + } +#endif + if ( (uint)pos >= s->length()*2 ) { +#if defined(CHECK_RANGE) + qWarning( "QStringBuffer::at: Index %d out of range", pos ); +#endif + return FALSE; + } + ioIndex = pos; + return TRUE; +} + + +int QStringBuffer::readBlock( char *p, uint len ) +{ +#if defined(CHECK_STATE) + CHECK_PTR( p ); + if ( !isOpen() ) { // buffer not open + qWarning( "QStringBuffer::readBlock: Buffer not open" ); + return -1; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QStringBuffer::readBlock: Read operation not permitted" ); + return -1; + } +#endif + if ( (uint)ioIndex + len > s->length()*sizeof(QChar) ) { + // overflow + if ( (uint)ioIndex >= s->length()*sizeof(QChar) ) { + setStatus( IO_ReadError ); + return -1; + } else { + len = s->length()*2 - (uint)ioIndex; + } + } + memcpy( p, ((const char*)(s->unicode()))+ioIndex, len ); + ioIndex += len; + return len; +} + +int QStringBuffer::writeBlock( const char *p, uint len ) +{ +#if defined(CHECK_NULL) + if ( p == 0 && len != 0 ) + qWarning( "QStringBuffer::writeBlock: Null pointer error" ); +#endif +#if defined(CHECK_STATE) + if ( !isOpen() ) { // buffer not open + qWarning( "QStringBuffer::writeBlock: Buffer not open" ); + return -1; + } + if ( !isWritable() ) { // writing not permitted + qWarning( "QStringBuffer::writeBlock: Write operation not permitted" ); + return -1; + } + if ( ioIndex&1 ) { + qWarning( "QStringBuffer::writeBlock: non-even index - non Unicode" ); + return -1; + } + if ( len&1 ) { + qWarning( "QStringBuffer::writeBlock: non-even length - non Unicode" ); + return -1; + } +#endif + s->replace(ioIndex/2, len/2, (QChar*)p, len/2); + ioIndex += len; + return len; +} + +int QStringBuffer::getch() +{ +#if defined(CHECK_STATE) + if ( !isOpen() ) { // buffer not open + qWarning( "QStringBuffer::getch: Buffer not open" ); + return -1; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QStringBuffer::getch: Read operation not permitted" ); + return -1; + } +#endif + if ( (uint)ioIndex >= s->length()*2 ) { // overflow + setStatus( IO_ReadError ); + return -1; + } + return *((char*)s->unicode() + ioIndex++); +} + +int QStringBuffer::putch( int ch ) +{ + char c = ch; + if ( writeBlock(&c,1) < 0 ) + return -1; + else + return ch; +} + +int QStringBuffer::ungetch( int ch ) +{ +#if defined(CHECK_STATE) + if ( !isOpen() ) { // buffer not open + qWarning( "QStringBuffer::ungetch: Buffer not open" ); + return -1; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QStringBuffer::ungetch: Read operation not permitted" ); + return -1; + } +#endif + if ( ch != -1 ) { // something to do with eof + if ( ioIndex ) + ioIndex--; + else + ch = -1; + } + return ch; +} + + +/*! + Constructs a text stream that operates on a Unicode QString through an + internal device. + + If you set an encoding or codec with setEncoding() or setCodec(), this + setting is ignored for text streams that operate on QString. + + Example: + \code + QString str; + QTextStream ts( &str, IO_WriteOnly ); + ts << "pi = " << 3.14; // str == "pi = 3.14" + \endcode + + Writing data to the text stream will modify the contents of the string. + The string will be expanded when data is written beyond the end of the + string. Note that the string will not be truncated: + \code + QString str = "pi = 3.14"; + QTextStream ts( &str, IO_WriteOnly ); + ts << "2+2 = " << 2+2; // str == "2+2 = 414" + \endcode + + Note that since QString is Unicode, you should not use readRawBytes() + or writeRawBytes() on such a stream. +*/ + +QTextStream::QTextStream( QString* str, int filemode ) +{ + // TODO: optimize for this case as it becomes more common + // (see QStringBuffer above) + init(); + dev = new QStringBuffer( str ); + ((QStringBuffer *)dev)->open( filemode ); + owndev = TRUE; + setEncoding(RawUnicode); + reset(); + d->sourceType = QTextStreamPrivate::String; +} + +/*! \obsolete + + This constructor is equivalent to the constructor taking a QString* + parameter. +*/ + +QTextStream::QTextStream( QString& str, int filemode ) +{ + init(); + dev = new QStringBuffer( &str ); + ((QStringBuffer *)dev)->open( filemode ); + owndev = TRUE; + setEncoding(RawUnicode); + reset(); + d->sourceType = QTextStreamPrivate::String; +} + +/*! + Constructs a text stream that operates on a byte array through an + internal QBuffer device. + + Example: + \code + QByteArray array; + QTextStream ts( array, IO_WriteOnly ); + ts << "pi = " << 3.14 << '\0'; // array == "pi = 3.14" + \endcode + + Writing data to the text stream will modify the contents of the array. + The array will be expanded when data is written beyond the end of the + string. + + Same example, using a QBuffer: + \code + QByteArray array; + QBuffer buf( array ); + buf.open( IO_WriteOnly ); + QTextStream ts( &buf ); + ts << "pi = " << 3.14 << '\0'; // array == "pi = 3.14" + buf.close(); + \endcode +*/ + +QTextStream::QTextStream( QByteArray a, int mode ) +{ + init(); + dev = new QBuffer( a ); + ((QBuffer *)dev)->open( mode ); + owndev = TRUE; + setEncoding( Locale ); //### Locale??? + reset(); + d->sourceType = QTextStreamPrivate::ByteArray; +} + +/*! + Constructs a text stream that operates on an existing file handle \e fh + through an internal QFile device. + + Example: + \code + QTextStream cout( stdout, IO_WriteOnly ); + QTextStream cin ( stdin, IO_ReadOnly ); + QTextStream cerr( stderr, IO_WriteOnly ); + \endcode +*/ + +QTextStream::QTextStream( FILE *fh, int mode ) +{ + init(); + setEncoding( Locale ); //### + dev = new QFile; + ((QFile *)dev)->open( mode, fh ); + fstrm = owndev = TRUE; + reset(); + d->sourceType = QTextStreamPrivate::File; +} + +/*! + Destructs the text stream. + + The destructor does not affect the current IO device. +*/ + +QTextStream::~QTextStream() +{ + if ( owndev ) + delete dev; + delete d; +} + +/*! + Positions the read pointer at the first non-whitespace character. +*/ +void QTextStream::skipWhiteSpace() +{ + ts_ungetc( eat_ws() ); +} + + +/*! + \fn Encoding QTextStream::encoding() const + + Returns the encoding mode of the stream. + + \sa setEncoding() +*/ + +/*! + Tries to read len characters from the stream and stores them in \a buf. + Returns the number of characters really read. + Attention: There will no QEOF appended if the read reaches the end of + the file. EOF is reached when the return value does not equal \a len. +*/ +uint QTextStream::ts_getbuf( QChar* buf, uint len ) +{ + if( len<1 ) + return 0; + + uint rnum=0; // the number of QChars really read + + if ( d && d->ungetcBuf.length() ) { + while( rnum < len && rnum < d->ungetcBuf.length() ) { + buf[rnum] = d->ungetcBuf.constref(rnum); + rnum++; + } + d->ungetcBuf = d->ungetcBuf.mid( rnum ); + if ( rnum >= len ) + return rnum; + } + + // we use dev->ungetch() for one of the bytes of the unicode + // byte-order mark, but a local unget hack for the other byte: + int ungetHack = EOF; + + if ( doUnicodeHeader ) { + doUnicodeHeader = FALSE; //only at the top + int c1 = dev->getch(); + if ( c1 == EOF ) + return rnum; + int c2 = dev->getch(); + if ( c1 == 0xfe && c2 == 0xff ) { + mapper = 0; + latin1 = FALSE; + internalOrder = QChar::networkOrdered(); //network order + } else if ( c1 == 0xff && c2 == 0xfe ) { + mapper = 0; + latin1 = FALSE; + internalOrder = !QChar::networkOrdered(); //reverse network order + } else { + if ( c2 != EOF ) { + dev->ungetch( c2 ); + ungetHack = c1; + } else { + dev->ungetch( c1 ); + // note that a small possible bug might hide here + // here, if only the first byte of a file has made it + // so far, and that first byte is half of the + // byte-order mark, then the utfness will not be + // detected. whether or not this is a bug depends on + // taste. I can't really decide. + } + } + } + +#ifndef QT_NO_TEXTCODEC + if ( mapper ) { + bool shortRead = FALSE; + if ( !d->decoder ) + d->decoder = mapper->makeDecoder(); + while( rnum < len ) { + QString s; + bool readBlock = !( len == 1+rnum ); + while ( TRUE ) { + // for efficiency: normally read a whole block + if ( readBlock ) { + // guess buffersize; this may be wrong (too small or too + // big). But we can handle this (either iterate reading + // or use ungetcBuf). + // Note that this might cause problems for codecs where + // one byte can result in >1 Unicode Characters if bytes + // are written to the stream in the meantime (loss of + // synchronicity). + uint rlen = len - rnum; + char *cbuf = new char[ rlen ]; + if ( ungetHack != EOF ) { + rlen = 1+dev->readBlock( cbuf+1, rlen-1 ); + cbuf[0] = (char)ungetHack; + ungetHack = EOF; + } else { + rlen = dev->readBlock( cbuf, rlen ); + } + s += d->decoder->toUnicode( cbuf, rlen ); + delete[] cbuf; + // use buffered reading only for the first time, because we + // have to get the stream synchronous again (this is easier + // with single character reading) + readBlock = FALSE; + } + // get stream (and codec) in sync + int c; + if ( ungetHack == EOF ) { + c = dev->getch(); + } else { + c = ungetHack; + ungetHack = EOF; + } + if ( c == EOF ) { + shortRead = TRUE; + break; + } + char b = c; + uint lengthBefore = s.length(); + s += d->decoder->toUnicode( &b, 1 ); + if ( s.length() > lengthBefore ) + break; // it seems we are in sync now + } + uint i = 0; + while( rnum < len && i < s.length() ) + buf[rnum++] = s.constref(i++); + if ( s.length() > i ) + // could be = but append is clearer + d->ungetcBuf.append( s.mid( i ) ); + if ( shortRead ) + return rnum; + } + } else +#endif + if ( latin1 ) { + if ( len == 1+rnum ) { + // use this method for one character because it is more efficient + // (arnt doubts whether it makes a difference, but lets it stand) + int c = (ungetHack == EOF) ? dev->getch() : ungetHack; + if ( c != EOF ) + buf[rnum++] = (char)c; + } else { + if ( ungetHack != EOF ) { + buf[rnum++] = (char)ungetHack; + ungetHack = EOF; + } + char *cbuf = new char[len - rnum]; + while ( !dev->atEnd() && rnum < len ) { + uint rlen = len - rnum; + rlen = dev->readBlock( cbuf, rlen ); + uint i = 0; + while( i < rlen ) + buf[rnum++] = cbuf[i++]; + } + delete[] cbuf; + } + } else { // UCS-2 or UTF-16 + if ( len == 1+rnum ) { + int c1 = (ungetHack == EOF) ? dev->getch() : ungetHack; + if ( c1 == EOF ) + return rnum; + int c2 = dev->getch(); + if ( c2 == EOF ) + return rnum; + if ( isNetworkOrder() ) + buf[rnum++] = QChar( c2, c1 ); + else + buf[rnum++] = QChar( c1, c2 ); + } else { + char *cbuf = new char[ 2*( len - rnum ) ]; // for paranoids: overflow possible + while ( !dev->atEnd() && rnum < len ) { + uint rlen = 2 * ( len-rnum ); + if ( ungetHack != EOF ) { + rlen = 1+dev->readBlock( cbuf+1, rlen-1 ); + cbuf[0] = (char)ungetHack; + ungetHack = EOF; + } else { + rlen = dev->readBlock( cbuf, rlen ); + } + // We can't use an odd number of bytes, so put it back. But + // do it only if we are capable of reading more -- normally + // there should not be an odd number, but the file might be + // truncated or not in UTF-16... + if ( (rlen & 1) == 1 ) + if ( !dev->atEnd() ) + dev->ungetch( cbuf[--rlen] ); + uint i = 0; + if ( isNetworkOrder() ) { + while( i < rlen ) { + buf[rnum++] = QChar( cbuf[i+1], cbuf[i] ); + i+=2; + } + } else { + while( i < rlen ) { + buf[rnum++] = QChar( cbuf[i], cbuf[i+1] ); + i+=2; + } + } + } + delete[] cbuf; + } + } + return rnum; +} + + +/*! + Puts one character to the stream. +*/ +void QTextStream::ts_putc( QChar c ) +{ +#ifndef QT_NO_TEXTCODEC + if ( mapper ) { + int len = 1; + QString s = c; + QCString block = mapper->fromUnicode( s, len ); + dev->writeBlock( block, len ); + } else +#endif + if ( latin1 ) { + if( c.row() ) + dev->putch( '?' ); //######unknown character??? + else + dev->putch( c.cell() ); + } else { + if ( doUnicodeHeader ) { + doUnicodeHeader = FALSE; + ts_putc( QChar::byteOrderMark ); + } + if ( internalOrder ) { + dev->writeBlock( (char*)&c, sizeof(QChar) ); + } else if ( isNetworkOrder() ) { + dev->putch(c.row()); + dev->putch(c.cell()); + } else { + dev->putch(c.cell()); + dev->putch(c.row()); + } + } +} + +/*! + Puts one character to the stream. +*/ +void QTextStream::ts_putc(int ch) +{ + ts_putc(QChar((ushort)ch)); +} + +bool QTextStream::ts_isdigit(QChar c) +{ + return c.isDigit(); +} + +bool QTextStream::ts_isspace( QChar c ) +{ + return c.isSpace(); +} + +void QTextStream::ts_ungetc( QChar c ) +{ + if ( c.unicode() == 0xffff ) + return; + + d->ungetcBuf.prepend( c ); +} + + + +/*! + Reads \e len bytes from the stream into \e e s and returns a reference to + the stream. + + The buffer \e s must be preallocated. + + Note that no encoding is done by this function. + + \warning The behaviour of this function is undefined unless the + stream's encoding is set to Unicode or Latin1. + + \sa QIODevice::readBlock() +*/ + +QTextStream &QTextStream::readRawBytes( char *s, uint len ) +{ + dev->readBlock( s, len ); + return *this; +} + +/*! + Writes the \e len bytes from \e s to the stream and returns a reference to + the stream. + + Note that no encoding is done by this function. + + \sa QIODevice::writeBlock() +*/ + +QTextStream &QTextStream::writeRawBytes( const char* s, uint len ) +{ + dev->writeBlock( s, len ); + return *this; +} + + +QTextStream &QTextStream::writeBlock( const char* p, uint len ) +{ + if ( doUnicodeHeader ) { + doUnicodeHeader = FALSE; + if ( !mapper && !latin1 ) + ts_putc( QChar::byteOrderMark ); + } + //All QCStrings and const char* are defined to be in Latin1 + if ( !mapper && latin1 ) { + dev->writeBlock( p, len ); + } else if ( !mapper && internalOrder ) { + QChar *u = new QChar[len]; + for (uint i=0; iwriteBlock( (char*)u, len*sizeof(QChar) ); + delete [] u; + } else { + for (uint i=0; iwriteBlock( (char*)p, sizeof(QChar)*len ); + } else { + for (uint i=0; i +
  • All flags are set to 0. +
  • The field width is set to 0. +
  • The fill character is set to ' ' (space). +
  • The precision is set to 6. + + + \sa setf(), width(), fill(), precision() +*/ + +void QTextStream::reset() +{ + fflags = 0; + fwidth = 0; + fillchar = ' '; + fprec = 6; +} + + +/*! + \fn QIODevice *QTextStream::device() const + Returns the IO device currently set. + \sa setDevice(), unsetDevice() +*/ + +/*! + Sets the IO device to \a iod. + \sa device(), unsetDevice() +*/ + +void QTextStream::setDevice( QIODevice *iod ) +{ + if ( owndev ) { + delete dev; + owndev = FALSE; + } + dev = iod; + d->sourceType = QTextStreamPrivate::IODevice; +} + +/*! + Unsets the IO device. Equivalent to setDevice( 0 ). + \sa device(), setDevice() +*/ + +void QTextStream::unsetDevice() +{ + setDevice( 0 ); + d->sourceType = QTextStreamPrivate::NotSet; +} + +/*! + \fn bool QTextStream::atEnd() const + Returns TRUE if the IO device has reached the end position (end of + stream or file) or if there is no IO device set. + + Returns FALSE if the current position of the read/write head of the IO + device is somewhere before the end position. + + \sa QIODevice::atEnd() +*/ + +/*!\fn bool QTextStream::eof() const + + \obsolete + + This function has been renamed to atEnd(). + + \sa QIODevice::atEnd() +*/ + +/***************************************************************************** + QTextStream read functions + *****************************************************************************/ + + +/*! + Reads a \c char from the stream and returns a reference to the stream. + Note that whitespace is skipped. +*/ + +QTextStream &QTextStream::operator>>( char &c ) +{ + CHECK_STREAM_PRECOND + c = eat_ws(); + return *this; +} + +/*! + Reads a \c char from the stream and returns a reference to the stream. + Note that whitespace is \e not skipped. +*/ + +QTextStream &QTextStream::operator>>( QChar &c ) +{ + CHECK_STREAM_PRECOND + c = ts_getc(); + return *this; +} + + +ulong QTextStream::input_bin() +{ + ulong val = 0; + QChar ch = eat_ws(); + int dv = ch.digitValue(); + while ( dv == 0 || dv == 1 ) { + val = ( val << 1 ) + dv; + ch = ts_getc(); + dv = ch.digitValue(); + } + if ( ch != QEOF ) + ts_ungetc( ch ); + return val; +} + +ulong QTextStream::input_oct() +{ + ulong val = 0; + QChar ch = eat_ws(); + int dv = ch.digitValue(); + while ( dv >= 0 && dv <= 7 ) { + val = ( val << 3 ) + dv; + ch = ts_getc(); + dv = ch.digitValue(); + } + if ( dv == 8 || dv == 9 ) { + while ( ts_isdigit(ch) ) + ch = ts_getc(); + } + if ( ch != QEOF ) + ts_ungetc( ch ); + return val; +} + +ulong QTextStream::input_dec() +{ + ulong val = 0; + QChar ch = eat_ws(); + int dv = ch.digitValue(); + while ( ts_isdigit(ch) ) { + val = val * 10 + dv; + ch = ts_getc(); + dv = ch.digitValue(); + } + if ( ch != QEOF ) + ts_ungetc( ch ); + return val; +} + +ulong QTextStream::input_hex() +{ + ulong val = 0; + QChar ch = eat_ws(); + char c = ch; + while ( isxdigit(c) ) { + val <<= 4; + if ( ts_isdigit(c) ) + val += c - '0'; + else + val += 10 + tolower(c) - 'a'; + c = ch = ts_getc(); + } + if ( ch != QEOF ) + ts_ungetc( ch ); + return val; +} + +long QTextStream::input_int() +{ + long val; + QChar ch; + char c; + switch ( flags() & basefield ) { + case bin: + val = (long)input_bin(); + break; + case oct: + val = (long)input_oct(); + break; + case dec: + c = ch = eat_ws(); + if ( ch == QEOF ) { + val = 0; + } else { + if ( !(c == '-' || c == '+') ) + ts_ungetc( ch ); + if ( c == '-' ) { + ulong v = input_dec(); + if ( v ) { // ensure that LONG_MIN can be read + v--; + val = -((long)v) - 1; + } else { + val = 0; + } + } else { + val = (long)input_dec(); + } + } + break; + case hex: + val = (long)input_hex(); + break; + default: + val = 0; + c = ch = eat_ws(); + if ( c == '0' ) { // bin, oct or hex + c = ch = ts_getc(); + if ( tolower(c) == 'x' ) + val = (long)input_hex(); + else if ( tolower(c) == 'b' ) + val = (long)input_bin(); + else { // octal + ts_ungetc( ch ); + if ( c >= '0' && c <= '7' ) { + val = (long)input_oct(); + } else { + val = 0; + } + } + } else if ( ts_isdigit(ch) ) { + ts_ungetc( ch ); + val = (long)input_dec(); + } else if ( c == '-' || c == '+' ) { + ulong v = input_dec(); + if ( c == '-' ) { + if ( v ) { // ensure that LONG_MIN can be read + v--; + val = -((long)v) - 1; + } else { + val = 0; + } + } else { + val = (long)v; + } + } + } + return val; +} + +// +// We use a table-driven FSM to parse floating point numbers +// strtod() cannot be used directly since we're reading from a QIODevice +// + +double QTextStream::input_double() +{ + const int Init = 0; // states + const int Sign = 1; + const int Mantissa = 2; + const int Dot = 3; + const int Abscissa = 4; + const int ExpMark = 5; + const int ExpSign = 6; + const int Exponent = 7; + const int Done = 8; + + const int InputSign = 1; // input tokens + const int InputDigit = 2; + const int InputDot = 3; + const int InputExp = 4; + + static uchar table[8][5] = { + /* None InputSign InputDigit InputDot InputExp */ + { 0, Sign, Mantissa, Dot, 0, }, // Init + { 0, 0, Mantissa, Dot, 0, }, // Sign + { Done, Done, Mantissa, Dot, ExpMark,}, // Mantissa + { 0, 0, Abscissa, 0, 0, }, // Dot + { Done, Done, Abscissa, Done, ExpMark,}, // Abscissa + { 0, ExpSign, Exponent, 0, 0, }, // ExpMark + { 0, 0, Exponent, 0, 0, }, // ExpSign + { Done, Done, Exponent, Done, Done } // Exponent + }; + + int state = Init; // parse state + int input; // input token + + char buf[256]; + int i = 0; + QChar c = eat_ws(); + + while ( TRUE ) { + + switch ( c ) { + case '+': + case '-': + input = InputSign; + break; + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + input = InputDigit; + break; + case '.': + input = InputDot; + break; + case 'e': + case 'E': + input = InputExp; + break; + default: + input = 0; + break; + } + + state = table[state][input]; + + if ( state == 0 || state == Done || i > 250 ) { + if ( i > 250 ) { // ignore rest of digits + do { c = ts_getc(); } while ( c != QEOF && ts_isdigit(c) ); + } + if ( c != QEOF ) + ts_ungetc( c ); + buf[i] = '\0'; + char *end; + return strtod( buf, &end ); + } + + buf[i++] = c; + c = ts_getc(); + } + +#if !defined(_CC_EGG_) + return 0.0; +#endif +} + + +/*! + Reads a signed \c short integer from the stream and returns a reference to + the stream. See flags() for an explanation of expected input format. +*/ + +QTextStream &QTextStream::operator>>( signed short &i ) +{ + CHECK_STREAM_PRECOND + i = (signed short)input_int(); + return *this; +} + + +/*! + Reads an unsigned \c short integer from the stream and returns a reference to + the stream. See flags() for an explanation of expected input format. +*/ + +QTextStream &QTextStream::operator>>( unsigned short &i ) +{ + CHECK_STREAM_PRECOND + i = (unsigned short)input_int(); + return *this; +} + + +/*! + Reads a signed \c int from the stream and returns a reference to the + stream. See flags() for an explanation of expected input format. +*/ + +QTextStream &QTextStream::operator>>( signed int &i ) +{ + CHECK_STREAM_PRECOND + i = (signed int)input_int(); + return *this; +} + + +/*! + Reads an unsigned \c int from the stream and returns a reference to the + stream. See flags() for an explanation of expected input format. +*/ + +QTextStream &QTextStream::operator>>( unsigned int &i ) +{ + CHECK_STREAM_PRECOND + i = (unsigned int)input_int(); + return *this; +} + + +/*! + Reads a signed \c long int from the stream and returns a reference to the + stream. See flags() for an explanation of expected input format. +*/ + +QTextStream &QTextStream::operator>>( signed long &i ) +{ + CHECK_STREAM_PRECOND + i = (signed long)input_int(); + return *this; +} + + +/*! + Reads an unsigned \c long int from the stream and returns a reference to the + stream. See flags() for an explanation of expected input format. +*/ + +QTextStream &QTextStream::operator>>( unsigned long &i ) +{ + CHECK_STREAM_PRECOND + i = (unsigned long)input_int(); + return *this; +} + + +/*! + Reads a \c float from the stream and returns a reference to the stream. + See flags() for an explanation of expected input format. +*/ + +QTextStream &QTextStream::operator>>( float &f ) +{ + CHECK_STREAM_PRECOND + f = (float)input_double(); + return *this; +} + + +/*! + Reads a \c double from the stream and returns a reference to the stream. + See flags() for an explanation of expected input format. +*/ + +QTextStream &QTextStream::operator>>( double &f ) +{ + CHECK_STREAM_PRECOND + f = input_double(); + return *this; +} + + +/*! + Reads a word from the stream and returns a reference to the stream. +*/ + +QTextStream &QTextStream::operator>>( char *s ) +{ + CHECK_STREAM_PRECOND + int maxlen = width( 0 ); + QChar c = eat_ws(); + if ( !maxlen ) + maxlen = -1; + while ( c != QEOF ) { + if ( ts_isspace(c) || maxlen-- == 0 ) { + ts_ungetc( c ); + break; + } + *s++ = c; + c = ts_getc(); + } + + *s = '\0'; + return *this; +} + +/*! + Reads a word from the stream and returns a reference to the stream. +*/ + +QTextStream &QTextStream::operator>>( QString &str ) +{ + CHECK_STREAM_PRECOND + str=QString::fromLatin1(""); + QChar c = eat_ws(); + + while ( c != QEOF ) { + if ( ts_isspace(c) ) { + ts_ungetc( c ); + break; + } + str += c; + c = ts_getc(); + } + return *this; +} + +/*! + Reads a word from the stream and returns a reference to the stream. +*/ + +QTextStream &QTextStream::operator>>( QCString &str ) +{ + CHECK_STREAM_PRECOND + QCString *dynbuf = 0; + const int buflen = 256; + char buffer[buflen]; + char *s = buffer; + int i = 0; + QChar c = eat_ws(); + + while ( c != QEOF ) { + if ( ts_isspace(c) ) { + ts_ungetc( c ); + break; + } + if ( i >= buflen-1 ) { + if ( !dynbuf ) { // create dynamic buffer + dynbuf = new QCString(buflen*2); + memcpy( dynbuf->data(), s, i ); // copy old data + } else if ( i >= (int)dynbuf->size()-1 ) { + dynbuf->resize( dynbuf->size()*2 ); + } + s = dynbuf->data(); + } + s[i++] = c; + c = ts_getc(); + } + str.resize( i+1 ); + memcpy( str.data(), s, i ); + delete dynbuf; + return *this; +} + + +/*! + Reads a line from the stream and returns a string containing the text. + + The returned string does not contain any trailing newline or carriage + return. Note that this is different from QIODevice::readLine(), which + does not strip the newline at the end of the line. + + On EOF you will get a QString that is null. On reading an empty line the + returned QString is empty but not null. + + \sa QIODevice::readLine() +*/ + +QString QTextStream::readLine() +{ +#if defined(CHECK_STATE) + if ( !dev ) { + qWarning( "QTextStream::readLine: No device" ); + return QString::null; + } +#endif + QString result( "" ); + const int buf_size = 256; + QChar c[buf_size]; + int pos = 0; + + c[pos] = ts_getc(); + if ( c[pos] == QEOF ) + return QString::null; + + while ( c[pos] != QEOF && c[pos] != '\n' ) { + pos++; + if ( pos >= buf_size ) { + result += QString( c, pos ); + pos = 0; + } + c[pos] = ts_getc(); + } + result += QString( c, pos ); + + int len = (int)result.length(); + if ( len && result[len-1] == '\r' ) + result.truncate(len-1); // (if there are two \r, let one stay) + + return result; +} + + +/*! + Reads the entire stream and returns a string containing the text. + + \sa QIODevice::readLine() +*/ + +QString QTextStream::read() +{ +#if defined(CHECK_STATE) + if ( !dev ) { + qWarning( "QTextStream::read: No device" ); + return QString::null; + } +#endif + QString result; + const uint bufsize = 512; + QChar buf[bufsize]; + uint i, num, start; + bool skipped_cr = FALSE; + + while ( 1 ) { + num = ts_getbuf(buf,bufsize); + // do a s/\r\n/\n + start = 0; + for ( i=0; i>= 1; + if ( !n ) + break; + } + if ( flags() & showbase ) { // show base + *--p = (flags() & uppercase) ? 'B' : 'b'; + *--p = '0'; + } + break; + + case I_BASE_8: // output octal number + p = &buf[74]; + *p = '\0'; + do { + *--p = (char)(n&7) + '0'; + n >>= 3; + } while ( n ); + if ( flags() & showbase ) + *--p = '0'; + break; + + case I_BASE_16: // output hexadecimal number + p = &buf[74]; + *p = '\0'; + hexdigits = (flags() & uppercase) ? + hexdigits_upper : hexdigits_lower; + do { + *--p = hexdigits[(int)n&0xf]; + n >>= 4; + } while ( n ); + if ( flags() & showbase ) { + *--p = (flags() & uppercase) ? 'X' : 'x'; + *--p = '0'; + } + break; + + default: // decimal base is default + p = &buf[74]; + *p = '\0'; + if ( neg ) + n = (ulong)(-(long)n); + do { + *--p = ((int)(n%10)) + '0'; + n /= 10; + } while ( n ); + if ( neg ) + *--p = '-'; + else if ( flags() & showpos ) + *--p = '+'; + if ( (flags() & internal) && fwidth && !ts_isdigit(*p) ) { + ts_putc( *p ); // special case for internal + ++p; // padding + fwidth--; + return *this << (const char*)p; + } + } + if ( fwidth ) { // adjustment required + if ( !(flags() & left) ) { // but NOT left adjustment + len = qstrlen(p); + int padlen = fwidth - len; + if ( padlen <= 0 ) { // no padding required + writeBlock( p, len ); + } else if ( padlen < (int)(p-buf) ) { // speeds up padding + memset( p-padlen, (char)fillchar, padlen ); + writeBlock( p-padlen, padlen+len ); + } + else // standard padding + *this << (const char*)p; + } + else + *this << (const char*)p; + fwidth = 0; // reset field width + } + else + writeBlock( p, qstrlen(p) ); + return *this; +} + + +/*! + Writes a \c short integer to the stream and returns a reference to + the stream. +*/ + +QTextStream &QTextStream::operator<<( signed short i ) +{ + return output_int( I_SHORT | I_SIGNED, i, i < 0 ); +} + + +/*! + Writes an \c unsigned \c short integer to the stream and returns a reference + to the stream. +*/ + +QTextStream &QTextStream::operator<<( unsigned short i ) +{ + return output_int( I_SHORT | I_UNSIGNED, i, FALSE ); +} + + +/*! + Writes an \c int to the stream and returns a reference to + the stream. +*/ + +QTextStream &QTextStream::operator<<( signed int i ) +{ + return output_int( I_INT | I_SIGNED, i, i < 0 ); +} + + +/*! + Writes an \c unsigned \c int to the stream and returns a reference to + the stream. +*/ + +QTextStream &QTextStream::operator<<( unsigned int i ) +{ + return output_int( I_INT | I_UNSIGNED, i, FALSE ); +} + + +/*! + Writes a \c long \c int to the stream and returns a reference to + the stream. +*/ + +QTextStream &QTextStream::operator<<( signed long i ) +{ + return output_int( I_LONG | I_SIGNED, i, i < 0 ); +} + + +/*! + Writes an \c unsigned \c long \c int to the stream and returns a reference to + the stream. +*/ + +QTextStream &QTextStream::operator<<( unsigned long i ) +{ + return output_int( I_LONG | I_UNSIGNED, i, FALSE ); +} + + +/*! + Writes a \c float to the stream and returns a reference to the stream. +*/ + +QTextStream &QTextStream::operator<<( float f ) +{ + return *this << (double)f; +} + + +/*! + Writes a \c double to the stream and returns a reference to the stream. +*/ + +QTextStream &QTextStream::operator<<( double f ) +{ + CHECK_STREAM_PRECOND + char buf[64]; + char f_char; + char format[16]; + if ( (flags()&floatfield) == fixed ) + f_char = 'f'; + else if ( (flags()&floatfield) == scientific ) + f_char = (flags() & uppercase) ? 'E' : 'e'; + else + f_char = (flags() & uppercase) ? 'G' : 'g'; + register char *fs = format; // generate format string + *fs++ = '%'; // "%.l" + *fs++ = '.'; + int prec = precision(); + if ( prec > 99 ) + prec = 99; + if ( prec >= 10 ) { + *fs++ = prec / 10 + '0'; + *fs++ = prec % 10 + '0'; + } else { + *fs++ = prec + '0'; + } + *fs++ = 'l'; + *fs++ = f_char; + *fs = '\0'; + sprintf( buf, format, f ); // convert to text + if ( fwidth ) // padding + *this << (const char*)buf; + else // just write it + writeBlock( buf, qstrlen(buf) ); + return *this; +} + + +/*! + Writes a string to the stream and returns a reference to the stream. + + The string \a s is assumed to be Latin1 encoded independent of the Encoding set + for the QTextStream. +*/ + +QTextStream &QTextStream::operator<<( const char* s ) +{ + CHECK_STREAM_PRECOND + char padbuf[48]; + uint len = qstrlen( s ); // don't write null terminator + if ( fwidth ) { // field width set + int padlen = fwidth - len; + fwidth = 0; // reset width + if ( padlen > 0 ) { + char *ppad; + if ( padlen > 46 ) { // create extra big fill buffer + ppad = new char[padlen]; + CHECK_PTR( ppad ); + } else { + ppad = padbuf; + } + memset( ppad, (char)fillchar, padlen ); // fill with fillchar + if ( !(flags() & left) ) { + writeBlock( ppad, padlen ); + padlen = 0; + } + writeBlock( s, len ); + if ( padlen ) + writeBlock( ppad, padlen ); + if ( ppad != padbuf ) // delete extra big fill buf + delete[] ppad; + return *this; + } + } + writeBlock( s, len ); + return *this; +} + +/*! + Writes \a s to the stream and returns a reference to the stream. + + The string \a s is assumed to be Latin1 encoded independent of the Encoding set + for the QTextStream. +*/ + +QTextStream &QTextStream::operator<<( const QCString & s ) +{ + return operator<<(s.data()); +} + +/*! + Writes \a s to the stream and returns a reference to the stream. +*/ + +QTextStream &QTextStream::operator<<( const QString& s ) +{ + CHECK_STREAM_PRECOND + uint len = s.length(); + QString s1 = s; + if ( fwidth ) { // field width set + if ( !(flags() & left) ) { + s1 = s.rightJustify(fwidth, (char)fillchar); + } else { + s1 = s.leftJustify(fwidth, (char)fillchar); + } + fwidth = 0; // reset width + } + writeBlock( s1.unicode(), len ); + return *this; +} + + +/*! + Writes a pointer to the stream and returns a reference to the stream. + + The \e ptr is output as an unsigned long hexadecimal integer. +*/ + +QTextStream &QTextStream::operator<<( void *ptr ) +{ + int f = flags(); + setf( hex, basefield ); + setf( showbase ); + unsetf( uppercase ); + output_int( I_LONG | I_UNSIGNED, (ulong)ptr, FALSE ); + flags( f ); + return *this; +} + + +/*! + \fn int QTextStream::flags() const + Returns the current stream flags. The default value is 0. + + The meaning of the flags are: +
      +
    • \e skipws - Not currently used - whitespace always skipped +
    • \e left - Numeric fields are left-aligned +
    • \e right - Not currently used (by default numerics are right aligned) +
    • \e internal - Put any padding spaces between +/- and value +
    • \e bin - Output \e and input only in binary +
    • \e oct - Output \e and input only in octal +
    • \e dec - Output \e and input only in decimal +
    • \e hex - Output \e and input only in hexadecimal +
    • \e showbase - Annotate numeric outputs with 0b, 0, or 0x if in + \e bin, \e oct, or \e hex format +
    • \e showpoint - Not currently used +
    • \e uppercase - Use 0B and 0X rather than 0b and 0x +
    • \e showpos - Show + for positive numeric values +
    • \e scientific - Use scientific notation for floating point values +
    • \e fixed - Use fixed-point notation for floating point values +
    + + Note that unless \e bin, \e oct, \e dec, or \e hex is set, the input base is + octal if the value starts with 0, hexadecimal if it starts with 0x, binary + if the value starts with 0b, and decimal otherwise. + + \sa setf(), unsetf() +*/ + +/*! + \fn int QTextStream::flags( int f ) + Sets the stream flags to \e f. + Returns the previous stream flags. + + \sa setf(), unsetf(), flags() +*/ + +/*! + \fn int QTextStream::setf( int bits ) + Sets the stream flag bits \e bits. + Returns the previous stream flags. + + Equivalent to flags( flags() | bits ). + + \sa setf(), unsetf() +*/ + +/*! + \fn int QTextStream::setf( int bits, int mask ) + Sets the stream flag bits \e bits with a bit mask \e mask. + Returns the previous stream flags. + + Equivalent to flags( (flags() & ~mask) | (bits & mask) ). + + \sa setf(), unsetf() +*/ + +/*! + \fn int QTextStream::unsetf( int bits ) + Clears the stream flag bits \e bits. + Returns the previous stream flags. + + Equivalent to flags( flags() & ~mask ). + + \sa setf() +*/ + +/*! + \fn int QTextStream::width() const + Returns the field width. The default value is 0. +*/ + +/*! + \fn int QTextStream::width( int w ) + Sets the field width to \e w. Returns the previous field width. +*/ + +/*! + \fn int QTextStream::fill() const + Returns the fill character. The default value is ' ' (space). +*/ + +/*! + \fn int QTextStream::fill( int f ) + Sets the fill character to \e f. Returns the previous fill character. +*/ + +/*! + \fn int QTextStream::precision() const + Returns the precision. The default value is 6. +*/ + +/*! + \fn int QTextStream::precision( int p ) + Sets the precision to \e p. Returns the previous precision setting. +*/ + + + /***************************************************************************** + QTextStream manipulators + *****************************************************************************/ + +QTextStream &bin( QTextStream &s ) +{ + s.setf(QTS::bin,QTS::basefield); + return s; +} + +QTextStream &oct( QTextStream &s ) +{ + s.setf(QTS::oct,QTS::basefield); + return s; +} + +QTextStream &dec( QTextStream &s ) +{ + s.setf(QTS::dec,QTS::basefield); + return s; +} + +QTextStream &hex( QTextStream &s ) +{ + s.setf(QTS::hex,QTS::basefield); + return s; +} + +QTextStream &endl( QTextStream &s ) +{ + return s << '\n'; +} + +QTextStream &flush( QTextStream &s ) +{ + if ( s.device() ) + s.device()->flush(); + return s; +} + +QTextStream &ws( QTextStream &s ) +{ + s.skipWhiteSpace(); + return s; +} + +QTextStream &reset( QTextStream &s ) +{ + s.reset(); + return s; +} + + +/*! + \class QTextIStream qtextstream.h + \brief A convenience class for input streams. + + For simple tasks, code should be simple. Hence this + class is a shorthand to avoid passing the \e mode argument + to the normal QTextStream constructors. + + This makes it easy for example, to write things like this: +\code + QString data = "123 456"; + int a, b; + QTextIStream(&data) >> a >> b; +\endcode + + \sa QTextOStream +*/ + +/*! + \fn QTextIStream::QTextIStream( QString *s ) + + Constructs a stream to read from string \a s. +*/ +/*! + \fn QTextIStream::QTextIStream( QByteArray ba ) + + Constructs a stream to read from the array \a ba. +*/ +/*! + \fn QTextIStream::QTextIStream( FILE *f ) + + Constructs a stream to read from the file \a f. +*/ + + +/*! + \class QTextOStream qtextstream.h + \brief A convenience class for output streams. + + For simple tasks, code should be simple. Hence this + class is a shorthand to avoid passing the \e mode argument + to the normal QTextStream constructors. + + This makes it easy for example, to write things like this: +\code + QString result; + QTextOStream(&result) << "pi = " << 3.14; +\endcode +*/ + +/*! + \fn QTextOStream::QTextOStream( QString *s ) + + Constructs a stream to write to string \a s. +*/ +/*! + \fn QTextOStream::QTextOStream( QByteArray ba ) + + Constructs a stream to write to the array \a ba. +*/ +/*! + \fn QTextOStream::QTextOStream( FILE *f ) + + Constructs a stream to write to the file \a f. +*/ + + + +/*! + Sets the encoding of this stream to \a e, where \a e is one of: +
      +
    • \c Locale Using local file format (Latin1 if locale is not + set), but autodetecting Unicode(utf16) on input. +
    • \c Unicode Using Unicode(utf16) for input and output. Output + will be written in the order most efficient for the current platform + (i.e. the order used internally in QString). +
    • \c UnicodeUTF8 Using Unicode(utf8) for input and output. If you use it + for input it will autodetect utf16 and use it instead of utf8. +
    • \c Latin1 ISO-8859-1. Will not autodetect utf16. +
    • \c UnicodeNetworkOrder Using network order Unicode(utf16) for + input and output. Useful when reading Unicode data that does not + start with the byte order marker. +
    • \c UnicodeReverse Using reverse network order Unicode(utf16) + for input and output. Useful when reading Unicode data that does not + start with the byte order marker, or writing data that should be + read by buggy Windows applications. +
    • \c RawUnicode Like Unicode, but does not write the byte order + marker, nor does it autodetect the byte order. Only useful when + writing to non-persistent storage used by a single process. +
    + + \c Locale and all Unicode encodings, except \c RawUnicode, will look at + the first two bytes in a input stream to determine the byte order. The + initial byte order marker will be stripped off before data is read. + + Note that this function should be called before any data is read + to/written from the stream. + \sa setCodec() +*/ + +void QTextStream::setEncoding( Encoding e ) +{ + if ( d->sourceType == QTextStreamPrivate::String ) + return; // QString does not need any encoding + switch ( e ) { + case Unicode: + mapper = 0; + latin1 = FALSE; + doUnicodeHeader = TRUE; + internalOrder = TRUE; + break; + case UnicodeUTF8: +#ifndef QT_NO_CODECS + mapper = QTextCodec::codecForMib( 106 ); + latin1 = FALSE; + doUnicodeHeader = TRUE; + internalOrder = TRUE; +#else + mapper = 0; + latin1 = TRUE; + doUnicodeHeader = TRUE; +#endif + break; + case UnicodeNetworkOrder: + mapper = 0; + latin1 = FALSE; + doUnicodeHeader = TRUE; + internalOrder = QChar::networkOrdered(); + break; + case UnicodeReverse: + mapper = 0; + latin1 = FALSE; + doUnicodeHeader = TRUE; + internalOrder = !QChar::networkOrdered(); //reverse network ordered + break; + case RawUnicode: + mapper = 0; + latin1 = FALSE; + doUnicodeHeader = FALSE; + internalOrder = TRUE; + break; + case Locale: + latin1 = TRUE; // fallback to Latin 1 +#ifndef QT_NO_TEXTCODEC + mapper = QTextCodec::codecForLocale(); +#if defined(_OS_WIN32_) + if ( GetACP() == 1252 ) + mapper = 0; // Optimized latin1 processing +#endif + if ( mapper && mapper->mibEnum() == 4 ) +#endif + mapper = 0; // Optimized latin1 processing + doUnicodeHeader = TRUE; // If it reads as Unicode, accept it + break; + case Latin1: + mapper = 0; + doUnicodeHeader = FALSE; + latin1 = TRUE; + break; + } +} + + +#ifndef QT_NO_TEXTCODEC +/*! Sets the codec for this stream to \a codec. Will not try to + autodetect Unicode. + + Note that this function should be called before any data is read + to/written from the stream. + + \sa setEncoding() +*/ + +void QTextStream::setCodec( QTextCodec *codec ) +{ + if ( d->sourceType == QTextStreamPrivate::String ) + return; // QString does not need any codec + mapper = codec; + doUnicodeHeader = FALSE; +} +#endif + +#endif // QT_NO_TEXTSTREAM Index: branches/xZenu/src/util/doxygen/qtools/LICENSE.GPL =================================================================== --- branches/xZenu/src/util/doxygen/qtools/LICENSE.GPL (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/LICENSE.GPL (revision 1322) @@ -0,0 +1,349 @@ + + The Qt GUI Toolkit is Copyright (C) 1994-2000 Trolltech AS. + + You may use, distribute and copy the Qt GUI Toolkit under the terms of + GNU General Public License version 2, which is display below. + +------------------------------------------------------------------------- + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + +------------------------------------------------------------------------- Index: branches/xZenu/src/util/doxygen/qtools/qfile_win32.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qfile_win32.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qfile_win32.cpp (revision 1322) @@ -0,0 +1,678 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2001 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + * Based on qfile_unix.cpp + * + * Copyright (C) 1992-2000 Trolltech AS. + */ + +#include "qglobal.h" + +#include "qfile.h" +#include "qfiledefs_p.h" + +#if defined(_OS_MAC_) || defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_) +# define HAS_TEXT_FILEMODE // has translate/text filemode +#endif +#if defined(O_NONBLOCK) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NONBLOCK +#elif defined(O_NDELAY) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NDELAY +#endif + +static void reslashify( QString& n ) +{ + for ( int i=0; i<(int)n.length(); i++ ) + { + if ( n[i] == '/' ) + n[i] = '\\'; + } +} + +bool qt_file_access( const QString& fn, int t ) +{ + if ( fn.isEmpty() ) + return FALSE; +#if defined(__CYGWIN32_) + return ACCESS( QFile::encodeName(fn), t ) == 0; +#else + QString str = fn; + reslashify(str); + return ( _waccess( (wchar_t*) str.ucs2(), t ) == 0 ); +#endif +} + +/*! + Removes the file \a fileName. + Returns TRUE if successful, otherwise FALSE. +*/ + +bool QFile::remove( const QString &fileName ) +{ + if ( fileName.isEmpty() ) { +#if defined(CHECK_NULL) + qWarning( "QFile::remove: Empty or null file name" ); +#endif + return FALSE; + } +#if defined(__CYGWIN32_) + // unlink more common in UNIX + return ::remove( QFile::encodeName(fileName) ) == 0; +#else + QString str = fileName; + reslashify(str); + return ( _wunlink( (wchar_t*) str.ucs2() ) == 0 ); +#endif +} + +#if defined(O_NONBLOCK) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NONBLOCK +#elif defined(O_NDELAY) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NDELAY +#endif + +/*! + Opens the file specified by the file name currently set, using the mode \e m. + Returns TRUE if successful, otherwise FALSE. + + The mode parameter \e m must be a combination of the following flags: +
      +
    • \c IO_Raw specified raw (non-buffered) file access. +
    • \c IO_ReadOnly opens the file in read-only mode. +
    • \c IO_WriteOnly opens the file in write-only mode (and truncates). +
    • \c IO_ReadWrite opens the file in read/write mode, equivalent to + \c (IO_ReadOnly|IO_WriteOnly). +
    • \c IO_Append opens the file in append mode. This mode is very useful + when you want to write something to a log file. The file index is set to + the end of the file. Note that the result is undefined if you position the + file index manually using at() in append mode. +
    • \c IO_Truncate truncates the file. +
    • \c IO_Translate enables carriage returns and linefeed translation + for text files under MS-DOS, Windows and OS/2. +
    + + The raw access mode is best when I/O is block-operated using 4kB block size + or greater. Buffered access works better when reading small portions of + data at a time. + + Important: When working with buffered files, data may + not be written to the file at once. Call \link flush() flush\endlink + to make sure the data is really written. + + \warning We have experienced problems with some C libraries when a buffered + file is opened for both reading and writing. If a read operation takes place + immediately after a write operation, the read buffer contains garbage data. + Worse, the same garbage is written to the file. Calling flush() before + readBlock() solved this problem. + + If the file does not exist and \c IO_WriteOnly or \c IO_ReadWrite is + specified, it is created. + + Example: + \code + QFile f1( "/tmp/data.bin" ); + QFile f2( "readme.txt" ); + f1.open( IO_Raw | IO_ReadWrite | IO_Append ); + f2.open( IO_ReadOnly | IO_Translate ); + \endcode + + \sa name(), close(), isOpen(), flush() +*/ + +bool QFile::open( int m ) +{ + if ( isOpen() ) { // file already open +#if defined(CHECK_STATE) + qWarning( "QFile::open: File already open" ); +#endif + return FALSE; + } + if ( fn.isNull() ) { // no file name defined +#if defined(CHECK_NULL) + qWarning( "QFile::open: No file name specified" ); +#endif + return FALSE; + } + init(); // reset params + setMode( m ); + if ( !(isReadable() || isWritable()) ) { +#if defined(CHECK_RANGE) + qWarning( "QFile::open: File access not specified" ); +#endif + return FALSE; + } + bool ok = TRUE; + STATBUF st; + if ( isRaw() ) { // raw file I/O + int oflags = OPEN_RDONLY; + if ( isReadable() && isWritable() ) + oflags = OPEN_RDWR; + else if ( isWritable() ) + oflags = OPEN_WRONLY; + if ( flags() & IO_Append ) { // append to end of file? + if ( flags() & IO_Truncate ) + oflags |= (OPEN_CREAT | OPEN_TRUNC); + else + oflags |= (OPEN_APPEND | OPEN_CREAT); + setFlags( flags() | IO_WriteOnly ); // append implies write + } else if ( isWritable() ) { // create/trunc if writable + if ( flags() & IO_Truncate ) + oflags |= (OPEN_CREAT | OPEN_TRUNC); + else + oflags |= OPEN_CREAT; + } +#if defined(HAS_TEXT_FILEMODE) + if ( isTranslated() ) + oflags |= OPEN_TEXT; + else + oflags |= OPEN_BINARY; +#endif +#if defined(HAS_ASYNC_FILEMODE) + if ( isAsynchronous() ) + oflags |= OPEN_ASYNC; +#endif + + +#if defined(__CYGWIN32_) + fd = OPEN( QFile::encodeName(fn), oflags, 0666 ); +#else + QString str = fn; + reslashify(str); + fd = _wopen( (wchar_t*) str.ucs2(), oflags, 0666 ); +#endif + + if ( fd != -1 ) { // open successful + FSTAT( fd, &st ); // get the stat for later usage + } else { + ok = FALSE; + } + } else { // buffered file I/O + QCString perm; + char perm2[4]; + bool try_create = FALSE; + if ( flags() & IO_Append ) { // append to end of file? + setFlags( flags() | IO_WriteOnly ); // append implies write + perm = isReadable() ? "a+" : "a"; + } else { + if ( isReadWrite() ) { + if ( flags() & IO_Truncate ) { + perm = "w+"; + } else { + perm = "r+"; + try_create = TRUE; // try to create if not exists + } + } else if ( isReadable() ) { + perm = "r"; + } else if ( isWritable() ) { + perm = "w"; + } + } + qstrcpy( perm2, perm ); + if ( isTranslated() ) + strcat( perm2, "t" ); + else + strcat( perm2, "b" ); + while (1) { // At most twice + +#if defined(__CYGWIN32_) + fh = fopen( QFile::encodeName(fn), perm2 ); +#else + QString str = fn; + QString prm( perm2 ); + reslashify(str); + fh = _wfopen( (wchar_t*) str.ucs2(), (wchar_t*) prm.ucs2() ); +#endif + + if ( !fh && try_create ) { + perm2[0] = 'w'; // try "w+" instead of "r+" + try_create = FALSE; + } else { + break; + } + } + if ( fh ) { + FSTAT( FILENO(fh), &st ); // get the stat for later usage + } else { + ok = FALSE; + } + } + if ( ok ) { + setState( IO_Open ); + // on successful open the file stat was got; now test what type + // of file we have + if ( (st.st_mode & STAT_MASK) != STAT_REG ) { + // non-seekable + setType( IO_Sequential ); + length = INT_MAX; + ioIndex = (flags() & IO_Append) == 0 ? 0 : length; + } else { + length = (int)st.st_size; + ioIndex = (flags() & IO_Append) == 0 ? 0 : length; + if ( (flags() & !IO_Truncate) && length == 0 && isReadable() ) { + // try if you can read from it (if you can, it's a sequential + // device; e.g. a file in the /proc filesystem) + int c = getch(); + if ( c != -1 ) { + ungetch(c); + setType( IO_Sequential ); + length = INT_MAX; + } + } + } + } else { + init(); + if ( errno == EMFILE ) // no more file handles/descrs + setStatus( IO_ResourceError ); + else + setStatus( IO_OpenError ); + } + return ok; +} + +/*! + Opens a file in the mode \e m using an existing file handle \e f. + Returns TRUE if successful, otherwise FALSE. + + Example: + \code + #include + + void printError( const char* msg ) + { + QFile f; + f.open( IO_WriteOnly, stderr ); + f.writeBlock( msg, qstrlen(msg) ); // write to stderr + f.close(); + } + \endcode + + When a QFile is opened using this function, close() does not actually + close the file, only flushes it. + + \warning If \e f is \c stdin, \c stdout, \c stderr, you may not + be able to seek. See QIODevice::isSequentialAccess() for more + information. + + \sa close() +*/ + +bool QFile::open( int m, FILE *f ) +{ + if ( isOpen() ) { +#if defined(CHECK_RANGE) + qWarning( "QFile::open: File already open" ); +#endif + return FALSE; + } + init(); + setMode( m &~IO_Raw ); + setState( IO_Open ); + fh = f; + ext_f = TRUE; + STATBUF st; + FSTAT( FILENO(fh), &st ); + ioIndex = (int)ftell( fh ); + if ( (st.st_mode & STAT_MASK) != STAT_REG ) { + // non-seekable + setType( IO_Sequential ); + length = INT_MAX; + } else { + length = (int)st.st_size; + if ( (flags() & !IO_Truncate) && length == 0 && isReadable() ) { + // try if you can read from it (if you can, it's a sequential + // device; e.g. a file in the /proc filesystem) + int c = getch(); + if ( c != -1 ) { + ungetch(c); + setType( IO_Sequential ); + length = INT_MAX; + } + } + } + return TRUE; +} + +/*! + Opens a file in the mode \e m using an existing file descriptor \e f. + Returns TRUE if successful, otherwise FALSE. + + When a QFile is opened using this function, close() does not actually + close the file. + + \warning If \e f is one of 0 (stdin), 1 (stdout) or 2 (stderr), you may not + be able to seek. size() is set to \c INT_MAX (in limits.h). + + \sa close() +*/ + + +bool QFile::open( int m, int f ) +{ + if ( isOpen() ) { +#if defined(CHECK_RANGE) + qWarning( "QFile::open: File already open" ); +#endif + return FALSE; + } + init(); + setMode( m |IO_Raw ); + setState( IO_Open ); + fd = f; + ext_f = TRUE; + STATBUF st; + FSTAT( fd, &st ); + ioIndex = (int)LSEEK(fd, 0, SEEK_CUR); + if ( (st.st_mode & STAT_MASK) != STAT_REG ) { + // non-seekable + setType( IO_Sequential ); + length = INT_MAX; + } else { + length = (int)st.st_size; + if ( length == 0 && isReadable() ) { + // try if you can read from it (if you can, it's a sequential + // device; e.g. a file in the /proc filesystem) + int c = getch(); + if ( c != -1 ) { + ungetch(c); + setType( IO_Sequential ); + length = INT_MAX; + } + } + } + return TRUE; +} + +/*! + Returns the file size. + \sa at() +*/ + +uint QFile::size() const +{ + STATBUF st; + if ( isOpen() ) { + FSTAT( fh ? FILENO(fh) : fd, &st ); + return st.st_size; + } else { +#if defined(__CYGWIN32_) + STAT( QFile::encodeName(fn), &st ); +#else + QString str = fn; + reslashify(str); +#ifdef QT_LARGEFILE_SUPPORT + if ( _wstati64( (wchar_t*) str.ucs2(), &st ) != -1 ) { +#else + if ( _wstat( (wchar_t*) str.ucs2(), &st ) != -1 ) { +#endif +#endif + return st.st_size; + } + } + return 0; +} + +/*! + \fn int QFile::at() const + Returns the file index. + \sa size() +*/ + +/*! + Sets the file index to \e pos. Returns TRUE if successful, otherwise FALSE. + + Example: + \code + QFile f( "data.bin" ); + f.open( IO_ReadOnly ); // index set to 0 + f.at( 100 ); // set index to 100 + f.at( f.at()+50 ); // set index to 150 + f.at( f.size()-80 ); // set index to 80 before EOF + f.close(); + \endcode + + \warning The result is undefined if the file was \link open() opened\endlink + using the \c IO_Append specifier. + + \sa size(), open() +*/ + +bool QFile::at( int pos ) +{ + if ( !isOpen() ) { +#if defined(CHECK_STATE) + qWarning( "QFile::at: File is not open" ); +#endif + return FALSE; + } + bool ok; + if ( isRaw() ) { // raw file + pos = (int)LSEEK(fd, pos, SEEK_SET); + ok = pos != -1; + } else { // buffered file + ok = fseek(fh, pos, SEEK_SET) == 0; + } + if ( ok ) + ioIndex = pos; +#if defined(CHECK_RANGE) + else + qWarning( "QFile::at: Cannot set file position %d", pos ); +#endif + return ok; +} + +/*! + Reads at most \e len bytes from the file into \e p and returns the + number of bytes actually read. + + Returns -1 if a serious error occurred. + + \warning We have experienced problems with some C libraries when a buffered + file is opened for both reading and writing. If a read operation takes place + immediately after a write operation, the read buffer contains garbage data. + Worse, the same garbage is written to the file. Calling flush() before + readBlock() solved this problem. + + \sa writeBlock() +*/ + +int QFile::readBlock( char *p, uint len ) +{ +#if defined(CHECK_NULL) + if ( !p ) + qWarning( "QFile::readBlock: Null pointer error" ); +#endif +#if defined(CHECK_STATE) + if ( !isOpen() ) { // file not open + qWarning( "QFile::readBlock: File not open" ); + return -1; + } + if ( !isReadable() ) { // reading not permitted + qWarning( "QFile::readBlock: Read operation not permitted" ); + return -1; + } +#endif + int nread; // number of bytes read + if ( isRaw() ) { // raw file + nread = READ( fd, p, len ); + if ( len && nread <= 0 ) { + nread = 0; + setStatus(IO_ReadError); + } + } else { // buffered file + nread = fread( p, 1, len, fh ); + if ( (uint)nread != len ) { + if ( ferror( fh ) || nread==0 ) + setStatus(IO_ReadError); + } + } + ioIndex += nread; + return nread; +} + +/*! \overload int writeBlock( const QByteArray& data ) +*/ + +/*! \reimp + + Writes \e len bytes from \e p to the file and returns the number of + bytes actually written. + + Returns -1 if a serious error occurred. + + \warning When working with buffered files, data may not be written + to the file at once. Call flush() to make sure the data is really + written. + + \sa readBlock() +*/ + +int QFile::writeBlock( const char *p, uint len ) +{ +#if defined(CHECK_NULL) + if ( p == 0 && len != 0 ) + qWarning( "QFile::writeBlock: Null pointer error" ); +#endif +#if defined(CHECK_STATE) + if ( !isOpen() ) { // file not open + qWarning( "QFile::writeBlock: File not open" ); + return -1; + } + if ( !isWritable() ) { // writing not permitted + qWarning( "QFile::writeBlock: Write operation not permitted" ); + return -1; + } +#endif + int nwritten; // number of bytes written + if ( isRaw() ) // raw file + nwritten = WRITE( fd, p, len ); + else // buffered file + nwritten = fwrite( p, 1, len, fh ); + if ( nwritten != (int)len ) { // write error + if ( errno == ENOSPC ) // disk is full + setStatus( IO_ResourceError ); + else + setStatus( IO_WriteError ); + if ( isRaw() ) // recalc file position + ioIndex = (int)LSEEK( fd, 0, SEEK_CUR ); + else + ioIndex = fseek( fh, 0, SEEK_CUR ); + } else { + ioIndex += nwritten; + } + if ( ioIndex > length ) // update file length + length = ioIndex; + return nwritten; +} + +/*! + Returns the file handle of the file. + + This is a small positive integer, suitable for use with C library + functions such as fdopen() and fcntl(), as well as with QSocketNotifier. + + If the file is not open or there is an error, handle() returns -1. + + \sa QSocketNotifier +*/ + +int QFile::handle() const +{ + if ( !isOpen() ) + return -1; + else if ( fh ) + return FILENO( fh ); + else + return fd; +} + +/*! + Closes an open file. + + The file is not closed if it was opened with an existing file handle. + If the existing file handle is a \c FILE*, the file is flushed. + If the existing file handle is an \c int file descriptor, nothing + is done to the file. + + Some "write-behind" filesystems may report an unspecified error on + closing the file. These errors only indicate that something may + have gone wrong since the previous open(). In such a case status() + reports IO_UnspecifiedError after close(), otherwise IO_Ok. + + \sa open(), flush() +*/ + + +void QFile::close() +{ + bool ok = FALSE; + if ( isOpen() ) { // file is not open + if ( fh ) { // buffered file + if ( ext_f ) + ok = fflush( fh ) != -1; // flush instead of closing + else + ok = fclose( fh ) != -1; + } else { // raw file + if ( ext_f ) + ok = TRUE; // cannot close + else + ok = CLOSE( fd ) != -1; + } + init(); // restore internal state + } + if (!ok) + setStatus (IO_UnspecifiedError); + + return; +} + +int64 QFile::pos() const +{ + if (isOpen()) + { + // TODO: support 64 bit size + return ftell( fh ); + } + return -1; +} + +int64 QFile::toEnd() +{ + if (isOpen()) + { + // TODO: support 64 bit size + if (fseek( fh, 0, SEEK_END )!=-1) + { + return ftell( fh ); + } + } + return -1; +} + +bool QFile::seek( int64 pos ) +{ + if (isOpen()) + { + // TODO: support 64 bit size + return fseek( fh, pos, SEEK_SET )!=-1; + } + return FALSE; +} + + + Index: branches/xZenu/src/util/doxygen/qtools/qutfcodec.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qutfcodec.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qutfcodec.h (revision 1322) @@ -0,0 +1,71 @@ +/**************************************************************************** +** $Id: qt/src/tools/qutfcodec.h 2.3.2 edited 2001-01-26 $ +** +** Definition of QEucCodec class +** +** Created : 981015 +** +** Copyright (C) 1998-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QUTFCODEC_H +#define QUTFCODEC_H + +#ifndef QT_H +#include "qtextcodec.h" +#endif // QT_H + +#ifndef QT_NO_TEXTCODEC + +class Q_EXPORT QUtf8Codec : public QTextCodec { +public: + virtual int mibEnum() const; + const char* name() const; + + QTextDecoder* makeDecoder() const; + + QCString fromUnicode(const QString& uc, int& len_in_out) const; + + int heuristicContentMatch(const char* chars, int len) const; +}; + +class Q_EXPORT QUtf16Codec : public QTextCodec { +public: + virtual int mibEnum() const; + const char* name() const; + + QTextDecoder* makeDecoder() const; + QTextEncoder* makeEncoder() const; + + int heuristicContentMatch(const char* chars, int len) const; +}; + +#endif //QT_NO_TEXTCODEC +#endif // QUTFCODEC_H Index: branches/xZenu/src/util/doxygen/qtools/qfiledefs_p.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qfiledefs_p.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qfiledefs_p.h (revision 1322) @@ -0,0 +1,261 @@ +/**************************************************************************** +** +** +** Common macros and system include files for QFile, QFileInfo and QDir. +** +** Created : 930812 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QFILEDEFS_P_H +#define QFILEDEFS_P_H + + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of qfile.cpp, qfileinfo.cpp and qdir.cpp. +// This header file may change from version to version without notice, +// or even be removed. +// +// +#if defined(_CC_MWERKS_) +# include +# include +#elif !defined(_OS_MAC_) +# include +# include +#elif defined(_OS_MAC_) +# include +# include +# define _OS_UNIX_ +#endif +#include +#include +#if defined(_OS_UNIX_) +# include +# include +#endif +#if defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_) +# define _OS_FATFS_ +# if defined(__CYGWIN32__) +# include +# include +# if !defined(_OS_UNIX_) +# define _OS_UNIX_ +# endif +# else +# include +# if !defined(_CC_MWERKS_) +# include +# endif +# include +# endif +#endif +#include + + +#if !defined(PATH_MAX) +#if defined( MAXPATHLEN ) +#define PATH_MAX MAXPATHLEN +#else +#define PATH_MAX 1024 +#endif +#endif + + +#undef STATBUF +#undef STAT +#undef STAT_REG +#undef STAT_DIR +#undef STAT_LNK +#undef STAT_MASK +#undef FILENO +#undef OPEN +#undef CLOSE +#undef LSEEK +#undef READ +#undef WRITE +#undef ACCESS +#undef GETCWD +#undef CHDIR +#undef MKDIR +#undef RMDIR +#undef OPEN_RDONLY +#undef OPEN_WRONLY +#undef OPEN_CREAT +#undef OPEN_TRUNC +#undef OPEN_APPEND +#undef OPEN_TEXT +#undef OPEN_BINARY + + +#if defined(_CC_MSVC_) || defined(_CC_SYM_) + +# define STATBUF struct _stat // non-ANSI defs +# define STATBUF4TSTAT struct _stat // non-ANSI defs +# define STAT ::_stat +# define FSTAT ::_fstat +# define STAT_REG _S_IFREG +# define STAT_DIR _S_IFDIR +# define STAT_MASK _S_IFMT +# if defined(_S_IFLNK) +# define STAT_LNK _S_IFLNK +# endif +# define FILENO _fileno +# define OPEN ::_open +# define CLOSE ::_close +# define LSEEK ::_lseek +# define READ ::_read +# define WRITE ::_write +# define ACCESS ::_access +# define GETCWD ::_getcwd +# define CHDIR ::_chdir +# define MKDIR ::_mkdir +# define RMDIR ::_rmdir +# define OPEN_RDONLY _O_RDONLY +# define OPEN_WRONLY _O_WRONLY +# define OPEN_RDWR _O_RDWR +# define OPEN_CREAT _O_CREAT +# define OPEN_TRUNC _O_TRUNC +# define OPEN_APPEND _O_APPEND +# if defined(O_TEXT) +# define OPEN_TEXT _O_TEXT +# define OPEN_BINARY _O_BINARY +# endif + +#elif defined(_CC_BOR_) && __BORLANDC__ >= 0x550 + +# define STATBUF struct stat // non-ANSI defs +# define STATBUF4TSTAT struct _stat // non-ANSI defs +# define STAT ::stat +# define FSTAT ::fstat +# define STAT_REG _S_IFREG +# define STAT_DIR _S_IFDIR +# define STAT_MASK _S_IFMT +# if defined(_S_IFLNK) +# define STAT_LNK _S_IFLNK +# endif +# define FILENO _fileno +# define OPEN ::open +# define CLOSE ::_close +# define LSEEK ::_lseek +# define READ ::_read +# define WRITE ::_write +# define ACCESS ::_access +# define GETCWD ::_getcwd +# define CHDIR ::chdir +# define MKDIR ::_mkdir +# define RMDIR ::_rmdir +# define OPEN_RDONLY _O_RDONLY +# define OPEN_WRONLY _O_WRONLY +# define OPEN_RDWR _O_RDWR +# define OPEN_CREAT _O_CREAT +# define OPEN_TRUNC _O_TRUNC +# define OPEN_APPEND _O_APPEND +# if defined(O_TEXT) +# define OPEN_TEXT _O_TEXT +# define OPEN_BINARY _O_BINARY +# endif + +#else // all other systems + +# define STATBUF struct stat +# define STATBUF4TSTAT struct stat +# define STAT ::stat +# define FSTAT ::fstat +# define STAT_REG S_IFREG +# define STAT_DIR S_IFDIR +# define STAT_MASK S_IFMT +# if defined(S_IFLNK) +# define STAT_LNK S_IFLNK +# endif +# define FILENO fileno +# define OPEN ::open +# define CLOSE ::close +# define LSEEK ::lseek +# define READ ::read +# define WRITE ::write +# define ACCESS ::access +# if defined(_OS_OS2EMX_) +# define GETCWD ::_getcwd2 +# define CHDIR ::_chdir2 +# else +# define GETCWD ::getcwd +# define CHDIR ::chdir +# endif +# define MKDIR ::mkdir +# define RMDIR ::rmdir +# define OPEN_RDONLY O_RDONLY +# define OPEN_WRONLY O_WRONLY +# define OPEN_RDWR O_RDWR +# define OPEN_CREAT O_CREAT +# define OPEN_TRUNC O_TRUNC +# define OPEN_APPEND O_APPEND +# if defined(O_TEXT) +# define OPEN_TEXT O_TEXT +# define OPEN_BINARY O_BINARY +# endif +#endif + +#if defined(_CC_MWERKS_) +#undef mkdir +#undef MKDIR +#define MKDIR _mkdir +#undef rmdir +#undef RMDIR +#define RMDIR _rmdir +#endif + + +#if defined(_OS_FATFS_) +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 +#endif + +#if defined(_OS_MAC_) && !defined(_OS_UNIX_) +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 +#endif + +struct QFileInfoCache +{ + STATBUF st; + bool isSymLink; +}; + +#endif Index: branches/xZenu/src/util/doxygen/qtools/qvaluestack.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qvaluestack.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qvaluestack.h (revision 1322) @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** +** Definition of QValueStack class +** +** Created : 990925 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QVALUESTACK_H +#define QVALUESTACK_H + +#ifndef QT_H +#include "qvaluelist.h" +#endif // QT_H + + +template +class Q_EXPORT QValueStack : public QValueList +{ +public: + QValueStack() {} + ~QValueStack() {} + void push( const T& d ) { QValueList::append(d); } + T pop() + { + T elem( this->last() ); + if ( !this->isEmpty() ) + this->remove( this->fromLast() ); + return elem; + } + T& top() { return this->last(); } + const T& top() const { return this->last(); } +}; + +#endif Index: branches/xZenu/src/util/doxygen/qtools/qgcache.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qgcache.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qgcache.cpp (revision 1322) @@ -0,0 +1,868 @@ +/**************************************************************************** +** +** +** Implementation of QGCache and QGCacheIterator classes +** +** Created : 950208 +** +** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** +** This file is part of the tools module of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qgcache.h" +#include "qlist.h" +#include "qdict.h" +#include "qstring.h" + + +// NOT REVISED +/*! + \class QGCache qgcache.h + + \brief The QGCache class is an internal class for implementing QCache template classes. + + QGCache is a strictly internal class that acts as a base class for the + \link collection.html collection classes\endlink QCache and QIntCache. +*/ + + +/***************************************************************************** + QGCacheItem class (internal cache item) + *****************************************************************************/ + +struct QCacheItem +{ + QCacheItem( void *k, QCollection::Item d, int c, short p ) + : priority(p), skipPriority(p), cost(c), key(k), data(d), node(0) {} + short priority; + short skipPriority; + int cost; + void *key; + QCollection::Item data; + QLNode *node; +}; + + +/***************************************************************************** + QCList class (internal list of cache items) + *****************************************************************************/ + +class QCList : private QList +{ +friend class QGCacheIterator; +friend class QCListIt; +public: + QCList() {} + ~QCList(); + + void insert( QCacheItem * ); // insert according to priority + void insert( int, QCacheItem * ); + void take( QCacheItem * ); + void reference( QCacheItem * ); + + void setAutoDelete( bool del ) { QCollection::setAutoDelete(del); } + + bool removeFirst() { return QList::removeFirst(); } + bool removeLast() { return QList::removeLast(); } + + QCacheItem *first() { return QList::first(); } + QCacheItem *last() { return QList::last(); } + QCacheItem *prev() { return QList::prev(); } + QCacheItem *next() { return QList::next(); } + +#if defined(DEBUG) + int inserts; // variables for statistics + int insertCosts; + int insertMisses; + int finds; + int hits; + int hitCosts; + int dumps; + int dumpCosts; +#endif +}; + + +QCList::~QCList() +{ +#if defined(DEBUG) + ASSERT( count() == 0 ); +#endif +} + + +void QCList::insert( QCacheItem *ci ) +{ + QCacheItem *item = first(); + while( item && item->skipPriority > ci->priority ) { + item->skipPriority--; + item = next(); + } + if ( item ) + QList::insert( at(), ci ); + else + append( ci ); +#if defined(DEBUG) + ASSERT( ci->node == 0 ); +#endif + ci->node = currentNode(); +} + +inline void QCList::insert( int i, QCacheItem *ci ) +{ + QList::insert( i, ci ); +#if defined(DEBUG) + ASSERT( ci->node == 0 ); +#endif + ci->node = currentNode(); +} + + +void QCList::take( QCacheItem *ci ) +{ + if ( ci ) { +#if defined(DEBUG) + ASSERT( ci->node != 0 ); +#endif + takeNode( ci->node ); + ci->node = 0; + } +} + + +inline void QCList::reference( QCacheItem *ci ) +{ +#if defined(DEBUG) + ASSERT( ci != 0 && ci->node != 0 ); +#endif + ci->skipPriority = ci->priority; + relinkNode( ci->node ); // relink as first item +} + + +class QCListIt: public QListIterator +{ +public: + QCListIt( const QCList *p ): QListIterator( *p ) {} + QCListIt( const QCListIt *p ): QListIterator( *p ) {} +}; + + +/***************************************************************************** + QCDict class (internal dictionary of cache items) + *****************************************************************************/ + +// +// Since we need to decide if the dictionary should use an int or const +// char * key (the "bool trivial" argument in the constructor below) +// we cannot use the macro/template dict, but inherit directly from QGDict. +// + +class QCDict : public QGDict +{ +public: + QCDict( uint size, uint kt, bool caseSensitive, bool copyKeys ) + : QGDict( size, (KeyType)kt, caseSensitive, copyKeys ) {} + + QCacheItem *find_string(const QString &key) const + { return (QCacheItem*)((QCDict*)this)->look_string(key, 0, 0); } + QCacheItem *find_ascii(const char *key) const + { return (QCacheItem*)((QCDict*)this)->look_ascii(key, 0, 0); } + QCacheItem *find_int(long key) const + { return (QCacheItem*)((QCDict*)this)->look_int(key, 0, 0); } + + QCacheItem *take_string(const QString &key) + { return (QCacheItem*)QGDict::take_string(key); } + QCacheItem *take_ascii(const char *key) + { return (QCacheItem*)QGDict::take_ascii(key); } + QCacheItem *take_int(long key) + { return (QCacheItem*)QGDict::take_int(key); } + + bool insert_string( const QString &key, const QCacheItem *ci ) + { return QGDict::look_string(key,(Item)ci,1)!=0;} + bool insert_ascii( const char *key, const QCacheItem *ci ) + { return QGDict::look_ascii(key,(Item)ci,1)!=0;} + bool insert_int( long key, const QCacheItem *ci ) + { return QGDict::look_int(key,(Item)ci,1)!=0;} + + bool remove_string( QCacheItem *item ) + { return QGDict::remove_string(*((QString*)(item->key)),item); } + bool remove_ascii( QCacheItem *item ) + { return QGDict::remove_ascii((const char *)item->key,item); } + bool remove_int( QCacheItem *item ) + { return QGDict::remove_int((long)item->key,item);} + + void statistics() { QGDict::statistics(); } +}; + + +/***************************************************************************** + QGDict member functions + *****************************************************************************/ + +/*! + \internal + Constructs a cache. +*/ + +QGCache::QGCache( int maxCost, uint size, KeyType kt, bool caseSensitive, + bool copyKeys ) +{ + keytype = kt; + lruList = new QCList; + CHECK_PTR( lruList ); + lruList->setAutoDelete( TRUE ); + copyk = ((keytype == AsciiKey) && copyKeys); + dict = new QCDict( size, kt, caseSensitive, FALSE ); + CHECK_PTR( dict ); + mCost = maxCost; + tCost = 0; +#if defined(DEBUG) + lruList->inserts = 0; + lruList->insertCosts = 0; + lruList->insertMisses = 0; + lruList->finds = 0; + lruList->hits = 0; + lruList->hitCosts = 0; + lruList->dumps = 0; + lruList->dumpCosts = 0; +#endif +} + +/*! + \internal + Cannot copy a cache. +*/ + +QGCache::QGCache( const QGCache & ) + : QCollection() +{ +#if defined(CHECK_NULL) + qFatal( "QGCache::QGCache(QGCache &): Cannot copy a cache" ); +#endif +} + +/*! + \internal + Removes all items from the cache and destroys it. +*/ + +QGCache::~QGCache() +{ + clear(); // delete everything first + delete dict; + delete lruList; +} + +/*! + \internal + Cannot assign a cache. +*/ + +QGCache &QGCache::operator=( const QGCache & ) +{ +#if defined(CHECK_NULL) + qFatal( "QGCache::operator=: Cannot copy a cache" ); +#endif + return *this; // satisfy the compiler +} + + +/*! + \fn uint QGCache::count() const + \internal + Returns the number of items in the cache. +*/ + +/*! + \fn uint QGCache::size() const + \internal + Returns the size of the hash array. +*/ + +/*! + \fn int QGCache::maxCost() const + \internal + Returns the maximum cache cost. +*/ + +/*! + \fn int QGCache::totalCost() const + \internal + Returns the total cache cost. +*/ + +/*! + \internal + Sets the maximum cache cost. +*/ + +void QGCache::setMaxCost( int maxCost ) +{ + if ( maxCost < tCost ) { + if ( !makeRoomFor(tCost - maxCost) ) // remove excess cost + return; + } + mCost = maxCost; +} + + +/*! + \internal + Inserts an item into the cache. + + \warning If this function returns FALSE, you must delete \a data + yourself. Additionally, be very careful about using \a data after + calling this function, as any other insertions into the cache, from + anywhere in the application, or within Qt itself, could cause the + data to be discarded from the cache, and the pointer to become + invalid. +*/ + +bool QGCache::insert_string( const QString &key, QCollection::Item data, + int cost, int priority) +{ + if ( tCost + cost > mCost ) { + if ( !makeRoomFor(tCost + cost - mCost, priority) ) { +#if defined(DEBUG) + lruList->insertMisses++; +#endif + return FALSE; + } + } +#if defined(DEBUG) + ASSERT( keytype == StringKey ); + lruList->inserts++; + lruList->insertCosts += cost; +#endif + if ( priority < -32768 ) + priority = -32768; + else if ( priority > 32767 ) + priority = 32677; + QCacheItem *ci = new QCacheItem( new QString(key), newItem(data), + cost, (short)priority ); + CHECK_PTR( ci ); + lruList->insert( 0, ci ); + dict->insert_string( key, ci ); + tCost += cost; + return TRUE; +} + + +/*! \internal */ + +bool QGCache::insert_other( const char *key, QCollection::Item data, + int cost, int priority) +{ + if ( tCost + cost > mCost ) { + if ( !makeRoomFor(tCost + cost - mCost, priority) ) { +#if defined(DEBUG) + lruList->insertMisses++; +#endif + return FALSE; + } + } +#if defined(DEBUG) + ASSERT( keytype != StringKey ); + lruList->inserts++; + lruList->insertCosts += cost; +#endif + if ( keytype == AsciiKey && copyk ) + key = qstrdup( key ); + if ( priority < -32768 ) + priority = -32768; + else if ( priority > 32767 ) + priority = 32677; + QCacheItem *ci = new QCacheItem( (void*)key, newItem(data), cost, + (short)priority ); + CHECK_PTR( ci ); + lruList->insert( 0, ci ); + if ( keytype == AsciiKey ) + dict->insert_ascii( key, ci ); + else + dict->insert_int( (long)key, ci ); + tCost += cost; + return TRUE; +} + + +/*! + \internal + Removes an item from the cache. +*/ + +bool QGCache::remove_string( const QString &key ) +{ + Item d = take_string( key ); + if ( d ) + deleteItem( d ); + return d != 0; +} + + +/*! \internal */ + +bool QGCache::remove_other( const char *key ) +{ + Item d = take_other( key ); + if ( d ) + deleteItem( d ); + return d != 0; +} + + +/*! + \internal + Takes an item out of the cache (no delete). +*/ + +QCollection::Item QGCache::take_string( const QString &key ) +{ + QCacheItem *ci = dict->take_string( key ); // take from dict + Item d; + if ( ci ) { + d = ci->data; + tCost -= ci->cost; + lruList->take( ci ); // take from list + delete (QString*)ci->key; + delete ci; + } else { + d = 0; + } + return d; +} + +/*! + \internal + Takes an item out of the cache (no delete). +*/ + +QCollection::Item QGCache::take_other( const char *key ) +{ + QCacheItem *ci; + if ( keytype == AsciiKey ) + ci = dict->take_ascii( key ); + else + ci = dict->take_int( (long)key ); + Item d; + if ( ci ) { + d = ci->data; + tCost -= ci->cost; + lruList->take( ci ); // take from list + if ( copyk ) + delete [] (char *)ci->key; + delete ci; + } else { + d = 0; + } + return d; +} + + +/*! + \internal + Clears the cache. +*/ + +void QGCache::clear() +{ + QCacheItem *ci; + while ( (ci = lruList->first()) ) { + switch ( keytype ) { + case StringKey: + dict->remove_string( ci ); + delete (QString*)ci->key; + break; + case AsciiKey: + dict->remove_ascii( ci ); + if ( copyk ) + delete [] (char*)ci->key; + break; + case IntKey: + dict->remove_int( ci ); + break; + case PtrKey: // unused + break; + } + deleteItem( ci->data ); // delete data + lruList->removeFirst(); // remove from list + } + tCost = 0; +} + + +/*! + \internal + Finds an item in the cache. +*/ + +QCollection::Item QGCache::find_string( const QString &key, bool ref ) const +{ + QCacheItem *ci = dict->find_string( key ); +#if defined(DEBUG) + lruList->finds++; +#endif + if ( ci ) { +#if defined(DEBUG) + lruList->hits++; + lruList->hitCosts += ci->cost; +#endif + if ( ref ) + lruList->reference( ci ); + return ci->data; + } + return 0; +} + + +/*! + \internal + Finds an item in the cache. +*/ + +QCollection::Item QGCache::find_other( const char *key, bool ref ) const +{ + QCacheItem *ci = keytype == AsciiKey ? dict->find_ascii(key) + : dict->find_int((long)key); +#if defined(DEBUG) + lruList->finds++; +#endif + if ( ci ) { +#if defined(DEBUG) + lruList->hits++; + lruList->hitCosts += ci->cost; +#endif + if ( ref ) + lruList->reference( ci ); + return ci->data; + } + return 0; +} + + +/*! + \internal + Allocates cache space for one or more items. +*/ + +bool QGCache::makeRoomFor( int cost, int priority ) +{ + if ( cost > mCost ) // cannot make room for more + return FALSE; // than maximum cost + if ( priority == -1 ) + priority = 32767; + register QCacheItem *ci = lruList->last(); + int cntCost = 0; + int dumps = 0; // number of items to dump + while ( cntCost < cost && ci && ci->skipPriority <= priority ) { + cntCost += ci->cost; + ci = lruList->prev(); + dumps++; + } + if ( cntCost < cost ) // can enough cost be dumped? + return FALSE; // no +#if defined(DEBUG) + ASSERT( dumps > 0 ); +#endif + while ( dumps-- ) { + ci = lruList->last(); +#if defined(DEBUG) + lruList->dumps++; + lruList->dumpCosts += ci->cost; +#endif + switch ( keytype ) { + case StringKey: + dict->remove_string( ci ); + delete (QString*)ci->key; + break; + case AsciiKey: + dict->remove_ascii( ci ); + if ( copyk ) + delete [] (char *)ci->key; + break; + case IntKey: + dict->remove_int( ci ); + break; + case PtrKey: // unused + break; + } + deleteItem( ci->data ); // delete data + lruList->removeLast(); // remove from list + } + tCost -= cntCost; + return TRUE; +} + + +/*! + \internal + Outputs debug statistics. +*/ + +void QGCache::statistics() const +{ +#if defined(DEBUG) + QString line; + line.fill( '*', 80 ); + qDebug( "%s",line.ascii() ); + qDebug( "CACHE STATISTICS:" ); + qDebug( "cache contains %d item%s, with a total cost of %d", + count(), count() != 1 ? "s" : "", tCost ); + qDebug( "maximum cost is %d, cache is %d%% full.", + mCost, (200*tCost + mCost) / (mCost*2) ); + qDebug( "find() has been called %d time%s", + lruList->finds, lruList->finds != 1 ? "s" : "" ); + qDebug( "%d of these were hits, items found had a total cost of %d.", + lruList->hits,lruList->hitCosts ); + qDebug( "%d item%s %s been inserted with a total cost of %d.", + lruList->inserts,lruList->inserts != 1 ? "s" : "", + lruList->inserts != 1 ? "have" : "has", lruList->insertCosts ); + qDebug( "%d item%s %s too large or had too low priority to be inserted.", + lruList->insertMisses, lruList->insertMisses != 1 ? "s" : "", + lruList->insertMisses != 1 ? "were" : "was" ); + qDebug( "%d item%s %s been thrown away with a total cost of %d.", + lruList->dumps, lruList->dumps != 1 ? "s" : "", + lruList->dumps != 1 ? "have" : "has", lruList->dumpCosts ); + qDebug( "Statistics from internal dictionary class:" ); + dict->statistics(); + qDebug( "%s",line.ascii() ); +#endif +} + + +/***************************************************************************** + QGCacheIterator member functions + *****************************************************************************/ + +/*! + \class QGCacheIterator qgcache.h + + \brief An internal class for implementing QCacheIterator and QIntCacheIterator. + + QGCacheIterator is a strictly internal class that does the heavy work for + QCacheIterator and QIntCacheIterator. +*/ + +/*! + \internal + Constructs an iterator that operates on the cache \e c. +*/ + +QGCacheIterator::QGCacheIterator( const QGCache &c ) +{ + it = new QCListIt( c.lruList ); +#if defined(DEBUG) + ASSERT( it != 0 ); +#endif +} + +/*! + \internal + Constructs an iterator that operates on the same cache as \e ci. +*/ + +QGCacheIterator::QGCacheIterator( const QGCacheIterator &ci ) +{ + it = new QCListIt( ci.it ); +#if defined(DEBUG) + ASSERT( it != 0 ); +#endif +} + +/*! + \internal + Destroys the iterator. +*/ + +QGCacheIterator::~QGCacheIterator() +{ + delete it; +} + +/*! + \internal + Assigns the iterator \e ci to this cache iterator. +*/ + +QGCacheIterator &QGCacheIterator::operator=( const QGCacheIterator &ci ) +{ + *it = *ci.it; + return *this; +} + +/*! + \internal + Returns the number of items in the cache. +*/ + +uint QGCacheIterator::count() const +{ + return it->count(); +} + +/*! + \internal + Returns TRUE if the iterator points to the first item. +*/ + +bool QGCacheIterator::atFirst() const +{ + return it->atFirst(); +} + +/*! + \internal + Returns TRUE if the iterator points to the last item. +*/ + +bool QGCacheIterator::atLast() const +{ + return it->atLast(); +} + +/*! + \internal + Sets the list iterator to point to the first item in the cache. +*/ + +QCollection::Item QGCacheIterator::toFirst() +{ + QCacheItem *item = it->toFirst(); + return item ? item->data : 0; +} + +/*! + \internal + Sets the list iterator to point to the last item in the cache. +*/ + +QCollection::Item QGCacheIterator::toLast() +{ + QCacheItem *item = it->toLast(); + return item ? item->data : 0; +} + +/*! + \internal + Returns the current item. +*/ + +QCollection::Item QGCacheIterator::get() const +{ + QCacheItem *item = it->current(); + return item ? item->data : 0; +} + +/*! + \internal + Returns the key of the current item. +*/ + +QString QGCacheIterator::getKeyString() const +{ + QCacheItem *item = it->current(); + return item ? *((QString*)item->key) : QString::null; +} + +/*! + \internal + Returns the key of the current item, as a \0-terminated C string. +*/ + +const char *QGCacheIterator::getKeyAscii() const +{ + QCacheItem *item = it->current(); + return item ? (const char *)item->key : 0; +} + +/*! + \internal + Returns the key of the current item, as a long. +*/ + +long QGCacheIterator::getKeyInt() const +{ + QCacheItem *item = it->current(); + return item ? (long)item->key : 0; +} + +/*! + \internal + Moves to the next item (postfix). +*/ + +QCollection::Item QGCacheIterator::operator()() +{ + QCacheItem *item = it->operator()(); + return item ? item->data : 0; +} + +/*! + \internal + Moves to the next item (prefix). +*/ + +QCollection::Item QGCacheIterator::operator++() +{ + QCacheItem *item = it->operator++(); + return item ? item->data : 0; +} + +/*! + \internal + Moves \e jumps positions forward. +*/ + +QCollection::Item QGCacheIterator::operator+=( uint jump ) +{ + QCacheItem *item = it->operator+=(jump); + return item ? item->data : 0; +} + +/*! + \internal + Moves to the previous item (prefix). +*/ + +QCollection::Item QGCacheIterator::operator--() +{ + QCacheItem *item = it->operator--(); + return item ? item->data : 0; +} + +/*! + \internal + Moves \e jumps positions backward. +*/ + +QCollection::Item QGCacheIterator::operator-=( uint jump ) +{ + QCacheItem *item = it->operator-=(jump); + return item ? item->data : 0; +} Index: branches/xZenu/src/util/doxygen/qtools/qconfig.h =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qconfig.h (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qconfig.h (revision 1322) @@ -0,0 +1 @@ +// Everything Index: branches/xZenu/src/util/doxygen/qtools/qthread_unix.cpp =================================================================== --- branches/xZenu/src/util/doxygen/qtools/qthread_unix.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/qthread_unix.cpp (revision 1322) @@ -0,0 +1,218 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qglobal.h" + +#if defined(_OS_HPUX_) +#include +#elif defined(_OS_MAC_) +#undef DEBUG +#include +#elif defined(_OS_BSDI_) +#include +#include +#include +#include +#endif +#include + +#include "qthread.h" +#include "qthread_p.h" + + +/************************************************************************** + ** QThreadPrivate + *************************************************************************/ + +QThreadPrivate::QThreadPrivate() : + running(FALSE), finished(FALSE), terminated(FALSE), stackSize(0) +{ + thread_id = 0; +} + +QThreadPrivate::~QThreadPrivate() +{ +} + +void *QThreadPrivate::start(void *arg) +{ + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); + pthread_cleanup_push(QThreadPrivate::finish, arg); + + QThread *thr = reinterpret_cast(arg); + + thr->started(); + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_testcancel(); + thr->run(); + + pthread_cleanup_pop(1); + return 0; +} + +void QThreadPrivate::finish(void *arg) +{ + QThread *thr = reinterpret_cast(arg); + QThreadPrivate *d = thr->d; + QMutexLocker locker(&d->mutex); + + d->running = FALSE; + d->finished = TRUE; + if (d->terminated) + thr->terminated(); + d->terminated = FALSE; + thr->finished(); + + d->thread_id = 0; + d->thread_done.wakeAll(); +} + + + + +/************************************************************************** + ** QThread + *************************************************************************/ + +void QThread::start() +{ + QMutexLocker locker(&d->mutex); + if (d->running) return; + + d->running = TRUE; + d->finished = FALSE; + + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED); + if (d->stackSize>0) + { +#if defined(_POSIX_THREAD_ATTR_STACKSIZE) && (_POSIX_THREAD_ATTR_STACKSIZE-0>0) + pthread_attr_setstacksize(&attr,d->stackSize); +#endif + } + int code = pthread_create(&d->thread_id, &attr, QThreadPrivate::start, this); + pthread_attr_destroy(&attr); + + if (code) + { + qWarning("QThread::start: Thread creation error: %d", code); + + d->running = FALSE; + d->finished = FALSE; + d->thread_id = 0; + } +} + +void QThread::terminate() +{ + QMutexLocker locker(&d->mutex); + + if (!d->thread_id) return; + + int code = pthread_cancel(d->thread_id); + if (code) + { + qWarning("QThread::start: Thread termination error: %d", code); + } + else + { + d->terminated = TRUE; + } +} + +void QThread::wait() +{ + QMutexLocker locker(&d->mutex); + if (d->finished || !d->running) return; + + while (d->running) + { + d->thread_done.wait(locker.mutex()); + } +} + +#if defined(QT_LINUXBASE) && !defined(_SC_NPROCESSORS_ONLN) +// LSB doesn't define _SC_NPROCESSORS_ONLN. +# define _SC_NPROCESSORS_ONLN 84 +#endif + +int QThread::idealThreadCount() +{ + int cores = -1; +#if defined(_OS_MAC_) + // Mac OS X + cores = MPProcessorsScheduled(); +#elif defined(_OS_HPUX_) + // HP-UX + struct pst_dynamic psd; + if (pstat_getdynamic(&psd, sizeof(psd), 1, 0) == -1) + { + perror("pstat_getdynamic"); + cores = -1; + } + else + { + cores = (int)psd.psd_proc_cnt; + } +#elif defined(_OS_BSDI_) + // FreeBSD, OpenBSD, NetBSD, BSD/OS + size_t len = sizeof(cores); + int mib[2]; + mib[0] = CTL_HW; + mib[1] = HW_NCPU; + + if (sysctl(mib, 2, &cores, &len, NULL, 0) != 0) + { + perror("sysctl"); + cores = -1; + } +#elif defined(_OS_IRIX_) + // IRIX + cores = (int)sysconf(_SC_NPROC_ONLN); +#else + // the rest: Linux, Solaris, AIX, Tru64 + cores = (int)sysconf(_SC_NPROCESSORS_ONLN); +#endif + return cores; +} + Index: branches/xZenu/src/util/doxygen/qtools/LICENSE.QPL =================================================================== --- branches/xZenu/src/util/doxygen/qtools/LICENSE.QPL (revision 0) +++ branches/xZenu/src/util/doxygen/qtools/LICENSE.QPL (revision 1322) @@ -0,0 +1,103 @@ + THE Q PUBLIC LICENSE + version 1.0 + + Copyright (C) 1999-2000 Trolltech AS, Norway. + Everyone is permitted to copy and + distribute this license document. + +The intent of this license is to establish freedom to share and change the +software regulated by this license under the open source model. + +This license applies to any software containing a notice placed by the +copyright holder saying that it may be distributed under the terms of +the Q Public License version 1.0. Such software is herein referred to as +the Software. This license covers modification and distribution of the +Software, use of third-party application programs based on the Software, +and development of free software which uses the Software. + + Granted Rights + +1. You are granted the non-exclusive rights set forth in this license + provided you agree to and comply with any and all conditions in this + license. Whole or partial distribution of the Software, or software + items that link with the Software, in any form signifies acceptance of + this license. + +2. You may copy and distribute the Software in unmodified form provided + that the entire package, including - but not restricted to - copyright, + trademark notices and disclaimers, as released by the initial developer + of the Software, is distributed. + +3. You may make modifications to the Software and distribute your + modifications, in a form that is separate from the Software, such as + patches. The following restrictions apply to modifications: + + a. Modifications must not alter or remove any copyright notices in + the Software. + + b. When modifications to the Software are released under this + license, a non-exclusive royalty-free right is granted to the + initial developer of the Software to distribute your modification + in future versions of the Software provided such versions remain + available under these terms in addition to any other license(s) of + the initial developer. + +4. You may distribute machine-executable forms of the Software or + machine-executable forms of modified versions of the Software, provided + that you meet these restrictions: + + a. You must include this license document in the distribution. + + b. You must ensure that all recipients of the machine-executable forms + are also able to receive the complete machine-readable source code + to the distributed Software, including all modifications, without + any charge beyond the costs of data transfer, and place prominent + notices in the distribution explaining this. + + c. You must ensure that all modifications included in the + machine-executable forms are available under the terms of this + license. + +5. You may use the original or modified versions of the Software to + compile, link and run application programs legally developed by you + or by others. + +6. You may develop application programs, reusable components and other + software items that link with the original or modified versions of the + Software. These items, when distributed, are subject to the following + requirements: + + a. You must ensure that all recipients of machine-executable forms of + these items are also able to receive and use the complete + machine-readable source code to the items without any charge + beyond the costs of data transfer. + + b. You must explicitly license all recipients of your items to use + and re-distribute original and modified versions of the items in + both machine-executable and source code forms. The recipients must + be able to do so without any charges whatsoever, and they must be + able to re-distribute to anyone they choose. + + + c. If the items are not available to the general public, and the + initial developer of the Software requests a copy of the items, + then you must supply one. + + Limitations of Liability + +In no event shall the initial developers or copyright holders be liable +for any damages whatsoever, including - but not restricted to - lost +revenue or profits or other direct, indirect, special, incidental or +consequential damages, even if they have been advised of the possibility +of such damages, except to the extent invariable law, if any, provides +otherwise. + + No Warranty + +The Software and this license document are provided AS IS with NO WARRANTY +OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE. + Choice of Law + +This license is governed by the Laws of Norway. Disputes shall be settled +by Oslo City Court. Index: branches/xZenu/src/util/doxygen/configure =================================================================== --- branches/xZenu/src/util/doxygen/configure (revision 0) +++ branches/xZenu/src/util/doxygen/configure (revision 1322) @@ -0,0 +1,671 @@ +#!/bin/sh +# +# $Id: configure,v 1.229 2005/11/09 21:17:03 dimitri Exp $ +# +# Copyright (C) 1997-2011 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. +# +# shell script to configure doxygen + +doxygen_version_major=1 +doxygen_version_minor=7 +doxygen_version_revision=4 + +#NOTE: Setting version_mmn to "NO" will omit mmn info from the package. +doxygen_version_mmn=NO + +bin_dirs=`echo $PATH | sed -e "s/:/ /g"` + +f_debug=NO +f_shared=YES +f_make=NO +f_dot=NO +f_perl=NO +f_plf_auto=NO +f_prefix=/usr/local +f_insttool=NO +f_english=NO +f_wizard=NO +f_app=NO +f_thread=NO +f_flex=NO +f_bison=NO +f_langs=nl,sv,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,mk,br,dk,sk,ua,gr,tw,sr,ca,lt,za,ar,fa,sc,vi,tr,eo + +while test -n "$1"; do + case $1 in + --prefix | -prefix) + shift; f_prefix=$1 + ;; + --docdir | -docdir) + shift; f_docdir=$1 + ;; + --shared | -shared) + f_shared=YES + ;; + --static | -static) + f_shared=NO + ;; + --release | -release) + f_debug=NO + ;; + --debug | -debug) + f_debug=YES + ;; + --english-only | -english-only) + f_english=YES + ;; + --enable-langs | -enable-langs) + shift; f_langs=$1 + ;; + --platform | -platform) + shift; f_platform=$1 + ;; + --make | -make) + shift; f_make=$1 + ;; + --dot | -dot) + shift; f_dot=$1 + ;; + --perl | -perl) + shift; f_perl=$1 + ;; + --flex | -flex) + shift; f_flex=$1 + ;; + --bison | -bison) + shift; f_bison=$1 + ;; + --install | -install) + shift; f_insttool=$1 + ;; + --with-doxywizard | -with-doxywizard) + f_wizard=YES + ;; + --with-doxyapp | -with-doxyapp) + f_app=YES + ;; + -h | -help | --help) + f_help=y + ;; + *) + echo $1: unknown argument + f_help=y + f_error=y + ;; + esac + shift +done + +if test "$f_help" = y; then + cat </dev/null` || u_release=unknown +u_system=`(uname -s) 2>/dev/null` || u_system=unknown + +if test -z "$f_platform"; then + f_platforms="`cat PLATFORMS`" + + case "$u_system:$u_release" in + AIX*) + f_platform=aix-xlc + ;; + BeOS*) + f_platform=beos-g++ + ;; + dgux:*) + f_platform=dgux-g++ + ;; + Darwin:*) + f_platform=macosx-c++ + if test "$f_insttool" = NO; then + f_insttool=/usr/bin/install + fi + ;; + FreeBSD:*) + f_platform=freebsd-g++ + if test "$f_insttool" = NO; then + f_insttool=/usr/bin/install + fi + ;; + HP-UX:*) + f_platform=hpux-g++ + if test "$f_insttool" = NO; then + f_insttool=/usr/bin/install + fi + ;; + IRIX64:*) + f_platform=irix-64 + ;; + IRIX:*) + f_platform=irix-n32 + ;; + Linux:*|GNU:*|GNU/*:*) + f_platform=linux-g++ + ;; + NetBSD:*) + f_platform=netbsd-g++ + ;; + OpenBSD:*) + f_platform=openbsd-g++ + ;; + OSF1:*) + f_platform=osf1-g++ + ;; + QNX:*) + f_platform=qnx-g++ + ;; + *:3.2) + f_platform=sco-g++ + ;; + SunOS:4*) + f_platform=sunos-g++ + ;; + SunOS:5*) + f_platform=solaris-g++ + if test "$f_insttool" = NO; then + f_insttool=/usr/bin/install + fi + ;; + ULTRIX:*) + f_platform=ultrix-g++ + ;; + UNIX_SV:4.2*) + f_platform=unixware-g++ + ;; + Cygwin:*|CYGWIN*) + f_platform=win32-g++ + ;; + *MiNT:*) + f_platform=m68k-atari-mint-g++ + ;; + *) + echo + echo "Your platform was not recognised by this configure script" + echo "Please use the -platform option to specify one of platforms" + echo "in this list:" + echo + for p in $f_platforms + do + echo " $0 $* -platform $p" + done + echo + exit 2 + esac + echo " Autodetected platform $f_platform... " + f_plf_auto=YES +fi + +if test -z "$f_docdir"; then + f_docdir='$(INSTALL)/share/doc/packages/doxygen' +fi + +if test "$f_plf_auto" = NO; then + echo -n " Checking for platform $f_platform... " + if test '!' -d tmake/lib/$f_platform; then + echo "not supported!" + echo + exit 2 + fi + echo "supported" +fi + +#- check for qt -------------------------------------------------------------- + +if test "$f_wizard" = YES; then + if test -z "$QTDIR"; then + echo " QTDIR environment variable not set!" + echo -n " Checking for Qt..." + for d in /usr/{lib,share,qt}/{qt-4,qt4,qt,qt*,4} /usr; do + if test -x "$d/bin/qmake"; then + QTDIR=$d + fi + done + else + echo " Detected Qt via the QTDIR environment variable..." + echo -n " " + fi + if test -z "$QTDIR"; then + echo "QTDIR not set and Qt not found at standard locations!" + echo + echo "Set the QTDIR environment variable such that \$QTDIR/bin/qmake exists." + echo "check the Qt installation instructions!" + exit 2 + fi +fi + +# - check for make ------------------------------------------------------------ + +echo -n " Checking for GNU make tool... " +if test "$f_make" = NO; then + make_names="gmake make" + make_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin" + make_prog=NO + for i in $make_names; do + for j in $make_dirs; do + if test -x "$j/$i"; then + if test -n "`$j/$i --version 2>/dev/null | grep GNU`"; then + make_prog="$j/$i" + break 2 + fi + fi + done + done + f_make="$make_prog" +fi + +if test "$f_make" = NO; then + echo "not found!"; + echo + exit 2 +fi +echo "using $f_make" + +# - check for install ------------------------------------------------------------ + +echo -n " Checking for GNU install tool... " +if test "$f_insttool" = NO; then + install_names="ginstall install" + install_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin /usr/ucb" + install_prog=NO + install_found=NO + for i in $install_names; do + for j in $install_dirs; do + if test -x "$j/$i"; then + if test -n "`$j/$i --version 2>/dev/null | grep utils`"; then + install_found=YES + install_prog="$j/$i" + break 2 + fi + fi + done + done + f_insttool="$install_prog" +fi + +if test "$f_insttool" = NO; then + if test "$install_found" = YES; then + echo; + else + echo "not found!"; + echo + fi + echo "GNU version of install is required: this is part of the fileutils/coreutils package: " + echo "see http://www.gnu.org/software/fileutils/fileutils.html" + echo + exit 2 +fi +echo "using $f_insttool"; + + +# - check for dot ------------------------------------------------------------ + +echo -n " Checking for dot (part of GraphViz)... " +if test "$f_dot" = NO; then + dot_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin" + dot_prog=NO + for j in $dot_dirs; do + if test -x "$j/dot"; then + dot_prog="$j/dot" + break 2 + fi + done + f_dot="$dot_prog" +fi + +if test "$f_dot" = NO; then + echo "not found!"; +else + echo "using $f_dot" +fi + +# - check for perl ------------------------------------------------------------ + +echo -n " Checking for perl... " +if test "$f_perl" = NO; then + perl_names="perl perl5" + perl_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin" + perl_prog=NO + perl_found=NO + for i in $perl_names; do + for j in $perl_dirs; do + if test -x "$j/$i"; then + perl_found=YES + if $j/$i -e 'require 5.000;' 2>/dev/null ; then + perl_prog="$j/$i" + break 2 + fi + fi + done + done + f_perl="$perl_prog" +fi + +if test "$f_perl" = NO; then + if test "$perl_found" = YES; then + echo "version is too old (5.000 or higher is required)." + else + echo "not found!"; + fi + echo + exit 2 +fi +echo "using $f_perl"; + +# - check for flex ------------------------------------------------------------ + +echo -n " Checking for flex... " +if test "$f_flex" = NO; then + flex_dirs="$bin_dirs /usr/bin /usr/local/bin /bin" + flex_prog=NO + flex_found=NO + for j in $flex_dirs; do + if test -x "$j/flex"; then + flex_found=YES + flex_prog="$j/flex" + break + fi + done + f_flex="$flex_prog" +fi + +if test "$f_flex" = NO; then + echo "not found!"; + exit 2 +else + echo "using $f_flex" +fi + +# - check for bison ------------------------------------------------------------ + +echo -n " Checking for bison... " +if test "$f_bison" = NO; then + bison_dirs="$bin_dirs /usr/bin /usr/local/bin /bin" + bison_prog=NO + bison_found=NO + for j in $bison_dirs; do + if test -x "$j/bison"; then + bison_found=YES + bison_prog="$j/bison" + break + fi + done + f_bison="$bison_prog" +fi + +if test "$f_bison" = NO; then + echo "not found!"; + exit 2 +else + echo "using $f_bison" +fi + +# ----------------------------------------------------------------------------- + +# +# Make VERSION file +# +echo " Creating VERSION file." +# Output should be something like 1.4.5-20051010 +if test "x$doxygen_version_mmn" = "xNO"; then + echo "$doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision" > VERSION +else + echo "$doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision-$doxygen_version_mmn" > VERSION +fi + +test -f .makeconfig && rm .makeconfig +test -f .tmakeconfig && rm .tmakeconfig + +configPWD=`pwd` + +cat > .makeconfig <> .makeconfig <> .makeconfig <> .makeconfig <> .makeconfig < spec.tmp +if test "$doxygen_version_mmn" = NO; then + echo "%define revision 1" >> spec.tmp + echo "%define mmn 1" >> spec.tmp +else + echo "%define revision $doxygen_version_mmn" >> spec.tmp + echo "%define mmn $doxygen_version_mmn" >> spec.tmp +fi + +mkdir -p packages +mkdir -p packages/rpm + +cat spec.tmp ./packages/rpm/doxygen.spec.in > ./packages/rpm/doxygen.spec + +rm -f spec.tmp + + +# make .tmakeconfig +# +touch .tmakeconfig +if test "$f_shared" = NO; then + if test "$f_platform" = "osf1-cxx" -o "$f_platform" = "irix-n32"; then + cat >> .tmakeconfig <> .tmakeconfig <> .tmakeconfig <> .tmakeconfig <> .tmakeconfig </dev/null`"; then + mac_sdk=MacOSX10.4u.sdk + fi + if test -n "`ls /Developer/SDKs/MacOSX10.5*.sdk 2>/dev/null`"; then + mac_sdk=MacOSX10.5.sdk + fi + if test -n $mac_sdk; then + cat >> .tmakeconfig <> .tmakeconfig <> .tmakeconfig < $DST <> $DST + if test $i = Makefile.in; then + echo "" >> $DST + echo "all: src/version.cpp " >> $DST + echo " \$(MAKE) -C qtools" >> $DST + echo " \$(MAKE) -C libmd5" >> $DST + echo " \$(MAKE) -C src" >> $DST + if test $f_wizard = YES; then + echo " \$(MAKE) MAN1DIR=\$(MAN1DIR) -C addon/doxywizard" >> $DST + fi + if test $f_app = YES; then + echo " \$(MAKE) -C addon/doxyapp" >> $DST + fi + echo "" >> $DST + echo "doxywizard_install:" >> $DST + if test $f_wizard = YES; then + echo " \$(MAKE) MAN1DIR=\$(MAN1DIR) -C addon/doxywizard install" >> $DST + fi + echo "" >> $DST + fi + if test $f_wizard = YES; then + sed -e "s/%%WITHDOXYWIZARD%% /--with doxywizard /g" $SRC >> $DST + else + sed -e "s/%%WITHDOXYWIZARD%% //g" $SRC >> $DST + fi + echo " Created $DST from $SRC..." +done + +f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libmd5/libmd5.pro.in addon/doxyapp/doxyapp.pro.in" + +for i in $f_inprofiles ; do + SRC=$i + DST=`echo $i|sed 's%\(.*\).in$%\1%'` + TIME=`date` + cat > $DST <> $DST + echo " Created $DST from $SRC..." +done + +# - generating src/lang_cfg.h + +if test -f "src/lang_cfg.h"; then + chmod u+w src/lang_cfg.h # make sure file can be overwritten +fi +echo -n " Generating src/lang_cfg.h..." +echo $f_langs | $f_perl -e '@l=split(/,/,); + chomp @l; + @allowed=(split(/,/,"NL,SV,CZ,FR,ID,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,MK,BR,DK,SK,UA,GR,TW,SR,CA,LT,ZA,AR,FA,SC,VI,TR,EO")); + foreach my $elem (@l){ + $elem =~ tr/a-z/A-Z/; + $r=0; + foreach my $tst (@allowed){ + if ($tst eq $elem) { $r=1; last; } + } + if ($r!=1) { die "ERROR: Invalid language $elem was selected!\n"; } + print "#define LANG_$elem\n"; + };' > ./src/lang_cfg.h +echo Property changes on: branches/xZenu/src/util/doxygen/configure ___________________________________________________________________ Added: svn:executable + * Index: branches/xZenu/src/util/doxygen/LANGUAGE.HOWTO =================================================================== --- branches/xZenu/src/util/doxygen/LANGUAGE.HOWTO (revision 0) +++ branches/xZenu/src/util/doxygen/LANGUAGE.HOWTO (revision 1322) @@ -0,0 +1,50 @@ +This short howto explains how to add support for a new language to Doxygen: + +Just follow these steps: + +1) Tell me which language you want to add support for. If no one else + is already working on support for that language, you will be + assigned as the maintainer for the language. I'll create a + list on Doxygen's homepage, so everyone knows who is doing what. +2) Create a copy of translator_en.h and name it + translator_.h + I'll use xx in the rest of this document. +3) Edit language.cpp: + - Add a #include + - In setTranslator() add + + else if (L_EQUAL("your_language_name")) + { + theTranslator = new TranslatorYourLanguage; + } + + after the if { ... } +4) Edit libdoxygen.pro.in and add translator_xx.h to the HEADERS line. +5) Edit translator_xx.h: + - Change TRANSLATOR_EN_H to TRANSLATOR_XX_H (in both the #include line and + the #define line). + - Change TranslatorEnglish to TranslatorYourLanguage + - In the member idLanguage() change "english" into the name of your + language (use lower case characters only). Depending on the language you + may also wish to change the member functions latexLanguageSupportCommand() + and idLanguageCharset(). + - Edit all the strings that are returned by the members that start + with tr. Try to match punctuation and capitals! + To enter special characters (with accents) you can: + a) Enter them directly if your keyboard supports that and you are + using a Latin-1 font. + Doxygen will translate the characters to proper Latex and + leave the Html and man output for what it is (which is fine, if + idLanguageCharset() is set correctly). + b) Use html codes like ä for an a with an umlaut (i.e. ä). + See the HTML specification for the codes. +6) Run configure and make again from the root of the distribution, + in order to regenerate the Makefiles. +7) Now you can use OUTPUT_LANGUAGE = your_language_name + in the config file to generate output in your language. +8) Send translator_xx.h to me so I can add it to doxygen. + Send also your name and e-mail address to be included in the + maintainers.txt list. + +Good luck, and let me know if there are problems. + Index: branches/xZenu/src/util/doxygen/LICENSE =================================================================== --- branches/xZenu/src/util/doxygen/LICENSE (revision 0) +++ branches/xZenu/src/util/doxygen/LICENSE (revision 1322) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) yyyy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) yyyy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Index: branches/xZenu/src/util/doxygen/Makefile.in =================================================================== --- branches/xZenu/src/util/doxygen/Makefile.in (revision 0) +++ branches/xZenu/src/util/doxygen/Makefile.in (revision 1322) @@ -0,0 +1,139 @@ +#all: src/version.cpp doxywizard +# cd qtools ; $(MAKE) +# cd src ; $(MAKE) + +DESTDIR = + +clean: FORCE + cd examples ; $(MAKE) clean + cd doc ; $(MAKE) clean + cd qtools ; $(MAKE) clean + cd src ; $(MAKE) clean + cd libmd5 ; $(MAKE) clean + cd addon/doxywizard ; $(MAKE) clean + cd addon/doxmlparser/src ; $(MAKE) clean + cd addon/doxmlparser/test ; $(MAKE) clean + cd addon/doxmlparser/examples/metrics ; $(MAKE) clean + -rm -f bin/doxy* + -rm -f objects/*.o + +distclean: clean + cd src ; $(MAKE) distclean + cd libmd5 ; $(MAKE) distclean + cd addon/doxywizard ; $(MAKE) distclean + cd addon/doxmlparser/src ; $(MAKE) distclean + cd addon/doxmlparser/test ; $(MAKE) distclean + cd addon/doxmlparser/examples/metrics ; $(MAKE) distclean + cd addon/doxyapp ; $(MAKE) distclean + -rm -f lib/lib* + -rm -f bin/doxy* + -rm -f html + -rm -f latex + -rm -f objects/*.o + -rm -f src/Makefile.doxygen src/Makefile.libdoxygen + -rm -f src/Makefile.doxytag src/Makefile.libdoxycfg + -rm -f libmd5/Makefile.libmd5 + -rm -f Makefile qtools/Makefile src/Makefile examples/Makefile doc/Makefile + -rm -f .makeconfig .tmakeconfig + -rm -f src/doxygen.pro src/libdoxygen.pro src/doxytag.pro qtools/qtools.pro src/libdoxycfg.pro libmd5/libmd5.pro + -rm -f src/version.cpp + -rm -r addon/doxywizard/Makefile + -rm -f addon/doxywizard/doxywizard.pro + -rm -f VERSION + -rm -f packages/rpm/doxygen.spec + +DATE=$(shell date "+%B %Y") + +MAN1DIR = man/man1 + +install: doxywizard_install + $(INSTTOOL) -d $(DESTDIR)/$(INSTALL)/bin + $(INSTTOOL) -m 755 bin/doxygen $(DESTDIR)/$(INSTALL)/bin + $(INSTTOOL) -m 755 bin/doxytag $(DESTDIR)/$(INSTALL)/bin + $(INSTTOOL) -d $(DESTDIR)/$(INSTALL)/$(MAN1DIR) + cat doc/doxygen.1 | sed -e "s/DATE/$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > doxygen.1 + $(INSTTOOL) -m 644 doxygen.1 $(DESTDIR)/$(INSTALL)/$(MAN1DIR)/doxygen.1 + rm doxygen.1 + cat doc/doxytag.1 | sed -e "s/DATE/$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > doxytag.1 + $(INSTTOOL) -m 644 doxytag.1 $(DESTDIR)/$(INSTALL)/$(MAN1DIR)/doxytag.1 + rm doxytag.1 + +install_docs: + $(INSTTOOL) -d $(DESTDIR)/$(DOCDIR) + $(MAKE) -C examples + $(MAKE) -C doc + $(MAKE) -C latex + $(INSTTOOL) -m 644 latex/doxygen_manual.pdf $(DESTDIR)/$(DOCDIR) + cp -r examples $(DESTDIR)/$(DOCDIR) + cp -r html $(DESTDIR)/$(DOCDIR) + +docs: FORCE + cd examples ; $(MAKE) + cd doc ; $(MAKE) + +pdf: docs + cd latex ; $(MAKE) + +DISTFILES = Doxyfile libmd5 addon tmake doc examples bin lib objects \ + qtools src configure configure.bin Makefile.in Makefile.win_nmake.in \ + Makefile.win_make.in INSTALL LANGUAGE.HOWTO LICENSE PLATFORMS \ + VERSION packages winbuild + +archive: clean + tar zcvf dx`date +%y%m%d`.tgz $(DISTFILES) + +DISTDIR = doxygen-`echo $(VERSION) | tr - _` + +dist: clean + rm -rf $(DISTDIR) + mkdir $(DISTDIR) + cp -a $(DISTFILES) README $(DISTDIR) + find $(DISTDIR) \( -name ".svn" \) -print0 | xargs -0 rm -rf + tar zcvf $(DISTDIR).src.tar.gz $(DISTDIR) + rm -rf $(DISTDIR) + +src/version.cpp: Makefile + echo "char versionString[]=\"$(VERSION)\";" > src/version.cpp + +addon/doxywizard/version.cpp: Makefile + echo "char versionString[]=\"$(VERSION)\";" > addon/doxywizard/version.cpp + +DISTDIR = doxygen-`echo $(VERSION) | tr - _` +rpm: dist + gzip -df $(DISTDIR).src.tar.gz + mkdir $(DISTDIR) + mkdir $(DISTDIR)/packages + mkdir $(DISTDIR)/packages/rpm + cp packages/rpm/doxygen.spec $(DISTDIR)/packages/rpm + rm -rf $(DISTDIR) + gzip -9v $(DISTDIR).src.tar + rpmbuild -ta %%WITHDOXYWIZARD%% $(DISTDIR).src.tar.gz + +rpmsrc: dist + gzip -df $(DISTDIR).src.tar.gz + mkdir $(DISTDIR) + mkdir $(DISTDIR)/packages + mkdir $(DISTDIR)/packages/rpm + cp packages/rpm/doxygen.spec $(DISTDIR)/packages/rpm + tar -rvf $(DISTDIR).src.tar $(DISTDIR)/packages/rpm/doxygen.spec + rm -rf $(DISTDIR) + gzip -9v $(DISTDIR).src.tar + rpmbuild -ts %%WITHDOXYWIZARD%% $(DISTDIR).src.tar.gz + +rpmbinary: dist + gzip -df $(DISTDIR).src.tar.gz + mkdir $(DISTDIR) + mkdir $(DISTDIR)/packages + mkdir $(DISTDIR)/packages/rpm + cp packages/rpm/doxygen.spec $(DISTDIR)/packages/rpm + tar -rvf $(DISTDIR).src.tar $(DISTDIR)/packages/rpm/doxygen.spec + rm -rf $(DISTDIR) + gzip -9v $(DISTDIR).src.tar + rpmbuild -tb %%WITHDOXYWIZARD%% $(DISTDIR).src.tar.gz + + +ctags: + ctags -f tags src addon/doxywizard qtools + +FORCE: + Index: branches/xZenu/src/util/doxygen/Doxyfile =================================================================== --- branches/xZenu/src/util/doxygen/Doxyfile (revision 0) +++ branches/xZenu/src/util/doxygen/Doxyfile (revision 1322) @@ -0,0 +1,297 @@ +# Doxyfile 1.6.3 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = Doxygen +PROJECT_NUMBER = +OUTPUT_DIRECTORY = doxygen_docs +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +TYPEDEF_HIDES_STRUCT = NO +SYMBOL_CACHE_SIZE = 0 +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text " +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = src +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.h \ + *.cpp +RECURSIVE = NO +EXCLUDE = src/code.cpp \ + src/ce_lex.cpp \ + src/ce_parse.cpp \ + src/declinfo.cpp \ + src/defargs.cpp \ + src/doxytag.cpp \ + src/pre.cpp \ + src/scanner.cpp \ + src/tag.cpp \ + src/doctokenizer.cpp \ + src/logos.cpp \ + src/suffixtree.cpp \ + src/suffixtree.h \ + src/searchindex.cpp \ + src/searchindex.h \ + src/commentcnv.cpp \ + src/commentscan.cpp \ + src/pycode.cpp \ + src/config.cpp \ + src/pyscanner.cpp \ + src/fortranscanner.cpp \ + src/fortrancode.cpp \ + src/vhdlscanner.cpp \ + src/vhdlcode.cpp \ + src/doxygen_css.h \ + src/doxygen_js.h \ + src/doxygen_php.h \ + src/compound_xsd.h \ + src/layout_default.h \ +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = YES +HTML_ALIGN_MEMBERS = YES +HTML_DYNAMIC_SECTIONS = YES +GENERATE_DOCSET = YES +DOCSET_FEEDNAME = "Doxygen docs" +DOCSET_BUNDLE_ID = org.doxygen.Doxygen +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +USE_INLINE_TREES = YES +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = qtools_docs/qtools.tag=../../qtools_docs/html +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = svg +DOT_PATH = +DOTFILE_DIRS = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = NO Index: branches/xZenu/src/util/doxygen/VERSION =================================================================== --- branches/xZenu/src/util/doxygen/VERSION (revision 0) +++ branches/xZenu/src/util/doxygen/VERSION (revision 1322) @@ -0,0 +1 @@ +1.7.4 Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/test/xmlparse.pro.in =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/test/xmlparse.pro.in (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/test/xmlparse.pro.in (revision 1322) @@ -0,0 +1,20 @@ +TEMPLATE = app.t +CONFIG = console warn_on $extraopts +HEADERS = +SOURCES = main.cpp +unix:LIBS += -L../../../lib -L../lib -ldoxmlparser -lqtools +win32:INCLUDEPATH += . +win32-mingw:LIBS += -L../../../lib -L../lib -ldoxmlparser -lqtools +win32-msvc:LIBS += doxmlparser.lib qtools.lib shell32.lib +win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\..\lib;..\lib +win32-borland:LIBS += doxmlparser.lib qtools.lib shell32.lib +win32-borland:TMAKE_LFLAGS += -L..\..\..\lib -L..\lib +win32:TMAKE_CXXFLAGS += -DQT_NODLL +DESTDIR = +OBJECTS_DIR = ../objects +TARGET = xmlparse +INCLUDEPATH += ../../../qtools ../include +DEPENDPATH += ../include +unix:TARGETDEPS = ../lib/libdoxmlparser.a +win32:TARGETDEPS = ..\lib\doxmlparser.lib + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/test/Makefile.in =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/test/Makefile.in (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/test/Makefile.in (revision 1322) @@ -0,0 +1,13 @@ +all clean depend: Makefile.xmlparse + $(MAKE) -f Makefile.xmlparse $@ + +distclean: clean + $(RM) -rf Makefile.xmlparse xmlparse.pro Makefile obj + +tmake: + $(ENV) $(PERL) $(TMAKE) xmlparse.pro >Makefile.xmlparse + +Makefile.xmlparse: xmlparse.pro + $(ENV) $(PERL) $(TMAKE) xmlparse.pro >Makefile.xmlparse + +install: Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/test/main.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/test/main.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/test/main.cpp (revision 1322) @@ -0,0 +1,759 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include +#include +#include +#include + +/*! Dumps the contents of a hyperlinked text fragment as plain text to the + * output. + */ +QString linkedTextToString(ILinkedTextIterator *ti) +{ + QString result; + ILinkedText *lt=0; + for (ti->toFirst();(lt=ti->current());ti->toNext()) + { + switch (lt->kind()) + { + case ILinkedText::Kind_Text: // plain text + result+=dynamic_cast(lt)->text()->latin1(); break; + case ILinkedText::Kind_Ref: // a link + result+=dynamic_cast(lt)->text()->latin1(); break; + } + } + return result; +} + +/*! Macro for printing an indented message. */ +#define InPrint(x) printf("%s",indent.latin1()), printf x; + +/*! Dumps the contents of a documentation block to stdout. + * @note This function will call itself recursively. + * @param doc The root of the documentation tree. + * @param level The indent level. + */ +void DumpDoc(IDoc *doc,int level) +{ + if (doc==0) return; + QString indent; + indent.fill(' ',level); + //printf(" doc node kind=`%d'\n",doc->kind()); + switch (doc->kind()) + { + case IDoc::Para: + { + InPrint(("\n")); + IDocPara *par = dynamic_cast(doc); + ASSERT(par!=0); + IDocIterator *di = par->contents(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("\n")); + } + break; + case IDoc::Text: + { + IDocText *txt = dynamic_cast(doc); + ASSERT(txt!=0); + InPrint(("\n", + txt->text()->latin1(),txt->markup(),txt->headingLevel())); + } + break; + case IDoc::MarkupModifier: + { + IDocMarkupModifier *md = dynamic_cast(doc); + ASSERT(md!=0); + InPrint(("\n", + md->enabled(),md->markup(),md->headingLevel())); + } + break; + case IDoc::ItemizedList: + { + InPrint(("\n")); + IDocItemizedList *list = dynamic_cast(doc); + ASSERT(list!=0); + IDocIterator *di = list->elements(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("\n")); + } + break; + case IDoc::OrderedList: + { + InPrint(("\n")); + IDocOrderedList *list = dynamic_cast(doc); + ASSERT(list!=0); + IDocIterator *di = list->elements(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("\n")); + } + break; + case IDoc::ListItem: + { + InPrint(("\n")); + IDocListItem *li = dynamic_cast(doc); + ASSERT(li!=0); + IDocIterator *di = li->contents(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("\n")); + } + break; + case IDoc::ParameterItem: + { + IDocParameterItem *item = dynamic_cast(doc); + InPrint(("\n")); + IDocIterator *di = item->paramNames(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + DumpDoc(item->description(),level+1); + InPrint(("\n")); + } + break; + case IDoc::ParameterList: + { + IDocParameterList *list = dynamic_cast(doc); + InPrint(("\n",list->sectType())); + IDocIterator *di = list->params(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("\n")); + ASSERT(list!=0); + } + break; + case IDoc::Parameter: + { + IDocParameter *par = dynamic_cast(doc); + ASSERT(par!=0); + InPrint(("\n",par->name()->latin1())); + } + break; + case IDoc::SimpleSect: + { + IDocSimpleSect *ss = dynamic_cast(doc); + ASSERT(ss!=0); + InPrint(("\n",ss->typeString()->latin1())); + DumpDoc(ss->title(),level+1); + DumpDoc(ss->description(),level+1); + InPrint(("\n")); + } + break; + case IDoc::Title: + { + InPrint(("\n")); + IDocTitle *t = dynamic_cast<IDocTitle*>(doc); + ASSERT(t!=0); + IDocIterator *di = t->title(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + InPrint(("<title/>\n")); + } + break; + case IDoc::Ref: + { + IDocRef *ref = dynamic_cast<IDocRef*>(doc); + ASSERT(ref!=0); + InPrint(("<ref id=%s text=%s/>\n", + ref->refId()->latin1(),ref->text()->latin1())); + } + break; + case IDoc::VariableList: + { + InPrint(("<variablelist>\n")); + IDocVariableList *vl = dynamic_cast<IDocVariableList*>(doc); + ASSERT(vl!=0); + IDocIterator *di = vl->entries(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("<variablelist/>\n")); + } + break; + case IDoc::VariableListEntry: + { + IDocVariableListEntry *vle = dynamic_cast<IDocVariableListEntry*>(doc); + ASSERT(vle!=0); + ILinkedTextIterator *lti = vle->term(); + QString term = linkedTextToString(lti); + lti->release(); + InPrint(("<variablelistentry term=%s>\n",term.latin1())); + DumpDoc(vle->description(),level+1); + InPrint(("<variablelistentry/>\n")); + } + break; + case IDoc::HRuler: + { + IDocHRuler *hr = dynamic_cast<IDocHRuler*>(doc); + ASSERT(hr!=0); + InPrint(("<hruler/>\n")); + } + break; + case IDoc::LineBreak: + { + IDocLineBreak *lb = dynamic_cast<IDocLineBreak*>(doc); + ASSERT(lb!=0); + InPrint(("<linebreak/>\n")); + } + break; + case IDoc::ULink: + { + IDocULink *ul = dynamic_cast<IDocULink*>(doc); + ASSERT(ul!=0); + InPrint(("<ulink url=`%s' text=`%s'/>\n",ul->url()->latin1(),ul->text()->latin1())); + } + break; + case IDoc::EMail: + { + IDocEMail *em = dynamic_cast<IDocEMail*>(doc); + ASSERT(em!=0); + InPrint(("<email address=`%s'/>\n",em->address()->latin1())); + } + break; + case IDoc::Link: + { + IDocLink *lk = dynamic_cast<IDocLink*>(doc); + ASSERT(lk!=0); + InPrint(("<link refid=`%s' text=`%s'/>\n",lk->refId()->latin1(),lk->text()->latin1())); + } + break; + case IDoc::ProgramListing: + { + IDocProgramListing *pl = dynamic_cast<IDocProgramListing*>(doc); + ASSERT(pl!=0); + InPrint(("<programlisting>\n")); + IDocIterator *cli = pl->codeLines(); + IDoc *cl; + for (cli->toFirst();(cl=cli->current());cli->toNext()) + { + DumpDoc(cl,level+1); + } + cli->release(); + InPrint(("</programlisting>\n")); + } + break; + case IDoc::CodeLine: + { + IDocCodeLine *cl = dynamic_cast<IDocCodeLine*>(doc); + ASSERT(cl!=0); + InPrint(("<codeline lineNumber=%d refId=`%s'>\n",cl->lineNumber(),cl->refId()->latin1())); + IDocIterator *cei = cl->codeElements(); + IDoc *ce; + for (cei->toFirst();(ce=cei->current());cei->toNext()) + { + DumpDoc(ce,level+1); + } + cei->release(); + InPrint(("</codeline>\n")); + } + break; + case IDoc::Highlight: + { + IDocHighlight *hl = dynamic_cast<IDocHighlight*>(doc); + ASSERT(hl!=0); + InPrint(("<highlight kind=%d>\n",hl->kind())); + IDocIterator *cei = hl->codeElements(); + IDoc *ce; + for (cei->toFirst();(ce=cei->current());cei->toNext()) + { + DumpDoc(ce,level+1); + } + cei->release(); + InPrint(("</highlight>\n")); + } + break; + case IDoc::Formula: + { + IDocFormula *fm = dynamic_cast<IDocFormula*>(doc); + ASSERT(fm!=0); + InPrint(("<formula id=`%s' text=`%s'/>\n",fm->id()->latin1(),fm->text()->latin1())); + } + break; + case IDoc::Image: + { + IDocImage *img = dynamic_cast<IDocImage*>(doc); + ASSERT(img!=0); + InPrint(("<image name=`%s' caption=`%s'/>\n",img->name()->latin1(),img->caption()->latin1())); + } + break; + case IDoc::DotFile: + { + IDocDotFile *df = dynamic_cast<IDocDotFile*>(doc); + ASSERT(df!=0); + InPrint(("<dotfile name=`%s' caption=`%s'/>\n",df->name()->latin1(),df->caption()->latin1())); + } + break; + case IDoc::IndexEntry: + { + IDocIndexEntry *ie = dynamic_cast<IDocIndexEntry*>(doc); + ASSERT(ie!=0); + InPrint(("<indexentry primary=`%s' secondary=`%s'/>\n",ie->primary()->latin1(),ie->secondary()->latin1())); + } + break; + case IDoc::Table: + { + IDocTable *tbl = dynamic_cast<IDocTable*>(doc); + ASSERT(tbl!=0); + InPrint(("<table numcols=%d caption=`%s'>\n",tbl->numColumns(),tbl->caption()->latin1())); + IDocIterator *ri = tbl->rows(); + IDoc *row; + for (ri->toFirst();(row=ri->current());ri->toNext()) + { + DumpDoc(row,level+1); + } + ri->release(); + InPrint(("</table>\n")); + } + break; + case IDoc::Row: + { + IDocRow *row = dynamic_cast<IDocRow*>(doc); + ASSERT(row!=0); + InPrint(("<row>\n")); + IDocIterator *ei = row->entries(); + IDoc *e; + for (ei->toFirst();(e=ei->current());ei->toNext()) + { + DumpDoc(e,level+1); + } + ei->release(); + InPrint(("</row>\n")); + } + break; + case IDoc::Entry: + { + IDocEntry *ent = dynamic_cast<IDocEntry*>(doc); + ASSERT(ent!=0); + InPrint(("<entry>\n")); + IDocIterator *di = ent->contents(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("</entry>\n")); + } + break; + case IDoc::Section: + { + IDocSection *sec = dynamic_cast<IDocSection*>(doc); + ASSERT(sec!=0); + InPrint(("<section id=`%s' level=%d>\n", + sec->id()->latin1(),sec->level())); + DumpDoc(sec->title(),level+1); + IDocIterator *di = sec->paragraphs(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di=sec->subSections(); + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + IDocInternal *intern = sec->internal(); + if (intern) + { + DumpDoc(intern,level+1); + } + InPrint(("</section>\n")); + } + break; + case IDoc::Internal: + { + IDocInternal *intern = dynamic_cast<IDocInternal*>(doc); + ASSERT(intern!=0); + InPrint(("<internal>\n")); + IDocIterator *di = intern->paragraphs(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di=intern->subSections(); + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + InPrint(("</internal>\n")); + } + break; + case IDoc::Copy: + { + IDocCopy *cpy = dynamic_cast<IDocCopy*>(doc); + ASSERT(cpy!=0); + InPrint(("<copydoc>\n")); + IDocIterator *di = cpy->contents(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("<copydoc/>\n")); + } + break; + case IDoc::TocItem: + { + IDocTocItem *ti = dynamic_cast<IDocTocItem*>(doc); + ASSERT(ti!=0); + InPrint(("<tocitem id=\"%s\" title=\"%s\"/>\n", + ti->id()->latin1(),ti->title()->latin1())); + } + break; + case IDoc::TocList: + { + IDocTocList *tl = dynamic_cast<IDocTocList*>(doc); + ASSERT(tl!=0); + InPrint(("<toclist>\n")); + IDocIterator *di = tl->elements(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("<toclist/>\n")); + } + break; + case IDoc::Verbatim: + { + IDocVerbatim *vt = dynamic_cast<IDocVerbatim*>(doc); + ASSERT(vt!=0); + const char *s=0; + switch (vt->type()) + { + case IDocVerbatim::Verbatim: s="verbatim"; break; + case IDocVerbatim::HtmlOnly: s="htmlonly"; break; + case IDocVerbatim::LatexOnly: s="latexonly"; break; + default: + printf("Invalid verbatim type!\n"); + } + InPrint(("<verbatim %s>\n",s)); + InPrint(("%s",vt->text()->latin1())); + InPrint(("</verbatim>\n")); + } + break; + case IDoc::Anchor: + { + IDocAnchor *anc = dynamic_cast<IDocAnchor*>(doc); + ASSERT(anc!=0); + InPrint(("<anchor id='%s'/>\n",anc->id()->latin1())); + } + break; + case IDoc::Symbol: + { + IDocSymbol *sym = dynamic_cast<IDocSymbol*>(doc); + ASSERT(sym!=0); + InPrint(("<symbol type=%s letter=%c/>\n", + sym->typeString()->latin1(),sym->letter())); + } + break; + case IDoc::Root: + { + InPrint(("<root>\n")); + IDocRoot *root = dynamic_cast<IDocRoot*>(doc); + ASSERT(root!=0); + IDocIterator *di = root->contents(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("</root>\n")); + } + break; + + default: + printf("Found unsupported node type %d!\n",doc->kind()); + break; + } +} + +void DumpGraph(IGraph *graph) +{ + if (graph==0) { printf(" --- no graph ---\n"); return; } + printf(" --- graph ----\n"); + INodeIterator *ni = graph->nodes(); + INode *node; + for (ni->toFirst();(node=ni->current());ni->toNext()) + { + printf(" --- node id=%s label=%s linkId=%s\n", + node->id()->latin1(), + node->label()->latin1(), + node->linkId()->latin1() + ); + IChildNodeIterator *cni = node->children(); + IChildNode *cn; + for (cni->toFirst();(cn=cni->current());cni->toNext()) + { + printf(" + child id=%s label=%s relation=%s\n", + cn->node()->id()->latin1(), + cn->node()->label()->latin1(), + cn->relationString()->latin1() + ); + IEdgeLabelIterator *eli = cn->edgeLabels(); + IEdgeLabel *el; + for (eli->toFirst();(el=eli->current());eli->toNext()) + { + printf(" edgeLabel=%s\n",el->label()->latin1()); + } + eli->release(); + } + cni->release(); + } + ni->release(); + printf(" --- end graph ----\n"); + +} + +void DumpParamList(IParamIterator *pli,int indent) +{ + QString indentStr; + indentStr.fill(' ',indent); + IParam *par; + for (pli->toFirst();(par=pli->current());pli->toNext()) + { + ILinkedTextIterator *lti = par->type(); + QString parType = linkedTextToString(lti); + lti->release(); + lti = par->defaultValue(); + QString defVal = linkedTextToString(lti); + lti->release(); + printf("%sParam type=%s decl_name=%s def_name=%s defvalue=%s\n", + indentStr.data(), parType.latin1(), + par->declarationName()->latin1(), + par->definitionName()->latin1(), + defVal.latin1()); + } +} + +int main(int argc,char **argv) +{ + if (argc!=2) + { + printf("Usage: %s xmldir\n",argv[0]); + exit(1); + } + + IDoxygen *dox = createObjectModel(); + + dox->setDebugLevel(4); + + if (!dox->readXMLDir(argv[1])) + { + printf("Error reading %s/index.xml\n",argv[1]); + exit(1); + } + + ICompoundIterator *cli = dox->compounds(); + ICompound *comp; + printf("--- compound list ---------\n"); + for (cli->toFirst();(comp=cli->current());cli->toNext()) + { + printf("Compound name=%s id=%s kind=%s\n", + comp->name()->latin1(),comp->id()->latin1(),comp->kindString()->latin1()); + + ISectionIterator *sli = comp->sections(); + ISection *sec; + for (sli->toFirst();(sec=sli->current());sli->toNext()) + { + printf(" Section kind=%s\n",sec->kindString()->latin1()); + IMemberIterator *mli = sec->members(); + IMember *mem; + if( sec->kind() == ISection::UserDefined ) + { + IUserDefined *group = dynamic_cast<IUserDefined*>(sec); + printf(" Title=%s\n", group->header()->latin1() ); + } + for (mli->toFirst();(mem=mli->current());mli->toNext()) + { + ILinkedTextIterator *lti = mem->type(); + printf(" Member type=%s name=%s\n", + linkedTextToString(lti).latin1(),mem->name()->latin1()); + lti->release(); + + IParamIterator *pli = mem->parameters(); + DumpParamList(pli,6); + pli->release(); + IMemberReferenceIterator *mri = mem->references(); + IMemberReference *mr; + for (mri->toFirst();(mr=mri->current());mri->toNext()) + { + IMember *memr = mr->member(); + printf(" References %s at line %d\n", + mr->name()->latin1(),memr->bodyStart()); + } + + mri->release(); + mri = mem->referencedBy(); + for (mri->toFirst();(mr=mri->current());mri->toNext()) + { + IMember *memr = mr->member(); + printf(" ReferencedBy %s at line %d\n", + mr->name()->latin1(),memr->bodyStart()); + } + mri->release(); + + if (mem->kind()==IMember::Enum) // we have found an enum + { + IEnum *e = dynamic_cast<IEnum*>(mem); + IMemberIterator *evi = e->enumValues(); // get the enum values + IMember *mev; + for (evi->toFirst();(mev=evi->current());evi->toNext()) + { + IEnumValue *ev = dynamic_cast<IEnumValue*>(mev); + ILinkedTextIterator *lti = ev->initializer(); + QString init = linkedTextToString(lti); + lti->release(); + printf(" Enum value `%s' init=`%s'\n", + ev->name()->latin1(),init.latin1()); + } + evi->release(); + } + + pli = mem->templateParameters(); + if (pli) + { + printf(" Template parameters\n"); + DumpParamList(pli,8); + pli->release(); + } + + IDoc *doc = mem->briefDescription(); + if (doc) + { + printf("===== brief description ==== \n"); + DumpDoc(doc,0); + } + + doc = mem->detailedDescription(); + if (doc) + { + printf("===== detailed description ==== \n"); + DumpDoc(doc,0); + } + } + mli->release(); + } + sli->release(); + + IDoc *doc = comp->briefDescription(); + if (doc) + { + printf("===== brief description ==== \n"); + DumpDoc(doc,0); + } + + doc = comp->detailedDescription(); + if (doc) + { + printf("===== detailed description ==== \n"); + DumpDoc(doc,0); + } + + if (comp->kind()==ICompound::Class) + { + IClass *cls = dynamic_cast<IClass*>(comp); + ASSERT(cls!=0); + + printf("==== inheritance graph ==== \n"); + DumpGraph(cls->inheritanceGraph()); + + printf("==== collabration graph ==== \n"); + DumpGraph(cls->collaborationGraph()); + + printf("==== base classes ==== \n"); + IRelatedCompoundIterator *bcli = cls->baseCompounds(); + IRelatedCompound *bClass; + for (bcli->toFirst();(bClass=bcli->current());bcli->toNext()) + { + ICompound *bc = bClass->compound(); + printf(" + class %s\n",bc->name()->latin1()); + bc->release(); + } + bcli->release(); + + printf("==== derived classes ==== \n"); + IRelatedCompoundIterator *dcli = cls->derivedCompounds(); + IRelatedCompound *dClass; + for (dcli->toFirst();(dClass=dcli->current());dcli->toNext()) + { + ICompound *dc = dClass->compound(); + printf(" + class %s\n",dc->name()->latin1()); + dc->release(); + } + dcli->release(); + } + else if (comp->kind()==ICompound::File) + { + IFile *file = dynamic_cast<IFile*>(comp); + ASSERT(file!=0); + + printf("==== include dependency graph ==== \n"); + DumpGraph(file->includeDependencyGraph()); + + printf("==== included by dependency graph ==== \n"); + DumpGraph(file->includedByDependencyGraph()); + + printf("==== source ====\n"); + DumpDoc(file->source(),0); + } + + comp->release(); + } + cli->release(); + printf("---------------------------\n"); + + dox->release(); + + return 0; +} + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/test/Makefile.xmlparse =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/test/Makefile.xmlparse (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/test/Makefile.xmlparse (revision 1322) @@ -0,0 +1,77 @@ +############################################################################# +# Makefile for building xmlparse +# Generated by tmake at 15:12, 2011/03/28 +# Project: xmlparse +# Template: app.t +############################################################################# + +####### Compiler, tools and options + +CC = cc +CXX = c++ +CFLAGS = -pipe -Wall -W -g -fstack-protector +CXXFLAGS= -pipe -D__FreeBSD__=6 -Wall -W -g -fstack-protector +INCPATH = -I../../../qtools -I../include +LINK = c++ +LFLAGS = -Wl,-search_paths_first +LIBS = -L../../../lib -L../lib -ldoxmlparser -lqtools -liconv -framework CoreServices +MOC = /usr/bin/moc + +TAR = tar -cf +GZIP = gzip -9f + +####### Files + +HEADERS = +SOURCES = main.cpp +OBJECTS = ../objects/main.o +SRCMOC = +OBJMOC = +DIST = +TARGET = xmlparse + +####### Implicit rules + +.SUFFIXES: .cpp .cxx .cc .C .c + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< + +####### Build rules + +all: $(TARGET) + +$(TARGET): $(OBJECTS) $(OBJMOC) ../lib/libdoxmlparser.a + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) + +moc: $(SRCMOC) + +tmake: + tmake xmlparse.pro + +dist: + $(TAR) xmlparse.tar xmlparse.pro $(SOURCES) $(HEADERS) $(DIST) + $(GZIP) xmlparse.tar + +clean: + -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(TARGET) + -rm -f *~ core + +####### Compile + +../objects/main.o: main.cpp \ + ../include/doxmlintf.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/main.o main.cpp + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/test/xmlparse.pro =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/test/xmlparse.pro (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/test/xmlparse.pro (revision 1322) @@ -0,0 +1,25 @@ +# +# This file was generated from xmlparse.pro.in on Mon Mar 28 15:09:00 CEST 2011 +# + +TEMPLATE = app.t +CONFIG = console warn_on debug +HEADERS = +SOURCES = main.cpp +unix:LIBS += -L../../../lib -L../lib -ldoxmlparser -lqtools +win32:INCLUDEPATH += . +win32-mingw:LIBS += -L../../../lib -L../lib -ldoxmlparser -lqtools +win32-msvc:LIBS += doxmlparser.lib qtools.lib shell32.lib +win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\..\lib;..\lib +win32-borland:LIBS += doxmlparser.lib qtools.lib shell32.lib +win32-borland:TMAKE_LFLAGS += -L..\..\..\lib -L..\lib +win32:TMAKE_CXXFLAGS += -DQT_NODLL +DESTDIR = +OBJECTS_DIR = ../objects +TARGET = xmlparse +INCLUDEPATH += ../../../qtools ../include +DEPENDPATH += ../include +unix:TARGETDEPS = ../lib/libdoxmlparser.a +win32:TARGETDEPS = ..\lib\doxmlparser.lib + +TMAKE_MOC = /usr/bin/moc Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/test/Makefile =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/test/Makefile (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/test/Makefile (revision 1322) @@ -0,0 +1,33 @@ +# +# This file was generated from Makefile.in on Mon Mar 28 15:09:00 CEST 2011 +# + +DOXYGEN = /Users/dimitri/doxygen +TMAKEPATH = /Users/dimitri/doxygen/tmake/lib/macosx-c++ +ENV = env TMAKEPATH=$(TMAKEPATH) +TMAKE = /Users/dimitri/doxygen/tmake/bin/tmake +MAKE = /opt/local/bin/gmake +PERL = /opt/local/bin/perl +RM = rm -f +CP = cp +VERSION = 1.7.3 +INSTALL = /usr/local +INSTTOOL = /opt/local/bin/ginstall +DOXYDOCS = .. +DOCDIR = $(INSTALL)/share/doc/packages/doxygen +QTDIR = /usr +HAVE_DOT = /usr/local/bin/dot +MKSPECS = -spec macx-g++ +all clean depend: Makefile.xmlparse + $(MAKE) -f Makefile.xmlparse $@ + +distclean: clean + $(RM) -rf Makefile.xmlparse xmlparse.pro Makefile obj + +tmake: + $(ENV) $(PERL) $(TMAKE) xmlparse.pro >Makefile.xmlparse + +Makefile.xmlparse: xmlparse.pro + $(ENV) $(PERL) $(TMAKE) xmlparse.pro >Makefile.xmlparse + +install: Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/Doxyfile =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/Doxyfile (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/Doxyfile (revision 1322) @@ -0,0 +1,177 @@ +# Doxyfile 1.2.12-20011209 + +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = doxmlparser +PROJECT_NUMBER = +OUTPUT_DIRECTORY = doc +OUTPUT_LANGUAGE = English +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +INTERNAL_DOCS = NO +STRIP_CODE_COMMENTS = YES +CASE_SENSE_NAMES = YES +SHORT_NAMES = NO +HIDE_SCOPE_NAMES = NO +VERBATIM_HEADERS = YES +SHOW_INCLUDE_FILES = YES +JAVADOC_AUTOBRIEF = NO +INHERIT_DOCS = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +ALIASES = +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +OPTIMIZE_OUTPUT_FOR_C = NO +SHOW_USED_FILES = YES +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_FORMAT = +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = include +FILE_PATTERNS = *.h +RECURSIVE = NO +EXCLUDE = +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = +MAN_EXTENSION = +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- +TAGFILES = ../../qtools_docs/qtools.tag=../../../../qtools_docs/html +GENERATE_TAGFILE = +ALLEXTERNALS = NO +PERL_PATH = +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +TEMPLATE_RELATIONS = YES +HIDE_UNDOC_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1280 +MAX_DOT_GRAPH_HEIGHT = 1024 +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO +CGI_NAME = +CGI_URL = +DOC_URL = +DOC_ABSPATH = +BIN_ABSPATH = +EXT_DOC_PATHS = Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/Doxyfile.impl =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/Doxyfile.impl (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/Doxyfile.impl (revision 1322) @@ -0,0 +1,179 @@ +# Doxyfile 1.2.13.1 + +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = doxmlparser +PROJECT_NUMBER = +OUTPUT_DIRECTORY = doc_impl +OUTPUT_LANGUAGE = English +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +INTERNAL_DOCS = NO +STRIP_CODE_COMMENTS = YES +CASE_SENSE_NAMES = YES +SHORT_NAMES = NO +HIDE_SCOPE_NAMES = NO +VERBATIM_HEADERS = YES +SHOW_INCLUDE_FILES = YES +JAVADOC_AUTOBRIEF = NO +INHERIT_DOCS = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +ALIASES = +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +OPTIMIZE_OUTPUT_FOR_C = NO +SHOW_USED_FILES = YES +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_FORMAT = +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = src +FILE_PATTERNS = +RECURSIVE = NO +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = +MAN_EXTENSION = +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = DEFINE_CLS_IMPL +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- +TAGFILES = ../../qtools_docs/qtools.tag=../../../../qtools_docs/html +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +TEMPLATE_RELATIONS = YES +HIDE_UNDOC_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1280 +MAX_DOT_GRAPH_HEIGHT = 1024 +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO +CGI_NAME = +CGI_URL = +DOC_URL = +DOC_ABSPATH = +BIN_ABSPATH = +EXT_DOC_PATHS = Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/include/doxmlintf.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/include/doxmlintf.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/include/doxmlintf.h (revision 1322) @@ -0,0 +1,1134 @@ +/****************************************************************************** + * + * $Id: doxmlintf.h,v 1.29 2002/10/13 21:01:58 dimitri Exp $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _DOXMLINTF_H +#define _DOXMLINTF_H + +/*! \file + * \brief The interface to the object model provided by the XML parser + * library. + * + * To start using this library one calls createObjectModel() and then + * uses the returned IDoxygen interface to read doxygen generated + * XML output and navigate through the information contained in it. + * + * @see createObjectModel() + */ + +class IMember; +class IDocIterator; +class ICompound; +class ISection; +class INode; +class IDocInternal; +class IDocRoot; + +#define VIRTUAL_DESTRUCTOR(x) virtual ~x() {} + +/*! \brief Read only interface to a string. + */ +class IString +{ + public: + VIRTUAL_DESTRUCTOR(IString) + /*! Returns a latin1 character representation of the string. */ + virtual const char *latin1() const = 0; + /*! Returns a utf8 character representation of the string. */ + virtual const char *utf8() const = 0; + /*! Returns a 16-bit unicode character representation of the character at + * position \a index in the string. The first character is at index 0. + */ + virtual unsigned short unicodeCharAt(int index) const = 0; + /*! Returns true if this string is empty or false otherwise */ + virtual bool isEmpty() const = 0; + /*! Returns the number of characters in the string. */ + virtual int length() const = 0; +}; + +/*! \brief Base interface for hyperlinked text + * + * Depending on the result of kind() the interface is extended by + * ILT_Text or ILT_Ref. + */ +class ILinkedText +{ + public: + VIRTUAL_DESTRUCTOR(ILinkedText) + enum Kind { Kind_Text, Kind_Ref }; + virtual Kind kind() const = 0; +}; + +/*! \brief Plain text fragment. + */ +class ILT_Text : public ILinkedText +{ + public: + VIRTUAL_DESTRUCTOR(ILT_Text) + virtual const IString *text() const = 0; +}; + +/*! \brief Reference to an object. + */ +class ILT_Ref : public ILinkedText +{ + public: + VIRTUAL_DESTRUCTOR(ILT_Ref) + enum TargetKind { Member, Compound }; + virtual const IString *id() const = 0; + virtual TargetKind targetKind() const = 0; + virtual const IString *external() const = 0; + virtual const IString *text() const = 0; +}; + +/*! \brief Iterates over a list of ILinkedText fragments. + */ +class ILinkedTextIterator +{ + public: + VIRTUAL_DESTRUCTOR(ILinkedTextIterator) + virtual ILinkedText *toFirst() = 0; + virtual ILinkedText *toLast() = 0; + virtual ILinkedText *toNext() = 0; + virtual ILinkedText *toPrev() = 0; + virtual ILinkedText *current() const = 0; + virtual void release() = 0; +}; + +/*! \brief Representation of a parameter of a function. */ +class IParam +{ + public: + VIRTUAL_DESTRUCTOR(IParam) + virtual ILinkedTextIterator *type() const = 0; + virtual const IString * declarationName() const = 0; + virtual const IString * definitionName() const = 0; + virtual const IString * attrib() const = 0; + virtual const IString * arraySpecifier() const = 0; + virtual ILinkedTextIterator *defaultValue() const = 0; + virtual IDocRoot *briefDescription() const = 0; +}; + +class IParamIterator +{ + public: + VIRTUAL_DESTRUCTOR(IParamIterator) + virtual IParam *toFirst() = 0; + virtual IParam *toLast() = 0; + virtual IParam *toNext() = 0; + virtual IParam *toPrev() = 0; + virtual IParam *current() const = 0; + virtual void release() = 0; +}; + +class IMemberReference +{ + public: + VIRTUAL_DESTRUCTOR(IMemberReference) + virtual IMember *member() const = 0; + virtual const IString * name() const = 0; + virtual const IString * scope() const = 0; + virtual const IString * protection() const = 0; + virtual const IString * virtualness() const = 0; + virtual const IString * ambiguityScope() const = 0; +}; + +class IMemberReferenceIterator +{ + public: + VIRTUAL_DESTRUCTOR(IMemberReferenceIterator) + virtual IMemberReference *toFirst() = 0; + virtual IMemberReference *toLast() = 0; + virtual IMemberReference *toNext() = 0; + virtual IMemberReference *toPrev() = 0; + virtual IMemberReference *current() const = 0; + virtual void release() = 0; +}; + +class IDoc +{ + public: + VIRTUAL_DESTRUCTOR(IDoc) + enum Kind + { + Invalid = 0, // 0 + Para, // 1 -> IDocPara + Text, // 2 -> IDocText + MarkupModifier, // 3 -> IDocMarkupModifier + ItemizedList, // 4 -> IDocItemizedList + OrderedList, // 5 -> IDocOrderedList + ListItem, // 6 -> IDocListItem + ParameterList, // 7 -> IDocParameterList + Parameter, // 8 -> IDocParameter + SimpleSect, // 9 -> IDocSimpleSect + Title, // 10 -> IDocTitle + Ref, // 11 -> IDocRef + VariableList, // 12 -> IDocVariableList + VariableListEntry, // 13 -> IDocVariableListEntry + HRuler, // 14 -> IDocHRuler + LineBreak, // 15 -> IDocLineBreak + ULink, // 16 -> IDocULink + EMail, // 17 -> IDocEMail + Link, // 18 -> IDocLink + ProgramListing, // 19 -> IDocProgramListing + CodeLine, // 20 -> IDocCodeLine + Highlight, // 21 -> IDocHighlight + Formula, // 22 -> IDocFormula + Image, // 23 -> IDocImage + DotFile, // 24 -> IDocDotFile + IndexEntry, // 25 -> IDocIndexEntry + Table, // 26 -> IDocTable + Row, // 27 -> IDocRow + Entry, // 28 -> IDocEntry + Section, // 29 -> IDocSection + Verbatim, // 30 -> IDocVerbatim + Copy, // 31 -> IDocCopy + TocList, // 32 -> IDocTocList + TocItem, // 33 -> IDocTocItem + Anchor, // 34 -> IDocAnchor + Symbol, // 35 -> IDocSymbol + Internal, // 36 -> IDocInternal + Root, // 37 -> IDocRoot + ParameterItem // 38 -> IDocParameterItem + }; + virtual Kind kind() const = 0; +}; + +class IDocMarkup : public IDoc +{ + public: + enum Markup + { + Normal = 0x000, + Bold = 0x001, + Emphasis = 0x002, + ComputerOutput = 0x004, + Subscript = 0x008, + Superscript = 0x010, + SmallFont = 0x020, + Center = 0x040, + Preformatted = 0x080, + Heading = 0x100 + }; +}; + +class IDocPara : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; +}; + +class IDocText : public IDocMarkup +{ + public: + virtual const IString * text() const = 0; + virtual int markup() const = 0; + virtual int headingLevel() const = 0; +}; + +class IDocMarkupModifier : public IDoc +{ + public: + virtual bool enabled() const = 0; + virtual int markup() const = 0; + virtual int headingLevel() const = 0; +}; + +class IDocItemizedList : public IDoc +{ + public: + virtual IDocIterator *elements() const = 0; +}; + +class IDocOrderedList : public IDoc +{ + public: + virtual IDocIterator *elements() const = 0; +}; + +class IDocListItem : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; +}; + +class IDocParameterList : public IDoc +{ + public: + enum Types { Param, RetVal, Exception }; + virtual Types sectType() const = 0; + virtual IDocIterator *params() const = 0; +}; + +class IDocParameterItem : public IDoc +{ + public: + virtual IDocIterator *paramNames() const = 0; + virtual IDocPara *description() const = 0; +}; + +class IDocParameter : public IDoc +{ + public: + virtual const IString * name() const = 0; +}; + +class IDocTitle : public IDoc +{ + public: + virtual IDocIterator *title() const = 0; +}; + +class IDocSimpleSect : public IDoc +{ + public: + enum Types { Invalid = 0, + See, Return, Author, Version, + Since, Date, Bug, Note, + Warning, Par, Deprecated, Pre, + Post, Invar, Remark, Attention, + Todo, Test, RCS, EnumValues, + Examples + }; + virtual Types type() const = 0; + virtual const IString * typeString() const = 0; + virtual IDocTitle *title() const = 0; + virtual IDocPara *description() const = 0; +}; + +class IDocRef : public IDoc +{ + public: + enum TargetKind { Member, Compound }; + virtual const IString * refId() const = 0; + virtual TargetKind targetKind() const = 0; + virtual const IString * external() const = 0; + virtual const IString * text() const = 0; +}; + +class IDocVariableList : public IDoc +{ + public: + virtual IDocIterator *entries() const = 0; +}; + +class IDocVariableListEntry : public IDoc +{ + public: + virtual ILinkedTextIterator * term() const = 0; + virtual IDocPara *description() const = 0; +}; + +class IDocHRuler : public IDoc +{ +}; + +class IDocLineBreak : public IDoc +{ +}; + +class IDocULink : public IDoc +{ + public: + virtual const IString * url() const = 0; + virtual const IString * text() const = 0; +}; + +class IDocEMail : public IDoc +{ + public: + virtual const IString * address() const = 0; +}; + +class IDocLink : public IDoc +{ + public: + virtual const IString * refId() const = 0; + virtual const IString * text() const = 0; +}; + +class IDocProgramListing : public IDoc +{ + public: + virtual IDocIterator *codeLines() const = 0; +}; + +class IDocCodeLine : public IDoc +{ + public: + virtual int lineNumber() const = 0; + virtual const IString * refId() const = 0; + virtual IDocIterator *codeElements() const = 0; +}; + +class IDocHighlight : public IDoc +{ + public: + enum HighlightKind + { Invalid=0, + Comment, Keyword, + KeywordType, KeywordFlow, CharLiteral, + StringLiteral, Preprocessor + }; + virtual HighlightKind highlightKind() const = 0; + virtual IDocIterator *codeElements() const = 0; +}; + +class IDocFormula : public IDoc +{ + public: + virtual const IString * id() const = 0; + virtual const IString * text() const = 0; +}; + +class IDocImage : public IDoc +{ + public: + virtual const IString * name() const = 0; + virtual const IString * caption() const = 0; +}; + +class IDocDotFile : public IDoc +{ + public: + virtual const IString * name() const = 0; + virtual const IString * caption() const = 0; +}; + +class IDocIndexEntry : public IDoc +{ + public: + virtual const IString * primary() const = 0; + virtual const IString * secondary() const = 0; +}; + +class IDocTable : public IDoc +{ + public: + virtual IDocIterator *rows() const = 0; + virtual int numColumns() const = 0; + virtual const IString * caption() const = 0; +}; + +class IDocRow : public IDoc +{ + public: + virtual IDocIterator *entries() const = 0; +}; + +class IDocEntry : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; +}; + +class IDocSection : public IDoc +{ + public: + virtual const IString * id() const = 0; + virtual int level() const = 0; + virtual IDocTitle *title() const = 0; + virtual IDocIterator *paragraphs() const = 0; + virtual IDocIterator *subSections() const = 0; + virtual IDocInternal *internal() const = 0; +}; + +class IDocInternal : public IDoc +{ + public: + virtual IDocIterator *paragraphs() const = 0; + virtual IDocIterator *subSections() const = 0; +}; + +class IDocTocList : public IDoc +{ + public: + virtual IDocIterator *elements() const = 0; +}; + +class IDocTocItem : public IDoc +{ + public: + virtual const IString *id() const = 0; + virtual const IString *title() const = 0; +}; + +class IDocCopy : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; +}; + +class IDocVerbatim : public IDoc +{ + public: + enum Types { Invalid = 0, HtmlOnly, LatexOnly, Verbatim }; + virtual const IString *text() const = 0; + virtual Types type() const = 0; +}; + +class IDocAnchor : public IDoc +{ + public: + virtual const IString *id() const = 0; +}; + +class IDocSymbol : public IDoc +{ + public: + enum Types + { Invalid = 0, + Umlaut, Acute, Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Copy + }; + virtual Types type() const = 0; + virtual const IString * typeString() const = 0; + virtual char letter() const = 0; +}; + +class IDocRoot : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; + virtual IDocInternal *internal() const = 0; +}; + +class IDocIterator +{ + public: + VIRTUAL_DESTRUCTOR(IDocIterator) + virtual IDoc *toFirst() = 0; + virtual IDoc *toLast() = 0; + virtual IDoc *toNext() = 0; + virtual IDoc *toPrev() = 0; + virtual IDoc *current() const = 0; + virtual void release() = 0; +}; + +class IEdgeLabel +{ + public: + VIRTUAL_DESTRUCTOR(IEdgeLabel) + virtual const IString * label() const = 0; +}; + +class IEdgeLabelIterator +{ + public: + VIRTUAL_DESTRUCTOR(IEdgeLabelIterator) + virtual IEdgeLabel *toFirst() = 0; + virtual IEdgeLabel *toLast() = 0; + virtual IEdgeLabel *toNext() = 0; + virtual IEdgeLabel *toPrev() = 0; + virtual IEdgeLabel *current() const = 0; + virtual void release() = 0; +}; + +class IChildNode +{ + public: + VIRTUAL_DESTRUCTOR(IChildNode) + enum NodeRelation { PublicInheritance, ProtectedInheritance, + PrivateInheritance, Usage, TemplateInstance + }; + virtual INode * node() const = 0; + virtual NodeRelation relation() const = 0; + virtual const IString * relationString() const = 0; + virtual IEdgeLabelIterator *edgeLabels() const = 0; +}; + +class IChildNodeIterator +{ + public: + VIRTUAL_DESTRUCTOR(IChildNodeIterator) + virtual IChildNode *toFirst() = 0; + virtual IChildNode *toLast() = 0; + virtual IChildNode *toNext() = 0; + virtual IChildNode *toPrev() = 0; + virtual IChildNode *current() const = 0; + virtual void release() = 0; +}; + +class INode +{ + public: + VIRTUAL_DESTRUCTOR(INode) + virtual const IString * id() const = 0; + virtual const IString * label() const = 0; + virtual const IString * linkId() const = 0; + virtual IChildNodeIterator *children() const = 0; +}; + +class INodeIterator +{ + public: + VIRTUAL_DESTRUCTOR(INodeIterator) + virtual INode *toFirst() = 0; + virtual INode *toLast() = 0; + virtual INode *toNext() = 0; + virtual INode *toPrev() = 0; + virtual INode *current() const = 0; + virtual void release() = 0; +}; + +class IGraph +{ + public: + VIRTUAL_DESTRUCTOR(IGraph) + virtual INodeIterator *nodes() const = 0; +}; + +class IMember +{ + public: + VIRTUAL_DESTRUCTOR(IMember) + enum MemberKind { Invalid=0, + Define, Property, Variable, Typedef, Enum, + Function, Signal, Prototype, Friend, DCOP, Slot, + EnumValue + }; + virtual ICompound *compound() const = 0; + virtual ISection *section() const = 0; + virtual MemberKind kind() const = 0; + virtual const IString * kindString() const = 0; + virtual const IString * id() const = 0; + virtual const IString * protection() const = 0; + virtual const IString * virtualness() const = 0; + virtual ILinkedTextIterator *type() const = 0; + virtual const IString * typeString() const = 0; + virtual const IString * name() const = 0; + virtual const IString * readAccessor() const = 0; + virtual const IString * writeAccessor() const = 0; + virtual const IString * definition() const = 0; + virtual const IString * argsstring() const = 0; + virtual bool isConst() const = 0; + virtual bool isVolatile() const = 0; + virtual bool isStatic() const = 0; + virtual bool isExplicit() const = 0; + virtual bool isInline() const = 0; + virtual bool isMutable() const = 0; + virtual bool isReadable() const = 0; + virtual bool isWritable() const = 0; + virtual IParamIterator *parameters() const = 0; + virtual IParamIterator *templateParameters() const = 0; + virtual ILinkedTextIterator *initializer() const = 0; + virtual ILinkedTextIterator *exceptions() const = 0; + virtual IMemberReferenceIterator *references() const = 0; + virtual IMemberReferenceIterator *referencedBy() const = 0; + virtual const IString *bodyFile() const = 0; + virtual int bodyStart() const = 0; + virtual int bodyEnd() const = 0; + virtual const IString * definitionFile() const = 0; + virtual int definitionLine() const = 0; + virtual IMemberReference *reimplements() const = 0; + virtual IMemberReferenceIterator *reimplementedBy() const = 0; + virtual IDocRoot *briefDescription() const = 0; + virtual IDocRoot *detailedDescription() const = 0; + virtual IDocRoot *inbodyDescription() const = 0; +}; + +class IDefine : public IMember +{ + public: +}; + +class IProperty : public IMember +{ + public: +}; + +class IVariable : public IMember +{ + public: +}; + +class ITypedef : public IMember +{ + public: +}; + +class IFunction : public IMember +{ + public: +}; + +class ISignal : public IMember +{ + public: +}; + +class IPrototype : public IMember +{ + public: +}; + +class IFriend : public IMember +{ + public: +}; + +class IDCOP : public IMember +{ + public: +}; + +class ISlot : public IMember +{ + public: +}; + +class IEnumValue : public IMember +{ + public: + virtual const IString * name() const = 0; +}; + +/*! \brief Include relation + */ +class IInclude +{ + public: + VIRTUAL_DESTRUCTOR(IInclude) + virtual const IString * name() const = 0; + virtual const IString * refId() const = 0; + virtual bool isLocal() const = 0; +}; + +class IIncludeIterator +{ + public: + VIRTUAL_DESTRUCTOR(IIncludeIterator) + virtual IInclude *toFirst() = 0; + virtual IInclude *toLast() = 0; + virtual IInclude *toNext() = 0; + virtual IInclude *toPrev() = 0; + virtual IInclude *current() const = 0; + virtual void release() = 0; +}; + +class IMemberIterator +{ + public: + VIRTUAL_DESTRUCTOR(IMemberIterator) + virtual IMember *toFirst() = 0; + virtual IMember *toLast() = 0; + virtual IMember *toNext() = 0; + virtual IMember *toPrev() = 0; + virtual IMember *current() const = 0; + virtual void release() = 0; +}; + +class IEnum : public IMember +{ + public: + virtual IMemberIterator *enumValues() const = 0; +}; + +/*! \brief The interface to a section in the object model. + * + * A compound can have a number of sections, where each + * section contains a set of members with the properties implied by + * the section kind. The kind() method returns the kind of the section. + * The members of the section can be accessed via members(). Apart + * from using kind(), some of the individual properties of the section can + * also be inspected via isStatic(), isPublic(), isProtected() and + * isPrivate(). + */ +class ISection +{ + public: + VIRTUAL_DESTRUCTOR(ISection) + /*! Possible section types */ + enum SectionKind + { Invalid=0, + UserDefined, //!< A user defined member group + PubTypes, //!< Public member typedefs + PubFuncs, //!< Public member functions + PubAttribs, //!< Public member attributes + PubSlots, //!< Public Qt Slots + Signals, //!< Qt Signals + DCOPFuncs, //!< KDE-DCOP interface functions + Properties, //!< IDL properties + Events, //!< C# events + PubStatFuncs, //!< Public static member functions + PubStatAttribs, //!< Public static attributes + ProTypes, //!< Protected member typedefs + ProFuncs, //!< Protected member functions + ProAttribs, //!< Protected member attributes + ProSlots, //!< Protected slots + ProStatFuncs, //!< Protected static member functions + ProStatAttribs, //!< Protected static member attributes + PacTypes, //!< Package member typedefs + PacFuncs, //!< Package member functions + PacAttribs, //!< Package member attributes + PacStatFuncs, //!< Package static member functions + PacStatAttribs, //!< Package static member attributes + PriTypes, //!< Private member typedefs + PriFuncs, //!< Private member functions + PriAttribs, //!< Private member attributes + PriSlots, //!< Private Qt slots + PriStatFuncs, //!< Private static member functions + PriStatAttribs, //!< Private static member attributes + Friend, //!< Friends + Related, //!< Function marked as related + Defines, //!< Preprocessor defines + Prototypes, //!< Global function prototypes + Typedefs, //!< Global typedefs + Enums, //!< Enumerations + Functions, //!< Global functions + Variables //!< Global variables + }; + + /*! Returns a string representation of the value returned by kind() */ + virtual const IString * kindString() const = 0; + + /*! Returns what kind of section this is */ + virtual SectionKind kind() const = 0; + + /*! Returns the description attached to this section (for user defined + * sections, also known as member groups). + */ + virtual IDocRoot *description() const = 0; + + /*! Returns an iterator for the members of this section */ + virtual IMemberIterator *members() const = 0; + + /*! Returns \c true if this section contains statics */ + virtual bool isStatic() const = 0; + + /*! Returns \c true if this section belongs to a + * public section of a class + */ + virtual bool isPublic() const = 0; + + /*! Returns \c true if this section belongs to a + * private section of a class + */ + virtual bool isPrivate() const = 0; + + /*! Returns \c true if this section belongs to a + * protected section of a class + * */ + virtual bool isProtected() const = 0; +}; + +class IUserDefined : public ISection +{ + public: + virtual const IString * header() const = 0; +}; + +class ISectionIterator +{ + public: + VIRTUAL_DESTRUCTOR(ISectionIterator) + virtual ISection *toFirst() = 0; + virtual ISection *toLast() = 0; + virtual ISection *toNext() = 0; + virtual ISection *toPrev() = 0; + virtual ISection *current() const = 0; + virtual void release() = 0; +}; + +/*! \brief The interface to a compound in the object model. + * + * A compound has a name which can be obtained via the name() method + * and a unique id, which is return via the id() method. + * A compound consists zero or more members which are grouped into sections. + * The sections() method can be used to access the individual sections. + * Alternatively, members can be obtained by name or id. There are + * different types of compounds. The kind() method returns what kind of + * compound this is. Depending on the return value one can dynamically + * cast an interface pointer to an more specialised interface that provides + * additional methods. + * Example: + * \code + * ICompound *comp=...; + * if (comp->kind()==ICompound::Class) + * { + * IClass *cls = dynamic_cast<IClass*>(comp); + * // use methods of IClass + * } + * \endcode + * The documentation that is provided by a compound is available via + * the briefDescription() and detailedDescription() methods. + * To avoid excessive memory usage, release() should be called (once) on each + * compound interface pointer that is no longer needed. + */ +class ICompound +{ + public: + VIRTUAL_DESTRUCTOR(ICompound) + /*! Represents the kind of compounds recognised by doxygen. */ + enum CompoundKind { Invalid=0, + Class, Struct, Union, Interface, Protocol, Category, + Exception, File, Namespace, Group, Page, Example, Dir + }; + + /*! Returns the name of this compound */ + virtual const IString * name() const = 0; + + /*! Returns the id of this compound. The id is a + * unique string representing a specific compound object. + */ + virtual const IString * id() const = 0; + + /*! Returns the kind of compound. See #CompoundKind for possible + * values. + */ + virtual CompoundKind kind() const = 0; + + /*! Returns a string representation of the compound kind. + * @see kind() + */ + virtual const IString * kindString() const = 0; + + /*! Returns an iterator for the different member sections in this + * compound. + */ + virtual ISectionIterator *sections() const = 0; + + /*! Returns a tree-structured representation of the brief + * description that is attached to this compound. + */ + virtual IDocRoot *briefDescription() const = 0; + + /*! Returns a tree-structured representation of the detailed + * description that is attached to this compound. + */ + virtual IDocRoot *detailedDescription() const = 0; + + /*! Returns an interface to a member given its id. + * @param id The member id. + */ + virtual IMember *memberById(const char * id) const = 0; + + /*! Returns a list of all members within the compound having a certain + * name. Member overloading is the reason why there can be more than + * one member. + * @param name The name of the member. + */ + virtual IMemberIterator *memberByName(const char * name) const = 0; + + /*! Decreases the reference counter for this compound. If it reaches + * zero, the memory for the compound will be released. + */ + virtual void release() = 0; +}; + +class ICompoundIterator +{ + public: + VIRTUAL_DESTRUCTOR(ICompoundIterator) + virtual void toFirst() = 0; + virtual void toLast() = 0; + virtual void toNext() = 0; + virtual void toPrev() = 0; + virtual ICompound *current() const = 0; + virtual void release() = 0; +}; + +class IRelatedCompound +{ + public: + VIRTUAL_DESTRUCTOR(IRelatedCompound) + enum Protection { Public, Protected, Private }; + enum Kind { Normal, Virtual }; + virtual ICompound *compound() const = 0; + virtual Protection protection() const = 0; + virtual Kind kind() const = 0; + virtual const IString *name() const = 0; + +}; + +class IRelatedCompoundIterator +{ + public: + VIRTUAL_DESTRUCTOR(IRelatedCompoundIterator) + virtual IRelatedCompound *toFirst() = 0; + virtual IRelatedCompound *toLast() = 0; + virtual IRelatedCompound *toNext() = 0; + virtual IRelatedCompound *toPrev() = 0; + virtual IRelatedCompound *current() const = 0; + virtual void release() = 0; +}; + +/*! \brief The interface to a class in the object model. + */ +class IClass : public ICompound +{ + public: + virtual IGraph *inheritanceGraph() const = 0; + virtual IGraph *collaborationGraph() const = 0; + virtual IRelatedCompoundIterator *baseCompounds() const = 0; + virtual IRelatedCompoundIterator *derivedCompounds() const = 0; + virtual ICompoundIterator *nestedCompounds() const = 0; + virtual IParamIterator *templateParameters() const = 0; + virtual const IString *locationFile() const = 0; + virtual int locationLine() const = 0; + virtual const IString *locationBodyFile() const = 0; + virtual int locationBodyStartLine() const = 0; + virtual int locationBodyEndLine() const = 0; + + // TODO: + // class: + // listOfAllMembers() + // protection() + // isAbstract() +}; + +/*! \brief The interface to a struct in the object model. + */ +class IStruct : public ICompound +{ + public: + virtual ICompoundIterator *nestedCompounds() const = 0; + virtual IRelatedCompoundIterator *baseCompounds() const = 0; + virtual IRelatedCompoundIterator *derivedCompounds() const = 0; + virtual const IString *locationFile() const = 0; + virtual int locationLine() const = 0; + virtual int locationBodyStartLine() const = 0; + virtual int locationBodyEndLine() const = 0; +}; + +/*! \brief The interface to a union in the object model. + */ +class IUnion : public ICompound +{ + public: + virtual ICompoundIterator *nestedCompounds() const = 0; +}; + +/*! \brief The interface to a Java/IDL interface in the object model. + */ +class IInterface : public ICompound +{ + public: + virtual IRelatedCompoundIterator *baseCompounds() const = 0; + virtual IRelatedCompoundIterator *derivedCompounds() const = 0; +}; + + +/*! \brief The interface to a Java/IDL exception in the object model. + */ +class IException : public ICompound +{ +}; + +/*! \brief The interface to a namespace in the object model. + */ +class INamespace : public ICompound +{ + public: + virtual ICompoundIterator *nestedCompounds() const = 0; +}; + +/*! \brief The interface to a file in the object model. + */ +class IFile : public ICompound +{ + public: + virtual IGraph *includeDependencyGraph() const = 0; + virtual IGraph *includedByDependencyGraph() const = 0; + virtual IDocProgramListing *source() const = 0; + virtual ICompoundIterator *nestedCompounds() const = 0; + + virtual IIncludeIterator *includes() const = 0; + virtual IIncludeIterator *includedBy() const = 0; + + // ICompound *innerNamespaces() + // ICompoundIterator *innerClasses() +}; + +/*! \brief The interface to a group in the object model. + */ +class IGroup : public ICompound +{ + public: + virtual ICompoundIterator *nestedCompounds() const = 0; + // group: + // Title() + // innerFile() + // innerPage() +}; + +/*! \brief The interface to a page in the object model. + */ +class IPage : public ICompound +{ + public: + virtual const IDocTitle *title() const = 0; +}; + +/*! Root node of the object model. */ +class IDoxygen +{ + public: + VIRTUAL_DESTRUCTOR(IDoxygen) + + /*! Returns an iterator that can be used to iterate over the list + * of compounds found in the project. + */ + virtual ICompoundIterator *compounds() const = 0; + + /*! Returns a compound given its unique \a id. If you have a + * compound id this function is much more efficient than iterating + * over the compound list. Returns 0 if the id is not valid. + */ + virtual ICompound *compoundById(const char * id) const = 0; + + /*! Returns a compound given its name (including the scope). + * Returns 0 if the name is not found in the project. + */ + virtual ICompound *compoundByName(const char * name) const = 0; + + /*! Returns an interface to a compound containing a member given it the + * member's id. Given the ICompound interface one can use the same id + * to obtain the IMember interface. + * @param id The member id. + */ + virtual ICompound *memberById(const char * id) const = 0; + + /*! Returns a list of all compounds containing at least one members + * with a certain name. Each compound can be asked to return the + * list of members with that name. + * @param name The name of the member. + */ + virtual ICompoundIterator *memberByName(const char * name) const = 0; + + /*! Releases the memory for the object hierarchy obtained by + * createdObjecModelFromXML(). First release all iterators before calling + * this function. + */ + virtual void release() = 0; + + /*! Sets the debug level. + * - 0 all debugging messages are disabled (the default). + * - 1 display important messages only + * - 2 display any messages. + */ + virtual void setDebugLevel(int level) = 0; + + /*! Reads an XML directory produced by doxygen and builds up a data + * structure representing the contents of the XML files in the directory. + */ + virtual bool readXMLDir(const char *xmlDirName) = 0; +}; + +/*! Factory method that creates an empty object model for a doxygen generated XML file. + * Use the readXMLDir() method to build the model from an XML output + * directory containing doxygen output. + */ +IDoxygen *createObjectModel(); + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/paramhandler.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/paramhandler.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/paramhandler.cpp (revision 1322) @@ -0,0 +1,158 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include "paramhandler.h" +#include "memberhandler.h" +#include "linkedtexthandler.h" +#include "debug.h" +#include "dochandler.h" + +TemplateParamListHandler::TemplateParamListHandler(IBaseHandler *parent) : m_parent(parent) +{ + addStartHandler("param",this,&TemplateParamListHandler::startParam); + + addEndHandler("templateparamlist",this,&TemplateParamListHandler::endTemplateParamList); +} + +void TemplateParamListHandler::startParam(const QXmlAttributes& attrib) +{ + ParamHandler *ph = new ParamHandler(this); + ph->startParam(attrib); + m_templateParams.append(ph); +} + +void TemplateParamListHandler::endParam() +{ +} + +void TemplateParamListHandler::startTemplateParamList(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"templateparamlist\n"); +} + +void TemplateParamListHandler::endTemplateParamList() +{ + m_parent->setDelegate(0); +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////// + +ParamHandler::ParamHandler(IBaseHandler *parent) : m_brief(0), m_parent(parent) +{ + addEndHandler("param",this,&ParamHandler::endParam); + + addStartHandler("type",this,&ParamHandler::startType); + + addStartHandler("declname"); + addEndHandler("declname",this,&ParamHandler::endDeclName); + + addStartHandler("defname"); + addEndHandler("defname",this,&ParamHandler::endDefName); + + addStartHandler("array"); + addEndHandler("array",this,&ParamHandler::endArray); + + addStartHandler("attribute"); + addEndHandler("attribute",this,&ParamHandler::endAttrib); + + addStartHandler("briefdescription",this,&ParamHandler::startBriefDesc); + + addStartHandler("defval",this,&ParamHandler::startDefVal); + + m_linkedTextHandler = 0; +} + +ParamHandler::~ParamHandler() +{ + delete m_brief; + delete m_linkedTextHandler; +} + +void ParamHandler::startParam(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"param\n"); +} + +void ParamHandler::endParam() +{ + m_parent->setDelegate(0); +} + +void ParamHandler::startType(const QXmlAttributes& /*attrib*/) +{ + delete m_linkedTextHandler; + m_linkedTextHandler = new LinkedTextHandler(this,m_type); + m_linkedTextHandler->start("type"); + debug(2,"param type\n"); +} + +void ParamHandler::endDeclName() +{ + m_declName = m_curString.stripWhiteSpace(); + debug(2,"member declName=`%s'\n",m_declName.data()); +} + +void ParamHandler::endDefName() +{ + m_defName = m_curString.stripWhiteSpace(); + debug(2,"member defName=`%s'\n",m_defName.data()); +} + +void ParamHandler::endAttrib() +{ + m_attrib = m_curString.stripWhiteSpace(); + debug(2,"member attrib=`%s'\n",m_attrib.data()); +} + +void ParamHandler::endArray() +{ + m_array = m_curString.stripWhiteSpace(); + debug(2,"member array=`%s'\n",m_array.data()); +} + +void ParamHandler::startDefVal(const QXmlAttributes& /*attrib*/) +{ + delete m_linkedTextHandler; + m_linkedTextHandler = new LinkedTextHandler(this,m_defVal); + m_linkedTextHandler->start("defval"); + debug(2,"member defVal\n"); +} + +void ParamHandler::startBriefDesc(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_brief = docHandler; +} + +ILinkedTextIterator *ParamHandler::type() const +{ + return new LinkedTextIterator(m_type); +} + +ILinkedTextIterator *ParamHandler::defaultValue() const +{ + return new LinkedTextIterator(m_defVal); +} + +IDocRoot *ParamHandler::briefDescription() const +{ + return m_brief; +} + + + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/graphhandler.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/graphhandler.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/graphhandler.cpp (revision 1322) @@ -0,0 +1,216 @@ +#include "graphhandler.h" + +class EdgeRelationMapper +{ + public: + EdgeRelationMapper() + { + m_map.insert("public-inheritance", IChildNode::PublicInheritance); + m_map.insert("protected-inheritance", IChildNode::ProtectedInheritance); + m_map.insert("private-inheritance", IChildNode::PrivateInheritance); + m_map.insert("usage", IChildNode::Usage); + m_map.insert("template-instance", IChildNode::TemplateInstance); + } + IChildNode::NodeRelation stringToNodeRelation(const QString &nrStr) + { + return m_map[nrStr]; + } + private: + QMap<QString,IChildNode::NodeRelation> m_map; +}; + +static EdgeRelationMapper *s_edgeRelationMapper; + +void graphhandler_init() +{ + s_edgeRelationMapper = new EdgeRelationMapper; +} + +void graphhandler_exit() +{ + delete s_edgeRelationMapper; +} + +//------------------------------------------------------------------------ + +GraphHandler::GraphHandler(IBaseHandler *parent,const char *endTag) + : m_parent(parent) +{ + addEndHandler(endTag,this,&GraphHandler::endGraph); + addStartHandler("node",this,&GraphHandler::startNode); + m_nodes.setAutoDelete(TRUE); + m_nodeDict = new QDict<NodeHandler>(1009); +} + +GraphHandler::~GraphHandler() +{ + delete m_nodeDict; +} + +void GraphHandler::startGraph(const QXmlAttributes &) +{ + debug(2,"startGraph\n"); + m_parent->setDelegate(this); +} + +void GraphHandler::endGraph() +{ + debug(2,"endGraph\n"); + m_parent->setDelegate(0); +} + +void GraphHandler::startNode(const QXmlAttributes &attrib) +{ + NodeHandler *n = new NodeHandler(this); + n->startNode(attrib); + m_nodes.append(n); + m_nodeDict->insert(attrib.value("id"),n); +} + +INodeIterator *GraphHandler::nodes() const +{ + return new NodeIterator(*this); +} + +NodeHandler *GraphHandler::getNodeById(const QString &id) const +{ + return m_nodeDict->find(id); +} + +//------------------------------------------------------------------------ + +NodeHandler::NodeHandler(GraphHandler *gh) + : m_parent(gh), m_graph(gh) +{ + addEndHandler("node",this,&NodeHandler::endNode); + addStartHandler("link",this,&NodeHandler::startLink); + addEndHandler("link",this,&NodeHandler::endLink); + addStartHandler("label",this,&NodeHandler::startLabel); + addEndHandler("label",this,&NodeHandler::endLabel); + addStartHandler("childnode",this,&NodeHandler::startChildNode); + m_children.setAutoDelete(TRUE); +} + +NodeHandler::~NodeHandler() +{ +} + +void NodeHandler::startNode(const QXmlAttributes &attrib) +{ + debug(2,"startNode\n"); + m_parent->setDelegate(this); + m_id = attrib.value("id"); +} + +void NodeHandler::endNode() +{ + debug(2,"endNode\n"); + m_parent->setDelegate(0); +} + +void NodeHandler::startLink(const QXmlAttributes &attrib) +{ + m_link = attrib.value("refid"); +} + +void NodeHandler::endLink() +{ +} + +void NodeHandler::startLabel(const QXmlAttributes &/*attrib*/) +{ + m_curString=""; +} + +void NodeHandler::endLabel() +{ + m_label = m_curString; +} + +void NodeHandler::startChildNode(const QXmlAttributes &attrib) +{ + ChildNodeHandler *cnh = new ChildNodeHandler(this,m_graph); + cnh->startChildNode(attrib); + m_children.append(cnh); +} + +IChildNodeIterator *NodeHandler::children() const +{ + return new ChildNodeIterator(*this); +} + +//------------------------------------------------------------------------ + +ChildNodeHandler::ChildNodeHandler(IBaseHandler *parent,GraphHandler *gh) + : m_parent(parent), m_graph(gh) +{ + addEndHandler("childnode",this,&ChildNodeHandler::endChildNode); + addStartHandler("edgelabel",this,&ChildNodeHandler::startEdgeLabel); + m_edgeLabels.setAutoDelete(TRUE); +} + +ChildNodeHandler::~ChildNodeHandler() +{ +} + +void ChildNodeHandler::startChildNode(const QXmlAttributes &attrib) +{ + debug(2,"startChildNode\n"); + m_id = attrib.value("refid"); + m_relationString = attrib.value("relation"); + m_relation = s_edgeRelationMapper->stringToNodeRelation(m_relationString); + m_parent->setDelegate(this); +} + +void ChildNodeHandler::endChildNode() +{ + debug(2,"endChildNode\n"); + m_parent->setDelegate(0); +} + + +void ChildNodeHandler::startEdgeLabel(const QXmlAttributes &attrib) +{ + EdgeLabelHandler *elh = new EdgeLabelHandler(this); + elh->startEdgeLabel(attrib); + m_edgeLabels.append(elh); +} + +IEdgeLabelIterator *ChildNodeHandler::edgeLabels() const +{ + return new EdgeLabelIterator(*this); +} + +INode *ChildNodeHandler::node() const +{ + return m_graph->getNodeById(m_id); +} + +//----------------------------------------------------------------------- + +EdgeLabelHandler::EdgeLabelHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("edgelabel",this,&EdgeLabelHandler::endEdgeLabel); +} + +EdgeLabelHandler::~EdgeLabelHandler() +{ +} + +void EdgeLabelHandler::startEdgeLabel(const QXmlAttributes &) +{ + m_parent->setDelegate(this); + m_curString=""; +} + +void EdgeLabelHandler::endEdgeLabel() +{ + m_label=m_curString; + m_parent->setDelegate(0); +} + + + + + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/Makefile.in =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/Makefile.in (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/Makefile.in (revision 1322) @@ -0,0 +1,13 @@ +all clean depend: Makefile.doxmlparser + $(MAKE) -f Makefile.doxmlparser $@ + +distclean: clean + $(RM) -rf Makefile.doxmlparser doxmlparser.pro Makefile obj + +tmake: + $(ENV) $(PERL) $(TMAKE) doxmlparser.pro >Makefile.doxmlparser + +Makefile.doxmlparser: doxmlparser.pro + $(ENV) $(PERL) $(TMAKE) doxmlparser.pro >Makefile.doxmlparser + +install: Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/sectionhandler.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/sectionhandler.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/sectionhandler.cpp (revision 1322) @@ -0,0 +1,168 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include "mainhandler.h" +#include "compoundhandler.h" +#include "sectionhandler.h" +#include "memberhandler.h" +#include "dochandler.h" +#include "debug.h" + +class SectionTypeMap +{ + public: + SectionTypeMap() : m_map(37) + { + m_map.setAutoDelete(TRUE); + m_map.insert("user-defined",new int(ISection::UserDefined)); + m_map.insert("public-type",new int(ISection::PubTypes)); + m_map.insert("public-func",new int(ISection::PubFuncs)); + m_map.insert("public-attrib",new int(ISection::PubAttribs)); + m_map.insert("public-slot",new int(ISection::PubSlots)); + m_map.insert("signal",new int(ISection::Signals)); + m_map.insert("dcop-func",new int(ISection::DCOPFuncs)); + m_map.insert("property",new int(ISection::Properties)); + m_map.insert("event",new int(ISection::Events)); + m_map.insert("public-static-func",new int(ISection::PubStatFuncs)); + m_map.insert("public-static-attrib",new int(ISection::PubStatAttribs)); + m_map.insert("protected-type",new int(ISection::ProTypes)); + m_map.insert("protected-func",new int(ISection::ProFuncs)); + m_map.insert("protected-attrib",new int(ISection::ProAttribs)); + m_map.insert("protected-slot",new int(ISection::ProSlots)); + m_map.insert("protected-static-func",new int(ISection::ProStatFuncs)); + m_map.insert("protected-static-attrib",new int(ISection::ProStatAttribs)); + m_map.insert("package-type",new int(ISection::PacTypes)); + m_map.insert("package-func",new int(ISection::PacFuncs)); + m_map.insert("package-attrib",new int(ISection::PacAttribs)); + m_map.insert("package-static-func",new int(ISection::PacStatFuncs)); + m_map.insert("package-static-attrib",new int(ISection::PacStatAttribs)); + m_map.insert("private-type",new int(ISection::PriTypes)); + m_map.insert("private-func",new int(ISection::PriFuncs)); + m_map.insert("private-attrib",new int(ISection::PriAttribs)); + m_map.insert("private-slot",new int(ISection::PriSlots)); + m_map.insert("private-static-func",new int(ISection::PriStatFuncs)); + m_map.insert("private-static-attrib",new int(ISection::PriStatAttribs)); + m_map.insert("friend",new int(ISection::Friend)); + m_map.insert("related",new int(ISection::Related)); + m_map.insert("define",new int(ISection::Defines)); + m_map.insert("prototype",new int(ISection::Prototypes)); + m_map.insert("typedef",new int(ISection::Typedefs)); + m_map.insert("enum",new int(ISection::Enums)); + m_map.insert("func",new int(ISection::Functions)); + m_map.insert("var",new int(ISection::Variables)); + } + ISection::SectionKind map(const QString &s) + { + int *val = m_map.find(s); + if (val==0) + { + debug(1,"Warning: `%s' is an invalid section type\n",s.data()); + return ISection::Invalid; + } + else return (ISection::SectionKind)*val; + } + private: + QDict<int> m_map; +}; + +static SectionTypeMap *s_typeMap; + +void sectionhandler_init() +{ + s_typeMap = new SectionTypeMap; +} + +void sectionhandler_exit() +{ + delete s_typeMap; +} + +SectionHandler::SectionHandler(IBaseHandler *parent) : m_parent(parent) +{ + //printf("SectionHandler::SectionHandler()\n"); + m_members.setAutoDelete(TRUE); + addEndHandler("sectiondef",this,&SectionHandler::endSection); + addStartHandler("memberdef",this,&SectionHandler::startMember); + addStartHandler("header",this,&SectionHandler::startHeader); + addEndHandler("header",this,&SectionHandler::endHeader); + addStartHandler("description",this,&SectionHandler::startDescription); +} + +SectionHandler::~SectionHandler() +{ + debug(2,"SectionHandler::~SectionHandler()\n"); +} + +void SectionHandler::startSection(const QXmlAttributes& attrib) +{ + m_parent->setDelegate(this); + m_kindString = attrib.value("kind"); + m_kind = s_typeMap->map(m_kindString); + debug(2,"section kind=`%s'\n",m_kindString.data()); +} + +void SectionHandler::startDescription(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_description = docHandler; +} + +void SectionHandler::endSection() +{ + m_parent->setDelegate(0); +} + +void SectionHandler::startMember(const QXmlAttributes& attrib) +{ + MemberHandler *memHandler = new MemberHandler(this); + memHandler->startMember(attrib); + m_members.append(memHandler); +} + +void SectionHandler::startHeader(const QXmlAttributes&) +{ + m_header=""; + m_curString=""; +} + +void SectionHandler::endHeader() +{ + m_header = m_curString.stripWhiteSpace(); + debug(2,"member header=`%s'\n",m_header.data()); +} + +void SectionHandler::initialize(CompoundHandler *ch) +{ + QListIterator<MemberHandler> mli(m_members); + MemberHandler *mh; + for (;(mh=mli.current());++mli) + { + mh->setCompoundHandler(ch); + ch->insertMember(mh); + mh->setSectionHandler(this); + } +} + +IDocRoot *SectionHandler::description() const +{ + return m_description; +} + +IMemberIterator *SectionHandler::members() const +{ + return new MemberIterator(m_members); +} + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/paramhandler.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/paramhandler.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/paramhandler.h (revision 1322) @@ -0,0 +1,103 @@ +/****************************************************************************** + * + * $Id:$ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _PARAMHANDLER_H +#define _PARAMHANDLER_H + +#include <qstring.h> +#include <qlist.h> +#include <qxml.h> +#include <doxmlintf.h> + +#include "stringimpl.h" +#include "basehandler.h" +#include "baseiterator.h" + +class LinkedTextImpl; +class LinkedTextHandler; +class DocHandler; + + +class ParamHandler : public IParam, public BaseHandler<ParamHandler> +{ + public: + virtual void startParam(const QXmlAttributes& attrib); + virtual void endParam(); + virtual void startType(const QXmlAttributes& attrib); + virtual void endDeclName(); + virtual void endDefName(); + virtual void endAttrib(); + virtual void endArray(); + virtual void startDefVal(const QXmlAttributes& attrib); + virtual void startBriefDesc(const QXmlAttributes& attrib); + + ParamHandler(IBaseHandler *parent); + virtual ~ParamHandler(); + + // IParam + virtual ILinkedTextIterator *type() const; + virtual const IString * declarationName() const { return &m_declName; } + virtual const IString * definitionName() const { return &m_defName; } + virtual const IString * attrib() const { return &m_attrib; } + virtual const IString * arraySpecifier() const { return &m_array; } + virtual ILinkedTextIterator *defaultValue() const; + virtual IDocRoot *briefDescription() const; + + private: + + // XML elements: + // ------------- + QList<LinkedTextImpl> m_type; // type + StringImpl m_declName; // declname + StringImpl m_defName; // defname + StringImpl m_array; // array + QList<LinkedTextImpl> m_defVal; // defval + DocHandler *m_brief; // briefdescription + + StringImpl m_attrib; // TODO: not yet in XML output + + IBaseHandler *m_parent; + LinkedTextHandler *m_linkedTextHandler; +}; + +class ParamIterator : public BaseIterator<IParamIterator,IParam,ParamHandler> +{ + public: + ParamIterator(const QList<ParamHandler> &list) : + BaseIterator<IParamIterator,IParam,ParamHandler>(list) {} +}; + +class TemplateParamListHandler : public BaseHandler<TemplateParamListHandler> +{ + public: + + virtual void startParam(const QXmlAttributes& attrib); + virtual void endParam(); + + virtual void startTemplateParamList(const QXmlAttributes& attrib); + virtual void endTemplateParamList(); + + TemplateParamListHandler(IBaseHandler *parent); + virtual ~TemplateParamListHandler() {} + + ParamIterator* templateParams() { return new ParamIterator(m_templateParams); } + + protected: + IBaseHandler *m_parent; + QList<ParamHandler> m_templateParams; +}; + + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/dochandler.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/dochandler.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/dochandler.cpp (revision 1322) @@ -0,0 +1,2240 @@ +/****************************************************************************** + * + * $Id: dochandler.cpp,v 1.33 2002/10/13 21:01:58 dimitri Exp $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include <qmap.h> + +#include "dochandler.h" +#include "debug.h" +#include "linkedtexthandler.h" + + +//---------------------------------------------------------------------- + +class TypeNameMapper +{ + public: + TypeNameMapper() + { + m_map.insert("see", SimpleSectHandler::See); + m_map.insert("return", SimpleSectHandler::Return); + m_map.insert("author", SimpleSectHandler::Author); + m_map.insert("version", SimpleSectHandler::Version); + m_map.insert("since", SimpleSectHandler::Since); + m_map.insert("date", SimpleSectHandler::Date); + m_map.insert("bug", SimpleSectHandler::Bug); + m_map.insert("note", SimpleSectHandler::Note); + m_map.insert("warning", SimpleSectHandler::Warning); + m_map.insert("par", SimpleSectHandler::Par); + m_map.insert("deprecated",SimpleSectHandler::Deprecated); + m_map.insert("pre", SimpleSectHandler::Pre); + m_map.insert("post", SimpleSectHandler::Post); + m_map.insert("invariant", SimpleSectHandler::Invar); + m_map.insert("remark", SimpleSectHandler::Remark); + m_map.insert("attention", SimpleSectHandler::Attention); + m_map.insert("todo", SimpleSectHandler::Todo); + m_map.insert("test", SimpleSectHandler::Test); + m_map.insert("rcs", SimpleSectHandler::RCS); + m_map.insert("enumvalues",SimpleSectHandler::EnumValues); + m_map.insert("examples", SimpleSectHandler::Examples); + } + SimpleSectHandler::Types stringToType(const QString &typeStr) + { + return m_map[typeStr]; + } + private: + QMap<QString,SimpleSectHandler::Types> m_map; +}; + +class HighlightMapper +{ + public: + HighlightMapper() + { + m_map.insert("comment", HighlightHandler::Comment); + m_map.insert("keyword", HighlightHandler::Keyword); + m_map.insert("keywordtype", HighlightHandler::KeywordType); + m_map.insert("keywordflow", HighlightHandler::KeywordFlow); + m_map.insert("charliteral", HighlightHandler::CharLiteral); + m_map.insert("stringliteral", HighlightHandler::StringLiteral); + m_map.insert("preprocessor", HighlightHandler::Preprocessor); + } + HighlightHandler::HighlightKind stringToKind(const QString &kindStr) + { + return m_map[kindStr]; + } + private: + QMap<QString,HighlightHandler::HighlightKind> m_map; +}; + +static TypeNameMapper *s_typeMapper; +static HighlightMapper *s_highlightMapper; + +void dochandler_init() +{ + s_typeMapper = new TypeNameMapper; + s_highlightMapper = new HighlightMapper; +} + +void dochandler_exit() +{ + delete s_typeMapper; + delete s_highlightMapper; +} + +//---------------------------------------------------------------------- +// MarkupHandler +//---------------------------------------------------------------------- + +MarkupHandler::MarkupHandler(QList<DocImpl> &children,QString &curString) + : m_children(children), m_curString(curString), + m_curMarkup(IDocMarkup::Normal), m_headingLevel(0) +{ + addStartHandler("bold",this,&MarkupHandler::startBold); + addEndHandler("bold",this,&MarkupHandler::endBold); + + addStartHandler("emphasis",this,&MarkupHandler::startEmphasis); + addEndHandler("emphasis",this,&MarkupHandler::endEmphasis); + + addStartHandler("computeroutput",this,&MarkupHandler::startComputerOutput); + addEndHandler("computeroutput",this,&MarkupHandler::endComputerOutput); + + addStartHandler("center",this,&MarkupHandler::startCenter); + addEndHandler("center",this,&MarkupHandler::endCenter); + + addStartHandler("small",this,&MarkupHandler::startSmallFont); + addEndHandler("small",this,&MarkupHandler::endSmallFont); + + addStartHandler("subscript",this,&MarkupHandler::startSubscript); + addEndHandler("subscript",this,&MarkupHandler::endSubscript); + + addStartHandler("superscript",this,&MarkupHandler::startSuperscript); + addEndHandler("superscript",this,&MarkupHandler::endSuperscript); + + addStartHandler("preformatted",this,&MarkupHandler::startPreformatted); + addEndHandler("preformatted",this,&MarkupHandler::endPreformatted); + + addStartHandler("heading1",this,&MarkupHandler::startHeading1); + addEndHandler("heading1",this,&MarkupHandler::endHeading1); + + addStartHandler("heading2",this,&MarkupHandler::startHeading2); + addEndHandler("heading2",this,&MarkupHandler::endHeading2); + + addStartHandler("heading3",this,&MarkupHandler::startHeading3); + addEndHandler("heading3",this,&MarkupHandler::endHeading3); + + addStartHandler("heading4",this,&MarkupHandler::startHeading4); + addEndHandler("heading4",this,&MarkupHandler::endHeading4); + + addStartHandler("heading5",this,&MarkupHandler::startHeading5); + addEndHandler("heading5",this,&MarkupHandler::endHeading5); + + addStartHandler("heading6",this,&MarkupHandler::startHeading6); + addEndHandler("heading6",this,&MarkupHandler::endHeading6); +} + +MarkupHandler::~MarkupHandler() +{ +} + +void MarkupHandler::addTextNode() +{ + if (!m_curString.isEmpty()) + { + m_children.append(new TextNode(m_curString,m_curMarkup,m_headingLevel)); + debug(2,"addTextNode() text=%s markup=%x\n",m_curString.data(),m_curMarkup); + m_curString=""; + } +} + +void MarkupHandler::startBold(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Bold,TRUE)); + m_curMarkup |= IDocMarkup::Bold; +} + +void MarkupHandler::endBold() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Bold,FALSE)); + m_curMarkup &= ~IDocMarkup::Bold; +} + +void MarkupHandler::startEmphasis(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Emphasis,TRUE)); + m_curMarkup |= IDocMarkup::Emphasis; +} + +void MarkupHandler::endEmphasis() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Emphasis,FALSE)); + m_curMarkup &= ~IDocMarkup::Emphasis; +} + +void MarkupHandler::startComputerOutput(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::ComputerOutput,TRUE)); + m_curMarkup |= IDocMarkup::ComputerOutput; +} + +void MarkupHandler::endComputerOutput() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::ComputerOutput,FALSE)); + m_curMarkup &= ~IDocMarkup::ComputerOutput; +} + +void MarkupHandler::startCenter(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Center,TRUE)); + m_curMarkup |= IDocMarkup::Center; +} + +void MarkupHandler::endCenter() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Center,FALSE)); + m_curMarkup &= ~IDocMarkup::Center; +} + +void MarkupHandler::startSmallFont(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::SmallFont,TRUE)); + m_curMarkup |= IDocMarkup::SmallFont; +} + +void MarkupHandler::endSmallFont() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::SmallFont,FALSE)); + m_curMarkup &= ~IDocMarkup::SmallFont; +} + +void MarkupHandler::startSubscript(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Subscript,TRUE)); + m_curMarkup |= IDocMarkup::Subscript; +} + +void MarkupHandler::endSubscript() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Subscript,FALSE)); + m_curMarkup &= ~IDocMarkup::Subscript; +} + +void MarkupHandler::startSuperscript(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Superscript,TRUE)); + m_curMarkup |= IDocMarkup::Superscript; +} + +void MarkupHandler::endSuperscript() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Superscript,FALSE)); + m_curMarkup &= ~IDocMarkup::Superscript; +} + +void MarkupHandler::startPreformatted(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Preformatted,TRUE)); + m_curMarkup |= IDocMarkup::Preformatted; +} + +void MarkupHandler::endPreformatted() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Preformatted,FALSE)); + m_curMarkup &= ~IDocMarkup::Preformatted; +} + +void MarkupHandler::startHeading1(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,1)); + m_curMarkup |= IDocMarkup::Heading; + m_headingLevel=1; +} + +void MarkupHandler::endHeading1() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,1)); + m_curMarkup &= ~IDocMarkup::Heading; + m_headingLevel=0; +} + +void MarkupHandler::startHeading2(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,2)); + m_curMarkup |= IDocMarkup::Heading; + m_headingLevel=2; +} + +void MarkupHandler::endHeading2() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,2)); + m_curMarkup &= ~IDocMarkup::Heading; + m_headingLevel=0; +} + +void MarkupHandler::startHeading3(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,3)); + m_curMarkup |= IDocMarkup::Heading; + m_headingLevel=3; +} + +void MarkupHandler::endHeading3() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,3)); + m_curMarkup &= ~IDocMarkup::Heading; + m_headingLevel=0; +} + +void MarkupHandler::startHeading4(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,4)); + m_curMarkup |= IDocMarkup::Heading; + m_headingLevel=4; +} + +void MarkupHandler::endHeading4() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,4)); + m_curMarkup &= ~IDocMarkup::Heading; + m_headingLevel=0; +} + +void MarkupHandler::startHeading5(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,5)); + m_curMarkup |= IDocMarkup::Heading; + m_headingLevel=5; +} + +void MarkupHandler::endHeading5() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,5)); + m_curMarkup &= ~IDocMarkup::Heading; + m_headingLevel=0; +} + +void MarkupHandler::startHeading6(const QXmlAttributes & /*attrib*/) +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,6)); + m_curMarkup |= IDocMarkup::Heading; + m_headingLevel=6; +} + +void MarkupHandler::endHeading6() +{ + addTextNode(); + m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,6)); + m_curMarkup &= ~IDocMarkup::Heading; + m_headingLevel=0; +} + + +//---------------------------------------------------------------------- +// ListItemHandler +//---------------------------------------------------------------------- + +ListItemHandler::ListItemHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + + addEndHandler("listitem",this,&ListItemHandler::endListItem); + + addStartHandler("para",this,&ListItemHandler::startParagraph); +} + +ListItemHandler::~ListItemHandler() +{ +} + +void ListItemHandler::startListItem(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"start list item handler\n"); +} + +void ListItemHandler::endListItem() +{ + debug(2,"end list item handler\n"); + m_parent->setDelegate(0); +} + +void ListItemHandler::startParagraph(const QXmlAttributes& attrib) +{ + ParagraphHandler *parHandler = new ParagraphHandler(this); + parHandler->startParagraph(attrib); + m_children.append(parHandler); +} + +IDocIterator *ListItemHandler::contents() const +{ + return new ListItemIterator(*this); +} + +//---------------------------------------------------------------------- +// OrderedListHandler +//---------------------------------------------------------------------- + +OrderedListHandler::OrderedListHandler(IBaseHandler *parent) : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + addEndHandler("orderedlist",this,&OrderedListHandler::endOrderedList); + addStartHandler("listitem",this,&OrderedListHandler::startOrderedListItem); +} + +OrderedListHandler::~OrderedListHandler() +{ +} + +void OrderedListHandler::startOrderedList(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); +} + +void OrderedListHandler::endOrderedList() +{ + m_parent->setDelegate(0); +} + +void OrderedListHandler::startOrderedListItem(const QXmlAttributes& attrib) +{ + ListItemHandler *liHandler = new ListItemHandler(this); + liHandler->startListItem(attrib); + m_children.append(liHandler); +} + +IDocIterator *OrderedListHandler::elements() const +{ + return new OrderedListIterator(*this); +} + +//---------------------------------------------------------------------- +// ItemizedListHandler +//---------------------------------------------------------------------- + +ItemizedListHandler::ItemizedListHandler(IBaseHandler *parent) : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + addEndHandler("itemizedlist",this,&ItemizedListHandler::endItemizedList); + addStartHandler("listitem",this,&ItemizedListHandler::startItemizedListItem); +} + +ItemizedListHandler::~ItemizedListHandler() +{ +} + +void ItemizedListHandler::startItemizedList(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); +} + +void ItemizedListHandler::endItemizedList() +{ + m_parent->setDelegate(0); +} + +void ItemizedListHandler::startItemizedListItem(const QXmlAttributes& attrib) +{ + ListItemHandler *liHandler = new ListItemHandler(this); + liHandler->startListItem(attrib); + m_children.append(liHandler); +} + +IDocIterator *ItemizedListHandler::elements() const +{ + return new ItemizedListIterator(*this); +} + +//---------------------------------------------------------------------- +// TocListHandler +//---------------------------------------------------------------------- + +TocListHandler::TocListHandler(IBaseHandler *parent) : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + addEndHandler("toclist",this,&TocListHandler::endTocList); + addStartHandler("tocitem",this,&TocListHandler::startTocItem); +} + +TocListHandler::~TocListHandler() +{ +} + +void TocListHandler::startTocList(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); +} + +void TocListHandler::endTocList() +{ + m_parent->setDelegate(0); +} + +void TocListHandler::startTocItem(const QXmlAttributes& attrib) +{ + TocItemHandler *tiHandler = new TocItemHandler(this); + tiHandler->startTocItem(attrib); + m_children.append(tiHandler); +} + +IDocIterator *TocListHandler::elements() const +{ + return new TocListIterator(*this); +} + +//---------------------------------------------------------------------- +// TocItemHandler +//---------------------------------------------------------------------- + +TocItemHandler::TocItemHandler(IBaseHandler *parent) : m_parent(parent) +{ + addEndHandler("tocitem",this,&TocItemHandler::endTocItem); +} + +TocItemHandler::~TocItemHandler() +{ +} + +void TocItemHandler::startTocItem(const QXmlAttributes& attrib) +{ + m_parent->setDelegate(this); + m_id = attrib.value("id"); + m_curString=""; +} + +void TocItemHandler::endTocItem() +{ + m_title = m_curString; + m_parent->setDelegate(0); +} + +//---------------------------------------------------------------------- +// ParameterHandler +//---------------------------------------------------------------------- + +ParameterHandler::ParameterHandler(IBaseHandler *parent) : + m_parent(parent) +{ + addEndHandler("parametername",this,&ParameterHandler::endParameterName); +} + +ParameterHandler::~ParameterHandler() +{ +} + +void ParameterHandler::startParameterName(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); +} + +void ParameterHandler::endParameterName() +{ + m_name = m_curString; + debug(2,"parameter %s\n",m_name.data()); + m_curString=""; + m_parent->setDelegate(0); +} + +//---------------------------------------------------------------------- +// ParameterListHandler +//---------------------------------------------------------------------- + +ParameterItemHandler::ParameterItemHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("parameteritem",this,&ParameterItemHandler::endParameterItem); + addStartHandler("parameternamelist"); + addEndHandler("parameternamelist"); + addStartHandler("parametername",this,&ParameterItemHandler::startParameterName); + addStartHandler("parameterdescription"); + addEndHandler("parameterdescription"); + addStartHandler("para",this,&ParameterItemHandler::startParagraph); + m_parameters.setAutoDelete(TRUE); + m_description = 0; +} + +ParameterItemHandler::~ParameterItemHandler() +{ + delete m_description; +} + +void ParameterItemHandler::startParameterItem(const QXmlAttributes&) +{ + m_parent->setDelegate(this); +} + +void ParameterItemHandler::endParameterItem() +{ + m_parent->setDelegate(0); +} + +void ParameterItemHandler::startParameterName(const QXmlAttributes& attrib) +{ + ParameterHandler *param = new ParameterHandler(this); + m_parameters.append(param); + param->startParameterName(attrib); +} + +void ParameterItemHandler::startParagraph(const QXmlAttributes& attrib) +{ + m_description = new ParagraphHandler(this); + m_description->startParagraph(attrib); +} + +IDocIterator *ParameterItemHandler::paramNames() const +{ + return new ParameterItemIterator(*this); +} + +//---------------------------------------------------------------------- +// ParameterListHandler +//---------------------------------------------------------------------- + +ParameterListHandler::ParameterListHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("parameterlist",this,&ParameterListHandler::endParameterList); + addStartHandler("parameteritem",this,&ParameterListHandler::startParameterItem); + m_paramItems.setAutoDelete(TRUE); +} + +ParameterListHandler::~ParameterListHandler() +{ +} + +void ParameterListHandler::startParameterList(const QXmlAttributes& attrib) +{ + QString kind = attrib.value("kind"); + if (kind=="retval") m_type=RetVal; + else if (kind=="exception") m_type=Exception; + else if (kind=="param") m_type=Param; + else + { + debug(1,"Error: invalid parameterlist type: %s\n",kind.data()); + } + debug(2,"parameterlist kind=%s\n",kind.data()); + m_parent->setDelegate(this); +} + +void ParameterListHandler::endParameterList() +{ + m_parent->setDelegate(0); +} + +void ParameterListHandler::startParameterItem(const QXmlAttributes& attrib) +{ + ParameterItemHandler *paramItem = new ParameterItemHandler(this); + m_paramItems.append(paramItem); + paramItem->startParameterItem(attrib); +} + +IDocIterator *ParameterListHandler::params() const +{ + return new ParameterListIterator(*this); +} + +//---------------------------------------------------------------------- +// LinkHandler +//---------------------------------------------------------------------- + +LinkHandler::LinkHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("link",this,&LinkHandler::endLink); +} + +LinkHandler::~LinkHandler() +{ +} + +void LinkHandler::startLink(const QXmlAttributes& attrib) +{ + m_parent->setDelegate(this); + debug(2,"Start link\n"); + m_ref = attrib.value("linkend"); + m_curString=""; +} + +void LinkHandler::endLink() +{ + m_text = m_curString; + m_curString=""; + m_parent->setDelegate(0); + debug(2,"End link\n"); +} + +//---------------------------------------------------------------------- +// EMailHandler +//---------------------------------------------------------------------- + +EMailHandler::EMailHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("email",this,&EMailHandler::endEMail); +} + +EMailHandler::~EMailHandler() +{ +} + +void EMailHandler::startEMail(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"Start email\n"); + m_curString=""; +} + +void EMailHandler::endEMail() +{ + m_address = m_curString; + m_curString=""; + m_parent->setDelegate(0); + debug(2,"End email\n"); +} + +//---------------------------------------------------------------------- +// ULinkHandler +//---------------------------------------------------------------------- + +ULinkHandler::ULinkHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("ulink",this,&ULinkHandler::endULink); +} + +ULinkHandler::~ULinkHandler() +{ +} + +void ULinkHandler::startULink(const QXmlAttributes& attrib) +{ + m_parent->setDelegate(this); + debug(2,"Start ulink\n"); + m_url = attrib.value("url"); + m_curString=""; +} + +void ULinkHandler::endULink() +{ + m_text = m_curString; + m_curString=""; + m_parent->setDelegate(0); + debug(2,"End ulink\n"); +} + +//---------------------------------------------------------------------- +// LineBreakHandler +//---------------------------------------------------------------------- + +LineBreakHandler::LineBreakHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("linebreak",this,&LineBreakHandler::endLineBreak); +} + +LineBreakHandler::~LineBreakHandler() +{ +} + +void LineBreakHandler::startLineBreak(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"Start linebreak\n"); +} + +void LineBreakHandler::endLineBreak() +{ + m_parent->setDelegate(0); + debug(2,"End linebreak\n"); +} + +//---------------------------------------------------------------------- +// HRulerHandler +//---------------------------------------------------------------------- + +HRulerHandler::HRulerHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("hruler",this,&HRulerHandler::endHRuler); +} + +HRulerHandler::~HRulerHandler() +{ +} + +void HRulerHandler::startHRuler(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"Start hruler\n"); +} + +void HRulerHandler::endHRuler() +{ + m_parent->setDelegate(0); + debug(2,"End hruler\n"); +} + +//---------------------------------------------------------------------- +// RefHandler +//---------------------------------------------------------------------- + +RefHandler::RefHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("ref",this,&RefHandler::endRef); +} + +RefHandler::~RefHandler() +{ +} + +void RefHandler::startRef(const QXmlAttributes& attrib) +{ + m_parent->setDelegate(this); + m_refId = attrib.value("refid"); + m_extId = attrib.value("external"); + ASSERT(attrib.value("kindref")=="compound" || + attrib.value("kindref")=="member"); + m_targetKind = attrib.value("kindref")=="compound" ? Compound : Member; + debug(2,"Start ref refId=%s\n",m_refId.data()); + m_curString=""; +} + +void RefHandler::endRef() +{ + m_linkText = m_curString; + m_parent->setDelegate(0); + debug(2,"End ref: text=`%s'\n",m_linkText.data()); +} + + +//---------------------------------------------------------------------- +// TitleHandler +//---------------------------------------------------------------------- + +TitleHandler::TitleHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + m_markupHandler = new MarkupHandler(m_children,m_curString); + setFallBackHandler(m_markupHandler); + addStartHandler("ref",this,&TitleHandler::startRef); + addEndHandler("title",this,&TitleHandler::endTitle); +} + +TitleHandler::~TitleHandler() +{ + delete m_markupHandler; +} + +void TitleHandler::startTitle(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"Start title\n"); + m_curString=""; +} + +void TitleHandler::endTitle() +{ + addTextNode(); + m_parent->setDelegate(0); + debug(2,"End title\n"); +} + +void TitleHandler::addTextNode() +{ + if (!m_curString.isEmpty()) + { + m_children.append( + new TextNode( + m_curString, + m_markupHandler->markup(), + m_markupHandler->headingLevel() + ) + ); + debug(2,"addTextNode() text=\"%s\" markup=%x headingLevel=%d\n", + m_curString.data(),m_markupHandler->markup(),m_markupHandler->headingLevel()); + m_curString=""; + } +} + +void TitleHandler::startRef(const QXmlAttributes& attrib) +{ + RefHandler *ref = new RefHandler(this); + ref->startRef(attrib); + m_children.append(ref); +} + +IDocIterator *TitleHandler::title() const +{ + return new TitleIterator(*this); +} + +//---------------------------------------------------------------------- +// SimpleSectHandler +//---------------------------------------------------------------------- + +SimpleSectHandler::SimpleSectHandler(IBaseHandler *parent) + : m_parent(parent), m_paragraph(0), m_title(0) +{ + addStartHandler("title",this,&SimpleSectHandler::startTitle); + addStartHandler("para",this,&SimpleSectHandler::startParagraph); + addEndHandler("simplesect",this,&SimpleSectHandler::endSimpleSect); +} + +SimpleSectHandler::~SimpleSectHandler() +{ +} + +void SimpleSectHandler::startSimpleSect(const QXmlAttributes& attrib) +{ + m_typeString = attrib.value("kind"); + m_type = s_typeMapper->stringToType(m_typeString); + debug(2,"start simple section %s\n",m_typeString.data()); + m_parent->setDelegate(this); +} + +void SimpleSectHandler::endSimpleSect() +{ + debug(2,"end simple section\n"); + m_parent->setDelegate(0); +} + +void SimpleSectHandler::startTitle(const QXmlAttributes& attrib) +{ + ASSERT(m_title==0); + m_title = new TitleHandler(this); + m_title->startTitle(attrib); +} + +void SimpleSectHandler::startParagraph(const QXmlAttributes& attrib) +{ + ASSERT(m_paragraph==0); + m_paragraph = new ParagraphHandler(this); + m_paragraph->startParagraph(attrib); +} + +//---------------------------------------------------------------------- +// VariableListEntryHandler +//---------------------------------------------------------------------- + +VariableListEntryHandler::VariableListEntryHandler(IBaseHandler *parent) + : m_parent(parent), m_description(0), m_linkedTextHandler(0) +{ + addStartHandler("term",this,&VariableListEntryHandler::startTerm); + addEndHandler("term",this,&VariableListEntryHandler::endTerm); + addStartHandler("para",this,&VariableListEntryHandler::startParagraph); + addEndHandler("varlistentry",this,&VariableListEntryHandler::endVarListEntry); + addEndHandler("listitem",this,&VariableListEntryHandler::endListItem); +} + +VariableListEntryHandler::~VariableListEntryHandler() +{ + delete m_description; +} + +void VariableListEntryHandler::startVarListEntry(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"start varlistentry\n"); +} + +void VariableListEntryHandler::endVarListEntry() +{ + m_parent->setDelegate(0); + debug(2,"end varlistentry\n"); +} + +void VariableListEntryHandler::startListItem(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"start listitem\n"); +} + +void VariableListEntryHandler::endListItem() +{ + m_parent->setDelegate(0); + debug(2,"end listitem\n"); +} + +void VariableListEntryHandler::startTerm(const QXmlAttributes& /*attrib*/) +{ + m_curString=""; + m_linkedTextHandler = new LinkedTextHandler(this,m_term); + m_linkedTextHandler->start("term"); +} + +void VariableListEntryHandler::endTerm() +{ + delete m_linkedTextHandler; +} + +void VariableListEntryHandler::startParagraph(const QXmlAttributes& attrib) +{ + ASSERT(m_description==0); + m_description = new ParagraphHandler(this); + m_description->startParagraph(attrib); +} + +ILinkedTextIterator *VariableListEntryHandler::term() const +{ + return new LinkedTextIterator(m_term); +} + + +//---------------------------------------------------------------------- +// VariableListHandler +//---------------------------------------------------------------------- + +VariableListHandler::VariableListHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_entries.setAutoDelete(TRUE); + addStartHandler("varlistentry",this,&VariableListHandler::startVarListEntry); + addStartHandler("listitem",this,&VariableListHandler::startListItem); + addEndHandler("variablelist",this,&VariableListHandler::endVariableList); +} + +VariableListHandler::~VariableListHandler() +{ +} + +void VariableListHandler::startVariableList(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"start variablelist\n"); +} + +void VariableListHandler::endVariableList() +{ + debug(2,"end variablelist\n"); + m_parent->setDelegate(0); +} + +void VariableListHandler::startVarListEntry(const QXmlAttributes& attrib) +{ + VariableListEntryHandler *vle = new VariableListEntryHandler(this); + vle->startVarListEntry(attrib); + m_curEntry = vle; + m_entries.append(vle); +} + +void VariableListHandler::startListItem(const QXmlAttributes& attrib) +{ + ASSERT(m_curEntry!=0); + m_curEntry->startListItem(attrib); +} + +IDocIterator *VariableListHandler::entries() const +{ + return new VariableListIterator(*this); +} + +//---------------------------------------------------------------------- +// HighlightHandler +//---------------------------------------------------------------------- + +HighlightHandler::HighlightHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + addEndHandler("highlight",this,&HighlightHandler::endHighlight); + addStartHandler("ref",this,&HighlightHandler::startRef); + addStartHandler("sp",this,&HighlightHandler::startSpace); + m_hl = IDocHighlight::Invalid; +} + +HighlightHandler::~HighlightHandler() +{ +} + +void HighlightHandler::startHighlight(const QXmlAttributes& attrib) +{ + m_hlString = attrib.value("class"); + m_hl = s_highlightMapper->stringToKind(m_hlString); + m_curString=""; + m_parent->setDelegate(this); + debug(2,"start highlight\n"); +} + +void HighlightHandler::endHighlight() +{ + addTextNode(); + debug(2,"end highlight class=`%s'\n",m_hlString.data()); + m_parent->setDelegate(0); +} + +void HighlightHandler::startRef(const QXmlAttributes& attrib) +{ + addTextNode(); + RefHandler *rh = new RefHandler(this); + m_children.append(rh); + rh->startRef(attrib); +} + +void HighlightHandler::startSpace(const QXmlAttributes&) +{ + m_curString=" "; + addTextNode(); +} + +void HighlightHandler::addTextNode() +{ + if (!m_curString.isEmpty()) + { + m_children.append(new TextNode(m_curString,IDocMarkup::Normal,0)); + debug(2,"addTextNode() text=\"%s\"\n", + m_curString.data()); + m_curString=""; + } +} + +IDocIterator *HighlightHandler::codeElements() const +{ + return new HighlightIterator(*this); +} + +//---------------------------------------------------------------------- +// CodeLineHandler +//---------------------------------------------------------------------- + +CodeLineHandler::CodeLineHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + addEndHandler("codeline",this,&CodeLineHandler::endCodeLine); + addEndHandler("linenumber",this,&CodeLineHandler::endLineNumber); + addStartHandler("highlight",this,&CodeLineHandler::startHighlight); + addStartHandler("ref",this,&CodeLineHandler::startRef); + m_lineNumber = 0; +} + +CodeLineHandler::~CodeLineHandler() +{ +} + +void CodeLineHandler::startCodeLine(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"start codeline\n"); +} + +void CodeLineHandler::endCodeLine() +{ + addTextNode(); + debug(2,"end codeline\n"); + m_parent->setDelegate(0); +} + +void CodeLineHandler::startLineNumber(const QXmlAttributes& attrib) +{ + m_parent->setDelegate(this); + debug(2,"start linenumber\n"); + m_lineNumber = attrib.value("line").toInt(); + m_refId = attrib.value("refid"); +} + +void CodeLineHandler::endLineNumber() +{ + m_parent->setDelegate(0); +} + +void CodeLineHandler::startHighlight(const QXmlAttributes& attrib) +{ + addTextNode(); + HighlightHandler *hlh = new HighlightHandler(this); + m_children.append(hlh); + hlh->startHighlight(attrib); +} + +void CodeLineHandler::startRef(const QXmlAttributes& attrib) +{ + addTextNode(); + RefHandler *rh = new RefHandler(this); + m_children.append(rh); + rh->startRef(attrib); +} + +void CodeLineHandler::addTextNode() +{ + if (!m_curString.isEmpty()) + { + m_children.append(new TextNode(m_curString,IDocMarkup::Normal,0)); + debug(2,"addTextNode() text=\"%s\"\n", + m_curString.data()); + m_curString=""; + } +} + +IDocIterator *CodeLineHandler::codeElements() const +{ + return new CodeLineIterator(*this); +} + + +//---------------------------------------------------------------------- +// ProgramListingHandler +//---------------------------------------------------------------------- + +ProgramListingHandler::ProgramListingHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + m_hasLineNumber=FALSE; + addEndHandler("programlisting",this,&ProgramListingHandler::endProgramListing); + + addStartHandler("linenumber",this,&ProgramListingHandler::startLineNumber); + addStartHandler("codeline",this,&ProgramListingHandler::startCodeLine); +} + +ProgramListingHandler::~ProgramListingHandler() +{ +} + +void ProgramListingHandler::startProgramListing(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"start programlisting\n"); +} + +void ProgramListingHandler::endProgramListing() +{ + debug(2,"end programlisting\n"); + m_parent->setDelegate(0); +} + +void ProgramListingHandler::startLineNumber(const QXmlAttributes& attrib) +{ + CodeLineHandler *clh = new CodeLineHandler(this); + m_children.append(clh); + m_hasLineNumber=TRUE; + clh->startLineNumber(attrib); +} + +void ProgramListingHandler::startCodeLine(const QXmlAttributes& attrib) +{ + CodeLineHandler *clh = 0; + if (!m_hasLineNumber) + { + clh = new CodeLineHandler(this); + m_children.append(clh); + } + else + { + clh = m_children.getLast(); + } + ASSERT(clh!=0); + clh->startCodeLine(attrib); + m_hasLineNumber=FALSE; +} + +IDocIterator *ProgramListingHandler::codeLines() const +{ + return new ProgramListingIterator(*this); +} + + + +//---------------------------------------------------------------------- +// FormulaHandler +//---------------------------------------------------------------------- + +FormulaHandler::FormulaHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("formula",this,&FormulaHandler::endFormula); +} + +FormulaHandler::~FormulaHandler() +{ +} + +void FormulaHandler::startFormula(const QXmlAttributes& attrib) +{ + m_id = attrib.value("id"); + m_curString=""; + m_parent->setDelegate(this); +} + +void FormulaHandler::endFormula() +{ + m_text = m_curString; + debug(2,"formula id=`%s' text=`%s'\n",m_id.data(),m_text.data()); + m_parent->setDelegate(0); +} + +//---------------------------------------------------------------------- +// AnchorHandler +//---------------------------------------------------------------------- + +AnchorHandler::AnchorHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("anchor",this,&AnchorHandler::endAnchor); +} + +AnchorHandler::~AnchorHandler() +{ +} + +void AnchorHandler::startAnchor(const QXmlAttributes& attrib) +{ + m_id = attrib.value("id"); + m_parent->setDelegate(this); +} + +void AnchorHandler::endAnchor() +{ + debug(2,"anchor id=`%s'\n",m_id.data()); + m_parent->setDelegate(0); +} + +//---------------------------------------------------------------------- +// ImageHandler +//---------------------------------------------------------------------- + +ImageHandler::ImageHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("image",this,&ImageHandler::endImage); +} + +ImageHandler::~ImageHandler() +{ +} + +void ImageHandler::startImage(const QXmlAttributes& attrib) +{ + m_name = attrib.value("name"); + m_curString=""; + m_parent->setDelegate(this); +} + +void ImageHandler::endImage() +{ + m_caption = m_curString; + debug(2,"image name=`%s' caption=`%s'\n",m_name.data(),m_caption.data()); + m_parent->setDelegate(0); +} + +//---------------------------------------------------------------------- +// DotFileHandler +//---------------------------------------------------------------------- + +DotFileHandler::DotFileHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("dotfile",this,&DotFileHandler::endDotFile); +} + +DotFileHandler::~DotFileHandler() +{ +} + +void DotFileHandler::startDotFile(const QXmlAttributes& attrib) +{ + m_name = attrib.value("name"); + m_curString=""; + m_parent->setDelegate(this); +} + +void DotFileHandler::endDotFile() +{ + m_caption = m_curString; + debug(2,"image name=`%s' caption=`%s'\n",m_name.data(),m_caption.data()); + m_parent->setDelegate(0); +} + +//---------------------------------------------------------------------- +// IndexEntryHandler +//---------------------------------------------------------------------- + +IndexEntryHandler::IndexEntryHandler(IBaseHandler *parent) + : m_parent(parent) +{ + addEndHandler("indexentry",this,&IndexEntryHandler::endIndexEntry); + addStartHandler("primaryie",this,&IndexEntryHandler::startPrimaryIE); + addEndHandler("primaryie",this,&IndexEntryHandler::endPrimaryIE); + addStartHandler("secondaryie",this,&IndexEntryHandler::startSecondaryIE); + addEndHandler("secondaryie",this,&IndexEntryHandler::endSecondaryIE); +} + +IndexEntryHandler::~IndexEntryHandler() +{ +} + +void IndexEntryHandler::startIndexEntry(const QXmlAttributes& /*attrib*/) +{ + debug(2,"start index entry\n"); + m_parent->setDelegate(this); +} + +void IndexEntryHandler::endIndexEntry() +{ + debug(2,"index entry primary=`%s' secondary=`%s'\n", + m_primary.data(),m_secondary.data()); + m_parent->setDelegate(0); +} + +void IndexEntryHandler::startPrimaryIE(const QXmlAttributes& /*attrib*/) +{ + m_curString=""; +} + +void IndexEntryHandler::endPrimaryIE() +{ + m_primary = m_curString; +} + +void IndexEntryHandler::startSecondaryIE(const QXmlAttributes& /*attrib*/) +{ + m_curString=""; +} + +void IndexEntryHandler::endSecondaryIE() +{ + m_secondary = m_curString; +} + +//---------------------------------------------------------------------- +// EntryHandler +//---------------------------------------------------------------------- + +EntryHandler::EntryHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + addEndHandler("entry",this,&EntryHandler::endEntry); + addStartHandler("para",this,&EntryHandler::startParagraph); +} + +EntryHandler::~EntryHandler() +{ +} + +void EntryHandler::startEntry(const QXmlAttributes&) +{ + m_parent->setDelegate(this); +} + +void EntryHandler::endEntry() +{ + m_parent->setDelegate(0); +} + +void EntryHandler::startParagraph(const QXmlAttributes& attrib) +{ + ParagraphHandler *ph = new ParagraphHandler(this); + ph->startParagraph(attrib); + m_children.append(ph); +} + +IDocIterator *EntryHandler::contents() const +{ + return new EntryIterator(*this); +} + +//---------------------------------------------------------------------- +// RowHandler +//---------------------------------------------------------------------- + +RowHandler::RowHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + addEndHandler("row",this,&RowHandler::endRow); + addStartHandler("entry",this,&RowHandler::startEntry); +} + +RowHandler::~RowHandler() +{ +} + +void RowHandler::startRow(const QXmlAttributes&) +{ + m_parent->setDelegate(this); +} + +void RowHandler::endRow() +{ + m_parent->setDelegate(0); +} + +void RowHandler::startEntry(const QXmlAttributes& attrib) +{ + EntryHandler *eh = new EntryHandler(this); + eh->startEntry(attrib); + m_children.append(eh); +} + +IDocIterator *RowHandler::entries() const +{ + return new RowIterator(*this); +} + +//---------------------------------------------------------------------- +// TableHandler +//---------------------------------------------------------------------- + +TableHandler::TableHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + addEndHandler("table",this,&TableHandler::endTable); + addStartHandler("row",this,&TableHandler::startRow); + addStartHandler("caption",this,&TableHandler::startCaption); + addEndHandler("caption",this,&TableHandler::endCaption); +} + +TableHandler::~TableHandler() +{ +} + +void TableHandler::startTable(const QXmlAttributes& attrib) +{ + m_parent->setDelegate(this); + m_numColumns = attrib.value("cols").toInt(); + debug(2,"table cols=%d\n",m_numColumns); +} + +void TableHandler::endTable() +{ + m_parent->setDelegate(0); +} + +void TableHandler::startRow(const QXmlAttributes& attrib) +{ + RowHandler *rh = new RowHandler(this); + rh->startRow(attrib); + m_children.append(rh); +} + +void TableHandler::startCaption(const QXmlAttributes& /*attrib*/) +{ + m_curString=""; +} + +void TableHandler::endCaption() +{ + m_caption = m_curString; +} + +IDocIterator *TableHandler::rows() const +{ + return new TableIterator(*this); +} + +//---------------------------------------------------------------------- +// CopyHandler +//---------------------------------------------------------------------- + +CopyHandler::CopyHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + + addEndHandler("copydoc",this,&CopyHandler::endCopy); + + addStartHandler("para",this,&CopyHandler::startParagraph); +} + +CopyHandler::~CopyHandler() +{ +} + +void CopyHandler::startCopy(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"start copy handler\n"); +} + +void CopyHandler::endCopy() +{ + debug(2,"end copy handler\n"); + m_parent->setDelegate(0); +} + +void CopyHandler::startParagraph(const QXmlAttributes& attrib) +{ + ParagraphHandler *parHandler = new ParagraphHandler(this); + parHandler->startParagraph(attrib); + m_children.append(parHandler); +} + +IDocIterator *CopyHandler::contents() const +{ + return new CopyIterator(*this); +} + +//---------------------------------------------------------------------- +// VerbatimHandler +//---------------------------------------------------------------------- + +VerbatimHandler::VerbatimHandler(IBaseHandler *parent) + : m_parent(parent), m_type(IDocVerbatim::Invalid) +{ + addEndHandler("verbatim",this,&VerbatimHandler::endVerbatim); + addEndHandler("latexonly",this,&VerbatimHandler::endVerbatim); + addEndHandler("htmlonly",this,&VerbatimHandler::endVerbatim); +} + +VerbatimHandler::~VerbatimHandler() +{ +} + +void VerbatimHandler::startVerbatim(const QXmlAttributes&,Types type) +{ + m_type = type; + m_parent->setDelegate(this); + m_curString=""; +} + +void VerbatimHandler::endVerbatim() +{ + m_text = m_curString; + m_parent->setDelegate(0); +} + + +//---------------------------------------------------------------------- +// SymbolHandler +//---------------------------------------------------------------------- + +SymbolHandler::SymbolHandler(IBaseHandler *parent,Types type) + : m_parent(parent), m_letter('\0'), m_type(type) +{ + addEndHandler("symbol"); + switch (type) + { + case IDocSymbol::Invalid: m_typeString="invalid"; break; + case IDocSymbol::Umlaut: m_typeString="umlaut"; break; + case IDocSymbol::Acute: m_typeString="acute"; break; + case IDocSymbol::Grave: m_typeString="grave"; break; + case IDocSymbol::Circ: m_typeString="circ"; break; + case IDocSymbol::Tilde: m_typeString="tilde"; break; + case IDocSymbol::Szlig: m_typeString="szlig"; break; + case IDocSymbol::Cedil: m_typeString="cedil"; break; + case IDocSymbol::Ring: m_typeString="ring"; break; + case IDocSymbol::Nbsp: m_typeString="nbsp"; break; + case IDocSymbol::Copy: m_typeString="copy"; break; + } +} + +SymbolHandler::~SymbolHandler() +{ +} + +void SymbolHandler::startSymbol(const QXmlAttributes& attrib) +{ + QString ls = attrib.value("char"); + if (!ls.isEmpty()) m_letter = ls.latin1()[0]; +} + +//---------------------------------------------------------------------- +// ParagraphHandler +//---------------------------------------------------------------------- + +ParagraphHandler::ParagraphHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + + m_markupHandler = new MarkupHandler(m_children,m_curString); + + // preformatted + setFallBackHandler(m_markupHandler); + + addEndHandler("para",this,&ParagraphHandler::endParagraph); + + addStartHandler("linebreak",this,&ParagraphHandler::startLineBreak); + addStartHandler("hruler",this,&ParagraphHandler::startHRuler); + addStartHandler("programlisting",this,&ParagraphHandler::startProgramListing); + addStartHandler("verbatim",this,&ParagraphHandler::startVerbatim); + addStartHandler("indexentry",this,&ParagraphHandler::startIndexEntry); + addStartHandler("orderedlist",this,&ParagraphHandler::startOrderedList); + addStartHandler("itemizedlist",this,&ParagraphHandler::startItemizedList); + addStartHandler("simplesect",this,&ParagraphHandler::startSimpleSect); + // TODO: title + addStartHandler("variablelist",this,&ParagraphHandler::startVariableList); + addStartHandler("table",this,&ParagraphHandler::startTable); + // TODO: heading + addStartHandler("image",this,&ParagraphHandler::startImage); + addStartHandler("dotfile",this,&ParagraphHandler::startDotFile); + addStartHandler("toclist",this,&ParagraphHandler::startTocList); + // TODO: language??? + addStartHandler("parameterlist",this,&ParagraphHandler::startParameterList); + // TODO: xrefsect + addStartHandler("copydoc",this,&ParagraphHandler::startCopyDoc); + + addStartHandler("ref",this,&ParagraphHandler::startRef); + addStartHandler("ulink",this,&ParagraphHandler::startULink); + addStartHandler("email",this,&ParagraphHandler::startEMail); + addStartHandler("link",this,&ParagraphHandler::startLink); + addStartHandler("formula",this,&ParagraphHandler::startFormula); + addStartHandler("latexonly",this,&ParagraphHandler::startHtmlOnly); + addStartHandler("htmlonly",this,&ParagraphHandler::startLatexOnly); + addStartHandler("umlaut",this,&ParagraphHandler::startUmlaut); + addStartHandler("acute",this,&ParagraphHandler::startAcute); + addStartHandler("grave",this,&ParagraphHandler::startGrave); + addStartHandler("circ",this,&ParagraphHandler::startCirc); + addStartHandler("tilde",this,&ParagraphHandler::startTilde); + addStartHandler("szlig",this,&ParagraphHandler::startSzlig); + addStartHandler("cedil",this,&ParagraphHandler::startCedil); + addStartHandler("ring",this,&ParagraphHandler::startRing); + addStartHandler("nbsp",this,&ParagraphHandler::startNbsp); + addStartHandler("copy",this,&ParagraphHandler::startCopy); + addStartHandler("anchor",this,&ParagraphHandler::startAnchor); +} + +ParagraphHandler::~ParagraphHandler() +{ + delete m_markupHandler; +} + +void ParagraphHandler::startParagraph(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"para\n"); +} + +void ParagraphHandler::endParagraph() +{ + addTextNode(); + debug(2,"end para\n"); + m_parent->setDelegate(0); +} + +void ParagraphHandler::startItemizedList(const QXmlAttributes& attrib) +{ + addTextNode(); + ItemizedListHandler *listHandler = new ItemizedListHandler(this); + listHandler->startItemizedList(attrib); + m_children.append(listHandler); +} + +void ParagraphHandler::startOrderedList(const QXmlAttributes& attrib) +{ + addTextNode(); + OrderedListHandler *listHandler = new OrderedListHandler(this); + listHandler->startOrderedList(attrib); + m_children.append(listHandler); +} + +void ParagraphHandler::startParameterList(const QXmlAttributes& attrib) +{ + addTextNode(); + ParameterListHandler *listHandler = new ParameterListHandler(this); + listHandler->startParameterList(attrib); + m_children.append(listHandler); +} + +void ParagraphHandler::startSimpleSect(const QXmlAttributes& attrib) +{ + addTextNode(); + SimpleSectHandler *sectHandler = new SimpleSectHandler(this); + sectHandler->startSimpleSect(attrib); + m_children.append(sectHandler); +} + +void ParagraphHandler::startRef(const QXmlAttributes& attrib) +{ + addTextNode(); + RefHandler *ref = new RefHandler(this); + ref->startRef(attrib); + m_children.append(ref); +} + +void ParagraphHandler::startVariableList(const QXmlAttributes& attrib) +{ + addTextNode(); + VariableListHandler *vl = new VariableListHandler(this); + vl->startVariableList(attrib); + m_children.append(vl); +} + +void ParagraphHandler::startHRuler(const QXmlAttributes& attrib) +{ + addTextNode(); + HRulerHandler *hr = new HRulerHandler(this); + hr->startHRuler(attrib); + m_children.append(hr); +} + +void ParagraphHandler::startLineBreak(const QXmlAttributes& attrib) +{ + addTextNode(); + LineBreakHandler *lb = new LineBreakHandler(this); + lb->startLineBreak(attrib); + m_children.append(lb); +} + +void ParagraphHandler::startULink(const QXmlAttributes& attrib) +{ + addTextNode(); + ULinkHandler *uh = new ULinkHandler(this); + uh->startULink(attrib); + m_children.append(uh); +} + +void ParagraphHandler::startEMail(const QXmlAttributes& attrib) +{ + addTextNode(); + EMailHandler *eh = new EMailHandler(this); + eh->startEMail(attrib); + m_children.append(eh); +} + +void ParagraphHandler::startLink(const QXmlAttributes& attrib) +{ + addTextNode(); + LinkHandler *lh = new LinkHandler(this); + lh->startLink(attrib); + m_children.append(lh); +} + +void ParagraphHandler::startProgramListing(const QXmlAttributes& attrib) +{ + addTextNode(); + ProgramListingHandler *pl = new ProgramListingHandler(this); + pl->startProgramListing(attrib); + m_children.append(pl); +} + +void ParagraphHandler::startFormula(const QXmlAttributes& attrib) +{ + addTextNode(); + FormulaHandler *fh = new FormulaHandler(this); + fh->startFormula(attrib); + m_children.append(fh); +} + +void ParagraphHandler::startImage(const QXmlAttributes& attrib) +{ + addTextNode(); + ImageHandler *ih = new ImageHandler(this); + ih->startImage(attrib); + m_children.append(ih); +} + +void ParagraphHandler::startDotFile(const QXmlAttributes& attrib) +{ + addTextNode(); + DotFileHandler *df = new DotFileHandler(this); + df->startDotFile(attrib); + m_children.append(df); +} + +void ParagraphHandler::startIndexEntry(const QXmlAttributes& attrib) +{ + addTextNode(); + IndexEntryHandler *df = new IndexEntryHandler(this); + df->startIndexEntry(attrib); + m_children.append(df); +} + +void ParagraphHandler::startTable(const QXmlAttributes& attrib) +{ + addTextNode(); + TableHandler *th = new TableHandler(this); + th->startTable(attrib); + m_children.append(th); +} + +void ParagraphHandler::startVerbatim(const QXmlAttributes& attrib) +{ + addTextNode(); + VerbatimHandler *vh = new VerbatimHandler(this); + vh->startVerbatim(attrib,IDocVerbatim::Verbatim); + m_children.append(vh); +} + +void ParagraphHandler::startHtmlOnly(const QXmlAttributes& attrib) +{ + addTextNode(); + VerbatimHandler *vh = new VerbatimHandler(this); + vh->startVerbatim(attrib,IDocVerbatim::HtmlOnly); + m_children.append(vh); +} + +void ParagraphHandler::startLatexOnly(const QXmlAttributes& attrib) +{ + addTextNode(); + VerbatimHandler *vh = new VerbatimHandler(this); + vh->startVerbatim(attrib,IDocVerbatim::LatexOnly); + m_children.append(vh); +} + +void ParagraphHandler::startUmlaut(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Umlaut); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startAcute(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Acute); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startGrave(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Grave); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startCirc(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Circ); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startTilde(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Tilde); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startSzlig(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Szlig); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startCedil(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Cedil); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startRing(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Ring); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startNbsp(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Nbsp); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startCopy(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Copy); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startAnchor(const QXmlAttributes& attrib) +{ + addTextNode(); + AnchorHandler *ah = new AnchorHandler(this); + ah->startAnchor(attrib); + m_children.append(ah); +} + +void ParagraphHandler::startCopyDoc(const QXmlAttributes& attrib) +{ + addTextNode(); + CopyHandler *ch = new CopyHandler(this); + ch->startCopy(attrib); + m_children.append(ch); +} + +void ParagraphHandler::startTocList(const QXmlAttributes& attrib) +{ + addTextNode(); + TocListHandler *th = new TocListHandler(this); + th->startTocList(attrib); + m_children.append(th); +} + +void ParagraphHandler::addTextNode() +{ + if (!m_curString.isEmpty()) + { + m_children.append( + new TextNode( + m_curString, + m_markupHandler->markup(), + m_markupHandler->headingLevel() + ) + ); + debug(2,"addTextNode() text=\"%s\" markup=%x headingLevel=%d\n", + m_curString.data(),m_markupHandler->markup(),m_markupHandler->headingLevel()); + m_curString=""; + } +} + +IDocIterator *ParagraphHandler::contents() const +{ + return new ParagraphIterator(*this); +} + +//---------------------------------------------------------------------- +// DocSectionHandler +//---------------------------------------------------------------------- + +DocSectionHandler::DocSectionHandler(IBaseHandler *parent,int level) + : m_parent(parent), m_internal(0), m_level(level), m_title(0) +{ + QString sectionKey; + m_paragraphs.setAutoDelete(TRUE); + m_subsections.setAutoDelete(TRUE); + addStartHandler("title",this,&DocSectionHandler::startTitle); + addStartHandler("para",this,&DocSectionHandler::startParagraph); + if (level<6) + { + sectionKey.sprintf("sect%d",level+1); + addStartHandler(sectionKey,this,&DocSectionHandler::startSubSection); + } + addStartHandler("internal",this,&DocSectionHandler::startInternal); + sectionKey.sprintf("sect%d",level); + addEndHandler(sectionKey,this,&DocSectionHandler::endDocSection); +} + +DocSectionHandler::~DocSectionHandler() +{ +} + +void DocSectionHandler::startDocSection(const QXmlAttributes& attrib) +{ + m_parent->setDelegate(this); + debug(2,"Start docsection\n"); + m_id = attrib.value("id"); +} + +void DocSectionHandler::endDocSection() +{ + m_parent->setDelegate(0); + debug(2,"End docsection\n"); +} + +void DocSectionHandler::startSubSection(const QXmlAttributes& attrib) +{ + DocSectionHandler *secHandler = new DocSectionHandler(this,m_level+1); + secHandler->startDocSection(attrib); + m_subsections.append(secHandler); +} + +void DocSectionHandler::startParagraph(const QXmlAttributes& attrib) +{ + ParagraphHandler *parHandler = new ParagraphHandler(this); + parHandler->startParagraph(attrib); + m_paragraphs.append(parHandler); +} + +void DocSectionHandler::startInternal(const QXmlAttributes& attrib) +{ + m_internal = new DocInternalHandler(this,m_level); + m_internal->startInternal(attrib); +} + +void DocSectionHandler::startTitle(const QXmlAttributes& attrib) +{ + m_title = new TitleHandler(this); + m_title->startTitle(attrib); +} + +IDocIterator *DocSectionHandler::paragraphs() const +{ + return new DocSectionParaIterator(*this); +} + +IDocIterator *DocSectionHandler::subSections() const +{ + return new DocSectionSubIterator(*this); +} + +IDocInternal *DocSectionHandler::internal() const +{ + return m_internal; +} + +//---------------------------------------------------------------------- +// DocInternal +//---------------------------------------------------------------------- + +DocInternalHandler::DocInternalHandler(IBaseHandler *parent,int level) + : m_parent(parent), m_level(level) +{ + m_paragraphs.setAutoDelete(TRUE); + m_subsections.setAutoDelete(TRUE); + addStartHandler("para",this,&DocInternalHandler::startParagraph); + QString sectionKey; + sectionKey.sprintf("sect%d",level+1); + addStartHandler(sectionKey,this,&DocInternalHandler::startSubSection); + addEndHandler("internal",this,&DocInternalHandler::endInternal); +} + +DocInternalHandler::~DocInternalHandler() +{ +} + +void DocInternalHandler::startInternal(const QXmlAttributes&) +{ + m_parent->setDelegate(this); + debug(2,"Start internal\n"); +} + +void DocInternalHandler::endInternal() +{ + m_parent->setDelegate(0); + debug(2,"End internal\n"); +} + +void DocInternalHandler::startSubSection(const QXmlAttributes& attrib) +{ + DocSectionHandler *secHandler = new DocSectionHandler(this,m_level+1); + secHandler->startDocSection(attrib); + m_subsections.append(secHandler); +} + +void DocInternalHandler::startParagraph(const QXmlAttributes& attrib) +{ + ParagraphHandler *parHandler = new ParagraphHandler(this); + parHandler->startParagraph(attrib); + m_paragraphs.append(parHandler); +} + +IDocIterator *DocInternalHandler::paragraphs() const +{ + return new DocInternalParaIterator(*this); +} + +IDocIterator *DocInternalHandler::subSections() const +{ + return new DocInternalSubIterator(*this); +} + + +//---------------------------------------------------------------------- +// DocHandler +//---------------------------------------------------------------------- + +DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + + addEndHandler("briefdescription",this,&DocHandler::endDoc); + addEndHandler("detaileddescription",this,&DocHandler::endDoc); + addEndHandler("inbodydescription",this,&DocHandler::endDoc); + //addEndHandler("internal"); // TODO: implement this as a section + addStartHandler("internal",this,&DocHandler::startInternal); + + addStartHandler("para",this,&DocHandler::startParagraph); + addStartHandler("sect1",this,&DocHandler::startSect1); + addStartHandler("title",this,&DocHandler::startTitle); + //addStartHandler("internal"); +} + +DocHandler::~DocHandler() +{ +} + +void DocHandler::startDoc(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"start dochandler\n"); +} + +void DocHandler::endDoc() +{ + debug(2,"end dochandler\n"); + m_parent->setDelegate(0); +} + +void DocHandler::startParagraph(const QXmlAttributes& attrib) +{ + ParagraphHandler *parHandler = new ParagraphHandler(this); + parHandler->startParagraph(attrib); + m_children.append(parHandler); +} + +void DocHandler::startSect1(const QXmlAttributes& attrib) +{ + DocSectionHandler *secHandler = new DocSectionHandler(this,1); + secHandler->startDocSection(attrib); + m_children.append(secHandler); +} + +void DocHandler::startTitle(const QXmlAttributes& attrib) +{ + TitleHandler *titleHandler = new TitleHandler(this); + titleHandler->startTitle(attrib); + m_children.append(titleHandler); +} + +void DocHandler::startInternal(const QXmlAttributes& attrib) +{ + m_internal = new DocInternalHandler(this,1); + m_internal->startInternal(attrib); +} + +IDocIterator *DocHandler::contents() const +{ + return new DocIterator(*this); +} + +IDocInternal *DocHandler::internal() const +{ + return m_internal; +} + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/graphhandler.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/graphhandler.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/graphhandler.h (revision 1322) @@ -0,0 +1,154 @@ +/****************************************************************************** + * + * $Id:$ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _GRAPHHANDLER_H +#define _GRAPHHANDLER_H + +#include "stringimpl.h" +#include "doxmlintf.h" +#include "basehandler.h" +#include "baseiterator.h" + +class NodeHandler; +class ChildNodeHandler; +class EdgeLabelHandler; + +class GraphHandler : public IGraph, public BaseHandler<GraphHandler> +{ + friend class NodeIterator; + public: + GraphHandler(IBaseHandler *parent,const char *endTag); + virtual ~GraphHandler(); + + void startGraph(const QXmlAttributes &attrib); + void endGraph(); + void startNode(const QXmlAttributes &attrib); + NodeHandler *getNodeById(const QString &id) const; + + // IGraph + virtual INodeIterator *nodes() const; + + private: + IBaseHandler *m_parent; + QList<NodeHandler> m_nodes; + QDict<NodeHandler> *m_nodeDict; +}; + +//---------------------------------------------------------------------- + +class NodeHandler : public INode, public BaseHandler<NodeHandler> +{ + friend class ChildNodeIterator; + public: + NodeHandler(GraphHandler *gh); + virtual ~NodeHandler(); + + void startNode(const QXmlAttributes &attrib); + void endNode(); + void startLabel(const QXmlAttributes &attrib); + void endLabel(); + void startLink(const QXmlAttributes &attrib); + void endLink(); + void startChildNode(const QXmlAttributes &attrib); + + // INode + virtual const IString *id() const { return &m_id; } + virtual const IString *label() const { return &m_label; } + virtual const IString *linkId() const { return &m_link; } + virtual IChildNodeIterator *children() const; + + private: + IBaseHandler *m_parent; + StringImpl m_id; + StringImpl m_label; + StringImpl m_link; + QList<ChildNodeHandler> m_children; + GraphHandler *m_graph; +}; + +class NodeIterator : public BaseIterator<INodeIterator,INode,NodeHandler> +{ + public: + NodeIterator(const GraphHandler &handler) : + BaseIterator<INodeIterator,INode,NodeHandler>(handler.m_nodes) {} +}; + +//---------------------------------------------------------------------- + +class ChildNodeHandler : public IChildNode, public BaseHandler<ChildNodeHandler> +{ + friend class EdgeLabelIterator; + public: + ChildNodeHandler(IBaseHandler *parent,GraphHandler *gh); + virtual ~ChildNodeHandler(); + + void startChildNode(const QXmlAttributes &attrib); + void endChildNode(); + void startEdgeLabel(const QXmlAttributes &attrib); + + // IChildNode + virtual INode *node() const; + virtual NodeRelation relation() const { return m_relation; } + virtual const IString * relationString() const { return &m_relationString; } + virtual IEdgeLabelIterator *edgeLabels() const; + + private: + IBaseHandler *m_parent; + QString m_id; + NodeRelation m_relation; + StringImpl m_relationString; + QList<EdgeLabelHandler> m_edgeLabels; + GraphHandler *m_graph; +}; + +class ChildNodeIterator : public BaseIterator<IChildNodeIterator,IChildNode,ChildNodeHandler> +{ + public: + ChildNodeIterator(const NodeHandler &handler) : + BaseIterator<IChildNodeIterator,IChildNode,ChildNodeHandler>(handler.m_children) {} +}; + +//---------------------------------------------------------------------- + +class EdgeLabelHandler : public IEdgeLabel, public BaseHandler<EdgeLabelHandler> +{ + friend class EdgeLabelIterator; + public: + EdgeLabelHandler(IBaseHandler *parent); + virtual ~EdgeLabelHandler(); + + void startEdgeLabel(const QXmlAttributes &attrib); + void endEdgeLabel(); + + // IEdgeLabel + virtual const IString *label() const { return &m_label; } + + private: + IBaseHandler *m_parent; + StringImpl m_label; +}; + +class EdgeLabelIterator : public BaseIterator<IEdgeLabelIterator,IEdgeLabel,EdgeLabelHandler> +{ + public: + EdgeLabelIterator(const ChildNodeHandler &handler) : + BaseIterator<IEdgeLabelIterator,IEdgeLabel,EdgeLabelHandler>(handler.m_edgeLabels) {} +}; + +void graphhandler_init(); +void graphhandler_exit(); + +#endif + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/memberhandler.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/memberhandler.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/memberhandler.cpp (revision 1322) @@ -0,0 +1,600 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include "memberhandler.h" +#include "sectionhandler.h" +#include "dochandler.h" +#include "mainhandler.h" +#include "linkedtexthandler.h" +#include "paramhandler.h" +#include "compoundhandler.h" +#include "debug.h" + +//------------------------------------------------------------------------------ + +class MemberTypeMap +{ + public: + MemberTypeMap() + { + m_map.setAutoDelete(TRUE); + m_map.insert("define",new int(IMember::Define)); + m_map.insert("property",new int(IMember::Property)); + m_map.insert("variable",new int(IMember::Variable)); + m_map.insert("typedef",new int(IMember::Typedef)); + m_map.insert("enum",new int(IMember::Enum)); + m_map.insert("function",new int(IMember::Function)); + m_map.insert("signal",new int(IMember::Signal)); + m_map.insert("prototype",new int(IMember::Prototype)); + m_map.insert("friend",new int(IMember::Friend)); + m_map.insert("dcop",new int(IMember::DCOP)); + m_map.insert("slot",new int(IMember::Slot)); + m_map.insert("enumvalue",new int(IMember::EnumValue)); + } + IMember::MemberKind map(const QString &s) + { + int *val = m_map.find(s); + if (val==0) + { + debug(1,"Warning: `%s' is an invalid member type\n",s.data()); + return IMember::Invalid; + } + else return (IMember::MemberKind)*val; + } + private: + QDict<int> m_map; +}; + +static MemberTypeMap *s_typeMap; + +void memberhandler_init() +{ + s_typeMap = new MemberTypeMap; +} + +void memberhandler_exit() +{ + delete s_typeMap; +} + +//------------------------------------------------------------------------------ + +void MemberReference::initialize(MainHandler *mh) +{ + m_mainHandler = mh; +} + +IMember *MemberReference::member() const +{ + //return m_mainHandler->memberById(m_memId); + return 0; +} + +//------------------------------------------------------------------------------ + + +#if 0 +EnumValueHandler::EnumValueHandler(IBaseHandler *parent) : + m_parent(parent), m_brief(0), m_detailed(0), m_linkedTextHandler(0) +{ + addEndHandler("enumvalue",this,&EnumValueHandler::endEnumValue); + + addStartHandler("name",this,&EnumValueHandler::startName); + addEndHandler("name",this,&EnumValueHandler::endName); + addStartHandler("initializer",this,&EnumValueHandler::startInitializer); + + addStartHandler("briefdescription",this,&EnumValueHandler::startBriefDesc); + + addStartHandler("detaileddescription",this,&EnumValueHandler::startDetailedDesc); + + m_initializer.setAutoDelete(TRUE); +} + +EnumValueHandler::~EnumValueHandler() +{ + delete m_brief; + delete m_detailed; + delete m_linkedTextHandler; +} + +void EnumValueHandler::startEnumValue(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); +} + +void EnumValueHandler::endEnumValue() +{ + m_parent->setDelegate(0); +} + +void EnumValueHandler::startName(const QXmlAttributes& /*attrib*/) +{ + m_curString=""; +} + +void EnumValueHandler::endName() +{ + m_name = m_curString; +} + +void EnumValueHandler::startInitializer(const QXmlAttributes& /*attrib*/) +{ + delete m_linkedTextHandler; + m_linkedTextHandler = new LinkedTextHandler(this,m_initializer); + m_linkedTextHandler->start("initializer"); +} + +void EnumValueHandler::startBriefDesc(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_brief = docHandler; +} + +void EnumValueHandler::startDetailedDesc(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_detailed = docHandler; +} +#endif + +//------------------------------------------------------------------------------ + +MemberHandler::MemberHandler(IBaseHandler *parent) + : m_brief(0), m_detailed(0), m_inbody(0), + m_compound(0), m_section(0), m_parent(parent) +{ + //printf("MemberHandler::MemberHandler() %p\n",this); + addEndHandler("memberdef",this,&MemberHandler::endMember); + + addStartHandler("templateparamlist",this,&MemberHandler::startTemplateParamList); + addEndHandler("templateparamlist",this,&MemberHandler::endTemplateParamList); + + addStartHandler("type",this,&MemberHandler::startType); + + addStartHandler("definition",this,&MemberHandler::startDefinition); + addEndHandler("definition",this,&MemberHandler::endDefinition); + + addStartHandler("argsstring",this,&MemberHandler::startArgsString); + addEndHandler("argsstring",this,&MemberHandler::endArgsString); + + addStartHandler("name",this,&MemberHandler::startName); + addEndHandler("name",this,&MemberHandler::endName); + + addStartHandler("read",this,&MemberHandler::startRead); + addEndHandler("read",this,&MemberHandler::endRead); + + addStartHandler("write",this,&MemberHandler::startWrite); + addEndHandler("write",this,&MemberHandler::endWrite); + + addStartHandler("reimplements",this,&MemberHandler::startReimplements); + addEndHandler("reimplements",this,&MemberHandler::endReimplements); + + addStartHandler("reimplementedby",this,&MemberHandler::startReimplementedBy); + addEndHandler("reimplementedby",this,&MemberHandler::endReimplementedBy); + + addStartHandler("param",this,&MemberHandler::startParam); + + addStartHandler("enumvalue",this,&MemberHandler::startEnumValue2); + addEndHandler("enumvalue",this,&MemberHandler::endMember); + + addStartHandler("initializer",this,&MemberHandler::startInitializer); + addStartHandler("exceptions",this,&MemberHandler::startException); + + addStartHandler("briefdescription",this,&MemberHandler::startBriefDesc); + + addStartHandler("detaileddescription",this,&MemberHandler::startDetailedDesc); + + addStartHandler("inbodydescription",this,&MemberHandler::startInbodyDesc); + + addStartHandler("location",this,&MemberHandler::startLocation); + addEndHandler("location"); + + addStartHandler("references",this,&MemberHandler::startReferences); + addEndHandler("references",this,&MemberHandler::endReferences); + + addStartHandler("referencedby",this,&MemberHandler::startReferencedBy); + addEndHandler("referencedby",this,&MemberHandler::endReferencedBy); + + m_type.setAutoDelete(TRUE); + m_initializer.setAutoDelete(TRUE); + m_exception.setAutoDelete(TRUE); + m_params.setAutoDelete(TRUE); + m_references.setAutoDelete(TRUE); + m_referencedBy.setAutoDelete(TRUE); + m_reimplements = 0; + m_reimplementedBy.setAutoDelete(TRUE); + m_enumValues.setAutoDelete(TRUE); + m_linkedTextHandler = 0; + m_defLine=0; + m_bodyStart=0; + m_bodyEnd=0; + m_insideTemplateParamList=FALSE; + m_hasTemplateParamList=FALSE; +} + +MemberHandler::~MemberHandler() +{ + debug(2,"MemberHandler::~MemberHandler() %p\n",this); + delete m_brief; + delete m_detailed; + delete m_inbody; + delete m_linkedTextHandler; + delete m_reimplements; +} + +void MemberHandler::startMember(const QXmlAttributes& attrib) +{ + m_parent->setDelegate(this); + m_kindString = attrib.value("kind"); + //printf("startMember kindString=`%s'\n",m_kindString.data()); + m_kind = s_typeMap->map(m_kindString); + m_id = attrib.value("id"); + m_protection = attrib.value("prot"); + m_isStatic = attrib.value("static")=="yes"; + m_isConst = attrib.value("const")=="yes"; + m_isExplicit = attrib.value("explicit")=="yes"; + m_isInline = attrib.value("inline")=="yes"; + m_virtualness = attrib.value("virt"); + m_isVolatile = attrib.value("volatile")=="yes"; + m_isMutable = attrib.value("mutable")=="yes"; + m_isReadable = attrib.value("readable")=="yes"; + m_isWritable = attrib.value("writable")=="yes"; + + debug(2,"member kind=`%s' id=`%s' prot=`%s' virt=`%s'\n", + m_kindString.data(),m_id.data(),m_protection.data(),m_virtualness.data()); +} + +void MemberHandler::startEnumValue(const QXmlAttributes& attrib) +{ + m_parent->setDelegate(this); + m_kindString = "enumvalue"; + //printf("startEnumValue kindString=`%s'\n",m_kindString.data()); + m_kind = s_typeMap->map(m_kindString); + m_id = attrib.value("id"); + m_protection = attrib.value("prot"); + m_isStatic = FALSE; + m_isConst = FALSE; + m_isExplicit = FALSE; + m_isInline = FALSE; + m_virtualness = "non-virtual"; + m_isVolatile = FALSE; + m_isMutable = FALSE; + m_isReadable = FALSE; + m_isWritable = FALSE; + debug(2,"member kind=`%s' id=`%s' prot=`%s' virt=`%s'\n", + m_kindString.data(),m_id.data(),m_protection.data(),m_virtualness.data()); +} + +void MemberHandler::startEnumValue2(const QXmlAttributes& attrib) +{ + MemberHandler *mh = new MemberHandler(this); + mh->startEnumValue(attrib); + m_enumValues.append(mh); +} + + +void MemberHandler::startBriefDesc(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_brief = docHandler; +} + +void MemberHandler::startDetailedDesc(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_detailed = docHandler; +} + +void MemberHandler::startInbodyDesc(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_inbody = docHandler; +} + +void MemberHandler::startLocation(const QXmlAttributes& attrib) +{ + m_defFile = attrib.value("file"); + m_bodyFile = attrib.value("bodyfile"); + QCString s; + s = attrib.value("line"); + if (!s.isEmpty()) m_defLine=s.toInt(); + s = attrib.value("bodystart"); + if (!s.isEmpty()) m_bodyStart=s.toInt(); + s = attrib.value("bodyend"); + if (!s.isEmpty()) m_bodyEnd=s.toInt(); +} + +void MemberHandler::startReferences(const QXmlAttributes& attrib) +{ + MemberReference *mr = new MemberReference; + mr->m_memId = attrib.value("refid"); + m_references.append(mr); + m_curString=""; +} + +void MemberHandler::endReferences() +{ + m_references.getLast()->m_name = m_curString; +} + +void MemberHandler::startReferencedBy(const QXmlAttributes& attrib) +{ + MemberReference *mr = new MemberReference; + mr->m_memId = attrib.value("refid"); + m_referencedBy.append(mr); + m_curString=""; +} + +void MemberHandler::endReferencedBy() +{ + m_referencedBy.getLast()->m_name = m_curString; +} + +void MemberHandler::startReimplements(const QXmlAttributes& attrib) +{ + m_reimplements = new MemberReference; + m_reimplements->m_memId = attrib.value("refid"); + m_curString=""; +} + +void MemberHandler::endReimplements() +{ + m_reimplements->m_name = m_curString; +} + +void MemberHandler::startReimplementedBy(const QXmlAttributes& attrib) +{ + MemberReference *mr = new MemberReference; + mr->m_memId = attrib.value("refid"); + m_reimplementedBy.append(mr); + m_curString=""; +} + +void MemberHandler::endReimplementedBy() +{ + m_reimplementedBy.getLast()->m_name = m_curString; +} + +void MemberHandler::endMember() +{ + m_parent->setDelegate(0); +} + +void MemberHandler::startType(const QXmlAttributes &) +{ + debug(2,"startType!\n"); + delete m_linkedTextHandler; + m_linkedTextHandler = new LinkedTextHandler(this,m_type); + m_linkedTextHandler->start("type"); +} + +void MemberHandler::startInitializer(const QXmlAttributes &) +{ + debug(2,"startInitializer!\n"); + delete m_linkedTextHandler; + m_linkedTextHandler = new LinkedTextHandler(this,m_initializer); + m_linkedTextHandler->start("initializer"); +} + +void MemberHandler::startException(const QXmlAttributes &) +{ + debug(2,"startException!\n"); + delete m_linkedTextHandler; + m_linkedTextHandler = new LinkedTextHandler(this,m_exception); + m_linkedTextHandler->start("exceptions"); +} + +void MemberHandler::startName(const QXmlAttributes &) +{ + m_curString=""; +} + +void MemberHandler::endName() +{ + m_name = m_curString.stripWhiteSpace(); + debug(2,"member name=`%s'\n",m_name.data()); +} + +void MemberHandler::startRead(const QXmlAttributes &) +{ + m_curString=""; +} + +void MemberHandler::endRead() +{ + m_read = m_curString.stripWhiteSpace(); + debug(2,"member read=`%s'\n",m_read.data()); +} + +void MemberHandler::startWrite(const QXmlAttributes &) +{ + m_curString=""; +} + +void MemberHandler::endWrite() +{ + m_write = m_curString.stripWhiteSpace(); + debug(2,"member write=`%s'\n",m_write.data()); +} + +void MemberHandler::startDefinition(const QXmlAttributes&) +{ + m_curString=""; +} + +void MemberHandler::endDefinition() +{ + m_definition = m_curString.stripWhiteSpace(); + debug(2,"definition=%s\n",m_definition.data()); +} + +void MemberHandler::startArgsString(const QXmlAttributes&) +{ + m_curString=""; +} + +void MemberHandler::endArgsString() +{ + m_argsstring = m_curString.stripWhiteSpace(); + debug(2,"arggstring=%s\n",m_argsstring.data()); +} + +void MemberHandler::startParam(const QXmlAttributes& attrib) +{ + ParamHandler *paramHandler = new ParamHandler(this); + paramHandler->startParam(attrib); + if (m_insideTemplateParamList) + { + m_templateParams.append(paramHandler); + } + else + { + m_params.append(paramHandler); + } +} + +void MemberHandler::startTemplateParamList(const QXmlAttributes&) +{ + m_insideTemplateParamList = TRUE; + m_hasTemplateParamList = TRUE; +} + +void MemberHandler::endTemplateParamList() +{ + m_insideTemplateParamList = FALSE; +} + +void MemberHandler::initialize(MainHandler *mh) +{ + { + QListIterator<MemberReference> mli(m_references); + MemberReference *mr; + for (;(mr=mli.current());++mli) + { + mr->initialize(mh); + } + } + { + QListIterator<MemberReference> mli(m_referencedBy); + MemberReference *mr; + for (;(mr=mli.current());++mli) + { + mr->initialize(mh); + } + } + { + QListIterator<MemberReference> mli(m_reimplementedBy); + MemberReference *mr; + for (;(mr=mli.current());++mli) + { + mr->initialize(mh); + } + } + if (m_reimplements) m_reimplements->initialize(mh); +} + +void MemberHandler::setCompoundHandler(CompoundHandler *c) +{ + m_compound = c; +} + +ICompound *MemberHandler::compound() const +{ + m_compound->addref(); + return m_compound->toICompound(); +} + +void MemberHandler::setSectionHandler(SectionHandler *c) +{ + m_section = c; +} + +ISection *MemberHandler::section() const +{ + return m_section; +} + +IMemberIterator *MemberHandler::enumValues() const +{ + return new MemberIterator(m_enumValues); +} + +ILinkedTextIterator *MemberHandler::type() const +{ + return new LinkedTextIterator(m_type); +} + +const IString *MemberHandler::typeString() const +{ + MemberHandler *that = (MemberHandler *)this; + that->m_typeString = LinkedTextHandler::toString(m_type); + return &m_typeString; +} + +IParamIterator *MemberHandler::parameters() const +{ + return new ParamIterator(m_params); +} + +IParamIterator *MemberHandler::templateParameters() const +{ + return m_hasTemplateParamList ? new ParamIterator(m_templateParams) : 0; +} + +IMemberReferenceIterator *MemberHandler::references() const +{ + return new MemberReferenceIterator(m_references); +} + +IMemberReferenceIterator *MemberHandler::referencedBy() const +{ + return new MemberReferenceIterator(m_referencedBy); +} + +ILinkedTextIterator *MemberHandler::initializer() const +{ + return new LinkedTextIterator(m_initializer); +} + +ILinkedTextIterator *MemberHandler::exceptions() const +{ + return new LinkedTextIterator(m_exception); +} + +IMemberReferenceIterator *MemberHandler::reimplementedBy() const +{ + return new MemberReferenceIterator(m_reimplementedBy); +} + +IDocRoot *MemberHandler::briefDescription() const +{ + return m_brief; +} + +IDocRoot *MemberHandler::detailedDescription() const +{ + return m_detailed; +} + +IDocRoot *MemberHandler::inbodyDescription() const +{ + return m_inbody; +} + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/sectionhandler.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/sectionhandler.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/sectionhandler.h (revision 1322) @@ -0,0 +1,102 @@ +/****************************************************************************** + * + * $Id:$ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _SECTIONHANDLER_H +#define _SECTIONHANDLER_H + +#include <qstring.h> +#include <qlist.h> +#include <qxml.h> +#include <doxmlintf.h> + +#include "basehandler.h" + +class SectionIterator : + public BaseIterator<ISectionIterator,ISection,SectionHandler> +{ + public: + SectionIterator(const QList<SectionHandler> &list) : + BaseIterator<ISectionIterator,ISection,SectionHandler>(list) {} +}; + + +class SectionHandler : public IUserDefined, public BaseHandler<SectionHandler> +{ + public: + virtual void startMember(const QXmlAttributes& attrib); + virtual void startHeader(const QXmlAttributes& attrib); + virtual void startSection(const QXmlAttributes& attrib); + virtual void startDescription(const QXmlAttributes& attrib); + virtual void endSection(); + virtual void endHeader(); + + SectionHandler(IBaseHandler *parent); + virtual ~SectionHandler(); + + // ISection + virtual const IString *kindString() const + { return &m_kindString; } + virtual SectionKind kind() const + { return m_kind; } + IDocRoot *description() const; + virtual IMemberIterator *members() const; + virtual bool isStatic() const + { + return m_kind==PubStatFuncs || m_kind==PubStatAttribs || + m_kind==ProStatFuncs || m_kind==ProStatAttribs || + m_kind==PriStatFuncs || m_kind==PriStatAttribs; + } + virtual bool isPublic() const + { + return !isProtected() && !isPrivate(); + } + virtual bool isProtected() const + { + return m_kind==ProTypes || m_kind==ProFuncs || m_kind==ProAttribs || + m_kind==ProSlots || m_kind==ProStatFuncs || m_kind==ProStatAttribs; + } + virtual bool isPrivate() const + { + return m_kind==PriTypes || m_kind==PriFuncs || m_kind==PriAttribs || + m_kind==PriSlots || m_kind==PriStatFuncs || m_kind==PriStatAttribs; + } + + void initialize(CompoundHandler *c); + + // IUserDefined implementation + virtual const IString *header() const + { + return &m_header; + } + + private: + IBaseHandler *m_parent; + + // XML elements: + // ------------- + StringImpl m_header; // header + DocHandler* m_description; // description + QList<MemberHandler> m_members; // memberdef + + // XML attributes: + // --------------- + SectionKind m_kind; // kind + StringImpl m_kindString; // kind as a string +}; + +void sectionhandler_init(); +void sectionhandler_exit(); + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/basehandler.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/basehandler.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/basehandler.cpp (revision 1322) @@ -0,0 +1,3 @@ +#include "basehandler.h" + +QXmlLocator * LocatorContainer::s_theLocator=0; Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/dochandler.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/dochandler.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/dochandler.h (revision 1322) @@ -0,0 +1,1352 @@ +/****************************************************************************** + * + * $Id:$ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _DOCHANDLER_H +#define _DOCHANDLER_H + +#include <qstring.h> +#include <qlist.h> +#include <qxml.h> + +#include <doxmlintf.h> +#include "stringimpl.h" +#include "basehandler.h" +#include "baseiterator.h" + +class ParagraphHandler; +class DocInternalHandler; +class LinkedTextImpl; +class LinkedTextHandler; + +//----------------------------------------------------------------------------- + +class DocImpl : public IDoc { public: virtual ~DocImpl() {} }; + +#define DEFINE_CLS_IMPL(cls) \ + class cls##Impl : public I##cls, public DocImpl { public: virtual ~cls##Impl() {} } + +DEFINE_CLS_IMPL(DocMarkup); +DEFINE_CLS_IMPL(DocPara); +DEFINE_CLS_IMPL(DocText); +DEFINE_CLS_IMPL(DocMarkupModifier); +DEFINE_CLS_IMPL(DocItemizedList); +DEFINE_CLS_IMPL(DocOrderedList); +DEFINE_CLS_IMPL(DocListItem); +DEFINE_CLS_IMPL(DocParameterList); +DEFINE_CLS_IMPL(DocParameterItem); +DEFINE_CLS_IMPL(DocParameter); +DEFINE_CLS_IMPL(DocTitle); +DEFINE_CLS_IMPL(DocSimpleSect); +DEFINE_CLS_IMPL(DocRef); +DEFINE_CLS_IMPL(DocVariableList); +DEFINE_CLS_IMPL(DocVariableListEntry); +DEFINE_CLS_IMPL(DocHRuler); +DEFINE_CLS_IMPL(DocLineBreak); +DEFINE_CLS_IMPL(DocULink); +DEFINE_CLS_IMPL(DocEMail); +DEFINE_CLS_IMPL(DocLink); +DEFINE_CLS_IMPL(DocProgramListing); +DEFINE_CLS_IMPL(DocCodeLine); +DEFINE_CLS_IMPL(DocHighlight); +DEFINE_CLS_IMPL(DocFormula); +DEFINE_CLS_IMPL(DocImage); +DEFINE_CLS_IMPL(DocDotFile); +DEFINE_CLS_IMPL(DocIndexEntry); +DEFINE_CLS_IMPL(DocTable); +DEFINE_CLS_IMPL(DocRow); +DEFINE_CLS_IMPL(DocEntry); +DEFINE_CLS_IMPL(DocSection); +DEFINE_CLS_IMPL(DocVerbatim); +DEFINE_CLS_IMPL(DocCopy); +DEFINE_CLS_IMPL(DocTocList); +DEFINE_CLS_IMPL(DocTocItem); +DEFINE_CLS_IMPL(DocAnchor); +DEFINE_CLS_IMPL(DocSymbol); +DEFINE_CLS_IMPL(DocInternal); +DEFINE_CLS_IMPL(DocRoot); + +//----------------------------------------------------------------------------- + + +/*! \brief Node representing a piece of text. + * + */ +class TextNode : public DocTextImpl +{ + public: + TextNode(const QString &t,int markup,int level) + : m_text(t), m_markup(markup), m_headingLevel(level) {} + virtual ~TextNode() {} + + // IDocText + virtual Kind kind() const { return DocImpl::Text; } + virtual const IString *text() const { return &m_text; } + virtual int markup() const { return m_markup; } + virtual int headingLevel() const { return m_headingLevel; } + + private: + StringImpl m_text; + int m_markup; + int m_headingLevel; +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a change in the markup style. + * + */ +class MarkupModifierNode : public DocMarkupModifierImpl +{ + public: + MarkupModifierNode(int markup,bool enabled,int level=0) + : m_markup(markup), m_enabled(enabled), m_headingLevel(level) {} + virtual ~MarkupModifierNode() {} + + // IDocMarkupModifier + virtual Kind kind() const { return DocImpl::MarkupModifier; } + virtual bool enabled() const { return m_enabled; } + virtual int markup() const { return m_markup; } + virtual int headingLevel() const { return m_headingLevel; } + + private: + int m_markup; + bool m_enabled; + int m_headingLevel; +}; + + +//----------------------------------------------------------------------------- + +/*! \brief Handles markup commands in the XML input. + * + */ +class MarkupHandler : public BaseFallBackHandler<MarkupHandler> +{ + public: + MarkupHandler(QList<DocImpl> &children,QString &curString); + virtual ~MarkupHandler(); + int markup() const { return m_curMarkup; } + int headingLevel() const { return m_headingLevel; } + + virtual void startBold(const QXmlAttributes &attrib); + virtual void endBold(); + virtual void startEmphasis(const QXmlAttributes &attrib); + virtual void endEmphasis(); + virtual void startComputerOutput(const QXmlAttributes &attrib); + virtual void endComputerOutput(); + virtual void startCenter(const QXmlAttributes &attrib); + virtual void endCenter(); + virtual void startSmallFont(const QXmlAttributes &attrib); + virtual void endSmallFont(); + virtual void startSubscript(const QXmlAttributes &attrib); + virtual void endSubscript(); + virtual void startSuperscript(const QXmlAttributes &attrib); + virtual void endSuperscript(); + virtual void startPreformatted(const QXmlAttributes &attrib); + virtual void endPreformatted(); + virtual void startHeading1(const QXmlAttributes &attrib); + virtual void endHeading1(); + virtual void startHeading2(const QXmlAttributes &attrib); + virtual void endHeading2(); + virtual void startHeading3(const QXmlAttributes &attrib); + virtual void endHeading3(); + virtual void startHeading4(const QXmlAttributes &attrib); + virtual void endHeading4(); + virtual void startHeading5(const QXmlAttributes &attrib); + virtual void endHeading5(); + virtual void startHeading6(const QXmlAttributes &attrib); + virtual void endHeading6(); + + + private: + void addTextNode(); + + QList<DocImpl> &m_children; + QString &m_curString; + int m_curMarkup; + int m_headingLevel; +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a paragraph of text and commands. + * + */ +// children: itemizedlist, orderedlist, parameterlist, simplesect, ref, +// variablelist, hruler, linebreak, ulink, email, link +// programlisting, formula, image, dotfile, indexentry, +// table +// +// children handled by MarkupHandler: +// bold, computeroutput, emphasis, center, +// small, subscript, superscript. +// +class ParagraphHandler : public DocParaImpl, + public BaseHandler<ParagraphHandler> +{ + friend class ParagraphIterator; + + public: + virtual void startParagraph(const QXmlAttributes& attrib); + virtual void endParagraph(); + virtual void startItemizedList(const QXmlAttributes& attrib); + virtual void startOrderedList(const QXmlAttributes& attrib); + virtual void startParameterList(const QXmlAttributes& attrib); + virtual void startSimpleSect(const QXmlAttributes& attrib); + virtual void startRef(const QXmlAttributes& attrib); + virtual void startVariableList(const QXmlAttributes& attrib); + virtual void startHRuler(const QXmlAttributes& attrib); + virtual void startLineBreak(const QXmlAttributes& attrib); + virtual void startULink(const QXmlAttributes& attrib); + virtual void startEMail(const QXmlAttributes& attrib); + virtual void startLink(const QXmlAttributes& attrib); + virtual void startProgramListing(const QXmlAttributes& attrib); + virtual void startFormula(const QXmlAttributes& attrib); + virtual void startImage(const QXmlAttributes& attrib); + virtual void startDotFile(const QXmlAttributes& attrib); + virtual void startIndexEntry(const QXmlAttributes& attrib); + virtual void startTable(const QXmlAttributes& attrib); + virtual void startVerbatim(const QXmlAttributes& attrib); + virtual void startHtmlOnly(const QXmlAttributes& attrib); + virtual void startLatexOnly(const QXmlAttributes& attrib); + virtual void startUmlaut(const QXmlAttributes& attrib); + virtual void startAcute(const QXmlAttributes& attrib); + virtual void startGrave(const QXmlAttributes& attrib); + virtual void startCirc(const QXmlAttributes& attrib); + virtual void startTilde(const QXmlAttributes& attrib); + virtual void startSzlig(const QXmlAttributes& attrib); + virtual void startCedil(const QXmlAttributes& attrib); + virtual void startRing(const QXmlAttributes& attrib); + virtual void startNbsp(const QXmlAttributes& attrib); + virtual void startCopy(const QXmlAttributes& attrib); + virtual void startAnchor(const QXmlAttributes& attrib); + virtual void startCopyDoc(const QXmlAttributes& attrib); + virtual void startTocList(const QXmlAttributes& attrib); + + ParagraphHandler(IBaseHandler *parent); + virtual ~ParagraphHandler(); + + // IDocPara + virtual Kind kind() const { return DocImpl::Para; } + virtual IDocIterator *contents() const; + + private: + void addTextNode(); + IBaseHandler *m_parent; + QList<DocImpl> m_children; + MarkupHandler *m_markupHandler; +}; + +class ParagraphIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + ParagraphIterator(const ParagraphHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a list item. + * + */ +class ListItemHandler : public DocListItemImpl, public BaseHandler<ListItemHandler> +{ + friend class ListItemIterator; + public: + ListItemHandler(IBaseHandler *parent); + virtual ~ListItemHandler(); + virtual void startListItem(const QXmlAttributes& attrib); + virtual void endListItem(); + virtual void startParagraph(const QXmlAttributes& attrib); + + // IDocItem + virtual Kind kind() const { return DocImpl::ListItem; } + virtual IDocIterator *contents() const; + + private: + IBaseHandler *m_parent; + QList<DocImpl> m_children; +}; + +class ListItemIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + ListItemIterator(const ListItemHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + + +//----------------------------------------------------------------------------- + +/*! \brief Node representing list of items. + * + */ +class OrderedListHandler : public DocOrderedListImpl, public BaseHandler<OrderedListHandler> +{ + friend class OrderedListIterator; + public: + OrderedListHandler(IBaseHandler *parent); + virtual ~OrderedListHandler(); + virtual void startOrderedList(const QXmlAttributes& attrib); + virtual void endOrderedList(); + virtual void startOrderedListItem(const QXmlAttributes& attrib); + + // IDocOrderedList + virtual Kind kind() const { return DocImpl::OrderedList; } + virtual IDocIterator *elements() const; + + private: + IBaseHandler *m_parent; + QList<DocImpl> m_children; +}; + +class OrderedListIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + OrderedListIterator(const OrderedListHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing table of contents list. + * + */ +class TocListHandler : public DocTocListImpl, public BaseHandler<TocListHandler> +{ + friend class TocListIterator; + public: + TocListHandler(IBaseHandler *parent); + virtual ~TocListHandler(); + virtual void startTocList(const QXmlAttributes& attrib); + virtual void endTocList(); + virtual void startTocItem(const QXmlAttributes& attrib); + + // IDocTocList + virtual Kind kind() const { return DocImpl::TocList; } + virtual IDocIterator *elements() const; + + private: + IBaseHandler *m_parent; + QList<DocImpl> m_children; +}; + +class TocListIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + TocListIterator(const TocListHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a table of contents item. + * + */ +class TocItemHandler : public DocTocItemImpl, public BaseHandler<TocItemHandler> +{ + friend class TocItemIterator; + public: + TocItemHandler(IBaseHandler *parent); + virtual ~TocItemHandler(); + virtual void startTocItem(const QXmlAttributes& attrib); + virtual void endTocItem(); + + // IDocItem + virtual Kind kind() const { return DocImpl::TocItem; } + virtual const IString *id() const { return &m_id; } + virtual const IString *title() const { return &m_title; } + + private: + IBaseHandler *m_parent; + StringImpl m_id; + StringImpl m_title; +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing list of items. + * + */ +class ItemizedListHandler : public DocItemizedListImpl, public BaseHandler<ItemizedListHandler> +{ + friend class ItemizedListIterator; + public: + ItemizedListHandler(IBaseHandler *parent); + virtual ~ItemizedListHandler(); + virtual void startItemizedList(const QXmlAttributes& attrib); + virtual void endItemizedList(); + virtual void startItemizedListItem(const QXmlAttributes& attrib); + + // IDocItemizedList + virtual Kind kind() const { return DocImpl::ItemizedList; } + virtual IDocIterator *elements() const; + + private: + IBaseHandler *m_parent; + QList<DocImpl> m_children; +}; + +class ItemizedListIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + ItemizedListIterator(const ItemizedListHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + + +//----------------------------------------------------------------------------- +/*! \brief Node representing a parameter. + * + */ +class ParameterHandler : public DocParameterImpl, + public BaseHandler<ParameterHandler> +{ + public: + ParameterHandler(IBaseHandler *parent); + virtual ~ParameterHandler(); + virtual void startParameterName(const QXmlAttributes& attrib); + virtual void endParameterName(); + + // IDocParameter + virtual Kind kind() const { return DocImpl::Parameter; } + virtual const IString *name() const { return &m_name; } + + private: + IBaseHandler *m_parent; + StringImpl m_name; +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing a list of param names with a single description. + * + */ +class ParameterItemHandler : public DocParameterItemImpl, + public BaseHandler<ParameterItemHandler> +{ + friend class ParameterItemIterator; + public: + ParameterItemHandler(IBaseHandler *parent); + virtual ~ParameterItemHandler(); + virtual void startParameterItem(const QXmlAttributes& attrib); + virtual void endParameterItem(); + virtual void startParameterName(const QXmlAttributes& attrib); + virtual void startParagraph(const QXmlAttributes& attrib); + + // IDocParameterItem + virtual Kind kind() const { return DocImpl::ParameterItem; } + virtual IDocIterator *paramNames() const; + virtual IDocPara *description() const { return m_description; } + + private: + IBaseHandler *m_parent; + QList<ParameterHandler> m_parameters; + ParagraphHandler *m_description; +}; + +class ParameterItemIterator : public BaseIteratorVia<IDocIterator,IDoc,ParameterHandler,DocImpl> +{ + public: + ParameterItemIterator(const ParameterItemHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,ParameterHandler,DocImpl>(handler.m_parameters) {} +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing a parameter section. + * + */ +class ParameterListHandler : public DocParameterListImpl, + public BaseHandler<ParameterListHandler> +{ + friend class ParameterListIterator; + public: + ParameterListHandler(IBaseHandler *parent); + virtual ~ParameterListHandler(); + virtual void startParameterList(const QXmlAttributes& attrib); + virtual void endParameterList(); + virtual void startParameterItem(const QXmlAttributes& attrib); + + // IDocParameterList + virtual Kind kind() const { return DocImpl::ParameterList; } + virtual Types sectType() const { return m_type; } + virtual IDocIterator *params() const; + + private: + IBaseHandler *m_parent; + QList<ParameterItemHandler> m_paramItems; + Types m_type; +}; + +class ParameterListIterator : public BaseIteratorVia<IDocIterator,IDoc,ParameterItemHandler,DocImpl> +{ + public: + ParameterListIterator(const ParameterListHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,ParameterItemHandler,DocImpl>(handler.m_paramItems) {} +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing a horizontal ruler + * + */ +class LineBreakHandler : public DocLineBreakImpl, public BaseHandler<LineBreakHandler> +{ + public: + LineBreakHandler(IBaseHandler *parent); + virtual ~LineBreakHandler(); + + void startLineBreak(const QXmlAttributes& attrib); + void endLineBreak(); + + // IDocLineBreak + virtual Kind kind() const { return DocImpl::LineBreak; } + + private: + IBaseHandler *m_parent; +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing a link to section + * + */ +class LinkHandler : public DocLinkImpl, public BaseHandler<LinkHandler> +{ + public: + LinkHandler(IBaseHandler *parent); + virtual ~LinkHandler(); + + void startLink(const QXmlAttributes& attrib); + void endLink(); + + // IDocLink + virtual Kind kind() const { return DocImpl::Link; } + virtual const IString *refId() const { return &m_ref; } + virtual const IString *text() const { return &m_text; } + + private: + IBaseHandler *m_parent; + StringImpl m_ref; + StringImpl m_text; +}; + + +//----------------------------------------------------------------------------- + +/* \brief Node representing a link to an email address + * + */ +class EMailHandler : public DocEMailImpl, public BaseHandler<EMailHandler> +{ + public: + EMailHandler(IBaseHandler *parent); + virtual ~EMailHandler(); + + void startEMail(const QXmlAttributes& attrib); + void endEMail(); + + // IDocEMail + virtual Kind kind() const { return DocImpl::EMail; } + virtual const IString *address() const { return &m_address; } + + private: + IBaseHandler *m_parent; + StringImpl m_address; +}; + + +//----------------------------------------------------------------------------- + +/* \brief Node representing a link to an URL + * + */ +class ULinkHandler : public DocULinkImpl, public BaseHandler<ULinkHandler> +{ + public: + ULinkHandler(IBaseHandler *parent); + virtual ~ULinkHandler(); + + void startULink(const QXmlAttributes& attrib); + void endULink(); + + // IDocULink + virtual Kind kind() const { return DocImpl::ULink; } + virtual const IString * url() const { return &m_url; } + virtual const IString * text() const { return &m_text; } + + private: + IBaseHandler *m_parent; + StringImpl m_url; + StringImpl m_text; +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing a horizontal ruler + * + */ +class HRulerHandler : public DocHRulerImpl, public BaseHandler<HRulerHandler> +{ + public: + HRulerHandler(IBaseHandler *parent); + virtual ~HRulerHandler(); + + void startHRuler(const QXmlAttributes& attrib); + void endHRuler(); + + // IDocHRuler + virtual Kind kind() const { return DocImpl::HRuler; } + + private: + IBaseHandler *m_parent; +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing a reference to another item + * + */ +class RefHandler : public DocRefImpl, public BaseHandler<RefHandler> +{ + public: + RefHandler(IBaseHandler *parent); + virtual ~RefHandler(); + void startRef(const QXmlAttributes& attrib); + void endRef(); + + // IDocRef + virtual Kind kind() const { return DocImpl::Ref; } + virtual const IString *refId() const { return &m_refId; } + virtual TargetKind targetKind() const { return m_targetKind; } + virtual const IString *external() const { return &m_extId; } + virtual const IString *text() const { return &m_linkText; } + + private: + IBaseHandler *m_parent; + StringImpl m_refId; + StringImpl m_extId; + StringImpl m_linkText; + TargetKind m_targetKind; +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing the title of a section + * + */ +// children: text, ref +// children handled by MarkupHandler: +// bold, computeroutput, emphasis, center, +// small, subscript, superscript. +class TitleHandler : public DocTitleImpl, public BaseHandler<TitleHandler> +{ + friend class TitleIterator; + public: + TitleHandler(IBaseHandler *parent); + virtual ~TitleHandler(); + virtual void startTitle(const QXmlAttributes& attrib); + virtual void endTitle(); + virtual void startRef(const QXmlAttributes& attrib); + void addTextNode(); + + // IDocTitle + virtual Kind kind() const { return DocImpl::Title; } + virtual IDocIterator *title() const; + + private: + IBaseHandler *m_parent; + QList<DocImpl> m_children; + MarkupHandler *m_markupHandler; +}; + +class TitleIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + TitleIterator(const TitleHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing a simple section with an unnumbered header. + * + */ +// children: title, para +class SimpleSectHandler : public DocSimpleSectImpl, + public BaseHandler<SimpleSectHandler> +{ + public: + SimpleSectHandler(IBaseHandler *parent); + virtual ~SimpleSectHandler(); + virtual void startSimpleSect(const QXmlAttributes& attrib); + virtual void endSimpleSect(); + virtual void startTitle(const QXmlAttributes& attrib); + virtual void startParagraph(const QXmlAttributes& attrib); + + // IDocSimpleSect + virtual Kind kind() const { return DocImpl::SimpleSect; } + virtual Types type() const { return m_type; } + virtual const IString *typeString() const { return &m_typeString; } + virtual IDocTitle *title() const { return m_title; } + virtual IDocPara *description() const { return m_paragraph; } + + private: + IBaseHandler *m_parent; + ParagraphHandler *m_paragraph; + Types m_type; + StringImpl m_typeString; + TitleHandler *m_title; +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing an named item of a VariableList. + * + */ +class VariableListEntryHandler : public DocVariableListEntryImpl, + public BaseHandler<VariableListEntryHandler> +{ + public: + virtual void startVarListEntry(const QXmlAttributes& attrib); + virtual void endVarListEntry(); + virtual void startListItem(const QXmlAttributes& attrib); + virtual void endListItem(); + virtual void startTerm(const QXmlAttributes& attrib); + virtual void endTerm(); + virtual void startParagraph(const QXmlAttributes& attrib); + + VariableListEntryHandler(IBaseHandler *parent); + virtual ~VariableListEntryHandler(); + + // IDocVariableListEntry + virtual Kind kind() const { return DocImpl::VariableListEntry; } + virtual ILinkedTextIterator *term() const; + virtual IDocPara *description() const { return m_description; } + + private: + IBaseHandler* m_parent; + QList<LinkedTextImpl> m_term; + ParagraphHandler* m_description; + LinkedTextHandler* m_linkedTextHandler; +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a list of named items. + * + */ +// children: varlistentry, listitem +class VariableListHandler : public DocVariableListImpl, + public BaseHandler<VariableListHandler> +{ + friend class VariableListIterator; + + public: + virtual void startVariableList(const QXmlAttributes& attrib); + virtual void endVariableList(); + virtual void startVarListEntry(const QXmlAttributes& attrib); + virtual void startListItem(const QXmlAttributes& attrib); + + VariableListHandler(IBaseHandler *parent); + virtual ~VariableListHandler(); + + // IDocVariableList + virtual Kind kind() const { return DocImpl::VariableList; } + virtual IDocIterator *entries() const; + + private: + IBaseHandler *m_parent; + QList<VariableListEntryHandler> m_entries; + VariableListEntryHandler *m_curEntry; +}; + +class VariableListIterator : public BaseIteratorVia<IDocIterator,IDoc,VariableListEntryHandler,DocImpl> +{ + public: + VariableListIterator(const VariableListHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,VariableListEntryHandler,DocImpl>(handler.m_entries) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a highlighted text fragment. + * + */ +// children: ref +class HighlightHandler : public DocHighlightImpl, public BaseHandler<HighlightHandler> +{ + friend class HighlightIterator; + public: + HighlightHandler(IBaseHandler *parent); + virtual ~HighlightHandler(); + void startHighlight(const QXmlAttributes& attrib); + void endHighlight(); + virtual void startRef(const QXmlAttributes&); + virtual void startSpace(const QXmlAttributes&); + + // IDocHighlight + virtual Kind kind() const { return DocImpl::Highlight; } + virtual HighlightKind highlightKind() const { return m_hl; } + virtual IDocIterator *codeElements() const; + + private: + void addTextNode(); + + IBaseHandler *m_parent; + HighlightKind m_hl; + QString m_hlString; + QList<DocImpl> m_children; +}; + +class HighlightIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + HighlightIterator(const HighlightHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a line of code. + * + */ +// children: linenumber, highlight, anchor, ref +class CodeLineHandler : public DocCodeLineImpl, public BaseHandler<CodeLineHandler> +{ + friend class CodeLineIterator; + public: + + virtual void startCodeLine(const QXmlAttributes&); + virtual void endCodeLine(); + virtual void startLineNumber(const QXmlAttributes&); + virtual void endLineNumber(); + virtual void startHighlight(const QXmlAttributes&); + virtual void startRef(const QXmlAttributes&); + + CodeLineHandler(IBaseHandler *parent); + virtual ~CodeLineHandler(); + + // IDocCodeLine + virtual Kind kind() const { return DocImpl::CodeLine; } + virtual int lineNumber() const { return m_lineNumber; } + virtual const IString *refId() const { return &m_refId; } + virtual IDocIterator *codeElements() const; + + private: + void addTextNode(); + + IBaseHandler *m_parent; + int m_lineNumber; + StringImpl m_refId; + QList<DocImpl> m_children; +}; + +class CodeLineIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + CodeLineIterator(const CodeLineHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a program listing + * + */ +// children: codeline, linenumber +class ProgramListingHandler : public DocProgramListingImpl, public BaseHandler<ProgramListingHandler> +{ + friend class ProgramListingIterator; + public: + virtual void startProgramListing(const QXmlAttributes& attrib); + virtual void endProgramListing(); + virtual void startCodeLine(const QXmlAttributes&); + virtual void startLineNumber(const QXmlAttributes&); + + ProgramListingHandler(IBaseHandler *parent); + virtual ~ProgramListingHandler(); + + // IDocProgramListing + virtual Kind kind() const { return DocImpl::ProgramListing; } + virtual IDocIterator *codeLines() const; + + private: + IBaseHandler *m_parent; + QList<CodeLineHandler> m_children; + bool m_hasLineNumber; +}; + +//----------------------------------------------------------------------------- + +class ProgramListingIterator : public BaseIteratorVia<IDocIterator,IDoc,CodeLineHandler,DocImpl> +{ + public: + ProgramListingIterator(const ProgramListingHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,CodeLineHandler,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a formula. + * + */ +// children: - +class FormulaHandler : public DocFormulaImpl, public BaseHandler<FormulaHandler> +{ + public: + FormulaHandler(IBaseHandler *parent); + virtual ~FormulaHandler(); + void startFormula(const QXmlAttributes& attrib); + void endFormula(); + + // IDocFormula + virtual Kind kind() const { return DocImpl::Formula; } + virtual const IString *id() const { return &m_id; } + virtual const IString *text() const { return &m_text; } + + private: + IBaseHandler *m_parent; + StringImpl m_id; + StringImpl m_text; +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing an image. + * + */ +// children: - +class ImageHandler : public DocImageImpl, public BaseHandler<ImageHandler> +{ + public: + ImageHandler(IBaseHandler *parent); + virtual ~ImageHandler(); + void startImage(const QXmlAttributes& attrib); + void endImage(); + + // IDocImage + virtual Kind kind() const { return DocImpl::Image; } + virtual const IString *name() const { return &m_name; } + virtual const IString *caption() const { return &m_caption; } + + private: + IBaseHandler *m_parent; + StringImpl m_name; + StringImpl m_caption; +}; + + +//----------------------------------------------------------------------------- +/*! \brief Node representing an anchor. + * + */ +// children: - +class AnchorHandler : public DocAnchorImpl, public BaseHandler<AnchorHandler> +{ + public: + AnchorHandler(IBaseHandler *parent); + virtual ~AnchorHandler(); + void startAnchor(const QXmlAttributes& attrib); + void endAnchor(); + + // IDocAnchor + virtual Kind kind() const { return DocImpl::Anchor; } + virtual const IString *id() const { return &m_id; } + + private: + IBaseHandler *m_parent; + StringImpl m_id; +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a dot file. + * + */ +// children: - +class DotFileHandler : public DocDotFileImpl, public BaseHandler<DotFileHandler> +{ + public: + DotFileHandler(IBaseHandler *parent); + virtual ~DotFileHandler(); + void startDotFile(const QXmlAttributes& attrib); + void endDotFile(); + + // IDocDotFile + virtual Kind kind() const { return DocImpl::DotFile; } + virtual const IString *name() const { return &m_name; } + virtual const IString *caption() const { return &m_caption; } + + private: + IBaseHandler *m_parent; + StringImpl m_name; + StringImpl m_caption; +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing an entry in the index. + * + */ +// children: - +class IndexEntryHandler : public DocIndexEntryImpl, public BaseHandler<IndexEntryHandler> +{ + public: + IndexEntryHandler(IBaseHandler *parent); + virtual ~IndexEntryHandler(); + void startIndexEntry(const QXmlAttributes& attrib); + void endIndexEntry(); + void startPrimaryIE(const QXmlAttributes& attrib); + void endPrimaryIE(); + void startSecondaryIE(const QXmlAttributes& attrib); + void endSecondaryIE(); + + // IDocIndexEntry + virtual Kind kind() const { return DocImpl::IndexEntry; } + virtual const IString *primary() const { return &m_primary; } + virtual const IString *secondary() const { return &m_secondary; } + + private: + IBaseHandler *m_parent; + StringImpl m_primary; + StringImpl m_secondary; +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing an entry in the table entry. + * + */ +// children: para +class EntryHandler : public DocEntryImpl, public BaseHandler<EntryHandler> +{ + friend class EntryIterator; + public: + EntryHandler(IBaseHandler *parent); + virtual ~EntryHandler(); + void startEntry(const QXmlAttributes& attrib); + void endEntry(); + void startParagraph(const QXmlAttributes& attrib); + + // IDocEntry + virtual Kind kind() const { return DocImpl::Entry; } + virtual IDocIterator *contents() const; + + private: + IBaseHandler *m_parent; + QList<DocImpl> m_children; +}; + +class EntryIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + EntryIterator(const EntryHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing an entry in the table row. + * + */ +// children: entry +class RowHandler : public DocRowImpl, public BaseHandler<RowHandler> +{ + friend class RowIterator; + public: + RowHandler(IBaseHandler *parent); + virtual ~RowHandler(); + void startRow(const QXmlAttributes& attrib); + void endRow(); + void startEntry(const QXmlAttributes& attrib); + + // IDocRow + virtual Kind kind() const { return DocImpl::Row; } + virtual IDocIterator *entries() const; + + private: + IBaseHandler *m_parent; + QList<EntryHandler> m_children; +}; + +class RowIterator : public BaseIteratorVia<IDocIterator,IDoc,EntryHandler,DocImpl> +{ + public: + RowIterator(const RowHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,EntryHandler,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing an entry in the table. + * + */ +// children: row, caption +class TableHandler : public DocTableImpl, public BaseHandler<TableHandler> +{ + friend class TableIterator; + public: + TableHandler(IBaseHandler *parent); + virtual ~TableHandler(); + void startTable(const QXmlAttributes& attrib); + void endTable(); + void startRow(const QXmlAttributes& attrib); + void startCaption(const QXmlAttributes& attrib); + void endCaption(); + + // IDocTable + virtual Kind kind() const { return DocImpl::Table; } + virtual IDocIterator *rows() const; + virtual int numColumns() const { return m_numColumns; } + virtual const IString *caption() const { return &m_caption; } + + private: + IBaseHandler *m_parent; + QList<RowHandler> m_children; + int m_numColumns; + StringImpl m_caption; +}; + +class TableIterator : public BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImpl> +{ + public: + TableIterator(const TableHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a copied piece of documentation. + * + */ +class CopyHandler : public DocCopyImpl, public BaseHandler<CopyHandler> +{ + friend class CopyIterator; + public: + CopyHandler(IBaseHandler *parent); + virtual ~CopyHandler(); + virtual void startCopy(const QXmlAttributes& attrib); + virtual void endCopy(); + virtual void startParagraph(const QXmlAttributes& attrib); + + // IDocCopy + virtual Kind kind() const { return DocImpl::Copy; } + virtual IDocIterator *contents() const; + + private: + IBaseHandler *m_parent; + QList<DocImpl> m_children; +}; + +class CopyIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + CopyIterator(const CopyHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing an preformatted section + */ +class VerbatimHandler : public DocVerbatimImpl, + public BaseHandler<VerbatimHandler> +{ + public: + VerbatimHandler(IBaseHandler *parent); + virtual ~VerbatimHandler(); + void startVerbatim(const QXmlAttributes& attrib,Types type); + void endVerbatim(); + + // IDocVerbatim + virtual Kind kind() const { return DocImpl::Verbatim; } + virtual const IString *text() const { return &m_text; } + virtual Types type() const { return m_type; } + + private: + IBaseHandler *m_parent; + StringImpl m_text; + Types m_type; +}; + + +//----------------------------------------------------------------------------- + +/*! \brief Node representing an special symbol. + * + */ +// children: - +class SymbolHandler : public DocSymbolImpl, public BaseHandler<SymbolHandler> +{ + public: + SymbolHandler(IBaseHandler *parent,Types type); + virtual ~SymbolHandler(); + void startSymbol(const QXmlAttributes& attrib); + void endSymbol(); + + // IDocSymbol + virtual Kind kind() const { return DocImpl::Symbol; } + virtual Types type() const { return m_type; } + virtual const IString *typeString() const { return &m_typeString; } + virtual char letter() const { return m_letter; } + + private: + IBaseHandler *m_parent; + char m_letter; + Types m_type; + StringImpl m_typeString; +}; + + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a section. + * + */ +// children: title, para, sect(n+1) +class DocSectionHandler : public DocSectionImpl, public BaseHandler<DocSectionHandler> +{ + friend class DocSectionParaIterator; + friend class DocSectionSubIterator; + public: + DocSectionHandler(IBaseHandler *parent,int level); + virtual ~DocSectionHandler(); + virtual void startDocSection(const QXmlAttributes& attrib); + virtual void endDocSection(); + virtual void startTitle(const QXmlAttributes& attrib); + virtual void startSubSection(const QXmlAttributes& attrib); + virtual void startParagraph(const QXmlAttributes& attrib); + virtual void startInternal(const QXmlAttributes& attrib); + + // IDocSection + virtual Kind kind() const { return DocImpl::Section; } + virtual const IString *id() const { return &m_id; } + virtual int level() const { return m_level; } + virtual IDocTitle *title() const { return m_title; } + virtual IDocIterator *paragraphs() const; + virtual IDocIterator *subSections() const; + virtual IDocInternal *internal() const; + + private: + IBaseHandler *m_parent; + QList<DocImpl> m_paragraphs; + QList<DocImpl> m_subsections; + DocInternalHandler *m_internal; + StringImpl m_id; + int m_level; + TitleHandler *m_title; +}; + +class DocSectionParaIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + DocSectionParaIterator(const DocSectionHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_paragraphs) {} +}; + +class DocSectionSubIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + DocSectionSubIterator(const DocSectionHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_subsections) {} +}; + +//----------------------------------------------------------------------------- + +class DocInternalHandler : public DocInternalImpl, public BaseHandler<DocInternalHandler> +{ + public: + friend class DocInternalParaIterator; + friend class DocInternalSubIterator; + DocInternalHandler(IBaseHandler *parent,int level); + virtual ~DocInternalHandler(); + virtual void startInternal(const QXmlAttributes& attrib); + virtual void endInternal(); + virtual void startSubSection(const QXmlAttributes& attrib); + virtual void startParagraph(const QXmlAttributes& attrib); + + // IDocInternal + virtual Kind kind() const { return DocImpl::Internal; } + virtual IDocIterator *paragraphs() const; + virtual IDocIterator *subSections() const; + + private: + IBaseHandler *m_parent; + QList<DocImpl> m_paragraphs; + QList<DocImpl> m_subsections; + int m_level; +}; + +class DocInternalParaIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + DocInternalParaIterator(const DocInternalHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_paragraphs) {} +}; + +class DocInternalSubIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + DocInternalSubIterator(const DocInternalHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_subsections) {} +}; + + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a documentation block. + * + */ +// children: para, title, sect1, internal +class DocHandler : public DocRootImpl, public BaseHandler<DocHandler> +{ + friend class DocIterator; + public: + virtual void startDoc(const QXmlAttributes& attrib); + virtual void endDoc(); + virtual void startParagraph(const QXmlAttributes& attrib); + virtual void startSect1(const QXmlAttributes& attrib); + virtual void startTitle(const QXmlAttributes& attrib); + virtual void startInternal(const QXmlAttributes& attrib); + + DocHandler(IBaseHandler *parent); + virtual ~DocHandler(); + + // IDocRoot + virtual Kind kind() const { return DocImpl::Root; } + virtual IDocIterator *contents() const; + virtual IDocInternal *internal() const; + + private: + IBaseHandler *m_parent; + QList<DocImpl> m_children; + DocInternalHandler *m_internal; +}; + +class DocIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> +{ + public: + DocIterator(const DocHandler &handler) : + BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +void dochandler_init(); +void dochandler_exit(); + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/linkedtexthandler.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/linkedtexthandler.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/linkedtexthandler.cpp (revision 1322) @@ -0,0 +1,133 @@ +/****************************************************************************** + * + * $Id: doxygen.cpp,v 1.87 2001/03/19 19:27:40 root Exp $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ +#include "linkedtexthandler.h" +#include "debug.h" +#include <doxmlintf.h> +#include "stringimpl.h" + +class LT_Text : public LinkedTextImpl, public ILT_Text +{ + public: + LT_Text(const QString &text) : m_text(text) {} + virtual ~LT_Text() {} + + // ILT_Text + virtual const IString *text() const { return &m_text; } + virtual Kind kind() const { return LinkedTextImpl::Kind_Text; } + private: + StringImpl m_text; +}; + +class LT_Ref : public LinkedTextImpl, public ILT_Ref +{ + public: + LT_Ref() {} + virtual ~LT_Ref() {} + void setRefId(const QString &refId) { m_refId=refId; } + void setText(const QString &text) { m_text=text; } + void setExtId(const QString &extId) { m_extId=extId; } + void setTargetKind(TargetKind k) { m_targetKind=k; } + + // ILT_Ref + virtual const IString *text() const { return &m_text; } + virtual const IString * id() const { return &m_refId; } + virtual TargetKind targetKind() const { return m_targetKind; } + virtual const IString *external() const { return &m_extId; } + virtual Kind kind() const { return LinkedTextImpl::Kind_Ref; } + + private: + StringImpl m_refId; + StringImpl m_extId; + StringImpl m_text; + TargetKind m_targetKind; +}; + +LinkedTextHandler::LinkedTextHandler(IBaseHandler *parent, + QList<LinkedTextImpl> &children + ) + : m_parent(parent), m_children(children) +{ + addStartHandler("ref",this,&LinkedTextHandler::startRef); + addEndHandler("ref",this,&LinkedTextHandler::endRef); + m_children.setAutoDelete(TRUE); + m_ref=0; +} + +LinkedTextHandler::~LinkedTextHandler() +{ +} + +void LinkedTextHandler::start(const char *endTag) +{ + addEndHandler(endTag,this,&LinkedTextHandler::end); + m_parent->setDelegate(this); + m_curString=""; +} + +void LinkedTextHandler::end() +{ + if (!m_curString.isEmpty()) + { + m_children.append(new LT_Text(m_curString)); + debug(2,"LinkedTextHandler: add text `%s'\n",m_curString.data()); + m_curString=""; + } + m_parent->setDelegate(0); +} + +void LinkedTextHandler::startRef(const QXmlAttributes& attrib) +{ + if (!m_curString.isEmpty()) + { + m_children.append(new LT_Text(m_curString)); + debug(2,"LinkedTextHandler: add text `%s'\n",m_curString.data()); + m_curString=""; + } + ASSERT(m_ref==0); + m_ref = new LT_Ref; + m_ref->setRefId(attrib.value("refid")); + m_ref->setExtId(attrib.value("external")); + ASSERT(attrib.value("kindref")=="compound" || attrib.value("kindref")=="member"); + m_ref->setTargetKind(attrib.value("kindref")=="compound" ? ILT_Ref::Compound : ILT_Ref::Member); +} + +void LinkedTextHandler::endRef() +{ + m_ref->setText(m_curString); + m_children.append(m_ref); + debug(2,"LinkedTextHandler: add ref `%s'\n",m_ref->text()->latin1()); + m_ref=0; +} + +QString LinkedTextHandler::toString(const QList<LinkedTextImpl> &list) +{ + QListIterator<LinkedTextImpl> li(list); + QString result; + LinkedTextImpl *lt; + for (li.toFirst();(lt=li.current());++li) + { + switch(lt->kind()) + { + case ILinkedText::Kind_Text: + result+=dynamic_cast<ILT_Text*>(lt)->text()->latin1(); + break; + case ILinkedText::Kind_Ref: + result+=dynamic_cast<ILT_Ref *>(lt)->text()->latin1(); + break; + } + } + return result; +} + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/doxmlintf.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/doxmlintf.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/doxmlintf.h (revision 1322) @@ -0,0 +1 @@ +link ../include/doxmlintf.h \ No newline at end of file Property changes on: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/doxmlintf.h ___________________________________________________________________ Added: svn:special + * Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/memberhandler.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/memberhandler.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/memberhandler.h (revision 1322) @@ -0,0 +1,252 @@ +/****************************************************************************** + * + * $Id:$ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _MEMBERHANDLER_H +#define _MEMBERHANDLER_H + +#include <qstring.h> +#include <qlist.h> +#include <qxml.h> +#include <doxmlintf.h> + +#include "basehandler.h" +#include "baseiterator.h" +#include "stringimpl.h" + +class MainHandler; +class CompoundHandler; +class SectionHandler; +class ParamHandler; +class LinkedTextImpl; +class LinkedTextHandler; +class DocHandler; + +class MemberReference : public IMemberReference +{ + public: + virtual ~MemberReference() {} + virtual IMember *member() const; + virtual const IString *name() const { return &m_name; } + virtual const IString *scope() const { return &m_scope; } + virtual const IString *protection() const { return &m_protection; } + virtual const IString *virtualness() const { return &m_virtualness; } + virtual const IString *ambiguityScope() const { return &m_ambiguityScope; } + void initialize(MainHandler *m); + + QString m_memId; + StringImpl m_name; + StringImpl m_scope; + StringImpl m_virtualness; + StringImpl m_protection; + StringImpl m_ambiguityScope; + MainHandler *m_mainHandler; +}; + +class MemberReferenceIterator : public BaseIterator<IMemberReferenceIterator,IMemberReference,MemberReference> +{ + public: + MemberReferenceIterator(const QList<MemberReference> &list) : + BaseIterator<IMemberReferenceIterator,IMemberReference,MemberReference>(list) {} +}; + +class MemberHandler : public IDefine, + public IProperty, + public IVariable, + public ITypedef, + public IFunction, + public ISignal, + public IPrototype, + public IFriend, + public IDCOP, + public ISlot, + public IEnum, + public IEnumValue, + public BaseHandler<MemberHandler> +{ + public: + virtual void startMember(const QXmlAttributes& attrib); + virtual void endMember(); + virtual void startParam(const QXmlAttributes& attrib); + virtual void startType(const QXmlAttributes& attrib); + virtual void startName(const QXmlAttributes& attrib); + virtual void endName(); + virtual void startRead(const QXmlAttributes& attrib); + virtual void endRead(); + virtual void startWrite(const QXmlAttributes& attrib); + virtual void endWrite(); + virtual void startDefinition(const QXmlAttributes& attrib); + virtual void endDefinition(); + virtual void startArgsString(const QXmlAttributes& attrib); + virtual void endArgsString(); + virtual void startBriefDesc(const QXmlAttributes& attrib); + virtual void startDetailedDesc(const QXmlAttributes& attrib); + virtual void startInbodyDesc(const QXmlAttributes& attrib); + virtual void startLocation(const QXmlAttributes& attrib); + virtual void startReferences(const QXmlAttributes& attrib); + virtual void endReferences(); + virtual void startReferencedBy(const QXmlAttributes& attrib); + virtual void endReferencedBy(); + virtual void startReimplements(const QXmlAttributes& attrib); + virtual void endReimplements(); + virtual void startReimplementedBy(const QXmlAttributes& attrib); + virtual void endReimplementedBy(); + virtual void startInitializer(const QXmlAttributes& attrib); + virtual void startException(const QXmlAttributes& attrib); + virtual void startEnumValue(const QXmlAttributes& attrib); + virtual void startEnumValue2(const QXmlAttributes& attrib); + virtual void startTemplateParamList(const QXmlAttributes &attrib); + virtual void endTemplateParamList(); + + MemberHandler(IBaseHandler *parent); + virtual ~MemberHandler(); + + // IMember implementation + virtual ICompound *compound() const; + virtual ISection *section() const; + virtual MemberKind kind() const + { return m_kind; } + virtual const IString *kindString() const + { return &m_kindString; } + virtual const IString *id() const + { return &m_id; } + virtual const IString *protection() const + { return &m_protection; } + virtual const IString *virtualness() const + { return &m_virtualness; } + virtual const IString *name() const + { return &m_name; } + virtual const IString *readAccessor() const + { return &m_read; } + virtual const IString *writeAccessor() const + { return &m_write; } + virtual const IString *definition() const + { return &m_definition; } + virtual const IString *argsstring() const + { return &m_argsstring; } + virtual bool isConst() const + { return m_isConst; } + virtual bool isVolatile() const + { return m_isVolatile; } + virtual bool isStatic() const + { return m_isStatic; } + virtual bool isExplicit() const + { return m_isExplicit; } + virtual bool isInline() const + { return m_isInline; } + virtual bool isMutable() const + { return m_isMutable; } + virtual bool isReadable() const + { return m_isReadable; } + virtual bool isWritable() const + { return m_isWritable; } + virtual ILinkedTextIterator *type() const; + virtual const IString *typeString() const; + virtual IParamIterator *parameters() const; + virtual IParamIterator *templateParameters() const; + virtual IMemberReferenceIterator *references() const; + virtual IMemberReferenceIterator *referencedBy() const; + virtual ILinkedTextIterator *initializer() const; + virtual ILinkedTextIterator *exceptions() const; + virtual const IString *bodyFile() const + { return &m_bodyFile; } + virtual int bodyStart() const + { return m_bodyStart; } + virtual int bodyEnd() const + { return m_bodyEnd; } + virtual const IString *definitionFile() const + { return &m_defFile; } + virtual int definitionLine() const + { return m_defLine; } + virtual IMemberReference *reimplements() const + { return m_reimplements; } + virtual IMemberReferenceIterator *reimplementedBy() const; + virtual IDocRoot *briefDescription() const; + virtual IDocRoot *detailedDescription() const; + virtual IDocRoot *inbodyDescription() const; + + // IEnum + virtual IMemberIterator *enumValues() const; + + void initialize(MainHandler *m); + void setCompoundHandler(CompoundHandler *c); + void setSectionHandler(SectionHandler *s); + + private: + // XML elements: + // ----------------- + QList<ParamHandler> m_templateParams; // templateparamlist + QList<LinkedTextImpl> m_type; // type + StringImpl m_definition; // definition + StringImpl m_argsstring; // argsstring + StringImpl m_name; // name + StringImpl m_read; // read + StringImpl m_write; // write + MemberReference *m_reimplements; // reimplements + QList<MemberReference> m_reimplementedBy; // reimplementedby + QList<ParamHandler> m_params; // param + QList<MemberHandler> m_enumValues; // enumvalue + QList<LinkedTextImpl> m_initializer; // initializer + QList<LinkedTextImpl> m_exception; // exceptions + DocHandler *m_brief; // briefdescription + DocHandler *m_detailed; // detaileddescription + DocHandler *m_inbody; // inbodydescription + // location + StringImpl m_defFile; // - file + int m_defLine; // - line + StringImpl m_bodyFile; // - bodyfile + int m_bodyStart; // - bodystart + int m_bodyEnd; // - bodyend + QList<MemberReference> m_references; // references + QList<MemberReference> m_referencedBy; // referencedby + + // XML attributes: + // --------------- + MemberKind m_kind; // kind + StringImpl m_kindString; // kind as a string + StringImpl m_id; // id + StringImpl m_protection; // prot + bool m_isStatic; // static + bool m_isConst; // const + bool m_isExplicit; // explicit + bool m_isInline; // inline + StringImpl m_virtualness; // virt + bool m_isVolatile; // volatile + bool m_isMutable; // mutable + bool m_isReadable; // readable + bool m_isWritable; // writable + + CompoundHandler *m_compound; + SectionHandler *m_section; + StringImpl m_typeString; + LinkedTextHandler *m_linkedTextHandler; + bool m_insideTemplateParamList; + bool m_hasTemplateParamList; + IBaseHandler *m_parent; +}; + +class MemberIterator : public BaseIteratorVia<IMemberIterator, + IMember, + MemberHandler, + IFunction> +{ + public: + MemberIterator(const QList<MemberHandler> &list) : + BaseIteratorVia<IMemberIterator,IMember,MemberHandler,IFunction>(list) {} +}; + +void memberhandler_init(); +void memberhandler_exit(); + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/basehandler.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/basehandler.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/basehandler.h (revision 1322) @@ -0,0 +1,325 @@ +/****************************************************************************** + * + * $Id: basehandler.h,v 1.33 2002/10/13 21:01:58 dimitri Exp $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _BASEHANDLER_H +#define _BASEHANDLER_H + +#include <qxml.h> +#include <qdict.h> +#include <qstring.h> + +#include "debug.h" + +//----------------------------------------------------------------------------- + +class IBaseHandler +{ + public: + virtual void setDelegate(QXmlDefaultHandler *delegate) = 0; + virtual QXmlDefaultHandler *delegate() const = 0; + virtual ~IBaseHandler() {} +}; + +//----------------------------------------------------------------------------- + +class IFallBackHandler +{ + public: + virtual bool handleStartElement(const QString & name, + const QXmlAttributes & attrib) = 0; + virtual bool handleEndElement(const QString &name) = 0; + virtual ~IFallBackHandler() {} +}; + +//----------------------------------------------------------------------------- + +template<class T> class ElementMapper +{ + class StartElementHandler + { + typedef void (T::*Handler)(const QXmlAttributes &attrib); + public: + StartElementHandler() : m_parent(0) {} + StartElementHandler(T *parent, Handler h) + : m_parent(parent), m_handler(h) {} + void operator()(const QXmlAttributes &attrib) + { if (m_parent) (m_parent->*m_handler)(attrib); } + private: + T *m_parent; + Handler m_handler; + }; + + class EndElementHandler + { + typedef void (T::*Handler)(); + public: + EndElementHandler() : m_parent(0) {} + EndElementHandler(T *parent, Handler h) + : m_parent(parent), m_handler(h) {} + void operator()() + { if (m_parent) (m_parent->*m_handler)(); } + private: + T *m_parent; + Handler m_handler; + }; + + public: + typedef StartElementHandler StartElementHandlerT; + typedef EndElementHandler EndElementHandlerT; + + ElementMapper() : m_startHandlers(67), m_endHandlers(67) + { + m_startHandlers.setAutoDelete(TRUE); + m_endHandlers.setAutoDelete(TRUE); + } + virtual ~ElementMapper() + { + } + + void addStartHandler(const char *key) + { + m_startHandlers.insert(key,new StartElementHandlerT); + } + + void addStartHandler(const char *key, T *obj, void (T::*handler)(const QXmlAttributes &)) + { + m_startHandlers.insert(key,new StartElementHandlerT(obj,handler)); + } + + void addEndHandler(const char *key) + { + m_endHandlers.insert(key,new EndElementHandlerT); + } + + void addEndHandler(const char *key, T *obj, void (T::*handler)()) + { + m_endHandlers.insert(key,new EndElementHandlerT(obj,handler)); + } + + + protected: + QDict<StartElementHandlerT> m_startHandlers; + QDict<EndElementHandlerT> m_endHandlers; +}; + +//----------------------------------------------------------------------------- + +struct LocatorContainer +{ + static QXmlLocator *s_theLocator; +}; + +//----------------------------------------------------------------------------- + +template<class T> class BaseHandler : public QXmlDefaultHandler, + public ElementMapper<T>, + public LocatorContainer, + public IBaseHandler +{ + public: + typedef typename ElementMapper<T>::StartElementHandlerT StartElementHandlerT; + typedef typename ElementMapper<T>::EndElementHandlerT EndElementHandlerT; + + BaseHandler() : m_delegateHandler(0), m_fallBackHandler(0) + { + } + + virtual ~BaseHandler() + { + ASSERT(m_delegateHandler==0); + } + + virtual bool startDocument() + { + return TRUE; + } + + virtual bool startElement( const QString & namespaceURI, + const QString & localName, + const QString & name, + const QXmlAttributes & attrib + ) + { + if (m_delegateHandler) + { + return m_delegateHandler->startElement(namespaceURI,localName,name,attrib); + } + if (!m_skipUntil.isEmpty()) // skip mode + { + if (m_skipUntil==name) m_skipCount++; + debug(1,"line %d, col %d: skipping start tag %s count=%d\n", + s_theLocator->lineNumber(),s_theLocator->columnNumber(), + name.data(),m_skipCount); + return TRUE; + } + + StartElementHandlerT *handler = ElementMapper<T>::m_startHandlers[name]; + if (handler) + { + (*handler)(attrib); + //printf("found start tag %s\n",name.data()); + } + else if (!m_fallBackHandler || + !m_fallBackHandler->handleStartElement(name,attrib) + ) + { + debug(1,"line %d, col %d: found unexpected tag `%s', skipping until matching end tag\n", + s_theLocator->lineNumber(),s_theLocator->columnNumber(), + name.data()); + m_skipUntil = name; + m_skipCount=1; + } + return TRUE; + } + + virtual bool endElement( const QString& namespaceURI, const QString& localName, const QString& name ) + { + if (m_delegateHandler) + { + return m_delegateHandler->endElement(namespaceURI,localName,name); + } + + if (name==m_skipUntil) + { + m_skipCount--; + debug(1,"line %d, col %d: skipping end tag %s count=%d\n", + s_theLocator->lineNumber(),s_theLocator->columnNumber(), + name.data(),m_skipCount); + if (m_skipCount==0) + { + m_skipUntil=""; + } + //printf("found end tag %s\n",name.data()); + } + else if (m_skipUntil.isEmpty()) + { + EndElementHandlerT *handler = ElementMapper<T>::m_endHandlers[name]; + if (handler) + { + (*handler)(); + //printf("found end tag %s\n",name.data()); + } + else if (m_fallBackHandler) + { + m_fallBackHandler->handleEndElement(name); + } + } + m_curString=""; + return TRUE; + } + + bool skippedEntity ( const QString &s ) + { + if (m_delegateHandler) + { + return m_delegateHandler->skippedEntity(s); + } + + debug(1,"line %d, col %d: Skipped unhandled entity %s\n", + s_theLocator->lineNumber(),s_theLocator->columnNumber(), + s.data()); + return TRUE; + } + + /*! called when a number of characters are received by the parser. + * \param ch the characters. + */ + virtual bool characters ( const QString & ch ) + { + if (m_delegateHandler) + { + return m_delegateHandler->characters(ch); + } + + //printf("Found characters \"%s\"\n",ch.data()); + m_curString+=ch; + return TRUE; + } + + void setDelegate(QXmlDefaultHandler *delegate) + { + m_delegateHandler = delegate; + } + + QXmlDefaultHandler *delegate() const + { + return m_delegateHandler; + } + + void setFallBackHandler(IFallBackHandler *h) + { + m_fallBackHandler = h; + } + + IFallBackHandler *fallBackHandler() const + { + return m_fallBackHandler; + } + + void setDocumentLocator( QXmlLocator * locator ) + { + debug(2,"setDocumentLocator(%p)\n",locator); + s_theLocator = locator; + } + + protected: + QString m_curString; + QString m_skipUntil; + int m_skipCount; + QXmlDefaultHandler *m_delegateHandler; + IFallBackHandler *m_fallBackHandler; +}; + +//----------------------------------------------------------------------------- + +template<class T> class BaseFallBackHandler : public ElementMapper<T>, + public IFallBackHandler +{ + public: + typedef typename ElementMapper<T>::StartElementHandlerT StartElementHandlerT; + typedef typename ElementMapper<T>::EndElementHandlerT EndElementHandlerT; + + BaseFallBackHandler() + { + } + virtual ~BaseFallBackHandler() + { + } + + bool handleStartElement(const QString & name, + const QXmlAttributes & attrib) + { + StartElementHandlerT *handler = ElementMapper<T>::m_startHandlers[name]; + if (handler) + { + (*handler)(attrib); + return TRUE; + } + return FALSE; + } + bool handleEndElement(const QString &name) + { + EndElementHandlerT *handler = ElementMapper<T>::m_endHandlers[name]; + if (handler) + { + (*handler)(); + return TRUE; + } + return FALSE; + } +}; + + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/doxmlparser.pro =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/doxmlparser.pro (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/doxmlparser.pro (revision 1322) @@ -0,0 +1,32 @@ +# +# This file was generated from doxmlparser.pro.in on Mon Mar 28 15:09:00 CEST 2011 +# + +TEMPLATE = lib.t +CONFIG = console staticlib warn_on debug +HEADERS = basehandler.h mainhandler.h \ + compoundhandler.h sectionhandler.h \ + memberhandler.h paramhandler.h \ + dochandler.h linkedtexthandler.h \ + debug.h graphhandler.h stringimpl.h \ + loamhandler.h +SOURCES = mainhandler.cpp \ + compoundhandler.cpp sectionhandler.cpp \ + memberhandler.cpp paramhandler.cpp \ + dochandler.cpp linkedtexthandler.cpp \ + basehandler.cpp debug.cpp graphhandler.cpp \ + loamhandler.cpp +unix:LIBS += -L../../../lib -lqtools +win32:INCLUDEPATH += . +win32-mingw:LIBS += -L../../../lib -lqtools +win32-msvc:LIBS += qtools.lib shell32.lib +win32-msvc:TMAKE_LFLAGS += /LIBPATH:....\\..\lib +win32-borland:LIBS += qtools.lib doxycfg.lib shell32.lib +win32-borland:TMAKE_LFLAGS += -L..\..\..\lib +win32:TMAKE_CXXFLAGS += -DQT_NODLL +DESTDIR = ../lib +OBJECTS_DIR = ../objects +TARGET = doxmlparser +INCLUDEPATH += ../../../qtools ../include + +TMAKE_MOC = /usr/bin/moc Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/linkedtexthandler.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/linkedtexthandler.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/linkedtexthandler.h (revision 1322) @@ -0,0 +1,54 @@ +/****************************************************************************** + * + * $Id: doxygen.cpp,v 1.87 2001/03/19 19:27:40 root Exp $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ +#ifndef LINKEDTEXTHANDLER_H +#define LINKEDTEXTHANDLER_H + +#include "baseiterator.h" +#include "basehandler.h" + +class LT_Ref; +class LinkedTextImpl : public ILinkedText +{ + public: + virtual ~LinkedTextImpl() {} +}; + +class LinkedTextHandler : public BaseHandler<LinkedTextHandler> +{ + public: + LinkedTextHandler(IBaseHandler *parent,QList<LinkedTextImpl> &children); + virtual ~LinkedTextHandler(); + virtual void start(const char *endTag); + virtual void end(); + virtual void startRef(const QXmlAttributes& attrib); + virtual void endRef(); + static QString toString(const QList<LinkedTextImpl> &list); + + // ILinkedText + + private: + IBaseHandler *m_parent; + QList<LinkedTextImpl> &m_children; + LT_Ref *m_ref; +}; + +class LinkedTextIterator : public BaseIterator<ILinkedTextIterator,ILinkedText,LinkedTextImpl> +{ + public: + LinkedTextIterator(const QList<LinkedTextImpl> &list) : + BaseIterator<ILinkedTextIterator,ILinkedText,LinkedTextImpl>(list) {} +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/compoundhandler.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/compoundhandler.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/compoundhandler.cpp (revision 1322) @@ -0,0 +1,650 @@ +/****************************************************************************** + * + * $Id: compoundhandler.cpp,v 1.33 2002/10/13 21:01:58 dimitri Exp $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include "mainhandler.h" +#include "compoundhandler.h" +#include "dochandler.h" +#include "debug.h" +#include "graphhandler.h" +#include "sectionhandler.h" +#include "paramhandler.h" +#include "loamhandler.h" +#include "memberhandler.h" + +//---------------------------------------------------------------------------- + +IncludeHandler::IncludeHandler(IBaseHandler *parent,const char *endtag) : + m_parent(parent) +{ + addEndHandler(endtag,this,&IncludeHandler::endInclude); +} + +IncludeHandler::~IncludeHandler() +{ +} + +void IncludeHandler::startInclude(const QXmlAttributes &attrib) +{ + m_curString = ""; + m_refId = attrib.value("refid"); + m_isLocal = attrib.value("local")=="yes"; + m_parent->setDelegate(this); +} + +void IncludeHandler::endInclude() +{ + m_name = m_curString; + m_parent->setDelegate(0); + debug(2,"Found include %s\n",m_name.data()); +} + +//---------------------------------------------------------------------------- + +class CompoundIdIterator : public ICompoundIterator, + public QListIterator<QString> +{ + public: + CompoundIdIterator(const MainHandler *m,const QList<QString> &list) : + QListIterator<QString>(list), m_mainHandler(m) {} + virtual ~CompoundIdIterator() {} + + virtual void toFirst() + { + QListIterator<QString>::toFirst(); + } + virtual void toLast() + { + QListIterator<QString>::toLast(); + } + virtual void toNext() + { + QListIterator<QString>::operator++(); + } + virtual void toPrev() + { + QListIterator<QString>::operator--(); + } + virtual ICompound *current() const + { + QString *id = QListIterator<QString>::current(); + return id ? m_mainHandler->compoundById(*id) : 0; + } + virtual void release() + { delete this; } + + private: + const MainHandler *m_mainHandler; +}; + +//---------------------------------------------------------------------------- + +ICompound *RelatedCompound::compound() const +{ + return m_parent->m_mainHandler->compoundById(m_id); +} + +//---------------------------------------------------------------------------- + +class CompoundErrorHandler : public QXmlErrorHandler +{ + public: + virtual ~CompoundErrorHandler() {} + bool warning( const QXmlParseException & ) + { + return FALSE; + } + bool error( const QXmlParseException & ) + { + return FALSE; + } + bool fatalError( const QXmlParseException &exception ) + { + debug(1,"Fatal error at line %d column %d: %s\n", + exception.lineNumber(),exception.columnNumber(), + exception.message().data()); + return FALSE; + } + QString errorString() { return ""; } + + private: + QString errorMsg; +}; + +//---------------------------------------------------------------------------- + +class CompoundTypeMap +{ + public: + CompoundTypeMap() + { + m_map.setAutoDelete(TRUE); + m_map.insert("class", new int(ICompound::Class)); + m_map.insert("struct", new int(ICompound::Struct)); + m_map.insert("union", new int(ICompound::Union)); + m_map.insert("interface",new int(ICompound::Interface)); + m_map.insert("protocol", new int(ICompound::Protocol)); + m_map.insert("category", new int(ICompound::Category)); + m_map.insert("exception",new int(ICompound::Exception)); + m_map.insert("file", new int(ICompound::File)); + m_map.insert("namespace",new int(ICompound::Namespace)); + m_map.insert("group", new int(ICompound::Group)); + m_map.insert("page", new int(ICompound::Page)); + m_map.insert("example", new int(ICompound::Example)); + m_map.insert("dir", new int(ICompound::Dir)); + } + virtual ~CompoundTypeMap() + { + } + ICompound::CompoundKind map(const QString &s) + { + int *val = m_map.find(s); + if (val==0) + { + debug(1,"Warning: `%s' is an invalid compound type\n",s.data()); + return ICompound::Invalid; + } + else return (ICompound::CompoundKind)*val; + } + private: + QDict<int> m_map; +}; + +static CompoundTypeMap *s_typeMap; + +void compoundhandler_init() +{ + s_typeMap = new CompoundTypeMap; +} + +void compoundhandler_exit() +{ + delete s_typeMap; +} + +//---------------------------------------------------------------------------- + +CompoundHandler::CompoundHandler(const QString &xmlDir) + : m_titleHandler(0), + m_includeDependencyGraph(0), + m_includedByDependencyGraph(0), + m_templateParamList(0), + m_brief(0), + m_detailed(0), + m_inheritanceGraph(0), + m_collaborationGraph(0), + m_programListing(0), + m_members(0), + m_xmlDir(xmlDir), + m_refCount(1), + m_memberDict(257), + m_memberNameDict(257), + m_mainHandler(0) +{ + m_superClasses.setAutoDelete(TRUE); + m_subClasses.setAutoDelete(TRUE); + m_sections.setAutoDelete(TRUE); + m_memberNameDict.setAutoDelete(TRUE); + m_innerCompounds.setAutoDelete(TRUE); + m_includes.setAutoDelete(TRUE); + m_includedBy.setAutoDelete(TRUE); + + addStartHandler("doxygen"); + addEndHandler("doxygen"); + + addStartHandler("compounddef",this,&CompoundHandler::startCompound); + addEndHandler("compounddef",this,&CompoundHandler::endCompound); + + addStartHandler("compoundname"); + addEndHandler("compoundname",this,&CompoundHandler::endCompoundName); + + addStartHandler("title",this,&CompoundHandler::startTitle); + + addStartHandler("basecompoundref",this,&CompoundHandler::startSuperClass); + addEndHandler("basecompoundref",this,&CompoundHandler::endSuperClass); + + addStartHandler("derivedcompoundref",this,&CompoundHandler::startSubClass); + addEndHandler("derivedcompoundref",this,&CompoundHandler::endSubClass); + + addStartHandler("includes",this,&CompoundHandler::startIncludes); + addStartHandler("includedby",this,&CompoundHandler::startIncludedBy); + + addStartHandler("incdepgraph",this,&CompoundHandler::startIncludeDependencyGraph); + + addStartHandler("invincdepgraph",this,&CompoundHandler::startIncludedByDependencyGraph); + + addStartHandler("innerdir",this,&CompoundHandler::startInnerDir); + addEndHandler("innerdir"); + + addStartHandler("innerfile",this,&CompoundHandler::startInnerFile); + addEndHandler("innerfile"); + + addStartHandler("innerclass",this,&CompoundHandler::startInnerClass); + addEndHandler("innerclass"); + + addStartHandler("innernamespace",this,&CompoundHandler::startInnerNamespace); + addEndHandler("innernamespace"); + + addStartHandler("innerpage",this,&CompoundHandler::startInnerPage); + addEndHandler("innerpage"); + + addStartHandler("innergroup",this,&CompoundHandler::startInnerGroup); + addEndHandler("innergroup"); + + addStartHandler("templateparamlist",this,&CompoundHandler::startTemplateParamList); + + addStartHandler("sectiondef",this,&CompoundHandler::startSection); + + addStartHandler("briefdescription",this,&CompoundHandler::startBriefDesc); + + addStartHandler("detaileddescription",this,&CompoundHandler::startDetailedDesc); + + addStartHandler("inheritancegraph",this,&CompoundHandler::startInheritanceGraph); + + addStartHandler("collaborationgraph",this,&CompoundHandler::startCollaborationGraph); + + addStartHandler("programlisting",this,&CompoundHandler::startProgramListing); + + addStartHandler("location",this,&CompoundHandler::startLocation); + addEndHandler("location"); + + addStartHandler("listofallmembers",this,&CompoundHandler::startListOfAllMembers); +} + +CompoundHandler::~CompoundHandler() +{ + debug(2,"CompoundHandler::~CompoundHandler()\n"); + delete m_titleHandler; + delete m_brief; + delete m_detailed; + delete m_programListing; + delete m_inheritanceGraph; + delete m_collaborationGraph; + delete m_includeDependencyGraph; + delete m_includedByDependencyGraph; + delete m_templateParamList; + delete m_members; +} + +void CompoundHandler::startSection(const QXmlAttributes& attrib) +{ + SectionHandler *sectHandler = new SectionHandler(this); + sectHandler->startSection(attrib); + m_sections.append(sectHandler); +} + +void CompoundHandler::startBriefDesc(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_brief = docHandler; +} + +void CompoundHandler::startDetailedDesc(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_detailed = docHandler; +} + +void CompoundHandler::startProgramListing(const QXmlAttributes& attrib) +{ + ProgramListingHandler *plHandler = new ProgramListingHandler(this); + plHandler->startProgramListing(attrib); + m_programListing = plHandler; +} + +void CompoundHandler::startIncludes(const QXmlAttributes& attrib) +{ + IncludeHandler *inc = new IncludeHandler(this,"includes"); + m_includes.append(inc); + inc->startInclude(attrib); +} + +void CompoundHandler::startIncludedBy(const QXmlAttributes& attrib) +{ + IncludeHandler *inc = new IncludeHandler(this,"includedby"); + m_includedBy.append(inc); + inc->startInclude(attrib); +} + +void CompoundHandler::startCompound(const QXmlAttributes& attrib) +{ + m_id = attrib.value("id"); + m_kindString = attrib.value("kind"); + m_kind = s_typeMap->map(m_kindString); + m_protection = attrib.value("prot"); + debug(2,"startCompound(id=`%s' type=`%s')\n",m_id.data(),m_kindString.data()); +} + +void CompoundHandler::endCompound() +{ + debug(2,"endCompound()\n"); +} + +void CompoundHandler::startLocation(const QXmlAttributes& attrib) +{ + m_defFile = attrib.value("file"); + m_defLine = attrib.value("line").toInt(); + m_defBodyFile = attrib.value("bodyfile"); + m_defBodyStart = attrib.value("bodystart").toInt(); + m_defBodyEnd = attrib.value("bodyend").toInt(); +} + +void CompoundHandler::endCompoundName() +{ + m_name = m_curString.stripWhiteSpace(); + debug(2,"Compound name `%s'\n",m_name.data()); +} + +void CompoundHandler::startInnerClass(const QXmlAttributes& attrib) +{ + m_innerCompounds.append(new QString(attrib.value("refid"))); +} + +void CompoundHandler::startInnerNamespace(const QXmlAttributes& attrib) +{ + m_innerCompounds.append(new QString(attrib.value("refid"))); +} + +void CompoundHandler::startInnerFile(const QXmlAttributes& attrib) +{ + m_innerCompounds.append(new QString(attrib.value("refid"))); +} + +void CompoundHandler::startInnerGroup(const QXmlAttributes& attrib) +{ + m_innerCompounds.append(new QString(attrib.value("refid"))); +} + +void CompoundHandler::startInnerPage(const QXmlAttributes& attrib) +{ + m_innerCompounds.append(new QString(attrib.value("refid"))); +} + +void CompoundHandler::startInnerDir(const QXmlAttributes& attrib) +{ + m_innerCompounds.append(new QString(attrib.value("refid"))); +} + +void CompoundHandler::startTemplateParamList(const QXmlAttributes& attrib) +{ + m_templateParamList = new TemplateParamListHandler(this); + m_templateParamList->startTemplateParamList(attrib); +} + +void CompoundHandler::startListOfAllMembers(const QXmlAttributes& attrib) +{ + m_members = new ListOfAllMembersHandler(this); + m_members->startListOfAllMembers(attrib); +} + +void CompoundHandler::startSuperClass(const QXmlAttributes& attrib) +{ + IRelatedCompound::Protection prot = IRelatedCompound::Public; + QString protString = attrib.value("prot"); + if (protString=="protected") + { + prot = IRelatedCompound::Protected; + } + else if (protString=="private") + { + prot = IRelatedCompound::Private; + } + IRelatedCompound::Kind kind = IRelatedCompound::Normal; + QString kindString = attrib.value("virt"); + if (kindString=="virtual") kind = IRelatedCompound::Virtual; + + RelatedCompound *sc=new RelatedCompound( + this, + attrib.value("refid"), + prot, + kind + ); + debug(2,"super class id=`%s' prot=`%s' virt=`%s'\n", + attrib.value("refid").data(), + protString.data(), + kindString.data()); + m_superClasses.append(sc); + m_curString = ""; +} + +void CompoundHandler::endSuperClass() +{ + m_superClasses.getLast()->setName(m_curString); +} + +void CompoundHandler::startSubClass(const QXmlAttributes& attrib) +{ + IRelatedCompound::Protection prot = IRelatedCompound::Public; + QString protString = attrib.value("prot"); + if (protString=="protected") prot = IRelatedCompound::Protected; + else if (protString=="private") prot = IRelatedCompound::Private; + + IRelatedCompound::Kind kind = IRelatedCompound::Normal; + QString kindString = attrib.value("virt"); + if (kindString=="virtual") kind = IRelatedCompound::Virtual; + + RelatedCompound *sc = new RelatedCompound( + this, + attrib.value("refid"), + prot, + kind + ); + debug(2,"sub class id=`%s' prot=`%s' virt=`%s'\n", + attrib.value("refid").data(), + protString.data(), + kindString.data()); + m_subClasses.append(sc); + m_curString = ""; +} + +void CompoundHandler::endSubClass() +{ + m_subClasses.getLast()->setName(m_curString); +} + +void CompoundHandler::startTitle(const QXmlAttributes& attrib) +{ + ASSERT(m_titleHandler==0); + m_titleHandler = new TitleHandler(this); + m_titleHandler->startTitle(attrib); +} + +bool CompoundHandler::parseXML(const char *compId) +{ + QFile xmlFile(m_xmlDir+"/"+compId+".xml"); + if (!xmlFile.exists()) return FALSE; + CompoundErrorHandler errorHandler; + QXmlInputSource source( xmlFile ); + QXmlSimpleReader reader; + reader.setContentHandler( this ); + reader.setErrorHandler( &errorHandler ); + reader.parse( source ); + return TRUE; +} + +void CompoundHandler::initialize(MainHandler *mh) +{ + m_mainHandler = mh; + QListIterator<SectionHandler> msi(m_sections); + SectionHandler *sec; + for (;(sec=msi.current());++msi) + { + sec->initialize(this); + } + if (m_members) + { + m_members->initialize(mh); + } +} + +void CompoundHandler::insertMember(MemberHandler *mh) +{ + m_memberDict.insert(mh->id()->latin1(),mh); + mh->initialize(m_mainHandler); + QList<MemberHandler> *mhl = m_memberNameDict.find(mh->id()->latin1()); + if (mhl==0) + { + mhl = new QList<MemberHandler>; + m_memberNameDict.insert(mh->name()->latin1(),mhl); + } + mhl->append(mh); +} + +ICompound *CompoundHandler::toICompound() const +{ + switch (m_kind) + { + case IClass::Class: return (IClass *)this; + case IStruct::Struct: return (IStruct *)this; + case IUnion::Union: return (IUnion *)this; + case IException::Exception: return (IException *)this; + case IInterface::Interface: return (IInterface *)this; + case INamespace::Namespace: return (INamespace *)this; + case IFile::File: return (IFile *)this; + case IGroup::Group: return (IGroup *)this; + case IPage::Page: return (IPage *)this; + default: return 0; + } + return 0; +} + +void CompoundHandler::release() +{ + debug(2,"CompoundHandler::release() %d->%d\n",m_refCount,m_refCount-1); + if (--m_refCount<=0) + { + m_mainHandler->unloadCompound(this); + delete this; + } +} + +ISectionIterator *CompoundHandler::sections() const +{ + return new SectionIterator(m_sections); +} + +IMemberIterator *CompoundHandler::memberByName(const char *name) const +{ + QList<MemberHandler> *ml = m_memberNameDict[name]; + if (ml==0) return 0; + return new MemberIterator(*ml); +} + +void CompoundHandler::startInheritanceGraph(const QXmlAttributes &attrib) +{ + m_inheritanceGraph = new GraphHandler(this,"inheritancegraph"); + m_inheritanceGraph->startGraph(attrib); +} + +void CompoundHandler::startCollaborationGraph(const QXmlAttributes &attrib) +{ + m_collaborationGraph = new GraphHandler(this,"collaborationgraph"); + m_collaborationGraph->startGraph(attrib); +} + +void CompoundHandler::startIncludeDependencyGraph(const QXmlAttributes &attrib) +{ + m_includeDependencyGraph = new GraphHandler(this,"incdepgraph"); + m_includeDependencyGraph->startGraph(attrib); +} + +void CompoundHandler::startIncludedByDependencyGraph(const QXmlAttributes &attrib) +{ + m_includedByDependencyGraph = new GraphHandler(this,"invincdepgraph"); + m_includedByDependencyGraph->startGraph(attrib); +} + +IDocRoot *CompoundHandler::briefDescription() const +{ + return m_brief; +} + +IDocRoot *CompoundHandler::detailedDescription() const +{ + return m_detailed; +} + +IMember *CompoundHandler::memberById(const char *id) const +{ + return (IFunction*)m_memberDict[id]; +} + +IGraph *CompoundHandler::inheritanceGraph() const +{ + return m_inheritanceGraph; +} + +IGraph *CompoundHandler::collaborationGraph() const +{ + return m_collaborationGraph; +} + +IGraph *CompoundHandler::includeDependencyGraph() const +{ + return m_includeDependencyGraph; +} + +IGraph *CompoundHandler::includedByDependencyGraph() const +{ + return m_includedByDependencyGraph; +} + +IRelatedCompoundIterator *CompoundHandler::baseCompounds() const +{ + return new RelatedCompoundIterator(m_superClasses); +} + +IRelatedCompoundIterator *CompoundHandler::derivedCompounds() const +{ + return new RelatedCompoundIterator(m_subClasses); +} + +ICompoundIterator *CompoundHandler::nestedCompounds() const +{ + return new CompoundIdIterator(m_mainHandler,m_innerCompounds); +} + +IDocProgramListing *CompoundHandler::source() const +{ + return m_programListing; +} + +IIncludeIterator *CompoundHandler::includes() const +{ + return new IncludeIterator(m_includes); +} + +IIncludeIterator *CompoundHandler::includedBy() const +{ + return new IncludeIterator(m_includedBy); +} + +IParamIterator *CompoundHandler::templateParameters() const +{ + return m_templateParamList ? m_templateParamList->templateParams() : 0; +} + +const IDocTitle *CompoundHandler::title() const +{ + return m_titleHandler; +} + +IMemberReferenceIterator *CompoundHandler::members() const +{ + return m_members ? m_members->members() : 0; +} + + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/mainhandler.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/mainhandler.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/mainhandler.cpp (revision 1322) @@ -0,0 +1,299 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include <qxml.h> +#include "mainhandler.h" +#include "compoundhandler.h" +#include "sectionhandler.h" +#include "graphhandler.h" +#include "dochandler.h" +#include "memberhandler.h" +#include "debug.h" + + +class ErrorHandler : public QXmlErrorHandler +{ + public: + virtual ~ErrorHandler() {} + bool warning( const QXmlParseException & ) + { + return FALSE; + } + bool error( const QXmlParseException & ) + { + return FALSE; + } + bool fatalError( const QXmlParseException &exception ) + { + debug(1,"Fatal error at line %d column %d: %s\n", + exception.lineNumber(),exception.columnNumber(), + exception.message().data()); + return FALSE; + } + QString errorString() { return ""; } + + private: + QString errorMsg; +}; + +//-------------------------------------------------------------------------- + +class CompoundEntryIterator : public ICompoundIterator, + public QListIterator<CompoundEntry> +{ + public: + CompoundEntryIterator(const MainHandler *m,const QList<CompoundEntry> &list) : + QListIterator<CompoundEntry>(list), m_mainHandler(m) {} + virtual ~CompoundEntryIterator() {} + + virtual void toFirst() + { + QListIterator<CompoundEntry>::toFirst(); + } + virtual void toLast() + { + QListIterator<CompoundEntry>::toLast(); + } + virtual void toNext() + { + QListIterator<CompoundEntry>::operator++(); + } + virtual void toPrev() + { + QListIterator<CompoundEntry>::operator--(); + } + virtual ICompound *current() const + { + CompoundEntry *ch = QListIterator<CompoundEntry>::current(); + return ch ? m_mainHandler->compoundById(ch->id) : 0; + } + virtual void release() + { delete this; } + + private: + const MainHandler *m_mainHandler; +}; + +//-------------------------------------------------------------------------- + +MainHandler::MainHandler() : m_compoundDict(2999), m_compoundNameDict(2999), + m_memberDict(12251), m_memberNameDict(12251), + m_compoundsLoaded(1009) +{ + m_compounds.setAutoDelete(TRUE); + m_memberNameDict.setAutoDelete(TRUE); + addStartHandler("doxygenindex"); + addEndHandler("doxygenindex"); + addStartHandler("compound",this,&MainHandler::startCompound); + addEndHandler("compound"); + addStartHandler("member",this,&MainHandler::startMember); + addEndHandler("member",this,&MainHandler::endMember); + addStartHandler("name",this,&MainHandler::startName); + addEndHandler("name",this,&MainHandler::endName); + m_curCompound = 0; + m_insideMember = FALSE; +} + +MainHandler::~MainHandler() +{ + debug(2,"MainHandler::~MainHandler()\n"); +} + +void MainHandler::startCompound(const QXmlAttributes& attrib) +{ + m_curCompound = new CompoundEntry(257); + m_curCompound->id = attrib.value("refid"); + m_compounds.append(m_curCompound); + m_compoundDict.insert(m_curCompound->id,m_curCompound); +} + +void MainHandler::startName(const QXmlAttributes& /*attrib*/) +{ + m_curString = ""; +} + +void MainHandler::endName() +{ + if (m_insideMember) + { + m_curMember->name = m_curString; + } + else + { + m_curCompound->name = m_curString; + m_compoundNameDict.insert(m_curString,m_curCompound); + } +} + +void MainHandler::startMember(const QXmlAttributes& attrib) +{ + m_insideMember = TRUE; + m_curMember = new MemberEntry; + m_curMember->id = attrib.value("refid"); + m_curMember->compound = m_curCompound; + m_memberDict.insert(m_curMember->id,m_curMember); +} + +void MainHandler::endMember() +{ + m_curCompound->memberDict.insert(m_curMember->name,m_curMember); + QList<CompoundEntry> *cel=0; + if ((cel=m_memberNameDict.find(m_curMember->name))==0) + { + cel = new QList<CompoundEntry>; + m_memberNameDict.insert(m_curMember->name,cel); + } + cel->append(m_curCompound); + m_insideMember = FALSE; +} + +void MainHandler::setDebugLevel(int level) +{ + ::setDebugLevel(level); +} + +void MainHandler::dump() +{ + QListIterator<CompoundEntry> cli(m_compounds); + CompoundEntry *ce; + for (cli.toFirst();(ce=cli.current());++cli) + { + debug(2,"compound id=`%s' name=`%s'\n",ce->id.data(),ce->name.data()); + QDictIterator<MemberEntry> mdi(ce->memberDict); + MemberEntry *me; + for (mdi.toFirst();(me=mdi.current());++mdi) + { + debug(2," member id=`%s' name=`%s'\n",me->id.data(),me->name.data()); + } + } +} + +bool MainHandler::readXMLDir(const char * xmlDirName) +{ + m_xmlDirName = xmlDirName; + QString xmlFileName=m_xmlDirName+"/index.xml"; + QFile xmlFile(xmlFileName); + //printf("Trying %s xmlFile.exists()=%d isReadable()=%d\n", + // xmlFileName.data(),xmlFile.exists(),xmlFile.isReadable()); + if (xmlFile.exists()) + { + ErrorHandler errorHandler; + QXmlInputSource source( xmlFile ); + QXmlSimpleReader reader; + reader.setContentHandler( this ); + reader.setErrorHandler( &errorHandler ); + reader.parse( source ); + dump(); + return TRUE; + } + return FALSE; +} + +ICompoundIterator *MainHandler::compounds() const +{ + return new CompoundEntryIterator(this,m_compounds); +} + +ICompound *MainHandler::compoundById(const char *id) const +{ + QString ids = id; + if (ids.isEmpty()) return 0; + CompoundHandler *ch = m_compoundsLoaded[ids]; + if (ch) // compound already in memory + { + ch->addref(); // returning alias -> increase reference counter + return ch->toICompound(); + } + CompoundEntry *ce = m_compoundDict.find(ids); + if (ce==0) return 0; // id not found + // create and load a new compound + ch = new CompoundHandler(m_xmlDirName); + if (!ch->parseXML(id)) + { + // compound could not be initialized. + delete ch; + return 0; + } + + // we disregard the constness here, because the object stays conceptually + // unchanged. + MainHandler *that = (MainHandler *)this; + ch->initialize(that); + //printf("loading compound %s in memory\n",id); + that->m_compoundsLoaded.insert(id,ch); + return ch->toICompound(); +} + +void MainHandler::unloadCompound(CompoundHandler *ch) +{ + //printf("unloading compound %s from memory\n",ch->id()->latin1()); + bool result = m_compoundsLoaded.remove(ch->id()->latin1()); + if (!result) debug(1,"Failed to unload component!\n"); +} + +ICompound *MainHandler::compoundByName(const char *name) const +{ + QString nameStr = name; + if (nameStr.isEmpty()) return 0; + CompoundEntry *ce = m_compoundNameDict[name]; + if (ce==0) return 0; // name not found + return compoundById(ce->id); +} + +ICompound *MainHandler::memberById(const char *id) const +{ + QString ids = id; + if (ids.isEmpty()) return 0; + MemberEntry *me = m_memberDict[id]; + if (me==0) return 0; // id not found + return compoundById(me->compound->id); +} + +ICompoundIterator *MainHandler::memberByName(const char *name) const +{ + QString nameStr = name; + if (nameStr.isEmpty()) return 0; + QList<CompoundEntry> *cel = m_memberNameDict[name]; + if (cel==0) return 0; // name not found + return new CompoundEntryIterator(this,*cel); +} + +IDoxygen *createObjectModel() +{ + compoundhandler_init(); + sectionhandler_init(); + memberhandler_init(); + dochandler_init(); + graphhandler_init(); + return new MainHandler; +} + +void MainHandler::release() +{ + //printf("MainHandler::release()\n"); + QDictIterator<CompoundHandler> chi(m_compoundsLoaded); + CompoundHandler *ch; + for (chi.toFirst();(ch=chi.current());++chi) + { + debug(1,"Compound %s not released\n",ch->name()->latin1()); + } + graphhandler_exit(); + dochandler_exit(); + memberhandler_exit(); + sectionhandler_exit(); + compoundhandler_exit(); + delete this; +} + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/doxmlparser.pro.in =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/doxmlparser.pro.in (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/doxmlparser.pro.in (revision 1322) @@ -0,0 +1,27 @@ +TEMPLATE = lib.t +CONFIG = console staticlib warn_on $extraopts +HEADERS = basehandler.h mainhandler.h \ + compoundhandler.h sectionhandler.h \ + memberhandler.h paramhandler.h \ + dochandler.h linkedtexthandler.h \ + debug.h graphhandler.h stringimpl.h \ + loamhandler.h +SOURCES = mainhandler.cpp \ + compoundhandler.cpp sectionhandler.cpp \ + memberhandler.cpp paramhandler.cpp \ + dochandler.cpp linkedtexthandler.cpp \ + basehandler.cpp debug.cpp graphhandler.cpp \ + loamhandler.cpp +unix:LIBS += -L../../../lib -lqtools +win32:INCLUDEPATH += . +win32-mingw:LIBS += -L../../../lib -lqtools +win32-msvc:LIBS += qtools.lib shell32.lib +win32-msvc:TMAKE_LFLAGS += /LIBPATH:....\\..\lib +win32-borland:LIBS += qtools.lib doxycfg.lib shell32.lib +win32-borland:TMAKE_LFLAGS += -L..\..\..\lib +win32:TMAKE_CXXFLAGS += -DQT_NODLL +DESTDIR = ../lib +OBJECTS_DIR = ../objects +TARGET = doxmlparser +INCLUDEPATH += ../../../qtools ../include + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/debug.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/debug.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/debug.cpp (revision 1322) @@ -0,0 +1,24 @@ +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> + +#include "debug.h" + +static int s_debugLevel = 0; + +void debug(int level,const char *msg,...) +{ + if (level<=s_debugLevel) + { + va_list args; + va_start(args, msg); + vfprintf(stderr, msg, args); + va_end(args); + } +} + +void setDebugLevel(int level) +{ + s_debugLevel = level; +} + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/loamhandler.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/loamhandler.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/loamhandler.cpp (revision 1322) @@ -0,0 +1,75 @@ +#include "loamhandler.h" +#include "memberhandler.h" + + +ListOfAllMembersHandler::ListOfAllMembersHandler(IBaseHandler *parent) : m_parent(parent) +{ + m_members.setAutoDelete(TRUE); + + addStartHandler("member",this,&ListOfAllMembersHandler::startMember); + addStartHandler("name",this,&ListOfAllMembersHandler::startName); + addEndHandler("name",this,&ListOfAllMembersHandler::endName); + addStartHandler("scope",this,&ListOfAllMembersHandler::startScope); + addEndHandler("scope",this,&ListOfAllMembersHandler::endScope); + + addEndHandler("listofallmembers",this,&ListOfAllMembersHandler::endListOfAllMembers); +} + +void ListOfAllMembersHandler::initialize(MainHandler *mh) +{ + QListIterator<MemberReference> mli(m_members); + MemberReference *mr; + for (;(mr=mli.current());++mli) + { + mr->initialize(mh); + } +} + +void ListOfAllMembersHandler::startMember(const QXmlAttributes& attrib) +{ + MemberReference *mr = new MemberReference; + mr->m_memId = attrib.value("refid"); + mr->m_virtualness = attrib.value("virt"); + mr->m_protection = attrib.value("prot"); + mr->m_ambiguityScope = attrib.value("ambiguityscope"); + m_members.append(new MemberReference); +} + +void ListOfAllMembersHandler::startName(const QXmlAttributes&) +{ + m_curString=""; +} + +void ListOfAllMembersHandler::endName() +{ + ASSERT(m_members.getLast()); + m_members.getLast()->m_name = m_curString; +} + +void ListOfAllMembersHandler::startScope(const QXmlAttributes&) +{ + m_curString=""; +} + +void ListOfAllMembersHandler::endScope() +{ + ASSERT(m_members.getLast()); + m_members.getLast()->m_scope = m_curString; +} + +void ListOfAllMembersHandler::startListOfAllMembers(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"listofallmembers start\n"); +} + +void ListOfAllMembersHandler::endListOfAllMembers() +{ + m_parent->setDelegate(0); + debug(2,"listofallmembers end\n"); +} + +IMemberReferenceIterator *ListOfAllMembersHandler::members() const +{ + return new MemberReferenceIterator(m_members); +} Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/compoundhandler.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/compoundhandler.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/compoundhandler.h (revision 1322) @@ -0,0 +1,236 @@ +/****************************************************************************** + * + * $Id: compoundhandler.h,v 1.33 2002/10/13 21:01:58 dimitri Exp $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ +#ifndef _COMPOUNDHANDLER_H +#define _COMPOUNDHANDLER_H + +#include <qstring.h> +#include <qlist.h> +#include <qxml.h> +#include <doxmlintf.h> + +#include "stringimpl.h" +#include "basehandler.h" +#include "baseiterator.h" + +class MainHandler; +class DocHandler; +class ProgramListingHandler; +class GraphHandler; +class MemberHandler; +class CompoundHandler; +class SectionHandler; +class ParamHandler; +class TemplateParamListHandler; +class TitleHandler; +class ListOfAllMembersHandler; + +class IncludeHandler : public IInclude, public BaseHandler<IncludeHandler> +{ + public: + IncludeHandler(IBaseHandler *parent,const char *endtag); + virtual ~IncludeHandler(); + + void startInclude(const QXmlAttributes &attrib); + void endInclude(); + + // IInclude + virtual const IString * name() const + { return &m_name; } + virtual const IString * refId() const + { return &m_refId; } + virtual bool isLocal() const + { return &m_isLocal; } + + private: + IBaseHandler *m_parent; + StringImpl m_name; // element's content + StringImpl m_refId; // refid + bool m_isLocal; // local +}; + +class IncludeIterator : public BaseIterator<IIncludeIterator,IInclude,IncludeHandler> +{ + public: + IncludeIterator(const QList<IncludeHandler> &list) : + BaseIterator<IIncludeIterator,IInclude,IncludeHandler>(list) {} +}; + + +class RelatedCompound : public IRelatedCompound +{ + public: + RelatedCompound(CompoundHandler *parent, + const QString &id, + Protection prot, + Kind kind + ) : + m_parent(parent), m_id(id), m_protection(prot), m_kind(kind) {} + virtual ~RelatedCompound() {} + void setName(const QString &str) { m_name = str; } + + virtual ICompound *compound() const; + virtual Protection protection() const { return m_protection; } + virtual Kind kind() const { return m_kind; } + virtual const IString *name() const { return &m_name; } + + private: + CompoundHandler *m_parent; + QString m_id; // refid + Protection m_protection; // prot + Kind m_kind; // virt + StringImpl m_name; // element's content +}; + +class RelatedCompoundIterator : public BaseIterator<IRelatedCompoundIterator,IRelatedCompound,RelatedCompound> +{ + public: + RelatedCompoundIterator(const QList<RelatedCompound> &list) : + BaseIterator<IRelatedCompoundIterator,IRelatedCompound,RelatedCompound>(list) {} +}; + + +class CompoundHandler : public IClass, + public IStruct, + public IUnion, + public IException, + public IInterface, + public INamespace, + public IFile, + public IGroup, + public IPage, + public BaseHandler<CompoundHandler> +{ + friend class RelatedCompound; + + public: + virtual void startSection(const QXmlAttributes& attrib); + virtual void startCompound(const QXmlAttributes& attrib); + virtual void startSuperClass(const QXmlAttributes& attrib); + virtual void endSuperClass(); + virtual void startSubClass(const QXmlAttributes& attrib); + virtual void endSubClass(); + virtual void endCompound(); + virtual void endCompoundName(); + virtual void startBriefDesc(const QXmlAttributes& attrib); + virtual void startDetailedDesc(const QXmlAttributes& attrib); + virtual void startLocation(const QXmlAttributes& attrib); + virtual void startProgramListing(const QXmlAttributes& attrib); + virtual void startInheritanceGraph(const QXmlAttributes& attrib); + virtual void startCollaborationGraph(const QXmlAttributes& attrib); + virtual void startIncludeDependencyGraph(const QXmlAttributes& attrib); + virtual void startIncludedByDependencyGraph(const QXmlAttributes& attrib); + virtual void startIncludes(const QXmlAttributes& attrib); + virtual void startIncludedBy(const QXmlAttributes& attrib); + virtual void startInnerDir(const QXmlAttributes& attrib); + virtual void startInnerClass(const QXmlAttributes& attrib); + virtual void startInnerNamespace(const QXmlAttributes& attrib); + virtual void startInnerFile(const QXmlAttributes& attrib); + virtual void startInnerGroup(const QXmlAttributes& attrib); + virtual void startInnerPage(const QXmlAttributes& attrib); + virtual void startTitle(const QXmlAttributes& attrib); + virtual void startTemplateParamList(const QXmlAttributes& attrib); + virtual void startListOfAllMembers(const QXmlAttributes& attrib); + virtual void addref() { m_refCount++; } + + CompoundHandler(const QString &dirName); + virtual ~CompoundHandler(); + bool parseXML(const char *compId); + void initialize(MainHandler *mh); + void insertMember(MemberHandler *mh); + ICompound *toICompound() const; + + // ICompound implementation + const IString *name() const { return &m_name; } + const IString *id() const { return &m_id; } + CompoundKind kind() const { return m_kind; } + const IString *kindString() const { return &m_kindString; } + ISectionIterator *sections() const; + IDocRoot *briefDescription() const; + IDocRoot *detailedDescription() const; + IMember *memberById(const char *id) const; + IMemberIterator *memberByName(const char *name) const; + IParamIterator *templateParameters() const; + void release(); + + // IClass implementation + IGraph *inheritanceGraph() const; + IGraph *collaborationGraph() const; + IRelatedCompoundIterator *baseCompounds() const; + IRelatedCompoundIterator *derivedCompounds() const; + ICompoundIterator *nestedCompounds() const; + ICompoundIterator *nestedGroup() const; + const IString *locationFile() const { return &m_defFile; } + int locationLine() const { return m_defLine; } + const IString *locationBodyFile() const { return &m_defBodyFile; } + int locationBodyStartLine() const { return m_defBodyStart; } + int locationBodyEndLine() const { return m_defBodyEnd; } + IMemberReferenceIterator *members() const; + + // IFile implementation + IGraph *includeDependencyGraph() const; + IGraph *includedByDependencyGraph() const; + IDocProgramListing *source() const; + IIncludeIterator *includes() const; + IIncludeIterator *includedBy() const; + + // IPage implementation + const IDocTitle *title() const; + + private: + // XML elements: + // ------------- + StringImpl m_name; // compoundname + TitleHandler* m_titleHandler; // title + QList<RelatedCompound> m_subClasses; // basecompoundref + QList<RelatedCompound> m_superClasses; // derivedcompoundref + QList<IncludeHandler> m_includes; // includes + QList<IncludeHandler> m_includedBy; // includedBy + GraphHandler* m_includeDependencyGraph; // incdepgraph + GraphHandler* m_includedByDependencyGraph; // invincdepgraph + QList<QString> m_innerCompounds; // innerdir/innerfile/innerclass/innernamespace/innergroup + TemplateParamListHandler* m_templateParamList; // templateparamlist + QList<SectionHandler> m_sections; // sectiondef + DocHandler* m_brief; // briefdescription + DocHandler* m_detailed; // detaileddescription + GraphHandler* m_inheritanceGraph; // inheritancegraph + GraphHandler* m_collaborationGraph; // collaborationgraph + ProgramListingHandler* m_programListing; // programlisting + // location + StringImpl m_defFile; // - file + int m_defLine; // - line + StringImpl m_defBodyFile; // - bodyfile + int m_defBodyStart; // - bodystart + int m_defBodyEnd; // - bodyend + ListOfAllMembersHandler* m_members; // listofallmember + + // XML attributes: + // --------------- + StringImpl m_id; // id + CompoundKind m_kind; // kind + StringImpl m_kindString; // kind as a string + StringImpl m_protection; // prot + + // local variables + QString m_xmlDir; // directory where the info is found + int m_refCount; // object reference counter + QDict<MemberHandler> m_memberDict; // id->member lookup + QDict<QList<MemberHandler> > m_memberNameDict; // name->memberlist lookup + MainHandler* m_mainHandler; // parent object +}; + +void compoundhandler_init(); +void compoundhandler_exit(); + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/mainhandler.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/mainhandler.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/mainhandler.h (revision 1322) @@ -0,0 +1,82 @@ +/****************************************************************************** + * + * $Id:$ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _MAINHANDLER_H +#define _MAINHANDLER_H + +#include <qlist.h> + +#include <doxmlintf.h> +#include "basehandler.h" + +class CompoundHandler; +struct CompoundEntry; + +struct IndexEntry +{ + QString id; + QString name; +}; + +struct MemberEntry : public IndexEntry +{ + CompoundEntry *compound; +}; + +struct CompoundEntry : public IndexEntry +{ + CompoundEntry(int size) : memberDict(size) + { memberDict.setAutoDelete(TRUE); } + QDict<MemberEntry> memberDict; +}; + +class MainHandler : public IDoxygen, public BaseHandler<MainHandler> +{ + public: + virtual void startCompound(const QXmlAttributes& attrib); + virtual void startMember(const QXmlAttributes& attrib); + virtual void endMember(); + virtual void startName(const QXmlAttributes& attrib); + virtual void endName(); + MainHandler(); + virtual ~MainHandler(); + + // IDoxygen + ICompoundIterator *compounds() const; + ICompound *compoundById(const char *id) const; + virtual ICompound *compoundByName(const char *name) const; + virtual ICompound *memberById(const char *id) const; + virtual ICompoundIterator *memberByName(const char *name) const; + + virtual void release(); + void setDebugLevel(int level); + bool readXMLDir(const char *dirName); + void dump(); + void unloadCompound(CompoundHandler *ch); + + private: + CompoundEntry *m_curCompound; + MemberEntry *m_curMember; + QList<CompoundEntry> m_compounds; + QDict<CompoundEntry> m_compoundDict; + QDict<CompoundEntry> m_compoundNameDict; + QDict<MemberEntry> m_memberDict; + QDict<QList<CompoundEntry> > m_memberNameDict; + QString m_xmlDirName; + QDict<CompoundHandler> m_compoundsLoaded; + bool m_insideMember; +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/baseiterator.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/baseiterator.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/baseiterator.h (revision 1322) @@ -0,0 +1,50 @@ +/****************************************************************************** + * + * $Id: doxygen.cpp,v 1.87 2001/03/19 19:27:40 root Exp $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ +#ifndef BASEITERATOR_H +#define BASEITERATOR_H + +#include <qlist.h> +#include <doxmlintf.h> + +template<class Intf,class ElemIntf,class ElemImpl> class BaseIterator : + public Intf, public QListIterator<ElemImpl> +{ + public: + BaseIterator(const QList<ElemImpl> &list) : QListIterator<ElemImpl>(list) {} + virtual ~BaseIterator() {} + virtual ElemIntf *toFirst() { return QListIterator<ElemImpl>::toFirst(); } + virtual ElemIntf *toLast() { return QListIterator<ElemImpl>::toLast(); } + virtual ElemIntf *toNext() { return QListIterator<ElemImpl>::operator++(); } + virtual ElemIntf *toPrev() { return QListIterator<ElemImpl>::operator--(); } + virtual ElemIntf *current() const { return QListIterator<ElemImpl>::current(); } + virtual void release() { delete this; } +}; + +template<class Intf,class ElemIntf,class ElemImpl,class Intermediate> + class BaseIteratorVia : + public Intf, public QListIterator<ElemImpl> +{ + public: + BaseIteratorVia(const QList<ElemImpl> &list) : QListIterator<ElemImpl>(list) {} + virtual ~BaseIteratorVia() {} + virtual ElemIntf *toFirst() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::toFirst()); } + virtual ElemIntf *toLast() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::toLast()); } + virtual ElemIntf *toNext() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::operator++()); } + virtual ElemIntf *toPrev() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::operator--()); } + virtual ElemIntf *current() const { return static_cast<Intermediate *>(QListIterator<ElemImpl>::current()); } + virtual void release() { delete this; } +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/debug.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/debug.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/debug.h (revision 1322) @@ -0,0 +1,7 @@ +#ifndef _DEBUG_H +#define _DEBUG_H + +void debug(int level,const char *msg,...); +void setDebugLevel(int level); + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/Makefile.doxmlparser =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/Makefile.doxmlparser (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/Makefile.doxmlparser (revision 1322) @@ -0,0 +1,224 @@ +############################################################################# +# Makefile for building ../lib/libdoxmlparser.a +# Generated by tmake at 15:12, 2011/03/28 +# Project: doxmlparser +# Template: lib.t +############################################################################# + +####### Compiler, tools and options + +CC = cc +CXX = c++ +CFLAGS = -pipe -Wall -W -g -fstack-protector +CXXFLAGS= -pipe -D__FreeBSD__=6 -Wall -W -g -fstack-protector +INCPATH = -I../../../qtools -I../include +AR = ar cq +RANLIB = ranlib +MOC = /usr/bin/moc + +TAR = tar -cf +GZIP = gzip -9f + +####### Files + +HEADERS = basehandler.h \ + mainhandler.h \ + compoundhandler.h \ + sectionhandler.h \ + memberhandler.h \ + paramhandler.h \ + dochandler.h \ + linkedtexthandler.h \ + debug.h \ + graphhandler.h \ + stringimpl.h \ + loamhandler.h +SOURCES = mainhandler.cpp \ + compoundhandler.cpp \ + sectionhandler.cpp \ + memberhandler.cpp \ + paramhandler.cpp \ + dochandler.cpp \ + linkedtexthandler.cpp \ + basehandler.cpp \ + debug.cpp \ + graphhandler.cpp \ + loamhandler.cpp +OBJECTS = ../objects/mainhandler.o \ + ../objects/compoundhandler.o \ + ../objects/sectionhandler.o \ + ../objects/memberhandler.o \ + ../objects/paramhandler.o \ + ../objects/dochandler.o \ + ../objects/linkedtexthandler.o \ + ../objects/basehandler.o \ + ../objects/debug.o \ + ../objects/graphhandler.o \ + ../objects/loamhandler.o +SRCMOC = +OBJMOC = +DIST = +TARGET = ../lib/libdoxmlparser.a + +####### Implicit rules + +.SUFFIXES: .cpp .cxx .cc .C .c + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< + +####### Build rules + +all: $(TARGET) + +staticlib: $(TARGET) + +$(TARGET): $(OBJECTS) $(OBJMOC) + -rm -f $(TARGET) + $(AR) $(TARGET) $(OBJECTS) $(OBJMOC) + ranlib $(TARGET) + +moc: $(SRCMOC) + +tmake: + tmake doxmlparser.pro + +dist: + $(TAR) doxmlparser.tar doxmlparser.pro $(SOURCES) $(HEADERS) $(DIST) + $(GZIP) doxmlparser.tar + +clean: + -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(TARGET) + -rm -f *~ core + +####### Compile + +../objects/mainhandler.o: mainhandler.cpp \ + mainhandler.h \ + doxmlintf.h \ + basehandler.h \ + debug.h \ + compoundhandler.h \ + stringimpl.h \ + baseiterator.h \ + sectionhandler.h \ + graphhandler.h \ + dochandler.h \ + memberhandler.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/mainhandler.o mainhandler.cpp + +../objects/compoundhandler.o: compoundhandler.cpp \ + mainhandler.h \ + doxmlintf.h \ + basehandler.h \ + debug.h \ + compoundhandler.h \ + stringimpl.h \ + baseiterator.h \ + dochandler.h \ + graphhandler.h \ + sectionhandler.h \ + paramhandler.h \ + loamhandler.h \ + memberhandler.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/compoundhandler.o compoundhandler.cpp + +../objects/sectionhandler.o: sectionhandler.cpp \ + mainhandler.h \ + doxmlintf.h \ + basehandler.h \ + debug.h \ + compoundhandler.h \ + stringimpl.h \ + baseiterator.h \ + sectionhandler.h \ + memberhandler.h \ + dochandler.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/sectionhandler.o sectionhandler.cpp + +../objects/memberhandler.o: memberhandler.cpp \ + memberhandler.h \ + doxmlintf.h \ + basehandler.h \ + debug.h \ + baseiterator.h \ + stringimpl.h \ + sectionhandler.h \ + dochandler.h \ + mainhandler.h \ + linkedtexthandler.h \ + paramhandler.h \ + compoundhandler.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/memberhandler.o memberhandler.cpp + +../objects/paramhandler.o: paramhandler.cpp \ + paramhandler.h \ + doxmlintf.h \ + stringimpl.h \ + basehandler.h \ + debug.h \ + baseiterator.h \ + memberhandler.h \ + linkedtexthandler.h \ + dochandler.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/paramhandler.o paramhandler.cpp + +../objects/dochandler.o: dochandler.cpp \ + dochandler.h \ + doxmlintf.h \ + stringimpl.h \ + basehandler.h \ + debug.h \ + baseiterator.h \ + linkedtexthandler.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/dochandler.o dochandler.cpp + +../objects/linkedtexthandler.o: linkedtexthandler.cpp \ + linkedtexthandler.h \ + baseiterator.h \ + doxmlintf.h \ + basehandler.h \ + debug.h \ + stringimpl.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/linkedtexthandler.o linkedtexthandler.cpp + +../objects/basehandler.o: basehandler.cpp \ + basehandler.h \ + debug.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/basehandler.o basehandler.cpp + +../objects/debug.o: debug.cpp \ + debug.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/debug.o debug.cpp + +../objects/graphhandler.o: graphhandler.cpp \ + graphhandler.h \ + stringimpl.h \ + doxmlintf.h \ + basehandler.h \ + debug.h \ + baseiterator.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/graphhandler.o graphhandler.cpp + +../objects/loamhandler.o: loamhandler.cpp \ + loamhandler.h \ + doxmlintf.h \ + basehandler.h \ + debug.h \ + memberhandler.h \ + baseiterator.h \ + stringimpl.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../objects/loamhandler.o loamhandler.cpp + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/loamhandler.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/loamhandler.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/loamhandler.h (revision 1322) @@ -0,0 +1,52 @@ +/****************************************************************************** + * + * $Id:$ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _LOAMHANDLER_H +#define _LOAMHANDLER_H + +#include <qstring.h> +#include <qlist.h> +#include <doxmlintf.h> + +#include "basehandler.h" + +class MainHandler; +class MemberReference; + +class ListOfAllMembersHandler : public BaseHandler<ListOfAllMembersHandler> +{ + public: + virtual void startMember(const QXmlAttributes& attrib); + virtual void startName(const QXmlAttributes& attrib); + virtual void endName(); + virtual void startScope(const QXmlAttributes& attrib); + virtual void endScope(); + virtual void startListOfAllMembers(const QXmlAttributes& attrib); + virtual void endListOfAllMembers(); + + ListOfAllMembersHandler(IBaseHandler *parent); + virtual ~ListOfAllMembersHandler() {} + + void initialize(MainHandler *mh); + + virtual IMemberReferenceIterator *members() const; + + protected: + IBaseHandler *m_parent; + QList<MemberReference> m_members; +}; + +#endif + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/Makefile =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/Makefile (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/Makefile (revision 1322) @@ -0,0 +1,33 @@ +# +# This file was generated from Makefile.in on Mon Mar 28 15:09:00 CEST 2011 +# + +DOXYGEN = /Users/dimitri/doxygen +TMAKEPATH = /Users/dimitri/doxygen/tmake/lib/macosx-c++ +ENV = env TMAKEPATH=$(TMAKEPATH) +TMAKE = /Users/dimitri/doxygen/tmake/bin/tmake +MAKE = /opt/local/bin/gmake +PERL = /opt/local/bin/perl +RM = rm -f +CP = cp +VERSION = 1.7.3 +INSTALL = /usr/local +INSTTOOL = /opt/local/bin/ginstall +DOXYDOCS = .. +DOCDIR = $(INSTALL)/share/doc/packages/doxygen +QTDIR = /usr +HAVE_DOT = /usr/local/bin/dot +MKSPECS = -spec macx-g++ +all clean depend: Makefile.doxmlparser + $(MAKE) -f Makefile.doxmlparser $@ + +distclean: clean + $(RM) -rf Makefile.doxmlparser doxmlparser.pro Makefile obj + +tmake: + $(ENV) $(PERL) $(TMAKE) doxmlparser.pro >Makefile.doxmlparser + +Makefile.doxmlparser: doxmlparser.pro + $(ENV) $(PERL) $(TMAKE) doxmlparser.pro >Makefile.doxmlparser + +install: Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/src/stringimpl.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/src/stringimpl.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/src/stringimpl.h (revision 1322) @@ -0,0 +1,30 @@ +#ifndef STRINGIMPL_H +#define STRINGIMPL_H + +#include <qstring.h> +#include "doxmlintf.h" + +class StringImpl : public QString, public IString +{ + public: + StringImpl() {} + StringImpl(const QString &str) : QString(str) {} + StringImpl &operator=(const QString &str) + { QString::operator=(str); return *this; } + virtual ~StringImpl() {} + + // IString + const char *latin1() const + { return QString::latin1(); } + const char *utf8() const + { return QString::utf8(); } + unsigned short unicodeCharAt(int index) const + { return QString::unicode()[index].unicode(); } + bool isEmpty() const + { return QString::isEmpty(); } + int length() const + { return QString::length(); } +}; + +#endif + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/Makefile.in =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/Makefile.in (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/Makefile.in (revision 1322) @@ -0,0 +1,13 @@ +all clean depend: Makefile.metrics + $(MAKE) -f Makefile.metrics $@ + +distclean: clean + $(RM) -rf Makefile.metrics metrics.pro Makefile obj + +tmake: + $(ENV) $(PERL) $(TMAKE) metrics.pro >Makefile.metrics + +Makefile.metrics: metrics.pro + $(ENV) $(PERL) $(TMAKE) metrics.pro >Makefile.metrics + +install: Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/Makefile.metrics =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/Makefile.metrics (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/Makefile.metrics (revision 1322) @@ -0,0 +1,77 @@ +############################################################################# +# Makefile for building metrics +# Generated by tmake at 15:12, 2011/03/28 +# Project: metrics +# Template: app.t +############################################################################# + +####### Compiler, tools and options + +CC = cc +CXX = c++ +CFLAGS = -pipe -Wall -W -g -fstack-protector +CXXFLAGS= -pipe -D__FreeBSD__=6 -Wall -W -g -fstack-protector +INCPATH = -I../../../../qtools -I../../include +LINK = c++ +LFLAGS = -Wl,-search_paths_first +LIBS = -L../../../../lib -L../../lib -ldoxmlparser -lqtools -liconv -framework CoreServices +MOC = /usr/bin/moc + +TAR = tar -cf +GZIP = gzip -9f + +####### Files + +HEADERS = +SOURCES = main.cpp +OBJECTS = obj/main.o +SRCMOC = +OBJMOC = +DIST = +TARGET = metrics + +####### Implicit rules + +.SUFFIXES: .cpp .cxx .cc .C .c + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< + +####### Build rules + +all: $(TARGET) + +$(TARGET): $(OBJECTS) $(OBJMOC) ../../lib/libdoxmlparser.a + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) + +moc: $(SRCMOC) + +tmake: + tmake metrics.pro + +dist: + $(TAR) metrics.tar metrics.pro $(SOURCES) $(HEADERS) $(DIST) + $(GZIP) metrics.tar + +clean: + -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(TARGET) + -rm -f *~ core + +####### Compile + +obj/main.o: main.cpp \ + ../../include/doxmlintf.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/main.o main.cpp + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/main.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/main.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/main.cpp (revision 1322) @@ -0,0 +1,254 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +/*! \mainpage Metrics + * This is a small example that shows how to use doxygen's XML output and + * the doxmlparser library. The example shows some very basic code metrics. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <doxmlintf.h> + +bool isDocumented(IDocRoot *brief,IDocRoot *detailed) +{ + bool found=false; + if (brief) + { + IDocIterator *docIt = brief->contents(); + if (docIt->current()) // method has brief description + { + found=true; + } + docIt->release(); + } + if (detailed && !found) + { + IDocIterator *docIt = detailed->contents(); + if (docIt->current()) + { + found=true; + } + docIt->release(); + } + return found; +} + +int main(int argc,char **argv) +{ + if (argc!=2) + { + printf("Usage: %s xml_output_dir\n",argv[0]); + exit(1); + } + + int numClasses=0; + int numDocClasses=0; + int numStructs=0; + int numUnions=0; + int numInterfaces=0; + int numExceptions=0; + int numNamespaces=0; + int numFiles=0; + int numGroups=0; + int numPages=0; + int numPackages=0; + int numPubMethods=0; + int numProMethods=0; + int numPriMethods=0; + int numDocPubMethods=0; + int numDocProMethods=0; + int numDocPriMethods=0; + int numFunctions=0; + int numAttributes=0; + int numVariables=0; + int numDocFunctions=0; + int numDocAttributes=0; + int numDocVariables=0; + int numParams=0; + + IDoxygen *dox = createObjectModel(); + + dox->setDebugLevel(0); + + if (!dox->readXMLDir(argv[1])) + { + printf("Error reading %s/index.xml\n",argv[1]); + exit(1); + } + + ICompoundIterator *cli = dox->compounds(); + ICompound *comp; + for (cli->toFirst();(comp=cli->current());cli->toNext()) + { + printf("Processing %s...\n",comp->name()->latin1()); + bool hasDocs = isDocumented(comp->briefDescription(),comp->detailedDescription()); + switch (comp->kind()) + { + case ICompound::Class: + numClasses++; + if (hasDocs) numDocClasses++; + break; + case ICompound::Struct: numStructs++; break; + case ICompound::Union: numUnions++; break; + case ICompound::Interface: numInterfaces++; break; + case ICompound::Exception: numExceptions++; break; + case ICompound::Namespace: numNamespaces++; break; + case ICompound::File: numFiles++; break; + case ICompound::Group: numGroups++; break; + case ICompound::Page: numPages++; break; + default: break; + } + + ISectionIterator *sli = comp->sections(); + ISection *sec; + for (sli->toFirst();(sec=sli->current());sli->toNext()) + { + IMemberIterator *mli = sec->members(); + IMember *mem; + for (mli->toFirst();(mem=mli->current());mli->toNext()) + { + IParamIterator *pli = mem->parameters(); + IParam *par; + if (comp->kind()==ICompound::Class || + comp->kind()==ICompound::Struct || + comp->kind()==ICompound::Interface + ) + { + if (mem->kind()==IMember::Function || + mem->kind()==IMember::Prototype || + mem->kind()==IMember::Signal || + mem->kind()==IMember::Slot || + mem->kind()==IMember::DCOP + ) // is a "method" + { + if (mem->section()->isPublic()) + { + numPubMethods++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocPubMethods++; + } + } + else if (mem->section()->isProtected()) + { + numProMethods++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocProMethods++; + } + } + else if (mem->section()->isPrivate()) + { + numPriMethods++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocPriMethods++; + } + } + } + else if (mem->kind()==IMember::Variable || + mem->kind()==IMember::Property + ) // is an "attribute" + { + numAttributes++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocAttributes++; + } + } + } + else if (comp->kind()==ICompound::File || + comp->kind()==ICompound::Namespace + ) + { + if (mem->kind()==IMember::Function || + mem->kind()==IMember::Prototype || + mem->kind()==IMember::Signal || + mem->kind()==IMember::Slot || + mem->kind()==IMember::DCOP + ) // is a "method" + { + numFunctions++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocFunctions++; + } + } + else if (mem->kind()==IMember::Variable || + mem->kind()==IMember::Property + ) // is an "attribute" + { + numVariables++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocVariables++; + } + } + } + + for (pli->toFirst();(par=pli->current());pli->toNext()) + { + numParams++; + } + const char *type = mem->typeString()->latin1(); + if (type && strcmp(type, "void")) + { + numParams++; // count non-void return types as well + } + pli->release(); + } + mli->release(); + } + sli->release(); + + comp->release(); + } + cli->release(); + + dox->release(); + + int numMethods = numPubMethods+numProMethods+numPriMethods; + int numDocMethods = numDocPubMethods+numDocProMethods+numDocPriMethods; + + printf("Metrics:\n"); + printf("-----------------------------------\n"); + if (numClasses>0) printf("Classes: %10d (%d documented)\n",numClasses,numDocClasses); + if (numStructs>0) printf("Structs: %10d\n",numStructs); + if (numUnions>0) printf("Unions: %10d\n",numUnions); + if (numInterfaces>0) printf("Interfaces: %10d\n",numInterfaces); + if (numExceptions>0) printf("Exceptions: %10d\n",numExceptions); + if (numNamespaces>0) printf("Namespaces: %10d\n",numNamespaces); + if (numFiles>0) printf("Files: %10d\n",numFiles); + if (numGroups>0) printf("Groups: %10d\n",numGroups); + if (numPages>0) printf("Pages: %10d\n",numPages); + if (numPackages>0) printf("Packages: %10d\n",numPackages); + if (numMethods>0) printf("Methods: %10d (%d documented)\n",numMethods,numDocMethods); + if (numPubMethods>0) printf(" Public: %10d (%d documented)\n",numPubMethods,numDocPubMethods); + if (numProMethods>0) printf(" Protected: %10d (%d documented)\n",numProMethods,numDocProMethods); + if (numPriMethods>0) printf(" Private: %10d (%d documented)\n",numPriMethods,numDocPriMethods); + if (numFunctions>0) printf("Functions: %10d (%d documented)\n",numFunctions,numDocFunctions); + if (numAttributes>0) printf("Attributes: %10d (%d documented)\n",numAttributes,numDocAttributes); + if (numVariables>0) printf("Variables: %10d (%d documented)\n",numVariables,numDocVariables); + if (numParams>0) printf("Params: %10d\n",numParams); + printf("-----------------------------------\n"); + if (numClasses>0) printf("Avg. #methods/compound: %10f\n",(double)numMethods/(double)numClasses); + if (numMethods>0) printf("Avg. #params/method: %10f\n",(double)numParams/(double)numMethods); + printf("-----------------------------------\n"); + + return 0; +} + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/metrics.pro =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/metrics.pro (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/metrics.pro (revision 1322) @@ -0,0 +1,25 @@ +# +# This file was generated from metrics.pro.in on Mon Mar 28 15:09:00 CEST 2011 +# + +TEMPLATE = app.t +CONFIG = console warn_on debug +HEADERS = +SOURCES = main.cpp +unix:LIBS += -L../../../../lib -L../../lib -ldoxmlparser -lqtools +win32:INCLUDEPATH += . +win32-mingw:LIBS += -L../../../../lib -L../../lib -ldoxmlparser -lqtools +win32-msvc:LIBS += doxmlparser.lib qtools.lib shell32.lib +win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\..\..\lib;..\..\lib +win32-borland:LIBS += doxmlparser.lib qtools.lib shell32.lib +win32-borland:TMAKE_LFLAGS += -L..\..\..\..\lib -L..\..\lib +win32:TMAKE_CXXFLAGS += -DQT_NODLL +DESTDIR = +OBJECTS_DIR = obj +TARGET = metrics +DEPENDPATH = ../../include +INCLUDEPATH += ../../../../qtools ../../include +unix:TARGETDEPS = ../../lib/libdoxmlparser.a +win32:TARGETDEPS = ..\..\lib\doxmlparser.lib + +TMAKE_MOC = /usr/bin/moc Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/metrics.pro.in =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/metrics.pro.in (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/metrics.pro.in (revision 1322) @@ -0,0 +1,20 @@ +TEMPLATE = app.t +CONFIG = console warn_on $extraopts +HEADERS = +SOURCES = main.cpp +unix:LIBS += -L../../../../lib -L../../lib -ldoxmlparser -lqtools +win32:INCLUDEPATH += . +win32-mingw:LIBS += -L../../../../lib -L../../lib -ldoxmlparser -lqtools +win32-msvc:LIBS += doxmlparser.lib qtools.lib shell32.lib +win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\..\..\lib;..\..\lib +win32-borland:LIBS += doxmlparser.lib qtools.lib shell32.lib +win32-borland:TMAKE_LFLAGS += -L..\..\..\..\lib -L..\..\lib +win32:TMAKE_CXXFLAGS += -DQT_NODLL +DESTDIR = +OBJECTS_DIR = obj +TARGET = metrics +DEPENDPATH = ../../include +INCLUDEPATH += ../../../../qtools ../../include +unix:TARGETDEPS = ../../lib/libdoxmlparser.a +win32:TARGETDEPS = ..\..\lib\doxmlparser.lib + Index: branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/Makefile =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/Makefile (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxmlparser/examples/metrics/Makefile (revision 1322) @@ -0,0 +1,33 @@ +# +# This file was generated from Makefile.in on Mon Mar 28 15:09:00 CEST 2011 +# + +DOXYGEN = /Users/dimitri/doxygen +TMAKEPATH = /Users/dimitri/doxygen/tmake/lib/macosx-c++ +ENV = env TMAKEPATH=$(TMAKEPATH) +TMAKE = /Users/dimitri/doxygen/tmake/bin/tmake +MAKE = /opt/local/bin/gmake +PERL = /opt/local/bin/perl +RM = rm -f +CP = cp +VERSION = 1.7.3 +INSTALL = /usr/local +INSTTOOL = /opt/local/bin/ginstall +DOXYDOCS = .. +DOCDIR = $(INSTALL)/share/doc/packages/doxygen +QTDIR = /usr +HAVE_DOT = /usr/local/bin/dot +MKSPECS = -spec macx-g++ +all clean depend: Makefile.metrics + $(MAKE) -f Makefile.metrics $@ + +distclean: clean + $(RM) -rf Makefile.metrics metrics.pro Makefile obj + +tmake: + $(ENV) $(PERL) $(TMAKE) metrics.pro >Makefile.metrics + +Makefile.metrics: metrics.pro + $(ENV) $(PERL) $(TMAKE) metrics.pro >Makefile.metrics + +install: Index: branches/xZenu/src/util/doxygen/addon/doxyapp/Makefile.in =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxyapp/Makefile.in (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxyapp/Makefile.in (revision 1322) @@ -0,0 +1,17 @@ + +all clean depend distclean: Makefile.doxyapp + $(MAKE) -f Makefile.doxyapp $@ + +distclean: clean + $(RM) -rf Makefile doxyapp.pro Makefile.doxyapp + +tmake: + $(ENV) $(PERL) $(TMAKE) doxyapp.pro >Makefile.doxyapp + +strip: + strip doxyapp + +Makefile.doxyapp: doxyapp.pro + $(ENV) $(PERL) $(TMAKE) doxyapp.pro >Makefile.doxyapp + +install: Index: branches/xZenu/src/util/doxygen/addon/doxyapp/doxyapp.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxyapp/doxyapp.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxyapp/doxyapp.cpp (revision 1322) @@ -0,0 +1,314 @@ +/****************************************************************************** + * + * Copyright (C) 1997-2006 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +/** @file + * @brief Example of how to use doxygen as part of another GPL applications + * + * This example shows how to configure and run doxygen programmatically from + * within an application without generating the usual output. + * The example should work on any Unix like OS (including Linux and Mac OS X). + * + * This example shows how to use to code parser to get cross-references information + * and it also shows how to look up symbols in a program parsed by doxygen and + * show some information about them. + */ + +#include <stdlib.h> +#include <unistd.h> +#include "doxygen.h" +#include "outputgen.h" +#include "parserintf.h" + +class XRefDummyCodeGenerator : public CodeOutputInterface +{ + public: + XRefDummyCodeGenerator(FileDef *fd) : m_fd(fd) {} + ~XRefDummyCodeGenerator() {} + + // these are just null functions, they can be used to produce a syntax highlighted + // and cross-linked version of the source code, but who needs that anyway ;-) + void codify(const char *) {} + void writeCodeLink(const char *,const char *,const char *,const char *,const char *) {} + void startCodeLine() {} + void endCodeLine() {} + void startCodeAnchor(const char *) {} + void endCodeAnchor() {} + void startFontClass(const char *) {} + void endFontClass() {} + void writeCodeAnchor(const char *) {} + void writeLineNumber(const char *,const char *,const char *,int) {} + + // here we are presented with the symbols found by the code parser + void linkableSymbol(int l, const char *sym,Definition *symDef,Definition *context) + { + QCString ctx; + if (context) // the context of the symbol is known + { + if (context->definitionType()==Definition::TypeMember) // it is inside a member + { + Definition *parentContext = context->getOuterScope(); + if (parentContext && parentContext->definitionType()==Definition::TypeClass) + // it is inside a member of a class + { + ctx.sprintf("inside %s %s of %s %s", + ((MemberDef *)context)->memberTypeName().data(), + context->name().data(), + ((ClassDef*)parentContext)->compoundTypeString().data(), + parentContext->name().data()); + } + else if (parentContext==Doxygen::globalScope) // it is inside a global member + { + ctx.sprintf("inside %s %s", + ((MemberDef *)context)->memberTypeName().data(), + context->name().data()); + } + } + if (ctx.isEmpty()) // it is something else (class, or namespace member, ...) + { + ctx.sprintf("in %s",context->name().data()); + } + } + printf("Found symbol %s at line %d of %s %s\n", + sym,l,m_fd->getDefFileName().data(),ctx.data()); + if (symDef && context) // in this case the definition of the symbol is + // known to doxygen. + { + printf("-> defined at line %d of %s\n", + symDef->getDefLine(),symDef->getDefFileName().data()); + } + } + private: + FileDef *m_fd; +}; + +static void findXRefSymbols(FileDef *fd) +{ + // get the interface to a parser that matches the file extension + ParserInterface *pIntf=Doxygen::parserManager->getParser(fd->getDefFileExtension()); + + // reset the parsers state + pIntf->resetCodeParserState(); + + // create a new backend object + XRefDummyCodeGenerator *xrefGen = new XRefDummyCodeGenerator(fd); + + // parse the source code + pIntf->parseCode(*xrefGen, + 0, + fileToString(fd->absFilePath()), + FALSE, + 0, + fd); + + // dismiss the object. + delete xrefGen; +} + +static void listSymbol(Definition *d) +{ + if (d!=Doxygen::globalScope && // skip the global namespace symbol + d->name().at(0)!='@' // skip anonymous stuff + ) + { + printf("%s\n", + d->name().data()); + } +} + +static void listSymbols() +{ + QDictIterator<DefinitionIntf> sli(*Doxygen::symbolMap); + DefinitionIntf *di; + for (sli.toFirst();(di=sli.current());++sli) + { + if (di->definitionType()==DefinitionIntf::TypeSymbolList) // list of symbols + // with same name + { + DefinitionListIterator dli(*(DefinitionList*)di); + Definition *d; + // for each symbol + for (dli.toFirst();(d=dli.current());++dli) + { + listSymbol(d); + } + } + else // single symbol + { + listSymbol((Definition*)di); + } + } +} + +static void lookupSymbol(Definition *d) +{ + if (d!=Doxygen::globalScope && // skip the global namespace symbol + d->name().at(0)!='@' // skip anonymous stuff + ) + { + printf("Symbol info\n"); + printf("-----------\n"); + printf("Name: %s\n",d->name().data()); + printf("File: %s\n",d->getDefFileName().data()); + printf("Line: %d\n",d->getDefLine()); + // depending on the definition type we can case to the appropriate + // derived to get additional information + switch (d->definitionType()) + { + case Definition::TypeClass: + { + ClassDef *cd = (ClassDef *)d; + printf("Kind: %s\n",cd->compoundTypeString().data()); + } + break; + case Definition::TypeFile: + { + FileDef *fd = (FileDef *)d; + printf("Kind: File: #includes %d other files\n", + fd->includeFileList() ? fd->includeFileList()->count() : 0); + } + break; + case Definition::TypeNamespace: + { + NamespaceDef *nd = (NamespaceDef *)d; + printf("Kind: Namespace: contains %d classes and %d namespaces\n", + nd->getClassSDict() ? nd->getClassSDict()->count() : 0, + nd->getNamespaceSDict() ? nd->getNamespaceSDict()->count() : 0); + } + break; + case Definition::TypeMember: + { + MemberDef *md = (MemberDef *)d; + printf("Kind: %s\n",md->memberTypeName().data()); + } + break; + default: + // ignore groups/pages/packages/dirs for now + break; + } + } +} + +static void lookupSymbols(const QCString &sym) +{ + if (!sym.isEmpty()) + { + DefinitionIntf *di = Doxygen::symbolMap->find(sym); + if (di) + { + if (di->definitionType()==DefinitionIntf::TypeSymbolList) + { + DefinitionListIterator dli(*(DefinitionList*)di); + Definition *d; + // for each symbol with the given name + for (dli.toFirst();(d=dli.current());++dli) + { + lookupSymbol(d); + } + } + else + { + lookupSymbol((Definition*)di); + } + } + else + { + printf("Unknown symbol\n"); + } + } +} + +int main(int argc,char **argv) +{ + char cmd[256]; + + if (argc<2) + { + printf("Usage: %s [source_file | source_dir]\n",argv[0]); + exit(1); + } + + // initialize data structures + initDoxygen(); + + // setup the non-default configuration options + + // we need a place to put intermediate files + Config_getString("OUTPUT_DIRECTORY")="/tmp/doxygen"; + // disable html output + Config_getBool("GENERATE_HTML")=FALSE; + // disable latex output + Config_getBool("GENERATE_LATEX")=FALSE; + // be quiet + Config_getBool("QUIET")=TRUE; + // turn off warnings + Config_getBool("WARNINGS")=FALSE; + Config_getBool("WARN_IF_UNDOCUMENTED")=FALSE; + Config_getBool("WARN_IF_DOC_ERROR")=FALSE; + // Extract as much as possible + Config_getBool("EXTRACT_ALL")=TRUE; + Config_getBool("EXTRACT_STATIC")=TRUE; + Config_getBool("EXTRACT_PRIVATE")=TRUE; + Config_getBool("EXTRACT_LOCAL_METHODS")=TRUE; + // Extract source browse information, needed + // to make doxygen gather the cross reference info + Config_getBool("SOURCE_BROWSER")=TRUE; + + // set the input + Config_getList("INPUT").append(argv[1]); + + // check and finialize the configuration + checkConfiguration(); + adjustConfiguration(); + + // parse the files + parseInput(); + + // iterate over the input files + FileNameListIterator fnli(*Doxygen::inputNameList); + FileName *fn; + // foreach file with a certain name + for (fnli.toFirst();(fn=fnli.current());++fnli) + { + FileNameIterator fni(*fn); + FileDef *fd; + // for each file definition + for (;(fd=fni.current());++fni) + { + // get the references (linked and unlinked) found in this file + findXRefSymbols(fd); + } + } + + // remove temporary files + if (!Doxygen::objDBFileName.isEmpty()) unlink(Doxygen::objDBFileName); + if (!Doxygen::entryDBFileName.isEmpty()) unlink(Doxygen::entryDBFileName); + // clean up after us + rmdir("/tmp/doxygen"); + + while (1) + { + printf("> Type a symbol name or\n> .list for a list of symbols or\n> .quit to exit\n> "); + fgets(cmd,256,stdin); + QCString s(cmd); + if (s.at(s.length()-1)=='\n') s=s.left(s.length()-1); // strip trailing \n + if (s==".list") + listSymbols(); + else if (s==".quit") + exit(0); + else + lookupSymbols(s); + } +} + Index: branches/xZenu/src/util/doxygen/addon/doxyapp/doxyapp.pro.in =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxyapp/doxyapp.pro.in (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxyapp/doxyapp.pro.in (revision 1322) @@ -0,0 +1,12 @@ +TEMPLATE = app.t +CONFIG = console warn_on debug +HEADERS = +SOURCES = doxyapp.cpp +LIBS += -L../../lib -L../../lib -ldoxygen -lqtools -lmd5 -ldoxycfg -lpng +DESTDIR = +OBJECTS_DIR = ../../objects +TARGET = ../../bin/doxyapp +INCLUDEPATH += ../../qtools ../../src +DEPENDPATH += ../../src +TARGETDEPS = ../../lib/libdoxygen.a + Index: branches/xZenu/src/util/doxygen/addon/doxyapp/README =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxyapp/README (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxyapp/README (revision 1322) @@ -0,0 +1,8 @@ +This directory contains an example of how to use doxygen as +an "source parsing engine" in an application. It shows how to configure doxygen +from the application and shows how to run doxygen without generating output, +and then uses the information about the symbols found in the source code. + +Note that if you use this approach your application should be licensed under the GPL. + + Index: branches/xZenu/src/util/doxygen/addon/doxywizard/Makefile.doxywizard =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/Makefile.doxywizard (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/Makefile.doxywizard (revision 1322) @@ -0,0 +1,408 @@ +############################################################################# +# Makefile for building: ../../bin/doxywizard.app/Contents/MacOS/doxywizard +# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon Mar 28 15:12:43 2011 +# Project: doxywizard.pro +# Template: app +# Command: /usr/bin/qmake -spec /usr/local/Qt4.6/mkspecs/macx-g++ -macx -o Makefile.doxywizard doxywizard.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED +CFLAGS = -pipe -g -gdwarf-2 -arch i386 -arch ppc -Wall -W $(DEFINES) +CXXFLAGS = -pipe -g -gdwarf-2 -arch i386 -arch ppc -Wall -W $(DEFINES) +INCPATH = -I/usr/local/Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/usr/include -I. -Imoc -F/Library/Frameworks +LINK = g++ +LFLAGS = -headerpad_max_install_names -arch i386 -arch ppc +LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -framework QtXml -framework QtGui -framework QtCore +AR = ar cq +RANLIB = ranlib -s +QMAKE = /usr/bin/qmake +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = cp -f +COPY_DIR = cp -f -R +STRIP = +INSTALL_FILE = $(COPY_FILE) +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = $(COPY_FILE) +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p +export MACOSX_DEPLOYMENT_TARGET = 10.4 + +####### Output directory + +OBJECTS_DIR = obj/ + +####### Files + +SOURCES = doxywizard.cpp \ + ../../src/version.cpp \ + expert.cpp \ + wizard.cpp \ + inputbool.cpp \ + inputstring.cpp \ + inputint.cpp \ + inputstrlist.cpp moc/moc_doxywizard.cpp \ + moc/moc_expert.cpp \ + moc/moc_helplabel.cpp \ + moc/moc_inputbool.cpp \ + moc/moc_inputstring.cpp \ + moc/moc_inputint.cpp \ + moc/moc_inputstrlist.cpp \ + moc/moc_wizard.cpp \ + rcc/qrc_doxywizard.cpp \ + config_lex.cpp +OBJECTS = obj/doxywizard.o \ + obj/version.o \ + obj/expert.o \ + obj/wizard.o \ + obj/inputbool.o \ + obj/inputstring.o \ + obj/inputint.o \ + obj/inputstrlist.o \ + obj/moc_doxywizard.o \ + obj/moc_expert.o \ + obj/moc_helplabel.o \ + obj/moc_inputbool.o \ + obj/moc_inputstring.o \ + obj/moc_inputint.o \ + obj/moc_inputstrlist.o \ + obj/moc_wizard.o \ + obj/qrc_doxywizard.o \ + obj/config_lex.o +DIST = /usr/local/Qt4.6/mkspecs/common/unix.conf \ + /usr/local/Qt4.6/mkspecs/common/mac.conf \ + /usr/local/Qt4.6/mkspecs/common/mac-g++.conf \ + /usr/local/Qt4.6/mkspecs/qconfig.pri \ + /usr/local/Qt4.6/mkspecs/features/qt_functions.prf \ + /usr/local/Qt4.6/mkspecs/features/qt_config.prf \ + /usr/local/Qt4.6/mkspecs/features/exclusive_builds.prf \ + /usr/local/Qt4.6/mkspecs/features/default_pre.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/default_pre.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/dwarf2.prf \ + /usr/local/Qt4.6/mkspecs/features/debug.prf \ + /usr/local/Qt4.6/mkspecs/features/default_post.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/default_post.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/x86.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/objective_c.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/ppc.prf \ + /usr/local/Qt4.6/mkspecs/features/warn_on.prf \ + /usr/local/Qt4.6/mkspecs/features/qt.prf \ + /usr/local/Qt4.6/mkspecs/features/unix/thread.prf \ + /usr/local/Qt4.6/mkspecs/features/moc.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/rez.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/sdk.prf \ + /usr/local/Qt4.6/mkspecs/features/resources.prf \ + /usr/local/Qt4.6/mkspecs/features/uic.prf \ + /usr/local/Qt4.6/mkspecs/features/yacc.prf \ + /usr/local/Qt4.6/mkspecs/features/lex.prf \ + /usr/local/Qt4.6/mkspecs/features/include_source_dir.prf \ + doxywizard.pro +QMAKE_TARGET = doxywizard +DESTDIR = ../../bin/ +TARGET = ../../bin/doxywizard.app/Contents/MacOS/doxywizard + +####### Custom Compiler Variables +QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \ + -g \ + -gdwarf-2 \ + -arch \ + i386 \ + -arch \ + ppc \ + -Wall \ + -W + + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile.doxywizard ../../bin/doxywizard.app/Contents/PkgInfo ../../bin/doxywizard.app/Contents/Resources/empty.lproj ../../bin/doxywizard.app/Contents/Info.plist $(TARGET) + +$(TARGET): $(OBJECTS) + @$(CHK_DIR_EXISTS) ../../bin/doxywizard.app/Contents/MacOS/ || $(MKDIR) ../../bin/doxywizard.app/Contents/MacOS/ + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) + +Makefile.doxywizard: doxywizard.pro /usr/local/Qt4.6/mkspecs/macx-g++/qmake.conf /usr/local/Qt4.6/mkspecs/common/unix.conf \ + /usr/local/Qt4.6/mkspecs/common/mac.conf \ + /usr/local/Qt4.6/mkspecs/common/mac-g++.conf \ + /usr/local/Qt4.6/mkspecs/qconfig.pri \ + /usr/local/Qt4.6/mkspecs/features/qt_functions.prf \ + /usr/local/Qt4.6/mkspecs/features/qt_config.prf \ + /usr/local/Qt4.6/mkspecs/features/exclusive_builds.prf \ + /usr/local/Qt4.6/mkspecs/features/default_pre.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/default_pre.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/dwarf2.prf \ + /usr/local/Qt4.6/mkspecs/features/debug.prf \ + /usr/local/Qt4.6/mkspecs/features/default_post.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/default_post.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/x86.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/objective_c.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/ppc.prf \ + /usr/local/Qt4.6/mkspecs/features/warn_on.prf \ + /usr/local/Qt4.6/mkspecs/features/qt.prf \ + /usr/local/Qt4.6/mkspecs/features/unix/thread.prf \ + /usr/local/Qt4.6/mkspecs/features/moc.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/rez.prf \ + /usr/local/Qt4.6/mkspecs/features/mac/sdk.prf \ + /usr/local/Qt4.6/mkspecs/features/resources.prf \ + /usr/local/Qt4.6/mkspecs/features/uic.prf \ + /usr/local/Qt4.6/mkspecs/features/yacc.prf \ + /usr/local/Qt4.6/mkspecs/features/lex.prf \ + /usr/local/Qt4.6/mkspecs/features/include_source_dir.prf \ + /Library/Frameworks/QtXml.framework/QtXml.prl \ + /Library/Frameworks/QtCore.framework/QtCore.prl \ + /Library/Frameworks/QtGui.framework/QtGui.prl + $(QMAKE) -spec /usr/local/Qt4.6/mkspecs/macx-g++ -macx -o Makefile.doxywizard doxywizard.pro +/usr/local/Qt4.6/mkspecs/common/unix.conf: +/usr/local/Qt4.6/mkspecs/common/mac.conf: +/usr/local/Qt4.6/mkspecs/common/mac-g++.conf: +/usr/local/Qt4.6/mkspecs/qconfig.pri: +/usr/local/Qt4.6/mkspecs/features/qt_functions.prf: +/usr/local/Qt4.6/mkspecs/features/qt_config.prf: +/usr/local/Qt4.6/mkspecs/features/exclusive_builds.prf: +/usr/local/Qt4.6/mkspecs/features/default_pre.prf: +/usr/local/Qt4.6/mkspecs/features/mac/default_pre.prf: +/usr/local/Qt4.6/mkspecs/features/mac/dwarf2.prf: +/usr/local/Qt4.6/mkspecs/features/debug.prf: +/usr/local/Qt4.6/mkspecs/features/default_post.prf: +/usr/local/Qt4.6/mkspecs/features/mac/default_post.prf: +/usr/local/Qt4.6/mkspecs/features/mac/x86.prf: +/usr/local/Qt4.6/mkspecs/features/mac/objective_c.prf: +/usr/local/Qt4.6/mkspecs/features/mac/ppc.prf: +/usr/local/Qt4.6/mkspecs/features/warn_on.prf: +/usr/local/Qt4.6/mkspecs/features/qt.prf: +/usr/local/Qt4.6/mkspecs/features/unix/thread.prf: +/usr/local/Qt4.6/mkspecs/features/moc.prf: +/usr/local/Qt4.6/mkspecs/features/mac/rez.prf: +/usr/local/Qt4.6/mkspecs/features/mac/sdk.prf: +/usr/local/Qt4.6/mkspecs/features/resources.prf: +/usr/local/Qt4.6/mkspecs/features/uic.prf: +/usr/local/Qt4.6/mkspecs/features/yacc.prf: +/usr/local/Qt4.6/mkspecs/features/lex.prf: +/usr/local/Qt4.6/mkspecs/features/include_source_dir.prf: +/Library/Frameworks/QtXml.framework/QtXml.prl: +/Library/Frameworks/QtCore.framework/QtCore.prl: +/Library/Frameworks/QtGui.framework/QtGui.prl: +qmake: FORCE + @$(QMAKE) -spec /usr/local/Qt4.6/mkspecs/macx-g++ -macx -o Makefile.doxywizard doxywizard.pro + +../../bin/doxywizard.app/Contents/PkgInfo: + @$(CHK_DIR_EXISTS) ../../bin/doxywizard.app/Contents || $(MKDIR) ../../bin/doxywizard.app/Contents + @$(DEL_FILE) ../../bin/doxywizard.app/Contents/PkgInfo + @echo "APPL????" >../../bin/doxywizard.app/Contents/PkgInfo +../../bin/doxywizard.app/Contents/Resources/empty.lproj: + @$(CHK_DIR_EXISTS) ../../bin/doxywizard.app/Contents/Resources || $(MKDIR) ../../bin/doxywizard.app/Contents/Resources + @touch ../../bin/doxywizard.app/Contents/Resources/empty.lproj + +../../bin/doxywizard.app/Contents/Info.plist: + @$(CHK_DIR_EXISTS) ../../bin/doxywizard.app/Contents || $(MKDIR) ../../bin/doxywizard.app/Contents + @$(DEL_FILE) ../../bin/doxywizard.app/Contents/Info.plist + @sed -e "s,@ICON@,,g" -e "s,@EXECUTABLE@,doxywizard,g" -e "s,@TYPEINFO@,????,g" /usr/local/Qt4.6/mkspecs/macx-g++/Info.plist.app >../../bin/doxywizard.app/Contents/Info.plist +dist: + @$(CHK_DIR_EXISTS) obj/doxywizard1.0.0 || $(MKDIR) obj/doxywizard1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/doxywizard1.0.0/ && $(COPY_FILE) --parents doxywizard.h version.h expert.h config.h helplabel.h inputbool.h inputstring.h inputint.h inputstrlist.h wizard.h obj/doxywizard1.0.0/ && $(COPY_FILE) --parents doxywizard.qrc obj/doxywizard1.0.0/ && $(COPY_FILE) --parents doxywizard.cpp ../../src/version.cpp expert.cpp wizard.cpp inputbool.cpp inputstring.cpp inputint.cpp inputstrlist.cpp obj/doxywizard1.0.0/ && $(COPY_FILE) --parents config.l obj/doxywizard1.0.0/ && (cd `dirname obj/doxywizard1.0.0` && $(TAR) doxywizard1.0.0.tar doxywizard1.0.0 && $(COMPRESS) doxywizard1.0.0.tar) && $(MOVE) `dirname obj/doxywizard1.0.0`/doxywizard1.0.0.tar.gz . && $(DEL_FILE) -r obj/doxywizard1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) -r ../../bin/doxywizard.app + -$(DEL_FILE) Makefile.doxywizard + + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_objective_c_make_all: +compiler_objective_c_clean: +compiler_moc_header_make_all: moc/moc_doxywizard.cpp moc/moc_expert.cpp moc/moc_helplabel.cpp moc/moc_inputbool.cpp moc/moc_inputstring.cpp moc/moc_inputint.cpp moc/moc_inputstrlist.cpp moc/moc_wizard.cpp +compiler_moc_header_clean: + -$(DEL_FILE) moc/moc_doxywizard.cpp moc/moc_expert.cpp moc/moc_helplabel.cpp moc/moc_inputbool.cpp moc/moc_inputstring.cpp moc/moc_inputint.cpp moc/moc_inputstrlist.cpp moc/moc_wizard.cpp +moc/moc_doxywizard.cpp: doxywizard.h + /usr/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ doxywizard.h -o moc/moc_doxywizard.cpp + +moc/moc_expert.cpp: expert.h + /usr/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ expert.h -o moc/moc_expert.cpp + +moc/moc_helplabel.cpp: helplabel.h + /usr/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ helplabel.h -o moc/moc_helplabel.cpp + +moc/moc_inputbool.cpp: input.h \ + inputbool.h + /usr/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ inputbool.h -o moc/moc_inputbool.cpp + +moc/moc_inputstring.cpp: input.h \ + inputstring.h + /usr/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ inputstring.h -o moc/moc_inputstring.cpp + +moc/moc_inputint.cpp: input.h \ + inputint.h + /usr/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ inputint.h -o moc/moc_inputint.cpp + +moc/moc_inputstrlist.cpp: input.h \ + inputstrlist.h + /usr/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ inputstrlist.h -o moc/moc_inputstrlist.cpp + +moc/moc_wizard.cpp: wizard.h + /usr/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ wizard.h -o moc/moc_wizard.cpp + +compiler_rcc_make_all: rcc/qrc_doxywizard.cpp +compiler_rcc_clean: + -$(DEL_FILE) rcc/qrc_doxywizard.cpp +rcc/qrc_doxywizard.cpp: doxywizard.qrc \ + ../../src/config.xml \ + images/file.png \ + images/add.png \ + images/folder.png \ + images/refresh.png \ + images/tunecolor.png \ + images/del.png + /Developer/Tools/Qt/rcc -name doxywizard doxywizard.qrc -o rcc/qrc_doxywizard.cpp + +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_rez_source_make_all: +compiler_rez_source_clean: +compiler_uic_make_all: +compiler_uic_clean: +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: config_lex.cpp +compiler_lex_clean: + -$(DEL_FILE) config_lex.cpp +config_lex.cpp: config.l + flex -Pconfig config.l + rm -f config_lex.cpp + mv -f lex.config.c config_lex.cpp + + +compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_lex_clean + +####### Compile + +obj/doxywizard.o: doxywizard.cpp doxywizard.h \ + version.h \ + expert.h \ + wizard.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/doxywizard.o doxywizard.cpp + +obj/version.o: ../../src/version.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/version.o ../../src/version.cpp + +obj/expert.o: expert.cpp expert.h \ + inputbool.h \ + input.h \ + inputstring.h \ + inputint.h \ + inputstrlist.h \ + config.h \ + version.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/expert.o expert.cpp + +obj/wizard.o: wizard.cpp wizard.h \ + input.h \ + doxywizard.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/wizard.o wizard.cpp + +obj/inputbool.o: inputbool.cpp inputbool.h \ + input.h \ + helplabel.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/inputbool.o inputbool.cpp + +obj/inputstring.o: inputstring.cpp inputstring.h \ + input.h \ + helplabel.h \ + doxywizard.h \ + config.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/inputstring.o inputstring.cpp + +obj/inputint.o: inputint.cpp inputint.h \ + input.h \ + helplabel.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/inputint.o inputint.cpp + +obj/inputstrlist.o: inputstrlist.cpp inputstrlist.h \ + input.h \ + helplabel.h \ + doxywizard.h \ + config.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/inputstrlist.o inputstrlist.cpp + +obj/moc_doxywizard.o: moc/moc_doxywizard.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_doxywizard.o moc/moc_doxywizard.cpp + +obj/moc_expert.o: moc/moc_expert.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_expert.o moc/moc_expert.cpp + +obj/moc_helplabel.o: moc/moc_helplabel.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_helplabel.o moc/moc_helplabel.cpp + +obj/moc_inputbool.o: moc/moc_inputbool.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_inputbool.o moc/moc_inputbool.cpp + +obj/moc_inputstring.o: moc/moc_inputstring.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_inputstring.o moc/moc_inputstring.cpp + +obj/moc_inputint.o: moc/moc_inputint.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_inputint.o moc/moc_inputint.cpp + +obj/moc_inputstrlist.o: moc/moc_inputstrlist.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_inputstrlist.o moc/moc_inputstrlist.cpp + +obj/moc_wizard.o: moc/moc_wizard.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_wizard.o moc/moc_wizard.cpp + +obj/qrc_doxywizard.o: rcc/qrc_doxywizard.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qrc_doxywizard.o rcc/qrc_doxywizard.cpp + +obj/config_lex.o: config_lex.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/config_lex.o config_lex.cpp + +####### Install + +install: FORCE + +uninstall: FORCE + +FORCE: + Index: branches/xZenu/src/util/doxygen/addon/doxywizard/Makefile.in =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/Makefile.in (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/Makefile.in (revision 1322) @@ -0,0 +1,39 @@ +# +# +# +# Copyright (C) 1997-2011 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# + +QMAKE=qmake $(MKSPECS) + +all: Makefile.doxywizard + $(MAKE) -f Makefile.doxywizard + +Makefile.doxywizard: doxywizard.pro + $(QMAKE) doxywizard.pro -o Makefile.doxywizard + +qmake: + $(QMAKE) doxywizard.pro -o Makefile.doxywizard + +clean: Makefile.doxywizard + $(MAKE) -f Makefile.doxywizard clean + +distclean: Makefile.doxywizard + $(MAKE) -f Makefile.doxywizard distclean + $(RM) Makefile.doxywizard + +install: + $(INSTTOOL) -d $(INSTALL)/bin + $(INSTTOOL) -m 755 ../../bin/doxywizard $(INSTALL)/bin + $(INSTTOOL) -d $(INSTALL)/$(MAN1DIR) + cat ../../doc/doxywizard.1 | sed -e "s/DATE/$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > doxywizard.1 + $(INSTTOOL) -m 644 doxywizard.1 $(INSTALL)/$(MAN1DIR)/doxywizard.1 + rm doxywizard.1 + +FORCE: Index: branches/xZenu/src/util/doxygen/addon/doxywizard/wizard.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/wizard.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/wizard.h (revision 1322) @@ -0,0 +1,253 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef WIZARD_H +#define WIZARD_H + +#include <QSplitter> +#include <QHash> +#include <QDialog> + +class Input; +class QTreeWidget; +class QTreeWidgetItem; +class QStackedWidget; +class QCheckBox; +class QLineEdit; +class QPushButton; +class QRadioButton; +class QGroupBox; +class QButtonGroup; +class Wizard; +class QImage; +class QLabel; + +enum OptLang { Lang_Cpp, Lang_C, Lang_Java, Lang_CS }; +enum HtmlStyle { HS_Plain, HS_TreeView, HS_CHM }; +enum TexStyle { TS_PDFHyper, TS_PDF, TS_PS }; +enum DiagramMode { DM_None, DM_Builtin, DM_Dot }; + +class TuneColorDialog : public QDialog +{ + Q_OBJECT + + public: + TuneColorDialog(int hue,int sat,int gamma,QWidget *parent=0); + int getHue() const; + int getSaturation() const; + int getGamma() const; + + private slots: + void updateImage(int hue,int sat,int val); + + private: + QImage *m_image; + QLabel *m_imageLab; + int m_hue; + int m_sat; + int m_gam; +}; + +class ColorPicker : public QWidget +{ + Q_OBJECT +public: + enum Mode { Hue, Saturation, Gamma }; + ColorPicker(Mode m); + ~ColorPicker(); + +public slots: + void setCol(int h, int s, int g); + //void setCol(int h, int s); + +signals: + void newHsv(int h, int s, int g); + +protected: + void paintEvent(QPaintEvent*); + void mouseMoveEvent(QMouseEvent *); + void mousePressEvent(QMouseEvent *); + +private: + enum { foff = 3, coff = 4 }; //frame and contents offset + int y2hue(int y); + int y2sat(int y); + int y2gam(int y); + int hue2y(int hue); + int sat2y(int sat); + int gam2y(int gamma); + void setHue(int v); + void setSat(int v); + void setGam(int v); + + QPixmap *m_pix; + Mode m_mode; + int m_gam; + int m_hue; + int m_sat; + +}; + + +class Step1 : public QWidget +{ + Q_OBJECT + + public: + Step1(Wizard *parent,const QHash<QString,Input*> &modelData); + void init(); + + private slots: + void selectSourceDir(); + void selectDestinationDir(); + void selectProjectIcon(); + void setProjectName(const QString &name); + void setProjectBrief(const QString &desc); + void setProjectNumber(const QString &num); + void setSourceDir(const QString &dir); + void setDestinationDir(const QString &dir); + void setRecursiveScan(int); + + private: + QLineEdit *m_projName; + QLineEdit *m_projBrief; + QLineEdit *m_projNumber; + QLineEdit *m_sourceDir; + QLineEdit *m_destDir; + QLabel *m_projIconLab; + QCheckBox *m_recursive; + QPushButton *m_srcSelectDir; + QPushButton *m_dstSelectDir; + Wizard *m_wizard; + const QHash<QString,Input *> &m_modelData; +}; + +class Step2 : public QWidget +{ + Q_OBJECT + public: + Step2(Wizard *parent,const QHash<QString,Input*> &modelData); + void init(); + + private slots: + void optimizeFor(int choice); + void extractMode(int choice); + void changeCrossRefState(int choice); + + private: + QGroupBox *m_extractMode; + QGroupBox *m_optimizeLang; + QButtonGroup *m_extractModeGroup; + QButtonGroup *m_optimizeLangGroup; + QCheckBox *m_crossRef; + Wizard *m_wizard; + const QHash<QString,Input *> &m_modelData; +}; + +class Step3 : public QWidget +{ + Q_OBJECT + + public: + Step3(Wizard *parent,const QHash<QString,Input*> &modelData); + void init(); + + private slots: + void setHtmlEnabled(bool); + void setLatexEnabled(bool); + void setManEnabled(int); + void setRtfEnabled(int); + void setXmlEnabled(int); + void setSearchEnabled(int); + void setHtmlOptions(int); + void setLatexOptions(int); + void tuneColorDialog(); + + private: + QGroupBox *m_texOptions; + QButtonGroup *m_texOptionsGroup; + QGroupBox *m_htmlOptions; + QButtonGroup *m_htmlOptionsGroup; + QCheckBox *m_htmlEnabled; + QCheckBox *m_latexEnabled; + QCheckBox *m_manEnabled; + QCheckBox *m_rtfEnabled; + QCheckBox *m_xmlEnabled; + QCheckBox *m_searchEnabled; + QPushButton *m_tuneColor; + Wizard *m_wizard; + const QHash<QString,Input *> &m_modelData; +}; + +class Step4 : public QWidget +{ + Q_OBJECT + + public: + Step4(Wizard *parent,const QHash<QString,Input*> &modelData); + void init(); + + private slots: + void diagramModeChanged(int); + void setClassGraphEnabled(int state); + void setCollaborationGraphEnabled(int state); + void setGraphicalHierarchyEnabled(int state); + void setIncludeGraphEnabled(int state); + void setIncludedByGraphEnabled(int state); + void setCallGraphEnabled(int state); + void setCallerGraphEnabled(int state); + + private: + QGroupBox *m_diagramMode; + QButtonGroup *m_diagramModeGroup; + QGroupBox *m_dotGroup; + QCheckBox *m_dotClass; + QCheckBox *m_dotCollaboration; + QCheckBox *m_dotInclude; + QCheckBox *m_dotIncludedBy; + QCheckBox *m_dotInheritance; + QCheckBox *m_dotCall; + QCheckBox *m_dotCaller; + Wizard *m_wizard; + const QHash<QString,Input *> &m_modelData; +}; + +class Wizard : public QSplitter +{ + Q_OBJECT + public: + Wizard(const QHash<QString,Input*> &modelData, QWidget *parent=0); + ~Wizard(); + + public slots: + void refresh(); + + private slots: + void activateTopic(QTreeWidgetItem *item,QTreeWidgetItem *); + void nextTopic(); + void prevTopic(); + + private: + const QHash<QString,Input *> &m_modelData; + QTreeWidget *m_treeWidget; + QStackedWidget *m_topicStack; + Step1 *m_step1; + Step2 *m_step2; + Step3 *m_step3; + Step4 *m_step4; + QPushButton *m_next; + QPushButton *m_prev; +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.h (revision 1322) @@ -0,0 +1,84 @@ +#ifndef DOXYWIZARD_H +#define DOXYWIZARD_H + +#include <QMainWindow> +#include <QSettings> +#include <QStringList> + +class Expert; +class Wizard; +class QLabel; +class QLineEdit; +class QPushButton; +class QTextEdit; +class QMenu; +class QProcess; +class QTimer; + +class MainWindow : public QMainWindow +{ + Q_OBJECT + + public: + static MainWindow &instance(); + void loadConfigFromFile(const QString &fileName); + void loadSettings(); + void saveSettings(); + void closeEvent(QCloseEvent *event); + QString configFileName() const { return m_fileName; } + void updateTitle(); + + public slots: + void manual(); + void about(); + void openConfig(); + bool saveConfig(); + bool saveConfigAs(); + void makeDefaults(); + void resetToDefaults(); + void selectTab(int); + void quit(); + + private slots: + void openRecent(QAction *action); + void selectWorkingDir(); + void updateWorkingDir(); + void runDoxygen(); + void readStdout(); + void runComplete(); + void showHtmlOutput(); + void saveLog(); + void showSettings(); + void configChanged(); + void clearRecent(); + + private: + MainWindow(); + void saveConfig(const QString &fileName); + void addRecentFile(const QString &fileName); + void updateConfigFileName(const QString &fileName); + void setWorkingDir(const QString &dirName); + void updateLaunchButtonState(); + bool discardUnsavedChanges(bool saveOption=true); + + QLineEdit *m_workingDir; + QPushButton *m_selWorkingDir; + QPushButton *m_run; + QPushButton *m_saveLog; + QPushButton *m_launchHtml; + QPushButton *m_launchPdf; + QTextEdit *m_outputLog; + QLabel *m_runStatus; + Expert *m_expert; + Wizard *m_wizard; + QString m_fileName; + QSettings m_settings; + QMenu *m_recentMenu; + QStringList m_recentFiles; + QProcess *m_runProcess; + QTimer *m_timer; + bool m_running; + bool m_modified; +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/inputint.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/inputint.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/inputint.cpp (revision 1322) @@ -0,0 +1,96 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include "inputint.h" +#include "helplabel.h" + +#include <QtGui> + +InputInt::InputInt( QGridLayout *layout,int &row, + const QString & id, + int defVal, int minVal,int maxVal, + const QString & docs ) + : m_default(defVal), m_minVal(minVal), m_maxVal(maxVal), m_docs(docs), m_id(id) +{ + m_lab = new HelpLabel(id); + m_sp = new QSpinBox; + m_sp->setMinimum(minVal); + m_sp->setMaximum(maxVal); + m_sp->setSingleStep(1); + m_val=defVal-1; // force update + setValue(defVal); + + layout->addWidget( m_lab, row, 0 ); + layout->addWidget( m_sp, row, 1 ); + + connect(m_sp, SIGNAL(valueChanged(int)), + this, SLOT(setValue(int)) ); + connect( m_lab, SIGNAL(enter()), SLOT(help()) ); + connect( m_lab, SIGNAL(reset()), SLOT(reset()) ); + row++; +} + +void InputInt::help() +{ + showHelp(this); +} + + +void InputInt::setValue(int val) +{ + val = qMax(m_minVal,val); + val = qMin(m_maxVal,val); + if (val!=m_val) + { + m_val = val; + m_sp->setValue(val); + m_value = m_val; + if (m_val==m_default) + { + m_lab->setText(QString::fromAscii("<qt>")+m_id+QString::fromAscii("</qt")); + } + else + { + m_lab->setText(QString::fromAscii("<qt><font color='red'>")+m_id+QString::fromAscii("</font></qt>")); + } + emit changed(); + } +} + +void InputInt::setEnabled(bool state) +{ + m_lab->setEnabled(state); + m_sp->setEnabled(state); +} + +QVariant &InputInt::value() +{ + return m_value; +} + +void InputInt::update() +{ + setValue(m_value.toInt()); +} + +void InputInt::reset() +{ + setValue(m_default); +} + +void InputInt::writeValue(QTextStream &t,QTextCodec *) +{ + t << m_val; +} + Index: branches/xZenu/src/util/doxygen/addon/doxywizard/config.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/config.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/config.h (revision 1322) @@ -0,0 +1,18 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include <QHash> +#include <QString> + +class Input; +class QTextStream; +class QTextCodec; + +bool parseConfig( + const QString &fileName, + const QHash<QString,Input *> &options + ); + +void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s); + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/inputbool.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/inputbool.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/inputbool.cpp (revision 1322) @@ -0,0 +1,110 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include "inputbool.h" +#include "helplabel.h" +#include <QtGui> + +InputBool::InputBool( QGridLayout *layout, int &row, + const QString &id, bool checked, + const QString &docs ) + : m_default(checked), m_docs(docs), m_id(id) +{ + m_lab = new HelpLabel(id); + m_cb = new QCheckBox; + layout->addWidget(m_lab,row, 0); + layout->addWidget(m_cb,row, 1); + m_enabled = true; + m_state=!checked; // force update + setValue(checked); + connect( m_cb, SIGNAL(toggled(bool)), SLOT(setValue(bool)) ); + connect( m_lab, SIGNAL(enter()), SLOT(help()) ); + connect( m_lab, SIGNAL(reset()), SLOT(reset()) ); + row++; +} + +void InputBool::help() +{ + showHelp(this); +} + +void InputBool::setEnabled(bool b) +{ + m_enabled = b; + m_cb->setEnabled(b); + updateDependencies(); +} + +void InputBool::updateDependencies() +{ + for (int i=0;i<m_dependencies.count();i++) + { + m_dependencies[i]->setEnabled(m_enabled && m_state); + } +} + +void InputBool::setValue( bool s ) +{ + if (m_state!=s) + { + m_state=s; + updateDefault(); + updateDependencies(); + m_cb->setChecked( s ); + m_value = m_state; + emit changed(); + } +} + +void InputBool::updateDefault() +{ + if (m_state==m_default) + { + m_lab->setText(QString::fromAscii("<qt>")+m_id+QString::fromAscii("</qt")); + } + else + { + m_lab->setText(QString::fromAscii("<qt><font color='red'>")+m_id+QString::fromAscii("</font></qt>")); + } +} + +QVariant &InputBool::value() +{ + return m_value; +} + +void InputBool::update() +{ + QString v = m_value.toString().toLower(); + m_state = (v==QString::fromAscii("yes") || + v==QString::fromAscii("true") || + v==QString::fromAscii("1")); + m_cb->setChecked( m_state ); + updateDefault(); + updateDependencies(); +} + +void InputBool::reset() +{ + setValue(m_default); +} + +void InputBool::writeValue(QTextStream &t,QTextCodec *codec) +{ + if (m_state) + t << codec->fromUnicode(QString::fromAscii("YES")); + else + t << codec->fromUnicode(QString::fromAscii("NO")); +} + Index: branches/xZenu/src/util/doxygen/addon/doxywizard/expert.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/expert.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/expert.h (revision 1322) @@ -0,0 +1,65 @@ +#ifndef EXPERT_H +#define EXPERT_H + +#include <QSplitter> +#include <QDomElement> +#include <QHash> + +class QTreeWidget; +class QTreeWidgetItem; +class QStackedWidget; +class QSettings; +class QTextEdit; +class QTextCodec; +class QPushButton; +class Input; + +class Expert : public QSplitter +{ + Q_OBJECT + + public: + Expert(); + ~Expert(); + void loadSettings(QSettings *); + void saveSettings(QSettings *); + void loadConfig(const QString &fileName); + bool writeConfig(QTextStream &t,bool brief); + QByteArray saveInnerState () const; + bool restoreInnerState ( const QByteArray & state ); + const QHash<QString,Input*> &modelData() const { return m_options; } + void resetToDefaults(); + bool htmlOutputPresent(const QString &workingDir) const; + bool pdfOutputPresent(const QString &workingDir) const; + QString getHtmlOutputIndex(const QString &workingDir) const; + + public slots: + void activateTopic(QTreeWidgetItem *,QTreeWidgetItem *); + QWidget *createTopicWidget(QDomElement &elem); + + private slots: + void showHelp(Input *); + void nextTopic(); + void prevTopic(); + + signals: + void changed(); + + private: + void createTopics(const QDomElement &); + void saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec,bool brief); + + QSplitter *m_splitter; + QTextEdit *m_helper; + QTreeWidget *m_treeWidget; + QStackedWidget *m_topicStack; + QHash<QString,QWidget *> m_topics; + QHash<QString,QObject *> m_optionWidgets; + QHash<QString,Input *> m_options; + QPushButton *m_next; + QPushButton *m_prev; + QDomElement m_rootElement; + bool m_inShowHelp; +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/config.l =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/config.l (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/config.l (revision 1322) @@ -0,0 +1,555 @@ +/****************************************************************************** + * + * $Id: config_templ.l,v 1.8 2001/01/01 10:15:16 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +%{ + +/* + * includes + */ +#include "config.h" +#include "input.h" +#include <QtCore> + +#define MAX_INCLUDE_DEPTH 10 + + +/* ----------------------------------------------------------------- + * + * static variables + */ + +struct ConfigFileState +{ + int lineNr; + FILE *file; + YY_BUFFER_STATE oldState; + YY_BUFFER_STATE newState; + QString fileName; +}; + +static const QHash<QString,Input*> *g_options; +static FILE *g_file; +static QString g_yyFileName; +static QString g_includeName; +static QVariant g_includePathList; +static QStack<ConfigFileState*> g_includeStack; +static int g_includeDepth; +static QVariant *g_arg; +static Input *g_curOption=0; +static QString g_elemStr; +static QTextCodec *g_codec = QTextCodec::codecForName("UTF-8"); +static QString g_codecName = QString::fromAscii("UTF-8"); +static int g_lastState; +static QByteArray g_tmpString; + +/* ----------------------------------------------------------------- + */ +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); + +static int yyread(char *buf,int maxSize) +{ + // no file included + if (g_includeStack.isEmpty()) + { + return fread(buf,1,maxSize,g_file); + } + else + { + return fread(buf,1,maxSize,g_includeStack.top()->file); + } +} + +void config_err(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); +} +void config_warn(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); +} + +static void substEnvVarsInStrList(QStringList &sl); +static void substEnvVarsInString(QString &s); + +static void checkEncoding() +{ + Input *option = g_options->value(QString::fromAscii("DOXYFILE_ENCODING")); + if (option && option->value().toString()!=g_codecName) + { + QTextCodec *newCodec = QTextCodec::codecForName(option->value().toString().toAscii()); + if (newCodec) + { + g_codec = newCodec; + g_codecName = option->value().toString(); + } + } +} + +static FILE *tryPath(const QString &path,const QString &fileName) +{ + QString absName=!path.isEmpty() ? path+QString::fromAscii("/")+fileName : fileName; + QFileInfo fi(absName); + if (fi.exists() && fi.isFile()) + { + FILE *f = fopen(absName.toLocal8Bit(),"r"); + if (f==NULL) + config_err("Error: could not open file %s for reading\n",absName.toLatin1().data()); + else + return f; + } + return NULL; +} + +static FILE *findFile(const QString &fileName) +{ + if (QFileInfo(fileName).isAbsolute()) // absolute path + { + return tryPath(QString(), fileName); + } + + // relative path, try with include paths in the list + QStringList sl = g_includePathList.toStringList(); + substEnvVarsInStrList(sl); + foreach (QString s, sl) + { + FILE *f = tryPath(s,fileName); + if (f) return f; + } + // try cwd if g_includePathList fails + return tryPath(QString::fromAscii("."),fileName); +} + +static void readIncludeFile(const QString &incName) +{ + if (g_includeDepth==MAX_INCLUDE_DEPTH) + { + config_err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n", + MAX_INCLUDE_DEPTH,qPrintable(incName)); + exit(1); + } + + QString inc = incName; + substEnvVarsInString(inc); + inc = inc.trimmed(); + uint incLen = inc.length(); + if (inc.at(0)==QChar::fromAscii('"') && + inc.at(incLen-1)==QChar::fromAscii('"')) // strip quotes + { + inc=inc.mid(1,incLen-2); + } + + FILE *f = findFile(inc); + if (f) // see if the include file can be found + { + // For debugging +#if SHOW_INCLUDES + for (i=0;i<includeStack.count();i++) msg(" "); + msg("@INCLUDE = %s: parsing...\n",inc.toLatin1().data()); +#endif + + // store the state of the old file + ConfigFileState *fs=new ConfigFileState; + fs->oldState=YY_CURRENT_BUFFER; + fs->fileName=g_yyFileName; + fs->file=f; + // push the state on the stack + g_includeStack.push(fs); + // set the scanner to the include file + yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE)); + fs->newState=YY_CURRENT_BUFFER; + g_yyFileName=inc; + g_includeDepth++; + } + else + { + config_err("Error: @INCLUDE = %s: not found!\n",inc.toLatin1().data()); + exit(1); + } +} + + +%} + +%option nounput +%option noyywrap +%option yylineno + +%x Start +%x SkipComment +%x SkipInvalid +%x GetString +%x GetStrList +%x GetQuotedString +%x GetEnvVar +%x Include + +%% + +<*>\0x0d +<Start,GetString,GetStrList,SkipInvalid>"#" { BEGIN(SkipComment); } +<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QString cmd = g_codec->toUnicode(yytext); + cmd=cmd.left(cmd.length()-1).trimmed(); + g_curOption = g_options->value(cmd); + if (g_curOption==0) // oops not known + { + config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", + qPrintable(cmd),yylineno,qPrintable(g_yyFileName)); + BEGIN(SkipInvalid); + } + else // known tag + { + //option->setEncoding(encoding); + g_arg = &g_curOption->value(); + switch(g_curOption->kind()) + { + case Input::StrList: + g_elemStr = QString(); + *g_arg = QStringList(); + BEGIN(GetStrList); + break; + case Input::String: + BEGIN(GetString); + break; + case Input::Int: + BEGIN(GetString); + break; + case Input::Bool: + BEGIN(GetString); + break; + case Input::Obsolete: + config_err("Warning: Tag `%s' at line %d of file %s has become obsolete.\n" + "To avoid this warning please update your configuration " + "file using \"doxygen -u\"\n", qPrintable(cmd), + yylineno,qPrintable(g_yyFileName)); + BEGIN(SkipInvalid); + break; + } + } + } +<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" { QString cmd=g_codec->toUnicode(yytext); + cmd=cmd.left(cmd.length()-2).trimmed(); + g_curOption = g_options->value(cmd); + if (g_curOption==0) // oops not known + { + config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", + yytext,yylineno,qPrintable(g_yyFileName)); + BEGIN(SkipInvalid); + } + else // known tag + { + switch(g_curOption->kind()) + { + case Input::StrList: + g_arg = &g_curOption->value(); + g_elemStr=QString(); + BEGIN(GetStrList); + break; + case Input::String: + case Input::Int: + case Input::Bool: + config_err("Warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n", + yytext,yylineno,qPrintable(g_yyFileName)); + BEGIN(SkipInvalid); + break; + case Input::Obsolete: + config_err("Warning: Tag `%s' at line %d of file %s has become obsolete.\n" + "To avoid this warning please update your configuration " + "file using \"doxygen -u\"\n", + qPrintable(cmd),yylineno,qPrintable(g_yyFileName)); + BEGIN(SkipInvalid); + break; + } + } + } +<Start>"@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); g_arg=&g_includePathList; *g_arg = QStringList(); g_elemStr=QString(); } + /* include a config file */ +<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);} +<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") { + readIncludeFile(g_codec->toUnicode(yytext)); + BEGIN(Start); + } +<<EOF>> { + //printf("End of include file\n"); + //printf("Include stack depth=%d\n",g_includeStack.count()); + if (g_includeStack.isEmpty()) + { + //printf("Terminating scanner!\n"); + yyterminate(); + } + else + { + ConfigFileState *fs = g_includeStack.pop(); + fclose(fs->file); + YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER; + yy_switch_to_buffer( fs->oldState ); + yy_delete_buffer( oldBuf ); + g_yyFileName=fs->fileName; + delete fs; + g_includeDepth--; + } + } + +<Start>[a-z_A-Z0-9]+ { config_err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yylineno,qPrintable(g_yyFileName)); } +<GetString,SkipInvalid>\n { BEGIN(Start); } +<GetStrList>\n { + if (!g_elemStr.isEmpty()) + { + //printf("elemStr1=`%s'\n",elemStr.toLatin1().data()); + *g_arg = QVariant(g_arg->toStringList() << g_elemStr); + } + BEGIN(Start); + } +<GetStrList>[ \t]+ { + if (!g_elemStr.isEmpty()) + { + //printf("elemStr2=`%s'\n",elemStr.toLatin1().data()); + *g_arg = QVariant(g_arg->toStringList() << g_elemStr); + } + g_elemStr = QString(); + } +<GetString>[^ \"\t\r\n]+ { + *g_arg = QVariant(g_codec->toUnicode(yytext)); + checkEncoding(); + } +<GetString,GetStrList,SkipInvalid>"\"" { g_lastState=YY_START; + BEGIN(GetQuotedString); + g_tmpString=""; + } +<GetQuotedString>"\""|"\n" { + // we add a bogus space to signal that the string was quoted. This space will be stripped later on. + g_tmpString+=" "; + //printf("Quoted String = `%s'\n",tmpString.toLatin1().data()); + if (g_lastState==GetString) + { + *g_arg = g_codec->toUnicode(g_tmpString); + checkEncoding(); + } + else + { + g_elemStr+=g_codec->toUnicode(g_tmpString); + } + if (*yytext=='\n') + { + config_err("Warning: Missing end quote (\") on line %d, file %s\n",yylineno, + qPrintable(g_yyFileName)); + } + BEGIN(g_lastState); + } +<GetQuotedString>"\\\"" { + g_tmpString+='"'; + } +<GetQuotedString>. { g_tmpString+=*yytext; } +<GetStrList>[^ \#\"\t\r\n]+ { + g_elemStr+=g_codec->toUnicode(yytext); + } +<SkipComment>\n { BEGIN(Start); } +<SkipComment>\\[ \r\t]*\n { BEGIN(Start); } +<*>\\[ \r\t]*\n { } +<*>\n +<*>. + +%% + +/*@ ---------------------------------------------------------------------------- + */ + +static void substEnvVarsInString(QString &s) +{ + static QRegExp re(QString::fromAscii("\\$\\([a-z_A-Z0-9]+\\)")); + if (s.isEmpty()) return; + int p=0; + int i,l; + //printf("substEnvVarInString(%s) start\n",s.toLatin1().data()); + while ((i=re.indexIn(s,p))!=-1) + { + l = re.matchedLength(); + //printf("Found environment var s.mid(%d,%d)=`%s'\n",i+2,l-3,s.mid(i+2,l-3).toLatin1().data()); + QString env=g_codec->toUnicode(getenv(s.mid(i+2,l-3).toLatin1())); + substEnvVarsInString(env); // recursively expand variables if needed. + s = s.left(i)+env+s.right(s.length()-i-l); + p=i+env.length(); // next time start at the end of the expanded string + } + s=s.trimmed(); // to strip the bogus space that was added when an argument + // has quotes + //printf("substEnvVarInString(%s) end\n",s.toLatin1().data()); +} + +static void substEnvVarsInStrList(QStringList &sl) +{ + QStringList out; + + foreach (QString result, sl) + { + // an argument with quotes will have an extra space at the end, so wasQuoted will be TRUE. + bool wasQuoted = (result.indexOf(QChar::fromAscii(' '))!=-1) || + (result.indexOf(QChar::fromAscii('\t'))!=-1); + // here we strip the quote again + substEnvVarsInString(result); + + //printf("Result %s was quoted=%d\n",result.toLatin1().data(),wasQuoted); + + if (!wasQuoted) /* as a result of the expansion, a single string + may have expanded into a list, which we'll + add to sl. If the orginal string already + contained multiple elements no further + splitting is done to allow quoted items with spaces! */ + { + int l=result.length(); + int i,p=0; + // skip spaces + // search for a "word" + for (i=0;i<l;i++) + { + QChar c=0; + // skip until start of new word + while (i<l && ((c=result.at(i))==QChar::fromAscii(' ') || c==QChar::fromAscii('\t'))) i++; + p=i; // p marks the start index of the word + // skip until end of a word + while (i<l && ((c=result.at(i))!=QChar::fromAscii(' ') && + c!=QChar::fromAscii('\t') && + c!=QChar::fromAscii('"'))) i++; + if (i<l) // not at the end of the string + { + if (c==QChar::fromAscii('"')) // word within quotes + { + p=i+1; + for (i++;i<l;i++) + { + c=result.at(i); + if (c==QChar::fromAscii('"')) // end quote + { + out += result.mid(p,i-p); + p=i+1; + break; + } + else if (c==QChar::fromAscii('\\')) // skip escaped stuff + { + i++; + } + } + } + else if (c==QChar::fromAscii(' ') || c==QChar::fromAscii('\t')) // separator + { + out += result.mid(p,i-p); + p=i+1; + } + } + } + if (p!=l) // add the leftover as a string + { + out += result.right(l-p); + } + } + else // just goto the next element in the list + { + out += result; + } + } + sl = out; +} + +//-------------------------------------------------------------------------- + +bool parseConfig( + const QString &fileName, + const QHash<QString,Input *> &options + ) +{ + QHashIterator<QString, Input*> i(options); + g_file = fopen(fileName.toLocal8Bit(),"r"); + if (g_file==NULL) return false; + + // reset all values + i.toFront(); + while (i.hasNext()) + { + i.next(); + if (i.value()) + { + i.value()->reset(); + } + } + + // parse config file + g_options = &options; + g_yyFileName = fileName; + g_includeStack.clear(); + g_includeDepth = 0; + configrestart( configin ); + BEGIN( Start ); + configlex(); + + // update the values in the UI + i.toFront(); + while (i.hasNext()) + { + i.next(); + if (i.value()) + { + //printf("Updating: %s\n",qPrintable(i.key())); + i.value()->update(); + } + else + { + printf("Invalid option: %s\n",qPrintable(i.key())); + } + } + fclose(g_file); + return true; +} + +void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s) +{ + QChar c; + bool needsEscaping=FALSE; + // convert the string back to it original encoding + //QByteArray se = codec->fromUnicode(s); + t.setCodec(codec); + const QChar *p=s.data(); + if (!s.isEmpty() && !p->isNull()) + { + while (!(c=*p++).isNull() && !needsEscaping) + { + needsEscaping = (c==QChar::fromAscii(' ') || + c==QChar::fromAscii('\n') || + c==QChar::fromAscii('\t') || + c==QChar::fromAscii('"')); + } + if (needsEscaping) + { + t << "\""; + p=s.data(); + while (!p->isNull()) + { + if (*p ==QChar::fromAscii(' ') && + *(p+1)==QChar::fromAscii('\0')) break; // skip inserted space at the end + if (*p ==QChar::fromAscii('"')) t << "\\"; // escape quotes + t << *p++; + } + t << "\""; + } + else + { + t << s; + } + } +} + Index: branches/xZenu/src/util/doxygen/addon/doxywizard/images/refresh.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/xZenu/src/util/doxygen/addon/doxywizard/images/refresh.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/xZenu/src/util/doxygen/addon/doxywizard/images/file.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/xZenu/src/util/doxygen/addon/doxywizard/images/file.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/xZenu/src/util/doxygen/addon/doxywizard/images/del.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/xZenu/src/util/doxygen/addon/doxywizard/images/del.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/xZenu/src/util/doxygen/addon/doxywizard/images/add.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/xZenu/src/util/doxygen/addon/doxywizard/images/add.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/xZenu/src/util/doxygen/addon/doxywizard/images/tunecolor.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/xZenu/src/util/doxygen/addon/doxywizard/images/tunecolor.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/xZenu/src/util/doxygen/addon/doxywizard/images/folder.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/xZenu/src/util/doxygen/addon/doxywizard/images/folder.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.rc =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.rc (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.rc (revision 1322) @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "doxywizard.ico" Index: branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.pro.in =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.pro.in (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.pro.in (revision 1322) @@ -0,0 +1,28 @@ +###################################################################### +# Automatically generated by qmake (2.01a) zo okt 19 12:50:02 2008 +###################################################################### + +TEMPLATE = app +DESTDIR = ../../bin +TARGET = +DEPENDPATH += . +INCLUDEPATH += . +QT += xml +CONFIG += $extraopts +OBJECTS_DIR = obj +MOC_DIR = moc +RCC_DIR = rcc +DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII + +macx-g++ { + CONFIG += x86 ppc +} + +# Input +HEADERS += doxywizard.h version.h expert.h config.h helplabel.h \ + inputbool.h inputstring.h inputint.h inputstrlist.h wizard.h +SOURCES += doxywizard.cpp ../../src/version.cpp expert.cpp wizard.cpp \ + inputbool.cpp inputstring.cpp inputint.cpp inputstrlist.cpp +LEXSOURCES += config.l +RESOURCES += doxywizard.qrc +win32:RC_FILE += doxywizard.rc Index: branches/xZenu/src/util/doxygen/addon/doxywizard/inputstrlist.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/inputstrlist.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/inputstrlist.h (revision 1322) @@ -0,0 +1,91 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _INPUTSTRLIST_H +#define _INPUTSTRLIST_H + +#include "input.h" + +#include <QObject> +#include <QStringList> + +class QLabel; +class QLineEdit; +class QPushButton; +class QListWidget; +class QStringList; +class QGridLayout; +class QAction; + +class InputStrList : public QObject, public Input +{ + Q_OBJECT + + public: + enum ListMode { ListString = 0, + ListFile = 1, + ListDir = 2, + ListFileDir = ListFile | ListDir + }; + + InputStrList( QGridLayout *layout,int &row, + const QString &id, const QStringList &sl, + ListMode v, const QString &docs); + void setValue(const QStringList &sl); + + QVariant &value(); + void update(); + Kind kind() const { return StrList; } + QString docs() const { return m_docs; } + QString id() const { return m_id; } + void addDependency(Input *) { Q_ASSERT(false); } + void setEnabled(bool); + void updateDependencies() {} + void writeValue(QTextStream &t,QTextCodec *codec); + + public slots: + void reset(); + + signals: + void changed(); + void showHelp(Input *); + + private slots: + void addString(); + void delString(); + void updateString(); + void selectText(const QString &s); + void browseFiles(); + void browseDir(); + void help(); + + private: + void updateDefault(); + QLabel *m_lab; + QLineEdit *m_le; + QAction *m_add; + QAction *m_del; + QAction *m_upd; + QAction *m_brFile; + QAction *m_brDir; + QListWidget *m_lb; + QStringList m_default; + QStringList m_strList; + QVariant m_value; + QString m_docs; + QString m_id; + +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/inputstring.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/inputstring.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/inputstring.h (revision 1322) @@ -0,0 +1,90 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _INPUTSTRING_H +#define _INPUTSTRING_H + +#include "input.h" + +#include <QObject> +#include <QMap> +#include <QStringList> + +class QLabel; +class QLineEdit; +class QToolBar; +class QComboBox; +class QGridLayout; + +class InputString : public QObject, public Input +{ + Q_OBJECT + + public: + enum StringMode { StringFree=0, + StringFile=1, + StringDir=2, + StringFixed=3 + }; + + InputString( QGridLayout *layout,int &row, + const QString &id, const QString &s, + StringMode m, + const QString &docs, + const QString &absPath = QString() ); + ~InputString(); + void addValue(QString s); + void setDefault(); + + // Input + QVariant &value(); + void update(); + Kind kind() const { return String; } + QString docs() const { return m_docs; } + QString id() const { return m_id; } + void addDependency(Input *) { Q_ASSERT(false); } + void setEnabled(bool); + void updateDependencies() {} + void writeValue(QTextStream &t,QTextCodec *codec); + + public slots: + void reset(); + void setValue(const QString&); + + signals: + void changed(); + void showHelp(Input *); + + private slots: + void browse(); + void clear(); + void help(); + + private: + QLabel *m_lab; + QLineEdit *m_le; + QToolBar *m_br; + QComboBox *m_com; + QString m_str; + QString m_default; + StringMode m_sm; + QStringList m_values; + int m_index; + QVariant m_value; + QString m_docs; + QString m_id; + bool m_absPath; +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/Makefile =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/Makefile (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/Makefile (revision 1322) @@ -0,0 +1,59 @@ +# +# This file was generated from Makefile.in on Mon Mar 28 15:09:00 CEST 2011 +# + +DOXYGEN = /Users/dimitri/doxygen +TMAKEPATH = /Users/dimitri/doxygen/tmake/lib/macosx-c++ +ENV = env TMAKEPATH=$(TMAKEPATH) +TMAKE = /Users/dimitri/doxygen/tmake/bin/tmake +MAKE = /opt/local/bin/gmake +PERL = /opt/local/bin/perl +RM = rm -f +CP = cp +VERSION = 1.7.3 +INSTALL = /usr/local +INSTTOOL = /opt/local/bin/ginstall +DOXYDOCS = .. +DOCDIR = $(INSTALL)/share/doc/packages/doxygen +QTDIR = /usr +HAVE_DOT = /usr/local/bin/dot +MKSPECS = -spec macx-g++ +# +# +# +# Copyright (C) 1997-2011 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# + +QMAKE=qmake $(MKSPECS) + +all: Makefile.doxywizard + $(MAKE) -f Makefile.doxywizard + +Makefile.doxywizard: doxywizard.pro + $(QMAKE) doxywizard.pro -o Makefile.doxywizard + +qmake: + $(QMAKE) doxywizard.pro -o Makefile.doxywizard + +clean: Makefile.doxywizard + $(MAKE) -f Makefile.doxywizard clean + +distclean: Makefile.doxywizard + $(MAKE) -f Makefile.doxywizard distclean + $(RM) Makefile.doxywizard + +install: + $(INSTTOOL) -d $(INSTALL)/bin + $(INSTTOOL) -m 755 ../../bin/doxywizard $(INSTALL)/bin + $(INSTTOOL) -d $(INSTALL)/$(MAN1DIR) + cat ../../doc/doxywizard.1 | sed -e "s/DATE/$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > doxywizard.1 + $(INSTTOOL) -m 644 doxywizard.1 $(INSTALL)/$(MAN1DIR)/doxywizard.1 + rm doxywizard.1 + +FORCE: Index: branches/xZenu/src/util/doxygen/addon/doxywizard/helplabel.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/helplabel.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/helplabel.h (revision 1322) @@ -0,0 +1,33 @@ +#ifndef HELPLABEL_H +#define HELPLABEL_H + +#include <QLabel> +#include <QMenu> + +class HelpLabel : public QLabel +{ + Q_OBJECT + public: + HelpLabel(const QString &text) : QLabel(text) + { setContextMenuPolicy(Qt::CustomContextMenu); + connect(this,SIGNAL(customContextMenuRequested(const QPoint&)), + this,SLOT(showMenu(const QPoint&))); + } + signals: + void enter(); + void reset(); + private slots: + void showMenu(const QPoint &p) + { + QMenu menu(this); + QAction *a = menu.addAction(tr("Reset to default")); + if (menu.exec(mapToGlobal(p))==a) + { + reset(); + } + } + protected: + void enterEvent( QEvent * event ) { enter(); QLabel::enterEvent(event); } +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/wizard.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/wizard.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/wizard.cpp (revision 1322) @@ -0,0 +1,1295 @@ +#include "wizard.h" +#include "input.h" +#include "doxywizard.h" + +#include <math.h> +#include <QtGui> + +// options configurable via the wizard +#define STR_PROJECT_NAME QString::fromAscii("PROJECT_NAME") +#define STR_PROJECT_LOGO QString::fromAscii("PROJECT_LOGO") +#define STR_PROJECT_BRIEF QString::fromAscii("PROJECT_BRIEF") +#define STR_INPUT QString::fromAscii("INPUT") +#define STR_OUTPUT_DIRECTORY QString::fromAscii("OUTPUT_DIRECTORY") +#define STR_PROJECT_NUMBER QString::fromAscii("PROJECT_NUMBER") +#define STR_RECURSIVE QString::fromAscii("RECURSIVE") +#define STR_OPTIMIZE_OUTPUT_FOR_C QString::fromAscii("OPTIMIZE_OUTPUT_FOR_C") +#define STR_OPTIMIZE_OUTPUT_JAVA QString::fromAscii("OPTIMIZE_OUTPUT_JAVA") +#define STR_OPTIMIZE_FOR_FORTRAN QString::fromAscii("OPTIMIZE_FOR_FORTRAN") +#define STR_OPTIMIZE_OUTPUT_VHDL QString::fromAscii("OPTIMIZE_OUTPUT_VHDL") +#define STR_CPP_CLI_SUPPORT QString::fromAscii("CPP_CLI_SUPPORT") +#define STR_HIDE_SCOPE_NAMES QString::fromAscii("HIDE_SCOPE_NAMES") +#define STR_EXTRACT_ALL QString::fromAscii("EXTRACT_ALL") +#define STR_SOURCE_BROWSER QString::fromAscii("SOURCE_BROWSER") +#define STR_GENERATE_HTML QString::fromAscii("GENERATE_HTML") +#define STR_GENERATE_LATEX QString::fromAscii("GENERATE_LATEX") +#define STR_GENERATE_MAN QString::fromAscii("GENERATE_MAN") +#define STR_GENERATE_RTF QString::fromAscii("GENERATE_RTF") +#define STR_GENERATE_XML QString::fromAscii("GENERATE_XML") +#define STR_GENERATE_HTMLHELP QString::fromAscii("GENERATE_HTMLHELP") +#define STR_GENERATE_TREEVIEW QString::fromAscii("GENERATE_TREEVIEW") +#define STR_USE_PDFLATEX QString::fromAscii("USE_PDFLATEX") +#define STR_PDF_HYPERLINKS QString::fromAscii("PDF_HYPERLINKS") +#define STR_SEARCHENGINE QString::fromAscii("SEARCHENGINE") +#define STR_HAVE_DOT QString::fromAscii("HAVE_DOT") +#define STR_CLASS_DIAGRAMS QString::fromAscii("CLASS_DIAGRAMS") +#define STR_CLASS_GRAPH QString::fromAscii("CLASS_GRAPH") +#define STR_COLLABORATION_GRAPH QString::fromAscii("COLLABORATION_GRAPH") +#define STR_GRAPHICAL_HIERARCHY QString::fromAscii("GRAPHICAL_HIERARCHY") +#define STR_INCLUDE_GRAPH QString::fromAscii("INCLUDE_GRAPH") +#define STR_INCLUDED_BY_GRAPH QString::fromAscii("INCLUDED_BY_GRAPH") +#define STR_CALL_GRAPH QString::fromAscii("CALL_GRAPH") +#define STR_CALLER_GRAPH QString::fromAscii("CALLER_GRAPH") +#define STR_HTML_COLORSTYLE_HUE QString::fromAscii("HTML_COLORSTYLE_HUE") +#define STR_HTML_COLORSTYLE_SAT QString::fromAscii("HTML_COLORSTYLE_SAT") +#define STR_HTML_COLORSTYLE_GAMMA QString::fromAscii("HTML_COLORSTYLE_GAMMA") + +static bool g_optimizeMapping[6][6] = +{ + // A: OPTIMIZE_OUTPUT_FOR_C + // B: OPTIMIZE_OUTPUT_JAVA + // C: OPTIMIZE_FOR_FORTRAN + // D: OPTIMIZE_OUTPUT_VHDL + // E: CPP_CLI_SUPPORT + // F: HIDE_SCOPE_NAMES + // A B C D E F + { false,false,false,false,false,false }, // 0: C++ + { false,false,false,false,true, false }, // 1: C++/CLI + { false,true, false,false,false,false }, // 2: C#/Java + { true, false,false,false,false,true }, // 3: C/PHP + { false,false,true, false,false,false }, // 4: Fortran + { false,false,false,true, false,false }, // 5: VHDL +}; + +static QString g_optimizeOptionNames[6] = +{ + STR_OPTIMIZE_OUTPUT_FOR_C, + STR_OPTIMIZE_OUTPUT_JAVA, + STR_OPTIMIZE_FOR_FORTRAN, + STR_OPTIMIZE_OUTPUT_VHDL, + STR_CPP_CLI_SUPPORT, + STR_HIDE_SCOPE_NAMES +}; + +//========================================================================== + +static bool stringVariantToBool(const QVariant &v) +{ + QString s = v.toString().toLower(); + return s==QString::fromAscii("yes") || s==QString::fromAscii("true") || s==QString::fromAscii("1"); +} + +static bool getBoolOption( + const QHash<QString,Input*>&model,const QString &name) +{ + Input *option = model[name]; + Q_ASSERT(option!=0); + return stringVariantToBool(option->value()); +} + +static int getIntOption( + const QHash<QString,Input*>&model,const QString &name) +{ + Input *option = model[name]; + Q_ASSERT(option!=0); + return option->value().toInt(); +} + +static QString getStringOption( + const QHash<QString,Input*>&model,const QString &name) +{ + Input *option = model[name]; + Q_ASSERT(option!=0); + return option->value().toString(); +} + +static void updateBoolOption( + const QHash<QString,Input*>&model,const QString &name,bool bNew) +{ + Input *option = model[name]; + Q_ASSERT(option!=0); + bool bOld = stringVariantToBool(option->value()); + if (bOld!=bNew) + { + option->value()=QString::fromAscii(bNew ? "true" : "false"); + option->update(); + } +} + +static void updateIntOption( + const QHash<QString,Input*>&model,const QString &name,int iNew) +{ + Input *option = model[name]; + Q_ASSERT(option!=0); + int iOld = option->value().toInt(); + if (iOld!=iNew) + { + option->value()=QString::fromAscii("%1").arg(iNew); + option->update(); + } +} + + +static void updateStringOption( + const QHash<QString,Input*>&model,const QString &name,const QString &s) +{ + Input *option = model[name]; + Q_ASSERT(option!=0); + if (option->value().toString()!=s) + { + option->value() = s; + option->update(); + } +} + +//========================================================================== + +TuneColorDialog::TuneColorDialog(int hue,int sat,int gamma,QWidget *parent) : QDialog(parent) +{ + setWindowTitle(tr("Tune the color of the HTML output")); + QGridLayout *layout = new QGridLayout(this); + m_image = new QImage(QString::fromAscii(":/images/tunecolor.png")); + m_imageLab = new QLabel; + updateImage(hue,sat,gamma); + layout->addWidget(new QLabel(tr("Example output: use the sliders on the right to adjust the color")),0,0); + layout->addWidget(m_imageLab,1,0); + QHBoxLayout *buttonsLayout = new QHBoxLayout; + + QPushButton *okButton = new QPushButton(tr("Ok")); + connect(okButton,SIGNAL(clicked()),SLOT(accept())); + okButton->setDefault(true); + QPushButton *cancelButton = new QPushButton(tr("Cancel")); + connect(cancelButton,SIGNAL(clicked()),SLOT(reject())); + + ColorPicker *huePicker = new ColorPicker(ColorPicker::Hue); + huePicker->setCol(hue,sat,gamma); + huePicker->setFixedWidth(20); + layout->addWidget(huePicker,1,1); + ColorPicker *satPicker = new ColorPicker(ColorPicker::Saturation); + satPicker->setCol(hue,sat,gamma); + satPicker->setFixedWidth(20); + layout->addWidget(satPicker,1,2); + ColorPicker *gamPicker = new ColorPicker(ColorPicker::Gamma); + gamPicker->setCol(hue,sat,gamma); + gamPicker->setFixedWidth(20); + layout->addWidget(gamPicker,1,3); + + connect(huePicker,SIGNAL(newHsv(int,int,int)),satPicker,SLOT(setCol(int,int,int))); + connect(satPicker,SIGNAL(newHsv(int,int,int)),huePicker,SLOT(setCol(int,int,int))); + connect(huePicker,SIGNAL(newHsv(int,int,int)),gamPicker,SLOT(setCol(int,int,int))); + connect(satPicker,SIGNAL(newHsv(int,int,int)),gamPicker,SLOT(setCol(int,int,int))); + connect(gamPicker,SIGNAL(newHsv(int,int,int)),satPicker,SLOT(setCol(int,int,int))); + connect(gamPicker,SIGNAL(newHsv(int,int,int)),huePicker,SLOT(setCol(int,int,int))); + connect(huePicker,SIGNAL(newHsv(int,int,int)),this,SLOT(updateImage(int,int,int))); + connect(satPicker,SIGNAL(newHsv(int,int,int)),this,SLOT(updateImage(int,int,int))); + connect(gamPicker,SIGNAL(newHsv(int,int,int)),this,SLOT(updateImage(int,int,int))); + + buttonsLayout->addStretch(); + buttonsLayout->addWidget(okButton); + buttonsLayout->addWidget(cancelButton); + layout->addLayout(buttonsLayout,5,0,1,4); +} + +void hsl2rgb(double h,double s,double l, + double *pRed,double *pGreen,double *pBlue) +{ + double v; + double r,g,b; + + r = l; // default to gray + g = l; + b = l; + v = (l <= 0.5) ? (l * (1.0 + s)) : (l + s - l * s); + if (v > 0) + { + double m; + double sv; + int sextant; + double fract, vsf, mid1, mid2; + + m = l + l - v; + sv = (v - m ) / v; + h *= 6.0; + sextant = (int)h; + fract = h - sextant; + vsf = v * sv * fract; + mid1 = m + vsf; + mid2 = v - vsf; + switch (sextant) + { + case 0: + r = v; + g = mid1; + b = m; + break; + case 1: + r = mid2; + g = v; + b = m; + break; + case 2: + r = m; + g = v; + b = mid1; + break; + case 3: + r = m; + g = mid2; + b = v; + break; + case 4: + r = mid1; + g = m; + b = v; + break; + case 5: + r = v; + g = m; + b = mid2; + break; + } + } + *pRed = r; + *pGreen = g; + *pBlue = b; +} + + + +void TuneColorDialog::updateImage(int hue,int sat,int gam) +{ + QImage coloredImg(m_image->width(),m_image->height(),QImage::Format_RGB32); + uint *srcPixel = (uint *)m_image->scanLine(0); + uint *dstPixel = (uint *)coloredImg.scanLine(0); + uint nrPixels = coloredImg.width()*coloredImg.height(); + for (uint i=0;i<nrPixels;i++,srcPixel++,dstPixel++) + { + QColor c = QColor::fromRgb(*srcPixel); + double r,g,b; + hsl2rgb(hue/359.0, sat/255.0, pow(c.green()/255.0,gam/100.0),&r,&g,&b); + *dstPixel = qRgb((int)(r*255.0),(int)(g*255.0),(int)(b*255.0)); + } + m_imageLab->setPixmap(QPixmap::fromImage(coloredImg)); + m_hue = hue; + m_sat = sat; + m_gam = gam; +} + +int TuneColorDialog::getHue() const +{ + return m_hue; +} + +int TuneColorDialog::getSaturation() const +{ + return m_sat; +} + +int TuneColorDialog::getGamma() const +{ + return m_gam; +} + +//========================================================================== + +ColorPicker::ColorPicker(Mode m) +{ + m_hue = 220; + m_gam = 100; + m_sat = 100; + m_mode = m; + m_pix = 0; +} + +ColorPicker::~ColorPicker() +{ + delete m_pix; +} + +void ColorPicker::paintEvent(QPaintEvent*) +{ + int w = width() - 5; + + QRect r(0, foff, w, height() - 2*foff); + int wi = r.width() - 2; + int hi = r.height() - 2; + if (!m_pix || m_pix->height() != hi || m_pix->width() != wi) + { + delete m_pix; + QImage img(wi, hi, QImage::Format_RGB32); + int y; + uint *pixel = (uint *) img.scanLine(0); + for (y = 0; y < hi; y++) + { + const uint *end = pixel + wi; + int yh = y2hue(y+coff); + int ys = y2sat(y+coff); + int yg = y2gam(y+coff); + while (pixel < end) + { + QColor c; + c.setHsv(yh, ys, (int)(255*pow(0.7,yg/100.0))); + *pixel = c.rgb(); + ++pixel; + } + } + m_pix = new QPixmap(QPixmap::fromImage(img)); + } + QPainter p(this); + p.drawPixmap(1, coff, *m_pix); + const QPalette &g = palette(); + qDrawShadePanel(&p, r, g, true); + p.setPen(g.foreground().color()); + p.setBrush(g.foreground()); + QPolygon a; + int y = m_mode==Hue ? hue2y(m_hue) : + m_mode==Saturation ? sat2y(m_sat) : + gam2y(m_gam); + a.setPoints(3, w, y, w+5, y+5, w+5, y-5); + p.eraseRect(w, 0, 5, height()); + p.drawPolygon(a); +} + +void ColorPicker::mouseMoveEvent(QMouseEvent *m) +{ + if (m_mode==Hue) setHue(y2hue(m->y())); + else if (m_mode==Saturation) setSat(y2sat(m->y())); + else setGam(y2gam(m->y())); +} + +void ColorPicker::mousePressEvent(QMouseEvent *m) +{ + if (m_mode==Hue) setHue(y2hue(m->y())); + else if (m_mode==Saturation) setSat(y2sat(m->y())); + else setGam(y2gam(m->y())); +} + +void ColorPicker::setHue(int h) +{ + if (h==m_hue) return; + m_hue = qMax(0,qMin(h,359)); + delete m_pix; m_pix=0; + repaint(); + emit newHsv(m_hue,m_sat,m_gam); +} + +void ColorPicker::setSat(int s) +{ + if (s==m_sat) return; + m_sat = qMax(0,qMin(s,255)); + delete m_pix; m_pix=0; + repaint(); + emit newHsv(m_hue,m_sat,m_gam); +} + +void ColorPicker::setGam(int g) +{ + if (g==m_gam) return; + m_gam = qMax(40,qMin(g,240)); + delete m_pix; m_pix=0; + repaint(); + emit newHsv(m_hue,m_sat,m_gam); +} + +void ColorPicker::setCol(int h, int s, int g) +{ + if (m_hue!=h || m_sat!=s || m_gam!=g) + { + m_hue = h; + m_sat = s; + m_gam = g; + delete m_pix; m_pix=0; + repaint(); + } +} + +int ColorPicker::y2hue(int y) +{ + int d = height() - 2*coff - 1; + return m_mode==Hue ? (y - coff)*359/d : m_hue; +} + +int ColorPicker::hue2y(int v) +{ + int d = height() - 2*coff - 1; + return coff + v*d/359; +} + +int ColorPicker::y2sat(int y) +{ + int d = height() - 2*coff - 1; + return m_mode==Saturation ? 255 - (y - coff)*255/d : m_sat; +} + +int ColorPicker::sat2y(int v) +{ + int d = height() - 2*coff - 1; + return coff + (255-v)*d/255; +} + +int ColorPicker::y2gam(int y) +{ + int d = height() - 2*coff - 1; + return m_mode==Gamma ? 240 - (y - coff)*200/d : m_gam; +} + +int ColorPicker::gam2y(int g) +{ + int d = height() - 2*coff - 1; + return coff + (240-g)*d/200; +} + +//========================================================================== + +Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(wizard), m_modelData(modelData) +{ + QVBoxLayout *layout = new QVBoxLayout(this); + layout->setMargin(4); + layout->setSpacing(8); + QLabel *l = new QLabel(this); + l->setText(tr("Provide some information " + "about the project you are documenting")); + layout->addWidget(l); + QWidget *w = new QWidget( this ); + QGridLayout *grid = new QGridLayout(w); + grid->setSpacing(10); + + // project name + QLabel *projName = new QLabel(this); + projName->setText(tr("Project name:")); + projName->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + // project brief + QLabel *projBrief = new QLabel(this); + projBrief->setText(tr("Project synopsis:")); + projBrief->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + // project version + QLabel *projVersion = new QLabel(this); + projVersion->setText(tr("Project version or id:")); + projVersion->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + // project icon + QLabel *projLogo = new QLabel(this); + projLogo->setText(tr("Project logo:")); + projLogo->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + + grid->addWidget(projName,0,0); + grid->addWidget(projBrief,1,0); + grid->addWidget(projVersion,2,0); + grid->addWidget(projLogo,3,0); + + m_projName = new QLineEdit; + m_projBrief = new QLineEdit; + m_projNumber = new QLineEdit; + QPushButton *projIconSel = new QPushButton(this); + projIconSel->setText(tr("Select...")); + QPixmap pm(QSize(120,55)); + pm.fill(); + m_projIconLab = new QLabel; + m_projIconLab->setPixmap(pm); + + grid->addWidget(m_projName,0,1,1,2); + grid->addWidget(m_projBrief,1,1,1,2); + grid->addWidget(m_projNumber,2,1,1,2); + grid->addWidget(projIconSel,3,1); + grid->addWidget(m_projIconLab,3,2); + + grid->setColumnStretch(2,1); + + w->setLayout(grid); + + layout->addWidget(w); + + //--------------------------------------------------- + QFrame *f = new QFrame( this ); + f->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + layout->addWidget(f); + + l = new QLabel(this); + l->setText(tr("Specify the directory to scan for source code")); + layout->addWidget(l); + QWidget *row = new QWidget; + QHBoxLayout *rowLayout = new QHBoxLayout(row); + rowLayout->setSpacing(10); + l = new QLabel(this); + l->setText(tr("Source code directory:")); + rowLayout->addWidget(l); + m_sourceDir = new QLineEdit; + m_srcSelectDir = new QPushButton(this); + m_srcSelectDir->setText(tr("Select...")); + rowLayout->addWidget(m_sourceDir); + rowLayout->addWidget(m_srcSelectDir); + layout->addWidget(row); + + m_recursive = new QCheckBox(this); + m_recursive->setText(tr("Scan recursively")); + m_recursive->setChecked(TRUE); + layout->addWidget(m_recursive); + + //--------------------------------------------------- + f = new QFrame( this ); + f->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + layout->addWidget(f); + + l = new QLabel(this); + l->setText(tr("Specify the directory where doxygen should " + "put the generated documentation")); + layout->addWidget(l); + row = new QWidget; + rowLayout = new QHBoxLayout(row); + rowLayout->setSpacing(10); + l = new QLabel(this); + l->setText(tr("Destination directory:")); + rowLayout->addWidget(l); + m_destDir = new QLineEdit; + m_dstSelectDir = new QPushButton(this); + m_dstSelectDir->setText(tr("Select...")); + rowLayout->addWidget(m_destDir); + rowLayout->addWidget(m_dstSelectDir); + layout->addWidget(row); + layout->addStretch(1); + setLayout(layout); + + connect(projIconSel,SIGNAL(clicked()), + this,SLOT(selectProjectIcon())); + connect(m_srcSelectDir,SIGNAL(clicked()), + this,SLOT(selectSourceDir())); + connect(m_dstSelectDir,SIGNAL(clicked()), + this,SLOT(selectDestinationDir())); + connect(m_projName,SIGNAL(textChanged(const QString &)),SLOT(setProjectName(const QString &))); + connect(m_projBrief,SIGNAL(textChanged(const QString &)),SLOT(setProjectBrief(const QString &))); + connect(m_projNumber,SIGNAL(textChanged(const QString &)),SLOT(setProjectNumber(const QString &))); + connect(m_sourceDir,SIGNAL(textChanged(const QString &)),SLOT(setSourceDir(const QString &))); + connect(m_recursive,SIGNAL(stateChanged(int)),SLOT(setRecursiveScan(int))); + connect(m_destDir,SIGNAL(textChanged(const QString &)),SLOT(setDestinationDir(const QString &))); +} + +void Step1::selectProjectIcon() +{ + QString path = QFileInfo(MainWindow::instance().configFileName()).path(); + QString iconName = QFileDialog::getOpenFileName(this, + tr("Select project icon/image"),path); + QPixmap pm(iconName); + if (!pm.isNull()) + { + m_projIconLab->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation)); + updateStringOption(m_modelData,STR_PROJECT_LOGO,iconName); + } +} + +void Step1::selectSourceDir() +{ + QString path = QFileInfo(MainWindow::instance().configFileName()).path(); + QString dirName = QFileDialog::getExistingDirectory(this, + tr("Select source directory"),path); + QDir dir(path); + if (!MainWindow::instance().configFileName().isEmpty() && dir.exists()) + { + dirName = dir.relativeFilePath(dirName); + } + if (dirName.isEmpty()) + { + dirName=QString::fromAscii("."); + } + m_sourceDir->setText(dirName); +} + +void Step1::selectDestinationDir() +{ + QString path = QFileInfo(MainWindow::instance().configFileName()).path(); + QString dirName = QFileDialog::getExistingDirectory(this, + tr("Select destination directory"),path); + QDir dir(path); + if (!MainWindow::instance().configFileName().isEmpty() && dir.exists()) + { + dirName = dir.relativeFilePath(dirName); + } + if (dirName.isEmpty()) + { + dirName=QString::fromAscii("."); + } + m_destDir->setText(dirName); +} + +void Step1::setProjectName(const QString &name) +{ + updateStringOption(m_modelData,STR_PROJECT_NAME,name); +} + +void Step1::setProjectBrief(const QString &desc) +{ + updateStringOption(m_modelData,STR_PROJECT_BRIEF,desc); +} + +void Step1::setProjectNumber(const QString &num) +{ + updateStringOption(m_modelData,STR_PROJECT_NUMBER,num); +} + +void Step1::setSourceDir(const QString &dir) +{ + Input *option = m_modelData[STR_INPUT]; + if (option->value().toStringList().count()>0) + { + QStringList sl = option->value().toStringList(); + if (sl[0]!=dir) + { + sl[0] = dir; + option->value() = sl; + option->update(); + } + } + else + { + option->value() = QStringList() << dir; + option->update(); + } +} + +void Step1::setDestinationDir(const QString &dir) +{ + updateStringOption(m_modelData,STR_OUTPUT_DIRECTORY,dir); +} + +void Step1::setRecursiveScan(int s) +{ + updateBoolOption(m_modelData,STR_RECURSIVE,s==Qt::Checked); +} + +void Step1::init() +{ + Input *option; + m_projName->setText(getStringOption(m_modelData,STR_PROJECT_NAME)); + m_projBrief->setText(getStringOption(m_modelData,STR_PROJECT_BRIEF)); + m_projNumber->setText(getStringOption(m_modelData,STR_PROJECT_NUMBER)); + QString iconName = getStringOption(m_modelData,STR_PROJECT_LOGO); + if (!iconName.isEmpty()) + { + QPixmap pm(iconName); + if (!pm.isNull()) + { + m_projIconLab->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation)); + } + } + else + { + QPixmap pm(QSize(120,55)); + pm.fill(); + m_projIconLab->setPixmap(pm); + } + option = m_modelData[STR_INPUT]; + if (option->value().toStringList().count()>0) + { + m_sourceDir->setText(option->value().toStringList().first()); + } + m_recursive->setChecked( + getBoolOption(m_modelData,STR_RECURSIVE) ? Qt::Checked : Qt::Unchecked); + m_destDir->setText(getStringOption(m_modelData,STR_OUTPUT_DIRECTORY)); +} + + +//========================================================================== + +Step2::Step2(Wizard *wizard,const QHash<QString,Input*> &modelData) + : m_wizard(wizard), m_modelData(modelData) +{ + QRadioButton *r; + QVBoxLayout *layout = new QVBoxLayout(this); + + //--------------------------------------------------- + m_extractModeGroup = new QButtonGroup(this); + m_extractMode = new QGroupBox(this); + m_extractMode->setTitle(tr("Select the desired extraction mode:")); + QGridLayout *gbox = new QGridLayout( m_extractMode ); + r = new QRadioButton(tr("Documented entities only")); + r->setChecked(true); + m_extractModeGroup->addButton(r, 0); + gbox->addWidget(r,1,0); + // 1 -> EXTRACT_ALL = NO + r = new QRadioButton(tr("All Entities")); + m_extractModeGroup->addButton(r, 1); + gbox->addWidget(r,2,0); + // 2 -> EXTRACT_ALL = YES + m_crossRef = new QCheckBox(m_extractMode); + m_crossRef->setText(tr("Include cross-referenced source code in the output")); + // m_crossRef -> SOURCE_BROWSER = YES/NO + gbox->addWidget(m_crossRef,3,0); + layout->addWidget(m_extractMode); + + //--------------------------------------------------- + QFrame *f = new QFrame( this ); + f->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + layout->addWidget(f); + + m_optimizeLangGroup = new QButtonGroup(this); + m_optimizeLang = new QGroupBox(this); + m_optimizeLang->setTitle(tr("Select programming language to optimize the results for")); + gbox = new QGridLayout( m_optimizeLang ); + + r = new QRadioButton(m_optimizeLang); + r->setText(tr("Optimize for C++ output")); + r->setChecked(true); + m_optimizeLangGroup->addButton(r, 0); + // 0 -> OPTIMIZE_OUTPUT_FOR_C = NO + // OPTIMIZE_OUTPUT_JAVA = NO + // OPTIMIZE_FOR_FORTRAN = NO + // OPTIMIZE_OUTPUT_VHDL = NO + // CPP_CLI_SUPPORT = NO + // HIDE_SCOPE_NAMES = NO + gbox->addWidget(r,0,0); + r = new QRadioButton(tr("Optimize for C++/CLI output")); + gbox->addWidget(r,1,0); + m_optimizeLangGroup->addButton(r, 1); + // 1 -> OPTIMIZE_OUTPUT_FOR_C = NO + // OPTIMIZE_OUTPUT_JAVA = NO + // OPTIMIZE_FOR_FORTRAN = NO + // OPTIMIZE_OUTPUT_VHDL = NO + // CPP_CLI_SUPPORT = YES + // HIDE_SCOPE_NAMES = NO + r = new QRadioButton(tr("Optimize for Java or C# output")); + m_optimizeLangGroup->addButton(r, 2); + // 2 -> OPTIMIZE_OUTPUT_FOR_C = NO + // OPTIMIZE_OUTPUT_JAVA = YES + // OPTIMIZE_FOR_FORTRAN = NO + // OPTIMIZE_OUTPUT_VHDL = NO + // CPP_CLI_SUPPORT = NO + // HIDE_SCOPE_NAMES = NO + gbox->addWidget(r,2,0); + r = new QRadioButton(tr("Optimize for C or PHP output")); + m_optimizeLangGroup->addButton(r, 3); + // 3 -> OPTIMIZE_OUTPUT_FOR_C = YES + // OPTIMIZE_OUTPUT_JAVA = NO + // OPTIMIZE_FOR_FORTRAN = NO + // OPTIMIZE_OUTPUT_VHDL = NO + // CPP_CLI_SUPPORT = NO + // HIDE_SCOPE_NAMES = YES + gbox->addWidget(r,3,0); + r = new QRadioButton(tr("Optimize for Fortran output")); + m_optimizeLangGroup->addButton(r, 4); + // 4 -> OPTIMIZE_OUTPUT_FOR_C = NO + // OPTIMIZE_OUTPUT_JAVA = NO + // OPTIMIZE_FOR_FORTRAN = YES + // OPTIMIZE_OUTPUT_VHDL = NO + // CPP_CLI_SUPPORT = NO + // HIDE_SCOPE_NAMES = NO + gbox->addWidget(r,4,0); + r = new QRadioButton(tr("Optimize for VHDL output")); + m_optimizeLangGroup->addButton(r, 5); + // 5 -> OPTIMIZE_OUTPUT_FOR_C = NO + // OPTIMIZE_OUTPUT_JAVA = NO + // OPTIMIZE_FOR_FORTRAN = NO + // OPTIMIZE_OUTPUT_VHDL = YES + // CPP_CLI_SUPPORT = NO + // HIDE_SCOPE_NAMES = NO + gbox->addWidget(r,5,0); + + layout->addWidget(m_optimizeLang); + layout->addStretch(1); + + connect(m_crossRef,SIGNAL(stateChanged(int)), + SLOT(changeCrossRefState(int))); + connect(m_optimizeLangGroup,SIGNAL(buttonClicked(int)), + SLOT(optimizeFor(int))); + connect(m_extractModeGroup,SIGNAL(buttonClicked(int)), + SLOT(extractMode(int))); +} + + +void Step2::optimizeFor(int choice) +{ + for (int i=0;i<6;i++) + { + updateBoolOption(m_modelData, + g_optimizeOptionNames[i], + g_optimizeMapping[choice][i]); + } +} + +void Step2::extractMode(int choice) +{ + updateBoolOption(m_modelData,STR_EXTRACT_ALL,choice==1); +} + +void Step2::changeCrossRefState(int choice) +{ + updateBoolOption(m_modelData,STR_SOURCE_BROWSER,choice==Qt::Checked); +} + +void Step2::init() +{ + m_extractModeGroup->button( + getBoolOption(m_modelData,STR_EXTRACT_ALL) ? 1 : 0)->setChecked(true); + m_crossRef->setChecked(getBoolOption(m_modelData,STR_SOURCE_BROWSER)); + + int x=0; + if (getBoolOption(m_modelData,STR_CPP_CLI_SUPPORT)) x=1; + else if (getBoolOption(m_modelData,STR_OPTIMIZE_OUTPUT_JAVA)) x=2; + else if (getBoolOption(m_modelData,STR_OPTIMIZE_OUTPUT_FOR_C)) x=3; + else if (getBoolOption(m_modelData,STR_OPTIMIZE_FOR_FORTRAN)) x=4; + else if (getBoolOption(m_modelData,STR_OPTIMIZE_OUTPUT_VHDL)) x=5; + m_optimizeLangGroup->button(x)->setChecked(true); +} + +//========================================================================== + +Step3::Step3(Wizard *wizard,const QHash<QString,Input*> &modelData) + : m_wizard(wizard), m_modelData(modelData) +{ + QVBoxLayout *vbox = 0; + QRadioButton *r = 0; + + QGridLayout *gbox = new QGridLayout( this ); + gbox->addWidget(new QLabel(tr("Select the output format(s) to generate")),0,0); + { + m_htmlOptions = new QGroupBox(tr("HTML")); + m_htmlOptions->setCheckable(true); + // GENERATE_HTML + m_htmlOptionsGroup = new QButtonGroup(m_htmlOptions); + QRadioButton *r = new QRadioButton(tr("plain HTML")); + r->setChecked(true); + m_htmlOptionsGroup->addButton(r, 0); + vbox = new QVBoxLayout; + vbox->addWidget(r); + r = new QRadioButton(tr("with navigation panel")); + m_htmlOptionsGroup->addButton(r, 1); + // GENERATE_TREEVIEW + vbox->addWidget(r); + r = new QRadioButton(tr("prepare for compressed HTML (.chm)")); + m_htmlOptionsGroup->addButton(r, 2); + // GENERATE_HTMLHELP + vbox->addWidget(r); + m_searchEnabled=new QCheckBox(tr("With search function")); + vbox->addWidget(m_searchEnabled); + // SEARCH_ENGINE + QHBoxLayout *hbox = new QHBoxLayout; + m_tuneColor=new QPushButton(tr("Change color...")); + hbox->addWidget(m_tuneColor); + hbox->addStretch(1); + vbox->addLayout(hbox); + m_htmlOptions->setLayout(vbox); + m_htmlOptions->setChecked(true); + } + gbox->addWidget(m_htmlOptions,1,0); + + { + m_texOptions = new QGroupBox(tr("LaTeX")); + m_texOptions->setCheckable(true); + // GENERATE_LATEX + m_texOptionsGroup = new QButtonGroup(m_texOptions); + vbox = new QVBoxLayout; + r = new QRadioButton(tr("as intermediate format for hyperlinked PDF")); + m_texOptionsGroup->addButton(r, 0); + // PDF_HYPERLINKS = YES + r->setChecked(true); + vbox->addWidget(r); + r = new QRadioButton(tr("as intermediate format for PDF")); + m_texOptionsGroup->addButton(r, 1); + // PDF_HYPERLINKS = NO, USE_PDFLATEX = YES + vbox->addWidget(r); + r = new QRadioButton(tr("as intermediate format for PostScript")); + m_texOptionsGroup->addButton(r, 2); + // USE_PDFLATEX = NO + vbox->addWidget(r); + vbox->addStretch(1); + m_texOptions->setLayout(vbox); + m_texOptions->setChecked(true); + } + gbox->addWidget(m_texOptions,2,0); + + m_manEnabled=new QCheckBox(tr("Man pages")); + // GENERATE_MAN + m_rtfEnabled=new QCheckBox(tr("Rich Text Format (RTF)")); + // GENERATE_RTF + m_xmlEnabled=new QCheckBox(tr("XML")); + // GENERATE_XML + gbox->addWidget(m_manEnabled,3,0); + gbox->addWidget(m_rtfEnabled,4,0); + gbox->addWidget(m_xmlEnabled,5,0); + + gbox->setRowStretch(6,1); + connect(m_htmlOptions,SIGNAL(toggled(bool)),SLOT(setHtmlEnabled(bool))); + connect(m_texOptions,SIGNAL(toggled(bool)),SLOT(setLatexEnabled(bool))); + connect(m_manEnabled,SIGNAL(stateChanged(int)),SLOT(setManEnabled(int))); + connect(m_rtfEnabled,SIGNAL(stateChanged(int)),SLOT(setRtfEnabled(int))); + connect(m_xmlEnabled,SIGNAL(stateChanged(int)),SLOT(setXmlEnabled(int))); + connect(m_searchEnabled,SIGNAL(stateChanged(int)),SLOT(setSearchEnabled(int))); + connect(m_htmlOptionsGroup,SIGNAL(buttonClicked(int)), + SLOT(setHtmlOptions(int))); + connect(m_texOptionsGroup,SIGNAL(buttonClicked(int)), + SLOT(setLatexOptions(int))); + connect(m_tuneColor,SIGNAL(clicked()),SLOT(tuneColorDialog())); +} + +void Step3::tuneColorDialog() +{ + int hue = getIntOption(m_modelData,STR_HTML_COLORSTYLE_HUE); + int sat = getIntOption(m_modelData,STR_HTML_COLORSTYLE_SAT); + int gam = getIntOption(m_modelData,STR_HTML_COLORSTYLE_GAMMA); + TuneColorDialog tuneColor(hue,sat,gam,this); + if (tuneColor.exec()==QDialog::Accepted) + { + updateIntOption(m_modelData,STR_HTML_COLORSTYLE_HUE,tuneColor.getHue()); + updateIntOption(m_modelData,STR_HTML_COLORSTYLE_SAT,tuneColor.getSaturation()); + updateIntOption(m_modelData,STR_HTML_COLORSTYLE_GAMMA,tuneColor.getGamma()); + } +} + +void Step3::setHtmlEnabled(bool b) +{ + updateBoolOption(m_modelData,STR_GENERATE_HTML,b); +} + +void Step3::setLatexEnabled(bool b) +{ + updateBoolOption(m_modelData,STR_GENERATE_LATEX,b); +} + +void Step3::setManEnabled(int state) +{ + updateBoolOption(m_modelData,STR_GENERATE_MAN,state==Qt::Checked); +} + +void Step3::setRtfEnabled(int state) +{ + updateBoolOption(m_modelData,STR_GENERATE_RTF,state==Qt::Checked); +} + +void Step3::setXmlEnabled(int state) +{ + updateBoolOption(m_modelData,STR_GENERATE_XML,state==Qt::Checked); +} + +void Step3::setSearchEnabled(int state) +{ + updateBoolOption(m_modelData,STR_SEARCHENGINE,state==Qt::Checked); +} + +void Step3::setHtmlOptions(int id) +{ + if (id==0) // plain HTML + { + updateBoolOption(m_modelData,STR_GENERATE_HTMLHELP,false); + updateBoolOption(m_modelData,STR_GENERATE_TREEVIEW,false); + } + else if (id==1) // with navigation tree + { + updateBoolOption(m_modelData,STR_GENERATE_HTMLHELP,false); + updateBoolOption(m_modelData,STR_GENERATE_TREEVIEW,true); + } + else if (id==2) // with compiled help + { + updateBoolOption(m_modelData,STR_GENERATE_HTMLHELP,true); + updateBoolOption(m_modelData,STR_GENERATE_TREEVIEW,false); + } +} + +void Step3::setLatexOptions(int id) +{ + if (id==0) // hyperlinked PDF + { + updateBoolOption(m_modelData,STR_USE_PDFLATEX,true); + updateBoolOption(m_modelData,STR_PDF_HYPERLINKS,true); + } + else if (id==1) // PDF + { + updateBoolOption(m_modelData,STR_USE_PDFLATEX,true); + updateBoolOption(m_modelData,STR_PDF_HYPERLINKS,false); + } + else if (id==2) // PostScript + { + updateBoolOption(m_modelData,STR_USE_PDFLATEX,false); + updateBoolOption(m_modelData,STR_PDF_HYPERLINKS,false); + } +} + +void Step3::init() +{ + m_htmlOptions->setChecked(getBoolOption(m_modelData,STR_GENERATE_HTML)); + m_texOptions->setChecked(getBoolOption(m_modelData,STR_GENERATE_LATEX)); + m_manEnabled->setChecked(getBoolOption(m_modelData,STR_GENERATE_MAN)); + m_rtfEnabled->setChecked(getBoolOption(m_modelData,STR_GENERATE_RTF)); + m_xmlEnabled->setChecked(getBoolOption(m_modelData,STR_GENERATE_XML)); + m_searchEnabled->setChecked(getBoolOption(m_modelData,STR_SEARCHENGINE)); + if (getBoolOption(m_modelData,STR_GENERATE_HTMLHELP)) + { + m_htmlOptionsGroup->button(2)->setChecked(true); // compiled help + } + else if (getBoolOption(m_modelData,STR_GENERATE_TREEVIEW)) + { + m_htmlOptionsGroup->button(1)->setChecked(true); // navigation tree + } + else + { + m_htmlOptionsGroup->button(0)->setChecked(true); // plain HTML + } + if (!getBoolOption(m_modelData,STR_USE_PDFLATEX)) + { + m_texOptionsGroup->button(2)->setChecked(true); // PostScript + } + else if (!getBoolOption(m_modelData,STR_PDF_HYPERLINKS)) + { + m_texOptionsGroup->button(1)->setChecked(true); // Plain PDF + } + else + { + m_texOptionsGroup->button(0)->setChecked(true); // PDF with hyperlinks + } +} + +//========================================================================== + +Step4::Step4(Wizard *wizard,const QHash<QString,Input*> &modelData) + : m_wizard(wizard), m_modelData(modelData) +{ + m_diagramModeGroup = new QButtonGroup(this); + QGridLayout *gbox = new QGridLayout( this ); + gbox->addWidget(new QLabel(tr("Diagrams to generate")),0,0); + + QRadioButton *rb = new QRadioButton(tr("No diagrams")); + m_diagramModeGroup->addButton(rb, 0); + gbox->addWidget(rb,1,0); + // CLASS_DIAGRAMS = NO, HAVE_DOT = NO + rb->setChecked(true); + rb = new QRadioButton(tr("Use built-in class diagram generator")); + m_diagramModeGroup->addButton(rb, 1); + // CLASS_DIAGRAMS = YES, HAVE_DOT = NO + gbox->addWidget(rb,2,0); + rb = new QRadioButton(tr("Use dot tool from the GraphViz package")); + m_diagramModeGroup->addButton(rb, 2); + gbox->addWidget(rb,3,0); + // CLASS_DIAGRAMS = NO, HAVE_DOT = YES + + m_dotGroup = new QGroupBox(tr("Dot graphs to generate")); + QVBoxLayout *vbox = new QVBoxLayout; + m_dotClass=new QCheckBox(tr("Class diagrams")); + // CLASS_GRAPH + m_dotCollaboration=new QCheckBox(tr("Collaboration diagrams")); + // COLLABORATION_GRAPH + m_dotInheritance=new QCheckBox(tr("Overall Class hierarchy")); + // GRAPHICAL_HIERARCHY + m_dotInclude=new QCheckBox(tr("Include dependency graphs")); + // INCLUDE_GRAPH + m_dotIncludedBy=new QCheckBox(tr("Included by dependency graphs")); + // INCLUDED_BY_GRAPH + m_dotCall=new QCheckBox(tr("Call graphs")); + // CALL_GRAPH + m_dotCaller=new QCheckBox(tr("Called by graphs")); + // CALLER_GRAPH + vbox->addWidget(m_dotClass); + vbox->addWidget(m_dotCollaboration); + vbox->addWidget(m_dotInheritance); + vbox->addWidget(m_dotInclude); + vbox->addWidget(m_dotIncludedBy); + vbox->addWidget(m_dotCall); + vbox->addWidget(m_dotCaller); + vbox->addStretch(1); + m_dotGroup->setLayout(vbox); + m_dotClass->setChecked(true); + m_dotGroup->setEnabled(false); + gbox->addWidget(m_dotGroup,4,0); + + m_dotInclude->setChecked(true); + m_dotCollaboration->setChecked(true); + gbox->setRowStretch(5,1); + + connect(m_diagramModeGroup,SIGNAL(buttonClicked(int)), + this,SLOT(diagramModeChanged(int))); + connect(m_dotClass,SIGNAL(stateChanged(int)), + this,SLOT(setClassGraphEnabled(int))); + connect(m_dotCollaboration,SIGNAL(stateChanged(int)), + this,SLOT(setCollaborationGraphEnabled(int))); + connect(m_dotInheritance,SIGNAL(stateChanged(int)), + this,SLOT(setGraphicalHierarchyEnabled(int))); + connect(m_dotInclude,SIGNAL(stateChanged(int)), + this,SLOT(setIncludeGraphEnabled(int))); + connect(m_dotIncludedBy,SIGNAL(stateChanged(int)), + this,SLOT(setIncludedByGraphEnabled(int))); + connect(m_dotCall,SIGNAL(stateChanged(int)), + this,SLOT(setCallGraphEnabled(int))); + connect(m_dotCaller,SIGNAL(stateChanged(int)), + this,SLOT(setCallerGraphEnabled(int))); +} + +void Step4::diagramModeChanged(int id) +{ + if (id==0) // no diagrams + { + updateBoolOption(m_modelData,STR_HAVE_DOT,false); + updateBoolOption(m_modelData,STR_CLASS_DIAGRAMS,false); + } + else if (id==1) // builtin diagrams + { + updateBoolOption(m_modelData,STR_HAVE_DOT,false); + updateBoolOption(m_modelData,STR_CLASS_DIAGRAMS,true); + } + else if (id==2) // dot diagrams + { + updateBoolOption(m_modelData,STR_HAVE_DOT,true); + updateBoolOption(m_modelData,STR_CLASS_DIAGRAMS,false); + } + m_dotGroup->setEnabled(id==2); +} + +void Step4::setClassGraphEnabled(int state) +{ + updateBoolOption(m_modelData,STR_CLASS_GRAPH,state==Qt::Checked); +} + +void Step4::setCollaborationGraphEnabled(int state) +{ + updateBoolOption(m_modelData,STR_COLLABORATION_GRAPH,state==Qt::Checked); +} + +void Step4::setGraphicalHierarchyEnabled(int state) +{ + updateBoolOption(m_modelData,STR_GRAPHICAL_HIERARCHY,state==Qt::Checked); +} + +void Step4::setIncludeGraphEnabled(int state) +{ + updateBoolOption(m_modelData,STR_INCLUDE_GRAPH,state==Qt::Checked); +} + +void Step4::setIncludedByGraphEnabled(int state) +{ + updateBoolOption(m_modelData,STR_INCLUDED_BY_GRAPH,state==Qt::Checked); +} + +void Step4::setCallGraphEnabled(int state) +{ + updateBoolOption(m_modelData,STR_CALL_GRAPH,state==Qt::Checked); +} + +void Step4::setCallerGraphEnabled(int state) +{ + updateBoolOption(m_modelData,STR_CALLER_GRAPH,state==Qt::Checked); +} + +void Step4::init() +{ + if (getBoolOption(m_modelData,STR_HAVE_DOT)) + { + m_diagramModeGroup->button(2)->setChecked(true); // Dot + } + else if (getBoolOption(m_modelData,STR_CLASS_DIAGRAMS)) + { + m_diagramModeGroup->button(1)->setChecked(true); // Builtin diagrams + } + else + { + m_diagramModeGroup->button(0)->setChecked(true); // no diagrams + } + m_dotClass->setChecked(getBoolOption(m_modelData,STR_CLASS_GRAPH)); + m_dotCollaboration->setChecked(getBoolOption(m_modelData,STR_COLLABORATION_GRAPH)); + m_dotInheritance->setChecked(getBoolOption(m_modelData,STR_GRAPHICAL_HIERARCHY)); + m_dotInclude->setChecked(getBoolOption(m_modelData,STR_INCLUDE_GRAPH)); + m_dotIncludedBy->setChecked(getBoolOption(m_modelData,STR_INCLUDED_BY_GRAPH)); + m_dotCall->setChecked(getBoolOption(m_modelData,STR_CALL_GRAPH)); + m_dotCaller->setChecked(getBoolOption(m_modelData,STR_CALLER_GRAPH)); +} + +//========================================================================== + +Wizard::Wizard(const QHash<QString,Input*> &modelData, QWidget *parent) : + QSplitter(parent), m_modelData(modelData) +{ + m_treeWidget = new QTreeWidget; + m_treeWidget->setColumnCount(1); + m_treeWidget->setHeaderLabels(QStringList() << QString::fromAscii("Topics")); + QList<QTreeWidgetItem*> items; + items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(tr("Project")))); + items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(tr("Mode")))); + items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(tr("Output")))); + items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(tr("Diagrams")))); + m_treeWidget->insertTopLevelItems(0,items); + + m_topicStack = new QStackedWidget; + m_step1 = new Step1(this,modelData); + m_step2 = new Step2(this,modelData); + m_step3 = new Step3(this,modelData); + m_step4 = new Step4(this,modelData); + m_topicStack->addWidget(m_step1); + m_topicStack->addWidget(m_step2); + m_topicStack->addWidget(m_step3); + m_topicStack->addWidget(m_step4); + + QWidget *rightSide = new QWidget; + QGridLayout *grid = new QGridLayout(rightSide); + m_prev = new QPushButton(tr("Previous")); + m_prev->setEnabled(false); + m_next = new QPushButton(tr("Next")); + grid->addWidget(m_topicStack,0,0,1,2); + grid->addWidget(m_prev,1,0,Qt::AlignLeft); + grid->addWidget(m_next,1,1,Qt::AlignRight); + grid->setColumnStretch(0,1); + grid->setRowStretch(0,1); + addWidget(m_treeWidget); + addWidget(rightSide); + + connect(m_treeWidget, + SIGNAL(currentItemChanged(QTreeWidgetItem *,QTreeWidgetItem *)), + SLOT(activateTopic(QTreeWidgetItem *,QTreeWidgetItem *))); + connect(m_next,SIGNAL(clicked()),SLOT(nextTopic())); + connect(m_prev,SIGNAL(clicked()),SLOT(prevTopic())); + + refresh(); +} + +Wizard::~Wizard() +{ +} + +void Wizard::activateTopic(QTreeWidgetItem *item,QTreeWidgetItem *) +{ + if (item) + { + + QString label = item->text(0); + if (label==tr("Project")) + { + m_topicStack->setCurrentWidget(m_step1); + m_prev->setEnabled(false); + m_next->setEnabled(true); + } + else if (label==tr("Mode")) + { + m_topicStack->setCurrentWidget(m_step2); + m_prev->setEnabled(true); + m_next->setEnabled(true); + } + else if (label==tr("Output")) + { + m_topicStack->setCurrentWidget(m_step3); + m_prev->setEnabled(true); + m_next->setEnabled(true); + } + else if (label==tr("Diagrams")) + { + m_topicStack->setCurrentWidget(m_step4); + m_prev->setEnabled(true); + m_next->setEnabled(false); + } + } +} + +void Wizard::nextTopic() +{ + m_topicStack->setCurrentIndex(m_topicStack->currentIndex()+1); + m_next->setEnabled(m_topicStack->count()!=m_topicStack->currentIndex()+1); + m_prev->setEnabled(m_topicStack->currentIndex()!=0); + m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(m_topicStack->currentIndex())); +} + +void Wizard::prevTopic() +{ + m_topicStack->setCurrentIndex(m_topicStack->currentIndex()-1); + m_next->setEnabled(m_topicStack->count()!=m_topicStack->currentIndex()+1); + m_prev->setEnabled(m_topicStack->currentIndex()!=0); + m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(m_topicStack->currentIndex())); +} + +void Wizard::refresh() +{ + m_step1->init(); + m_step2->init(); + m_step3->init(); + m_step4->init(); +} Index: branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.cpp (revision 1322) @@ -0,0 +1,639 @@ +#include <QtGui> +#include "doxywizard.h" +#include "version.h" +#include "expert.h" +#include "wizard.h" + +#ifdef WIN32 +#include <windows.h> +#endif + +#define MAX_RECENT_FILES 10 + +const int messageTimeout = 5000; //!< status bar message timeout in millisec. + +MainWindow &MainWindow::instance() +{ + static MainWindow *theInstance = new MainWindow; + return *theInstance; +} + +MainWindow::MainWindow() + : m_settings(QString::fromAscii("Doxygen.org"), QString::fromAscii("Doxywizard")) +{ + QMenu *file = menuBar()->addMenu(tr("File")); + file->addAction(tr("Open..."), + this, SLOT(openConfig()), Qt::CTRL+Qt::Key_O); + m_recentMenu = file->addMenu(tr("Open recent")); + file->addAction(tr("Save"), + this, SLOT(saveConfig()), Qt::CTRL+Qt::Key_S); + file->addAction(tr("Save as..."), + this, SLOT(saveConfigAs()), Qt::SHIFT+Qt::CTRL+Qt::Key_S); + file->addAction(tr("Quit"), + this, SLOT(quit()), Qt::CTRL+Qt::Key_Q); + + QMenu *settings = menuBar()->addMenu(tr("Settings")); + settings->addAction(tr("Reset to factory defaults"), + this,SLOT(resetToDefaults())); + settings->addAction(tr("Use current settings at startup"), + this,SLOT(makeDefaults())); + settings->addAction(tr("Clear recent list"), + this,SLOT(clearRecent())); + + QMenu *help = menuBar()->addMenu(tr("Help")); + help->addAction(tr("Online manual"), + this, SLOT(manual()), Qt::Key_F1); + help->addAction(tr("About"), + this, SLOT(about()) ); + + m_expert = new Expert; + m_wizard = new Wizard(m_expert->modelData()); + + // ----------- top part ------------------ + QWidget *topPart = new QWidget; + QVBoxLayout *rowLayout = new QVBoxLayout(topPart); + + // select working directory + QHBoxLayout *dirLayout = new QHBoxLayout; + m_workingDir = new QLineEdit; + m_selWorkingDir = new QPushButton(tr("Select...")); + dirLayout->addWidget(m_workingDir); + dirLayout->addWidget(m_selWorkingDir); + + //------------- bottom part -------------- + QWidget *runTab = new QWidget; + QVBoxLayout *runTabLayout = new QVBoxLayout(runTab); + + // run doxygen + QHBoxLayout *runLayout = new QHBoxLayout; + m_run = new QPushButton(tr("Run doxygen")); + m_run->setEnabled(false); + m_runStatus = new QLabel(tr("Status: not running")); + m_saveLog = new QPushButton(tr("Save log...")); + m_saveLog->setEnabled(false); + QPushButton *showSettings = new QPushButton(tr("Show configuration")); + runLayout->addWidget(m_run); + runLayout->addWidget(m_runStatus); + runLayout->addStretch(1); + runLayout->addWidget(showSettings); + runLayout->addWidget(m_saveLog); + + // output produced by doxygen + runTabLayout->addLayout(runLayout); + runTabLayout->addWidget(new QLabel(tr("Output produced by doxygen"))); + QGridLayout *grid = new QGridLayout; + m_outputLog = new QTextEdit; + m_outputLog->setReadOnly(true); + m_outputLog->setFontFamily(QString::fromAscii("courier")); + m_outputLog->setMinimumWidth(600); + grid->addWidget(m_outputLog,0,0); + grid->setColumnStretch(0,1); + grid->setRowStretch(0,1); + QHBoxLayout *launchLayout = new QHBoxLayout; + m_launchHtml = new QPushButton(tr("Show HTML output")); + launchLayout->addWidget(m_launchHtml); + + launchLayout->addStretch(1); + grid->addLayout(launchLayout,1,0); + runTabLayout->addLayout(grid); + + QTabWidget *tabs = new QTabWidget; + tabs->addTab(m_wizard,tr("Wizard")); + tabs->addTab(m_expert,tr("Expert")); + tabs->addTab(runTab,tr("Run")); + + rowLayout->addWidget(new QLabel(tr("Step 1: Specify the working directory from which doxygen will run"))); + rowLayout->addLayout(dirLayout); + rowLayout->addWidget(new QLabel(tr("Step 2: Configure doxygen using the Wizard and/or Expert tab, then switch to the Run tab to generate the documentation"))); + rowLayout->addWidget(tabs); + + setCentralWidget(topPart); + statusBar()->showMessage(tr("Welcome to Doxygen"),messageTimeout); + + m_runProcess = new QProcess; + m_running = false; + m_timer = new QTimer; + + // connect signals and slots + connect(tabs,SIGNAL(currentChanged(int)),SLOT(selectTab(int))); + connect(m_selWorkingDir,SIGNAL(clicked()),SLOT(selectWorkingDir())); + connect(m_recentMenu,SIGNAL(triggered(QAction*)),SLOT(openRecent(QAction*))); + connect(m_workingDir,SIGNAL(returnPressed()),SLOT(updateWorkingDir())); + connect(m_runProcess,SIGNAL(readyReadStandardOutput()),SLOT(readStdout())); + connect(m_runProcess,SIGNAL(finished(int, QProcess::ExitStatus)),SLOT(runComplete())); + connect(m_timer,SIGNAL(timeout()),SLOT(readStdout())); + connect(m_run,SIGNAL(clicked()),SLOT(runDoxygen())); + connect(m_launchHtml,SIGNAL(clicked()),SLOT(showHtmlOutput())); + connect(m_saveLog,SIGNAL(clicked()),SLOT(saveLog())); + connect(showSettings,SIGNAL(clicked()),SLOT(showSettings())); + connect(m_expert,SIGNAL(changed()),SLOT(configChanged())); + + loadSettings(); + updateLaunchButtonState(); + m_modified = false; + updateTitle(); + m_wizard->refresh(); +} + +void MainWindow::closeEvent(QCloseEvent *event) +{ + if (discardUnsavedChanges()) + { + saveSettings(); + event->accept(); + } + else + { + event->ignore(); + } +} + +void MainWindow::quit() +{ + if (discardUnsavedChanges()) + { + saveSettings(); + } + QApplication::exit(0); +} + +void MainWindow::setWorkingDir(const QString &dirName) +{ + QDir::setCurrent(dirName); + m_workingDir->setText(dirName); + m_run->setEnabled(!dirName.isEmpty()); +} + +void MainWindow::selectWorkingDir() +{ + QString dirName = QFileDialog::getExistingDirectory(this, + tr("Select working directory"),m_workingDir->text()); + if (!dirName.isEmpty()) + { + setWorkingDir(dirName); + } +} + +void MainWindow::updateWorkingDir() +{ + setWorkingDir(m_workingDir->text()); +} + +void MainWindow::manual() +{ + QDesktopServices::openUrl(QUrl(QString::fromAscii("http://www.doxygen.org/manual.html"))); +} + +void MainWindow::about() +{ + QString msg; + QTextStream t(&msg,QIODevice::WriteOnly); + t << QString::fromAscii("<qt><center>A tool to configure and run doxygen version ")+ + QString::fromAscii(versionString)+ + QString::fromAscii(" on your source files.</center><p><br>" + "<center>Written by<br> Dimitri van Heesch<br>© 2000-2010</center><p>" + "</qt>"); + QMessageBox::about(this,tr("Doxygen GUI"),msg); +} + +void MainWindow::openConfig() +{ + if (discardUnsavedChanges(false)) + { + QString fn = QFileDialog::getOpenFileName(this, + tr("Open configuration file"), + m_workingDir->text()); + if (!fn.isEmpty()) + { + loadConfigFromFile(fn); + } + } +} + +void MainWindow::updateConfigFileName(const QString &fileName) +{ + if (m_fileName!=fileName) + { + m_fileName = fileName; + QString curPath = QFileInfo(fileName).path(); + setWorkingDir(curPath); + addRecentFile(fileName); + updateTitle(); + } +} + +void MainWindow::loadConfigFromFile(const QString & fileName) +{ + m_expert->loadConfig(fileName); + m_wizard->refresh(); + updateConfigFileName(fileName); + updateLaunchButtonState(); + m_modified = false; + updateTitle(); +} + +void MainWindow::saveConfig(const QString &fileName) +{ + if (fileName.isEmpty()) return; + QFile f(fileName); + if (!f.open(QIODevice::WriteOnly)) + { + QMessageBox::warning(this, + tr("Error saving"), + tr("Error: cannot open the file ")+fileName+tr(" for writing!\n")+ + tr("Reason given: ")+f.error()); + return; + } + QTextStream t(&f); + m_expert->writeConfig(t,false); + updateConfigFileName(fileName); + m_modified = false; + updateTitle(); +} + +bool MainWindow::saveConfig() +{ + if (m_fileName.isEmpty()) + { + return saveConfigAs(); + } + else + { + saveConfig(m_fileName); + return true; + } +} + +bool MainWindow::saveConfigAs() +{ + QString fileName = QFileDialog::getSaveFileName(this, QString(), + m_workingDir->text()+QString::fromAscii("/Doxyfile")); + if (fileName.isEmpty()) return false; + saveConfig(fileName); + return true; +} + +void MainWindow::makeDefaults() +{ + if (QMessageBox::question(this,tr("Use current setting at startup?"), + tr("Do you want to save the current settings " + "and use them next time Doxywizard starts?"), + QMessageBox::Save| + QMessageBox::Cancel)==QMessageBox::Save) + { + //printf("MainWindow:makeDefaults()\n"); + m_expert->saveSettings(&m_settings); + m_settings.setValue(QString::fromAscii("wizard/loadsettings"), true); + m_settings.sync(); + } +} + +void MainWindow::clearRecent() +{ + if (QMessageBox::question(this,tr("Clear the list of recent files?"), + tr("Do you want to clear the list of recently " + "loaded configuration files?"), + QMessageBox::Yes| + QMessageBox::Cancel)==QMessageBox::Yes) + { + m_recentMenu->clear(); + m_recentFiles.clear(); + for (int i=0;i<MAX_RECENT_FILES;i++) + { + m_settings.setValue(QString().sprintf("recent/config%d",i++),QString::fromAscii("")); + } + m_settings.sync(); + } + +} + +void MainWindow::resetToDefaults() +{ + if (QMessageBox::question(this,tr("Reset settings to their default values?"), + tr("Do you want to revert all settings back " + "to their original values?"), + QMessageBox::Reset| + QMessageBox::Cancel)==QMessageBox::Reset) + { + //printf("MainWindow:resetToDefaults()\n"); + m_expert->resetToDefaults(); + m_settings.setValue(QString::fromAscii("wizard/loadsettings"), false); + m_settings.sync(); + m_wizard->refresh(); + } +} + +void MainWindow::loadSettings() +{ + QVariant geometry = m_settings.value(QString::fromAscii("main/geometry"), QVariant::Invalid); + QVariant state = m_settings.value(QString::fromAscii("main/state"), QVariant::Invalid); + QVariant wizState = m_settings.value(QString::fromAscii("wizard/state"), QVariant::Invalid); + QVariant loadSettings = m_settings.value(QString::fromAscii("wizard/loadsettings"), QVariant::Invalid); + QVariant workingDir = m_settings.value(QString::fromAscii("wizard/workingdir"), QVariant::Invalid); + + if (geometry !=QVariant::Invalid) restoreGeometry(geometry.toByteArray()); + if (state !=QVariant::Invalid) restoreState (state.toByteArray()); + if (wizState !=QVariant::Invalid) m_wizard->restoreState(wizState.toByteArray()); + if (loadSettings!=QVariant::Invalid && loadSettings.toBool()) + { + m_expert->loadSettings(&m_settings); + if (workingDir!=QVariant::Invalid && QDir(workingDir.toString()).exists()) + { + setWorkingDir(workingDir.toString()); + } + } + + for (int i=0;i<MAX_RECENT_FILES;i++) + { + QString entry = m_settings.value(QString().sprintf("recent/config%d",i)).toString(); + if (!entry.isEmpty() && QFileInfo(entry).exists()) + { + addRecentFile(entry); + } + } + +} + +void MainWindow::saveSettings() +{ + QSettings settings(QString::fromAscii("Doxygen.org"), QString::fromAscii("Doxywizard")); + + m_settings.setValue(QString::fromAscii("main/geometry"), saveGeometry()); + m_settings.setValue(QString::fromAscii("main/state"), saveState()); + m_settings.setValue(QString::fromAscii("wizard/state"), m_wizard->saveState()); + m_settings.setValue(QString::fromAscii("wizard/workingdir"), m_workingDir->text()); +} + +void MainWindow::selectTab(int id) +{ + if (id==0) m_wizard->refresh(); +} + +void MainWindow::addRecentFile(const QString &fileName) +{ + int i=m_recentFiles.indexOf(fileName); + if (i!=-1) m_recentFiles.removeAt(i); + + // not found + if (m_recentFiles.count() < MAX_RECENT_FILES) // append + { + m_recentFiles.prepend(fileName); + } + else // add + drop last item + { + m_recentFiles.removeLast(); + m_recentFiles.prepend(fileName); + } + m_recentMenu->clear(); + i=0; + foreach( QString str, m_recentFiles ) + { + m_recentMenu->addAction(str); + m_settings.setValue(QString().sprintf("recent/config%d",i++),str); + } + for (;i<MAX_RECENT_FILES;i++) + { + m_settings.setValue(QString().sprintf("recent/config%d",i++),QString::fromAscii("")); + } +} + +void MainWindow::openRecent(QAction *action) +{ + if (discardUnsavedChanges(false)) + { + loadConfigFromFile(action->text()); + } +} + +void MainWindow::runDoxygen() +{ + if (!m_running) + { + QString doxygenPath; +#if defined(Q_OS_MACX) + doxygenPath = qApp->applicationDirPath()+QString::fromAscii("/../Resources/"); + qDebug() << tr("Doxygen path: ") << doxygenPath; + if ( !QFile(doxygenPath + QString::fromAscii("doxygen")).exists() ) + { + // No doygen binary in the resources, if there is a system doxygen binary, use that instead + if ( QFile(QString::fromAscii("/usr/local/bin/doxygen")).exists() ) + { + doxygenPath = QString::fromAscii("/usr/local/bin/"); + } + else + { + qDebug() << tr("Can't find the doxygen command, make sure it's in your $$PATH"); + doxygenPath = QString::fromAscii(""); + } + } + qDebug() << tr("Getting doxygen from: ") << doxygenPath; +#endif + + m_runProcess->setReadChannel(QProcess::StandardOutput); + m_runProcess->setProcessChannelMode(QProcess::MergedChannels); + m_runProcess->setWorkingDirectory(m_workingDir->text()); + QStringList env=QProcess::systemEnvironment(); + // set PWD environment variable to m_workingDir + env.replaceInStrings(QRegExp(QString::fromAscii("^PWD=(.*)"),Qt::CaseInsensitive), + QString::fromAscii("PWD=")+m_workingDir->text()); + m_runProcess->setEnvironment(env); + + QStringList args; + args << QString::fromAscii("-b"); // make stdout unbuffered + args << QString::fromAscii("-"); // read config from stdin + + m_outputLog->clear(); + m_runProcess->start(doxygenPath + QString::fromAscii("doxygen"), args); + + if (!m_runProcess->waitForStarted()) + { + m_outputLog->append(QString::fromAscii("*** Failed to run doxygen\n")); + return; + } + QTextStream t(m_runProcess); + m_expert->writeConfig(t,false); + m_runProcess->closeWriteChannel(); + + if (m_runProcess->state() == QProcess::NotRunning) + { + m_outputLog->append(QString::fromAscii("*** Failed to run doxygen\n")); + } + else + { + m_saveLog->setEnabled(false); + m_running=true; + m_run->setText(tr("Stop doxygen")); + m_runStatus->setText(tr("Status: running")); + m_timer->start(1000); + } + } + else + { + m_running=false; + m_run->setText(tr("Run doxygen")); + m_runStatus->setText(tr("Status: not running")); + m_runProcess->kill(); + m_timer->stop(); + //updateRunnable(m_workingDir->text()); + } +} + +void MainWindow::readStdout() +{ + if (m_running) + { + QByteArray data = m_runProcess->readAllStandardOutput(); + QString text = QString::fromLocal8Bit(data); + if (!text.isEmpty()) + { + m_outputLog->append(text.trimmed()); + } + } +} + +void MainWindow::runComplete() +{ + if (m_running) + { + m_outputLog->append(tr("*** Doxygen has finished\n")); + } + else + { + m_outputLog->append(tr("*** Cancelled by user\n")); + } + m_outputLog->ensureCursorVisible(); + m_run->setText(tr("Run doxygen")); + m_runStatus->setText(tr("Status: not running")); + m_running=false; + updateLaunchButtonState(); + //updateRunnable(m_workingDir->text()); + m_saveLog->setEnabled(true); +} + +void MainWindow::updateLaunchButtonState() +{ + m_launchHtml->setEnabled(m_expert->htmlOutputPresent(m_workingDir->text())); +#if 0 + m_launchPdf->setEnabled(m_expert->pdfOutputPresent(m_workingDir->text())); +#endif +} + +void MainWindow::showHtmlOutput() +{ + QString indexFile = m_expert->getHtmlOutputIndex(m_workingDir->text()); + QFileInfo fi(indexFile); + // TODO: the following doesn't seem to work with IE +#ifdef WIN32 + //QString indexUrl(QString::fromAscii("file:///")); + ShellExecute(NULL, L"open", fi.absoluteFilePath().utf16(), NULL, NULL, SW_SHOWNORMAL); +#else + QString indexUrl(QString::fromAscii("file://")); + indexUrl+=fi.absoluteFilePath(); + QDesktopServices::openUrl(QUrl(indexUrl)); +#endif +} + +void MainWindow::saveLog() +{ + QString fn = QFileDialog::getSaveFileName(this, tr("Save log file"), + m_workingDir->text()+ + QString::fromAscii("/doxygen_log.txt")); + if (!fn.isEmpty()) + { + QFile f(fn); + if (f.open(QIODevice::WriteOnly)) + { + QTextStream t(&f); + t << m_outputLog->toPlainText(); + statusBar()->showMessage(tr("Output log saved"),messageTimeout); + } + else + { + QMessageBox::warning(0,tr("Warning"), + tr("Cannot open file ")+fn+tr(" for writing. Nothing saved!"),tr("ok")); + } + } +} + +void MainWindow::showSettings() +{ + QString text; + QTextStream t(&text); + m_expert->writeConfig(t,true); + m_outputLog->clear(); + m_outputLog->append(text); + m_outputLog->ensureCursorVisible(); + m_saveLog->setEnabled(true); +} + +void MainWindow::configChanged() +{ + m_modified = true; + updateTitle(); +} + +void MainWindow::updateTitle() +{ + QString title = tr("Doxygen GUI frontend"); + if (m_modified) + { + title+=QString::fromAscii(" +"); + } + if (!m_fileName.isEmpty()) + { + title+=QString::fromAscii(" (")+m_fileName+QString::fromAscii(")"); + } + setWindowTitle(title); +} + +bool MainWindow::discardUnsavedChanges(bool saveOption) +{ + if (m_modified) + { + QMessageBox::StandardButton button; + if (saveOption) + { + button = QMessageBox::question(this, + tr("Unsaved changes"), + tr("Unsaved changes will be lost! Do you want to save the configuration file?"), + QMessageBox::Save | + QMessageBox::Discard | + QMessageBox::Cancel + ); + if (button==QMessageBox::Save) + { + return saveConfig(); + } + } + else + { + button = QMessageBox::question(this, + tr("Unsaved changes"), + tr("Unsaved changes will be lost! Do you want to continue?"), + QMessageBox::Discard | + QMessageBox::Cancel + ); + } + return button==QMessageBox::Discard; + } + return true; +} + +//----------------------------------------------------------------------- + +int main(int argc,char **argv) +{ + QApplication a(argc,argv); + MainWindow &main = MainWindow::instance(); + if (argc==2 && argv[1][0]!='-') // name of config file as an argument + { + main.loadConfigFromFile(QString::fromLocal8Bit(argv[1])); + } + else if (argc>1) + { + printf("Usage: %s [config file]\n",argv[0]); + exit(1); + } + main.show(); + return a.exec(); +} Index: branches/xZenu/src/util/doxygen/addon/doxywizard/input.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/input.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/input.h (revision 1322) @@ -0,0 +1,34 @@ +#ifndef INPUT_H +#define INPUT_H + +#include <QVariant> + +class QTextStream; +class QTextCodec; + +class Input +{ + public: + enum Kind + { + Bool, + Int, + String, + StrList, + Obsolete + }; + virtual ~Input() {} + virtual QVariant &value() = 0; + virtual void update() = 0; + virtual Kind kind() const = 0; + virtual QString docs() const = 0; + virtual QString id() const = 0; + virtual void addDependency(Input *option) = 0; + virtual void setEnabled(bool) = 0; + virtual void updateDependencies() = 0; + virtual void reset() = 0; + virtual void writeValue(QTextStream &t,QTextCodec *codec) = 0; +}; + + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/expert.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/expert.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/expert.cpp (revision 1322) @@ -0,0 +1,561 @@ +#include "expert.h" +#include "inputbool.h" +#include "inputstring.h" +#include "inputint.h" +#include "inputstring.h" +#include "inputstrlist.h" +#include <QtGui> +#include <QtXml> +#include "config.h" +#include "version.h" + +#undef SA +#define SA(x) QString::fromAscii(x) + +static QString convertToComment(const QString &s) +{ + if (s.isEmpty()) + { + return QString(); + } + else + { + return SA("# ")+ + s.trimmed().replace(SA("\n"),SA("\n# "))+ + SA("\n"); + } +} + +//------------------------------------------------------------------------------------ + +Expert::Expert() +{ + m_treeWidget = new QTreeWidget; + m_treeWidget->setColumnCount(1); + m_topicStack = new QStackedWidget; + m_inShowHelp = FALSE; + + QFile file(SA(":/config.xml")); + QString err; + int errLine,errCol; + QDomDocument configXml; + if (file.open(QIODevice::ReadOnly)) + { + if (!configXml.setContent(&file,false,&err,&errLine,&errCol)) + { + QString msg = tr("Error parsing internal config.xml at line %1 column %2.\n%3"). + arg(errLine).arg(errCol).arg(err); + QMessageBox::warning(this, tr("Error"), msg); + exit(1); + } + } + m_rootElement = configXml.documentElement(); + + createTopics(m_rootElement); + m_helper = new QTextEdit; + m_helper->setReadOnly(true); + m_splitter = new QSplitter(Qt::Vertical); + m_splitter->addWidget(m_treeWidget); + m_splitter->addWidget(m_helper); + + QWidget *rightSide = new QWidget; + QGridLayout *grid = new QGridLayout(rightSide); + m_prev = new QPushButton(tr("Previous")); + m_prev->setEnabled(false); + m_next = new QPushButton(tr("Next")); + grid->addWidget(m_topicStack,0,0,1,2); + grid->addWidget(m_prev,1,0,Qt::AlignLeft); + grid->addWidget(m_next,1,1,Qt::AlignRight); + grid->setColumnStretch(0,1); + grid->setRowStretch(0,1); + + addWidget(m_splitter); + addWidget(rightSide); + connect(m_next,SIGNAL(clicked()),SLOT(nextTopic())); + + connect(m_prev,SIGNAL(clicked()),SLOT(prevTopic())); +} + +Expert::~Expert() +{ + QHashIterator<QString,Input*> i(m_options); + while (i.hasNext()) + { + i.next(); + delete i.value(); + } +} + +void Expert::createTopics(const QDomElement &rootElem) +{ + QList<QTreeWidgetItem*> items; + QDomElement childElem = rootElem.firstChildElement(); + while (!childElem.isNull()) + { + if (childElem.tagName()==SA("group")) + { + QString name = childElem.attribute(SA("name")); + items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(name))); + QWidget *widget = createTopicWidget(childElem); + m_topics[name] = widget; + m_topicStack->addWidget(widget); + } + childElem = childElem.nextSiblingElement(); + } + m_treeWidget->setHeaderLabels(QStringList() << SA("Topics")); + m_treeWidget->insertTopLevelItems(0,items); + connect(m_treeWidget, + SIGNAL(currentItemChanged(QTreeWidgetItem *,QTreeWidgetItem *)), + this, + SLOT(activateTopic(QTreeWidgetItem *,QTreeWidgetItem *))); +} + + +QWidget *Expert::createTopicWidget(QDomElement &elem) +{ + QScrollArea *area = new QScrollArea; + QWidget *topic = new QWidget; + QGridLayout *layout = new QGridLayout(topic); + QDomElement child = elem.firstChildElement(); + int row=0; + while (!child.isNull()) + { + QString type = child.attribute(SA("type")); + if (type==SA("bool")) + { + InputBool *boolOption = + new InputBool( + layout,row, + child.attribute(SA("id")), + child.attribute(SA("defval"))==SA("1"), + child.attribute(SA("docs")) + ); + m_options.insert( + child.attribute(SA("id")), + boolOption + ); + connect(boolOption,SIGNAL(showHelp(Input*)),SLOT(showHelp(Input*))); + connect(boolOption,SIGNAL(changed()),SIGNAL(changed())); + } + else if (type==SA("string")) + { + InputString::StringMode mode; + QString format = child.attribute(SA("format")); + if (format==SA("dir")) + { + mode = InputString::StringDir; + } + else if (format==SA("file")) + { + mode = InputString::StringFile; + } + else // format=="string" + { + mode = InputString::StringFree; + } + InputString *stringOption = + new InputString( + layout,row, + child.attribute(SA("id")), + child.attribute(SA("defval")), + mode, + child.attribute(SA("docs")), + child.attribute(SA("abspath")) + ); + m_options.insert( + child.attribute(SA("id")), + stringOption + ); + connect(stringOption,SIGNAL(showHelp(Input*)),SLOT(showHelp(Input*))); + connect(stringOption,SIGNAL(changed()),SIGNAL(changed())); + } + else if (type==SA("enum")) + { + InputString *enumList = new InputString( + layout,row, + child.attribute(SA("id")), + child.attribute(SA("defval")), + InputString::StringFixed, + child.attribute(SA("docs")) + ); + QDomElement enumVal = child.firstChildElement(); + while (!enumVal.isNull()) + { + enumList->addValue(enumVal.attribute(SA("name"))); + enumVal = enumVal.nextSiblingElement(); + } + enumList->setDefault(); + + m_options.insert(child.attribute(SA("id")),enumList); + connect(enumList,SIGNAL(showHelp(Input*)),SLOT(showHelp(Input*))); + connect(enumList,SIGNAL(changed()),SIGNAL(changed())); + } + else if (type==SA("int")) + { + InputInt *intOption = + new InputInt( + layout,row, + child.attribute(SA("id")), + child.attribute(SA("defval")).toInt(), + child.attribute(SA("minval")).toInt(), + child.attribute(SA("maxval")).toInt(), + child.attribute(SA("docs")) + ); + m_options.insert( + child.attribute(SA("id")), + intOption + ); + connect(intOption,SIGNAL(showHelp(Input*)),SLOT(showHelp(Input*))); + connect(intOption,SIGNAL(changed()),SIGNAL(changed())); + } + else if (type==SA("list")) + { + InputStrList::ListMode mode; + QString format = child.attribute(SA("format")); + if (format==SA("dir")) + { + mode = InputStrList::ListDir; + } + else if (format==SA("file")) + { + mode = InputStrList::ListFile; + } + else if (format==SA("filedir")) + { + mode = InputStrList::ListFileDir; + } + else // format=="string" + { + mode = InputStrList::ListString; + } + QStringList sl; + QDomElement listVal = child.firstChildElement(); + while (!listVal.isNull()) + { + sl.append(listVal.attribute(SA("name"))); + listVal = listVal.nextSiblingElement(); + } + InputStrList *listOption = + new InputStrList( + layout,row, + child.attribute(SA("id")), + sl, + mode, + child.attribute(SA("docs")) + ); + m_options.insert( + child.attribute(SA("id")), + listOption + ); + connect(listOption,SIGNAL(showHelp(Input*)),SLOT(showHelp(Input*))); + connect(listOption,SIGNAL(changed()),SIGNAL(changed())); + } + else if (type==SA("obsolete")) + { + // ignore + } + else // should not happen + { + printf("Unsupported type %s\n",qPrintable(child.attribute(SA("type")))); + } + child = child.nextSiblingElement(); + } + + // compute dependencies between options + child = elem.firstChildElement(); + while (!child.isNull()) + { + QString dependsOn = child.attribute(SA("depends")); + QString id = child.attribute(SA("id")); + if (!dependsOn.isEmpty()) + { + Input *parentOption = m_options[dependsOn]; + Input *thisOption = m_options[id]; + Q_ASSERT(parentOption); + Q_ASSERT(thisOption); + if (parentOption && thisOption) + { + //printf("Adding dependency '%s' (%p)->'%s' (%p)\n", + // qPrintable(dependsOn),parentOption, + // qPrintable(id),thisOption); + parentOption->addDependency(thisOption); + } + } + child = child.nextSiblingElement(); + } + + // set initial dependencies + QHashIterator<QString,Input*> i(m_options); + while (i.hasNext()) + { + i.next(); + if (i.value()) + { + i.value()->updateDependencies(); + } + } + + layout->setRowStretch(row,1); + layout->setColumnStretch(1,2); + layout->setSpacing(5); + topic->setLayout(layout); + area->setWidget(topic); + area->setWidgetResizable(true); + return area; +} + +void Expert::activateTopic(QTreeWidgetItem *item,QTreeWidgetItem *) +{ + if (item) + { + QWidget *w = m_topics[item->text(0)]; + m_topicStack->setCurrentWidget(w); + m_prev->setEnabled(m_topicStack->currentIndex()!=0); + m_next->setEnabled(m_topicStack->currentIndex()!=m_topicStack->count()-1); + } +} + +void Expert::loadSettings(QSettings *s) +{ + QHashIterator<QString,Input*> i(m_options); + while (i.hasNext()) + { + i.next(); + QVariant var = s->value(SA("config/")+i.key()); + if (i.value()) + { + //printf("Loading key %s: type=%d value='%s'\n",qPrintable(i.key()),var.type(),qPrintable(var.toString())); + i.value()->value() = var; + i.value()->update(); + } + } +} + +void Expert::saveSettings(QSettings *s) +{ + QHashIterator<QString,Input*> i(m_options); + while (i.hasNext()) + { + i.next(); + //printf("Saving key %s: type=%d value='%s'\n",qPrintable(i.key()),i.value()->value().type(),qPrintable(i.value()->value().toString())); + if (i.value()) + { + s->setValue(SA("config/")+i.key(),i.value()->value()); + } + } +} + +void Expert::loadConfig(const QString &fileName) +{ + //printf("Expert::loadConfig(%s)\n",qPrintable(fileName)); + parseConfig(fileName,m_options); +} + +void Expert::saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec, + bool brief) +{ + // write group header + t << endl; + t << "#---------------------------------------------------------------------------" << endl; + t << "# " << elem.attribute(SA("docs")) << endl; + t << "#---------------------------------------------------------------------------" << endl; + + // write options... + QDomElement childElem = elem.firstChildElement(); + while (!childElem.isNull()) + { + QString type = childElem.attribute(SA("type")); + QString name = childElem.attribute(SA("id")); + QHash<QString,Input*>::const_iterator i = m_options.find(name); + if (i!=m_options.end()) + { + Input *option = i.value(); + if (!brief) + { + t << endl; + t << convertToComment(childElem.attribute(SA("docs"))); + t << endl; + } + t << name.leftJustified(23) << "= "; + if (option) + { + option->writeValue(t,codec); + } + t << endl; + } + childElem = childElem.nextSiblingElement(); + } + +} + +bool Expert::writeConfig(QTextStream &t,bool brief) +{ + if (!brief) + { + // write global header + t << "# Doxyfile " << versionString << endl << endl; // TODO: add version + t << "# This file describes the settings to be used by the documentation system\n"; + t << "# doxygen (www.doxygen.org) for a project\n"; + t << "#\n"; + t << "# All text after a hash (#) is considered a comment and will be ignored\n"; + t << "# The format is:\n"; + t << "# TAG = value [value, ...]\n"; + t << "# For lists items can also be appended using:\n"; + t << "# TAG += value [value, ...]\n"; + t << "# Values that contain spaces should be placed between quotes (\" \")\n"; + } + + QTextCodec *codec = 0; + Input *option = m_options[QString::fromAscii("DOXYFILE_ENCODING")]; + if (option) + { + codec = QTextCodec::codecForName(option->value().toString().toAscii()); + if (codec==0) // fallback: use UTF-8 + { + codec = QTextCodec::codecForName("UTF-8"); + } + } + QDomElement childElem = m_rootElement.firstChildElement(); + while (!childElem.isNull()) + { + saveTopic(t,childElem,codec,brief); + childElem = childElem.nextSiblingElement(); + } + return true; +} + +QByteArray Expert::saveInnerState () const +{ + return m_splitter->saveState(); +} + +bool Expert::restoreInnerState ( const QByteArray & state ) +{ + return m_splitter->restoreState(state); +} + +void Expert::showHelp(Input *option) +{ + if (!m_inShowHelp) + { + m_inShowHelp = TRUE; + m_helper->setText( + QString::fromAscii("<qt><b>")+option->id()+ + QString::fromAscii("</b><br>")+ + option->docs(). + replace(QChar::fromAscii('\n'),QChar::fromAscii(' '))+ + QString::fromAscii("<qt>") + ); + m_inShowHelp = FALSE; + } +} + +void Expert::nextTopic() +{ + m_topicStack->setCurrentIndex(m_topicStack->currentIndex()+1); + m_next->setEnabled(m_topicStack->count()!=m_topicStack->currentIndex()+1); + m_prev->setEnabled(m_topicStack->currentIndex()!=0); + m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(m_topicStack->currentIndex())); +} + +void Expert::prevTopic() +{ + m_topicStack->setCurrentIndex(m_topicStack->currentIndex()-1); + m_next->setEnabled(m_topicStack->count()!=m_topicStack->currentIndex()+1); + m_prev->setEnabled(m_topicStack->currentIndex()!=0); + m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(m_topicStack->currentIndex())); +} + +void Expert::resetToDefaults() +{ + //printf("Expert::makeDefaults()\n"); + QHashIterator<QString,Input*> i(m_options); + while (i.hasNext()) + { + i.next(); + if (i.value()) + { + i.value()->reset(); + } + } +} + +static bool stringVariantToBool(const QVariant &v) +{ + QString s = v.toString().toLower(); + return s==QString::fromAscii("yes") || s==QString::fromAscii("true") || s==QString::fromAscii("1"); +} + +static bool getBoolOption( + const QHash<QString,Input*>&model,const QString &name) +{ + Input *option = model[name]; + Q_ASSERT(option!=0); + return stringVariantToBool(option->value()); +} + +static QString getStringOption( + const QHash<QString,Input*>&model,const QString &name) +{ + Input *option = model[name]; + Q_ASSERT(option!=0); + return option->value().toString(); +} + + +bool Expert::htmlOutputPresent(const QString &workingDir) const +{ + bool generateHtml = getBoolOption(m_options,QString::fromAscii("GENERATE_HTML")); + if (!generateHtml || workingDir.isEmpty()) return false; + QString indexFile = getHtmlOutputIndex(workingDir); + QFileInfo fi(indexFile); + return fi.exists() && fi.isFile(); +} + +QString Expert::getHtmlOutputIndex(const QString &workingDir) const +{ + QString outputDir = getStringOption(m_options,QString::fromAscii("OUTPUT_DIRECTORY")); + QString htmlOutputDir = getStringOption(m_options,QString::fromAscii("HTML_OUTPUT")); + //printf("outputDir=%s\n",qPrintable(outputDir)); + //printf("htmlOutputDir=%s\n",qPrintable(htmlOutputDir)); + QString indexFile = workingDir; + if (QFileInfo(outputDir).isAbsolute()) // override + { + indexFile = outputDir; + } + else // append + { + indexFile += QString::fromAscii("/")+outputDir; + } + if (QFileInfo(htmlOutputDir).isAbsolute()) // override + { + indexFile = htmlOutputDir; + } + else // append + { + indexFile += QString::fromAscii("/")+htmlOutputDir; + } + indexFile+=QString::fromAscii("/index.html"); + return indexFile; +} + +bool Expert::pdfOutputPresent(const QString &workingDir) const +{ + bool generateLatex = getBoolOption(m_options,QString::fromAscii("GENERATE_LATEX")); + bool pdfLatex = getBoolOption(m_options,QString::fromAscii("USE_PDFLATEX")); + if (!generateLatex || !pdfLatex) return false; + QString latexOutput = getStringOption(m_options,QString::fromAscii("LATEX_OUTPUT")); + QString indexFile; + if (QFileInfo(latexOutput).isAbsolute()) + { + indexFile = latexOutput+QString::fromAscii("/refman.pdf"); + } + else + { + indexFile = workingDir+QString::fromAscii("/")+ + latexOutput+QString::fromAscii("/refman.pdf"); + } + QFileInfo fi(indexFile); + return fi.exists() && fi.isFile(); +} + Index: branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.qrc =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.qrc (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.qrc (revision 1322) @@ -0,0 +1,11 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource prefix="/"> + <file alias="config.xml">../../src/config.xml</file> + <file>images/add.png</file> + <file>images/del.png</file> + <file>images/file.png</file> + <file>images/folder.png</file> + <file>images/refresh.png</file> + <file>images/tunecolor.png</file> +</qresource> +</RCC> Index: branches/xZenu/src/util/doxygen/addon/doxywizard/README =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/README (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/README (revision 1322) @@ -0,0 +1,3 @@ +Doxywizard is a graphical front-end to read/edit/write doxygen configuration +files and to launch doxygen. It requires Qt version 4.3 or higher. + Index: branches/xZenu/src/util/doxygen/addon/doxywizard/inputint.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/inputint.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/inputint.h (revision 1322) @@ -0,0 +1,70 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _INPUTINT_H +#define _INPUTINT_H + +#include "input.h" +#include <QObject> + +class QGridLayout; +class QLabel; +class QSpinBox; + +class InputInt : public QObject, public Input +{ + Q_OBJECT + + public: + InputInt( QGridLayout *layout,int &row, + const QString &id, int defVal, + int minVal, int maxVal, + const QString &docs ); + ~InputInt(){}; + + // Input + QVariant &value(); + void update(); + Kind kind() const { return Int; } + QString docs() const { return m_docs; } + QString id() const { return m_id; } + void addDependency(Input *) { Q_ASSERT(false); } + void setEnabled(bool); + void updateDependencies() {} + void writeValue(QTextStream &t,QTextCodec *codec); + + public slots: + void reset(); + void setValue(int val); + + private slots: + void help(); + + signals: + void changed(); + void showHelp(Input *); + + private: + QLabel *m_lab; + QSpinBox *m_sp; + int m_val; + int m_default; + int m_minVal; + int m_maxVal; + QVariant m_value; + QString m_docs; + QString m_id; +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/inputbool.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/inputbool.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/inputbool.h (revision 1322) @@ -0,0 +1,70 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _INPUTBOOL_H +#define _INPUTBOOL_H + +#include "input.h" +#include <QObject> + +class QCheckBox; +class QGridLayout; +class QLabel; + +class InputBool : public QObject, public Input +{ + Q_OBJECT + + public: + InputBool(QGridLayout *layout,int &row,const QString &id, + bool enabled, const QString &docs ); + + // Input + QVariant &value(); + void update(); + Kind kind() const { return Bool; } + QString docs() const { return m_docs; } + QString id() const { return m_id; } + void addDependency(Input *option) { m_dependencies+=option; } + void setEnabled(bool); + void updateDependencies(); + void writeValue(QTextStream &t,QTextCodec *codec); + + public slots: + void reset(); + void setValue(bool); + + signals: + void changed(); + void toggle(QString,bool); + void showHelp(Input *); + + private slots: + void help(); + + private: + void updateDefault(); + bool m_state; + bool m_default; + bool m_enabled; + QVariant m_value; + QCheckBox *m_cb; + QString m_docs; + QList<Input*> m_dependencies; + QString m_id; + QLabel *m_lab; + +}; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.pro =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.pro (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.pro (revision 1322) @@ -0,0 +1,33 @@ +# +# This file was generated from doxywizard.pro.in on Mon Mar 28 15:09:00 CEST 2011 +# + +###################################################################### +# Automatically generated by qmake (2.01a) zo okt 19 12:50:02 2008 +###################################################################### + +TEMPLATE = app +DESTDIR = ../../bin +TARGET = +DEPENDPATH += . +INCLUDEPATH += . +QT += xml +CONFIG += debug +OBJECTS_DIR = obj +MOC_DIR = moc +RCC_DIR = rcc +DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII + +macx-g++ { + CONFIG += x86 ppc +} + +# Input +HEADERS += doxywizard.h version.h expert.h config.h helplabel.h \ + inputbool.h inputstring.h inputint.h inputstrlist.h wizard.h +SOURCES += doxywizard.cpp ../../src/version.cpp expert.cpp wizard.cpp \ + inputbool.cpp inputstring.cpp inputint.cpp inputstrlist.cpp +LEXSOURCES += config.l +RESOURCES += doxywizard.qrc +win32:RC_FILE += doxywizard.rc +TMAKE_MOC = /usr/bin/moc Index: branches/xZenu/src/util/doxygen/addon/doxywizard/inputstrlist.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/inputstrlist.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/inputstrlist.cpp (revision 1322) @@ -0,0 +1,254 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include "inputstrlist.h" +#include "helplabel.h" +#include "doxywizard.h" +#include "config.h" + +#include <QtGui> + +InputStrList::InputStrList( QGridLayout *layout,int &row, + const QString & id, + const QStringList &sl, ListMode lm, + const QString & docs) + : m_default(sl), m_strList(sl), m_docs(docs), m_id(id) +{ + m_lab = new HelpLabel( id ); + + m_le = new QLineEdit; + m_le->clear(); + + QToolBar *toolBar = new QToolBar; + toolBar->setIconSize(QSize(24,24)); + m_add = toolBar->addAction(QIcon(QString::fromAscii(":/images/add.png")),QString(), + this,SLOT(addString())); + m_add->setToolTip(tr("Add item")); + m_del = toolBar->addAction(QIcon(QString::fromAscii(":/images/del.png")),QString(), + this,SLOT(delString())); + m_del->setToolTip(tr("Delete selected item")); + m_upd = toolBar->addAction(QIcon(QString::fromAscii(":/images/refresh.png")),QString(), + this,SLOT(updateString())); + m_upd->setToolTip(tr("Update selected item")); + + m_lb = new QListWidget; + //m_lb->setMinimumSize(400,100); + foreach (QString s, m_strList) m_lb->addItem(s); + + m_brFile=0; + m_brDir=0; + if (lm!=ListString) + { + if (lm&ListFile) + { + m_brFile = toolBar->addAction(QIcon(QString::fromAscii(":/images/file.png")),QString(), + this,SLOT(browseFiles())); + m_brFile->setToolTip(tr("Browse to a file")); + } + if (lm&ListDir) + { + m_brDir = toolBar->addAction(QIcon(QString::fromAscii(":/images/folder.png")),QString(), + this,SLOT(browseDir())); + m_brDir->setToolTip(tr("Browse to a folder")); + } + } + QHBoxLayout *rowLayout = new QHBoxLayout; + rowLayout->addWidget( m_le ); + rowLayout->addWidget( toolBar ); + layout->addWidget( m_lab, row,0 ); + layout->addLayout( rowLayout, row,1,1,2 ); + layout->addWidget( m_lb, row+1,1,1,2 ); + row+=2; + + m_value = m_strList; + + connect(m_le, SIGNAL(returnPressed()), + this, SLOT(addString()) ); + connect(m_lb, SIGNAL(currentTextChanged(const QString &)), + this, SLOT(selectText(const QString &))); + connect( m_lab, SIGNAL(enter()), SLOT(help()) ); + connect( m_lab, SIGNAL(reset()), SLOT(reset()) ); +} + +void InputStrList::help() +{ + showHelp(this); +} + + +void InputStrList::addString() +{ + if (!m_le->text().isEmpty()) + { + m_lb->addItem(m_le->text()); + m_strList.append(m_le->text()); + m_value = m_strList; + updateDefault(); + emit changed(); + m_le->clear(); + } +} + +void InputStrList::delString() +{ + if (m_lb->currentRow()!=-1) + { + int itemIndex = m_lb->currentRow(); + delete m_lb->currentItem(); + m_strList.removeAt(itemIndex); + m_value = m_strList; + updateDefault(); + emit changed(); + } +} + +void InputStrList::updateString() +{ + if (m_lb->currentRow()!=-1 && !m_le->text().isEmpty()) + { + m_lb->currentItem()->setText(m_le->text()); + m_strList.insert(m_lb->currentRow(),m_le->text()); + m_strList.removeAt(m_lb->currentRow()+1); + m_value = m_strList; + updateDefault(); + emit changed(); + } +} + +void InputStrList::selectText(const QString &s) +{ + m_le->setText(s); +} + +void InputStrList::setEnabled(bool state) +{ + m_lab->setEnabled(state); + m_le->setEnabled(state); + m_add->setEnabled(state); + m_del->setEnabled(state); + m_upd->setEnabled(state); + m_lb->setEnabled(state); + if (m_brFile) m_brFile->setEnabled(state); + if (m_brDir) m_brDir->setEnabled(state); +} + +void InputStrList::browseFiles() +{ + QString path = QFileInfo(MainWindow::instance().configFileName()).path(); + QStringList fileNames = QFileDialog::getOpenFileNames(); + + if (!fileNames.isEmpty()) + { + QStringList::Iterator it; + for ( it= fileNames.begin(); it != fileNames.end(); ++it ) + { + QString fileName; + QDir dir(path); + if (!MainWindow::instance().configFileName().isEmpty() && dir.exists()) + { + fileName = dir.relativeFilePath(*it); + } + if (fileName.isEmpty()) + { + fileName = *it; + } + m_lb->addItem(fileName); + m_strList.append(fileName); + m_value = m_strList; + updateDefault(); + emit changed(); + } + m_le->setText(m_strList[0]); + } +} + +void InputStrList::browseDir() +{ + QString path = QFileInfo(MainWindow::instance().configFileName()).path(); + QString dirName = QFileDialog::getExistingDirectory(); + + if (!dirName.isNull()) + { + QDir dir(path); + if (!MainWindow::instance().configFileName().isEmpty() && dir.exists()) + { + dirName = dir.relativeFilePath(dirName); + } + if (dirName.isEmpty()) + { + dirName=QString::fromAscii("."); + } + m_lb->addItem(dirName); + m_strList.append(dirName); + m_value = m_strList; + updateDefault(); + emit changed(); + m_le->setText(dirName); + } +} + +void InputStrList::setValue(const QStringList &sl) +{ + m_le->clear(); + m_lb->clear(); + m_strList = sl; + for (int i=0;i<m_strList.size();i++) + { + m_lb->addItem(m_strList[i].trimmed()); + } + updateDefault(); +} + +QVariant &InputStrList::value() +{ + return m_value; +} + +void InputStrList::update() +{ + setValue(m_value.toStringList()); +} + +void InputStrList::updateDefault() +{ + if (m_strList==m_default) + { + m_lab->setText(QString::fromAscii("<qt>")+m_id+QString::fromAscii("</qt")); + } + else + { + m_lab->setText(QString::fromAscii("<qt><font color='red'>")+m_id+QString::fromAscii("</font></qt>")); + } +} + +void InputStrList::reset() +{ + setValue(m_default); +} + +void InputStrList::writeValue(QTextStream &t,QTextCodec *codec) +{ + bool first=TRUE; + foreach (QString s, m_strList) + { + if (!first) + { + t << " \\" << endl; + t << " "; + } + first=FALSE; + writeStringValue(t,codec,s); + } +} + Index: branches/xZenu/src/util/doxygen/addon/doxywizard/inputstring.cpp =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/inputstring.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/inputstring.cpp (revision 1322) @@ -0,0 +1,193 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#include "inputstring.h" +#include "helplabel.h" +#include "doxywizard.h" +#include "config.h" + +#include <QtGui> + +InputString::InputString( QGridLayout *layout,int &row, + const QString & id, const QString &s, + StringMode m, const QString &docs, + const QString &absPath ) + : m_default(s), m_sm(m), m_index(0), m_docs(docs), m_id(id), + m_absPath(absPath==QString::fromAscii("1")) +{ + m_lab = new HelpLabel(id); + if (m==StringFixed) + { + layout->addWidget( m_lab, row, 0 ); + m_com = new QComboBox; + layout->addWidget( m_com, row, 1, 1, 3, Qt::AlignLeft ); + m_le=0; + m_br=0; + row++; + } + else + { + layout->addWidget( m_lab, row, 0 ); + m_le = new QLineEdit; + m_le->setText( s ); + //layout->setColumnMinimumWidth(2,150); + if (m==StringFile || m==StringDir) + { + layout->addWidget( m_le, row, 1 ); + m_br = new QToolBar; + m_br->setIconSize(QSize(24,24)); + if (m==StringFile) + { + QAction *file = m_br->addAction(QIcon(QString::fromAscii(":/images/file.png")),QString(),this,SLOT(browse())); + file->setToolTip(tr("Browse to a file")); + } + else + { + QAction *dir = m_br->addAction(QIcon(QString::fromAscii(":/images/folder.png")),QString(),this,SLOT(browse())); + dir->setToolTip(tr("Browse to a folder")); + } + layout->addWidget( m_br,row,2 ); + } + else + { + layout->addWidget( m_le, row, 1, 1, 2 ); + m_br=0; + } + m_com=0; + row++; + } + + if (m_le) connect( m_le, SIGNAL(textChanged(const QString&)), + this, SLOT(setValue(const QString&)) ); + if (m_com) connect( m_com, SIGNAL(activated(const QString &)), + this, SLOT(setValue(const QString &)) ); + m_str = s+QChar::fromAscii('!'); // force update + setValue(s); + connect( m_lab, SIGNAL(enter()), SLOT(help()) ); + connect( m_lab, SIGNAL(reset()), SLOT(reset()) ); +} + +void InputString::help() +{ + showHelp(this); +} + + +InputString::~InputString() +{ +} + + +void InputString::setValue(const QString &s) +{ + if (m_str!=s) + { + m_str = s; + m_value = m_str; + if (m_str==m_default) + { + m_lab->setText(QString::fromAscii("<qt>")+m_id+QString::fromAscii("</qt")); + } + else + { + m_lab->setText(QString::fromAscii("<qt><font color='red'>")+m_id+QString::fromAscii("</font></qt>")); + } + if (m_le && m_le->text()!=m_str) m_le->setText( m_str ); + emit changed(); + } +} + +void InputString::setEnabled(bool state) +{ + m_lab->setEnabled(state); + if (m_le) m_le->setEnabled(state); + if (m_br) m_br->setEnabled(state); + if (m_com) m_com->setEnabled(state); +} + +void InputString::browse() +{ + QString path = QFileInfo(MainWindow::instance().configFileName()).path(); + if (m_sm==StringFile) + { + QString fileName = QFileDialog::getOpenFileName(&MainWindow::instance(), + tr("Select file"),path); + if (!fileName.isNull()) + { + QDir dir(path); + if (!MainWindow::instance().configFileName().isEmpty() && dir.exists()) + { + fileName = m_absPath ? fileName : dir.relativeFilePath(fileName); + } + setValue(fileName); + } + } + else // sm==StringDir + { + QString dirName = QFileDialog::getExistingDirectory(&MainWindow::instance(), + tr("Select directory"),path); + if (!dirName.isNull()) + { + QDir dir(path); + if (!MainWindow::instance().configFileName().isEmpty() && dir.exists()) + { + dirName = m_absPath ? dirName : dir.relativeFilePath(dirName); + } + setValue(dirName); + } + } +} + +void InputString::clear() +{ + setValue(QString()); +} + +void InputString::addValue(QString s) +{ + if (m_sm==StringFixed) + { + m_values.append(s); + m_com->addItem(s); + } +} + +void InputString::setDefault() +{ + int index = m_values.indexOf(m_str); + if (index!=-1 && m_com) m_com->setCurrentIndex(index); +} + +QVariant &InputString::value() +{ + return m_value; +} + +void InputString::update() +{ + setValue(m_value.toString().trimmed()); + setDefault(); +} + +void InputString::reset() +{ + setValue(m_default); + setDefault(); +} + +void InputString::writeValue(QTextStream &t,QTextCodec *codec) +{ + writeStringValue(t,codec,m_str); +} + Index: branches/xZenu/src/util/doxygen/addon/doxywizard/version.h =================================================================== --- branches/xZenu/src/util/doxygen/addon/doxywizard/version.h (revision 0) +++ branches/xZenu/src/util/doxygen/addon/doxywizard/version.h (revision 1322) @@ -0,0 +1,23 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef VERSION_H +#define VERSION_H + +extern char versionString[]; + +#endif Index: branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.ico =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/xZenu/src/util/doxygen/addon/doxywizard/doxywizard.ico ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/xZenu/src/util/doxygen/src/xmlgen.h =================================================================== --- branches/xZenu/src/util/doxygen/src/xmlgen.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/xmlgen.h (revision 1322) @@ -0,0 +1,20 @@ +/****************************************************************************** + * + * $Id: xmlgen.h,v 1.2 2001/01/01 10:15:18 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef XMLGEN_H +#define XMLGEN_H + +void generateXML(); + +#endif Index: branches/xZenu/src/util/doxygen/src/sortdict.h =================================================================== --- branches/xZenu/src/util/doxygen/src/sortdict.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/sortdict.h (revision 1322) @@ -0,0 +1,647 @@ +/****************************************************************************** + * + * $Id: sortdict.h,v 1.3 2001/03/19 19:27:41 root Exp $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef _SORTDICT_H +#define _SORTDICT_H + +#include "qtbc.h" +#include <qlist.h> +#include <qdict.h> +#include <qintdict.h> + +#define AUTORESIZE 1 + +#if AUTORESIZE +const uint SDict_primes[] = +{ + 17, + 29, + 47, + 71, + 113, + 179, + 293, + 457, + 733, + 1171, + 1871, + 2999, + 4787, + 7669, + 12251, + 19603, + 31379, + 50177, + 80287, + 128449, + 205519, + 328829, + 526139, + 841801, + 1346881, + 2155007, + 3448033, + 5516827, + 8826919, + 14123059, + 23538433, + 39230771, + 65384537, + 108974231, + 181623707, + 302706181, + 504510283, + 840850487, + 0xffffffff +}; +#endif + +template<class T> class SDict; +template<class T> class SIntDict; + +/*! internal wrapper class that redirects compareItems() to the + * dictionary + */ +template<class T> +class SList : public QList<T> +{ + public: + SList(SDict<T> *owner) : m_owner(owner) {} + virtual ~SList() {} + int compareItems(GCI item1,GCI item2) + { + return m_owner->compareItems(item1,item2); + } + private: + SDict<T> *m_owner; +}; + +/*! Ordered dictionary of elements of type T. + * Internally uses a QList<T> and a QDict<T>. + */ +template<class T> +class SDict +{ + private: + SList<T> *m_list; + QDict<T> *m_dict; + int m_sizeIndex; + + public: + /*! Create an ordered dictionary. + * \param size The size of the dictionary. Should be a prime number for + * best distribution of elements. + * \param caseSensitive indicated whether the keys should be sorted + * in a case sensitive way. + */ + SDict(int size,bool caseSensitive=TRUE) : m_sizeIndex(0) + { + m_list = new SList<T>(this); +#if AUTORESIZE + while ((uint)size>SDict_primes[m_sizeIndex]) m_sizeIndex++; + m_dict = new QDict<T>(SDict_primes[m_sizeIndex],caseSensitive); +#else + m_dict = new QDict<T>(size,caseSensitive); +#endif + } + + /*! Destroys the dictionary */ + virtual ~SDict() + { + delete m_list; + delete m_dict; + } + + /*! Appends an element to the dictionary. The element is owned by the + * dictionary. + * \param key The unique key to use to quicky find the item later on. + * \param d The compound to add. + * \sa find() + */ + void append(const char *key,const T *d) + { + m_list->append(d); + m_dict->insert(key,d); +#if AUTORESIZE + if (m_dict->size()>SDict_primes[m_sizeIndex]) + { + m_dict->resize(SDict_primes[++m_sizeIndex]); + } +#endif + } + + /*! Prepends an element to the dictionary. The element is owned by the + * dictionary. + * \param key The unique key to use to quicky find the item later on. + * \param d The compound to add. + * \sa find() + */ + void prepend(const char *key,const T *d) + { + m_list->prepend(d); + m_dict->insert(key,d); +#if AUTORESIZE + if (m_dict->size()>SDict_primes[m_sizeIndex]) + { + m_dict->resize(SDict_primes[++m_sizeIndex]); + } +#endif + } + + /*! Remove an item from the dictionary */ + bool remove(const char *key) + { + T *item = m_dict->take(key); + return item ? m_list->remove(item) : FALSE; + } + + /*! Take an item out of the dictionary without deleting it */ + T *take(const char *key) + { + T *item = m_dict->take(key); + if (item) + { + int i = m_list->find(item); + m_list->take(i); + } + return item; + } + + /*! Sorts the members of the dictionary. First appending a number + * of members and then sorting them is faster (O(NlogN) than using + * inSort() for each member (O(N^2)). + */ + void sort() + { + m_list->sort(); + } + /*! Inserts a compound into the dictionary in a sorted way. + * \param key The unique key to use to quicky find the item later on. + * \param d The compound to add. + * \sa find() + */ + void inSort(const char *key,const T *d) + { + m_list->inSort(d); + m_dict->insert(key,d); +#if AUTORESIZE + if (m_dict->size()>SDict_primes[m_sizeIndex]) + { + m_dict->resize(SDict_primes[++m_sizeIndex]); + } +#endif + } + + /*! Indicates whether or not the dictionary owns its elements */ + void setAutoDelete(bool val) + { + m_list->setAutoDelete(val); + } + + /*! Looks up a compound given its key. + * \param key The key to identify this element. + * \return The requested compound or zero if it cannot be found. + * \sa append() + */ + T *find(const char *key) + { + return m_dict->find(key); + } + T *find(const QCString &key) + { + return m_dict->find(key); + } + T *find(const QString &key) + { + return m_dict->find(key); + } + + /*! Equavalent to find(). */ + T *operator[](const char *key) const + { + return m_dict->find(key); + } + + /*! Returns the item at position \a i in the sorted dictionary */ + T *at(uint i) + { + return m_list->at(i); + } + + /*! Function that is used to compare two items when sorting. + * Overload this to properly sort items. + * \sa inSort() + */ + virtual int compareItems(GCI item1,GCI item2) + { + return item1!=item2; + } + + /*! Clears the dictionary. Will delete items if setAutoDelete() was + * set to \c TRUE. + * \sa setAutoDelete + */ + void clear() + { + m_list->clear(); + m_dict->clear(); + } + + /*! Returns the number of items stored in the dictionary + */ + int count() const + { + return m_list->count(); + } + + class Iterator; // first forward declare + friend class Iterator; // then make it a friend + /*! Simple iterator for SDict. It iterates in the order in which the + * elements are stored. + */ + class Iterator + { + public: + /*! Create an iterator given the dictionary. */ + Iterator(const SDict<T> &dict) + { + m_li = new QListIterator<T>(*dict.m_list); + } + + /*! Destroys the dictionary */ + virtual ~Iterator() + { + delete m_li; + } + + /*! Set the iterator to the first element in the list. + * \return The first compound, or zero if the list was empty. + */ + T *toFirst() const + { + return m_li->toFirst(); + } + + /*! Set the iterator to the last element in the list. + * \return The first compound, or zero if the list was empty. + */ + T *toLast() const + { + return m_li->toLast(); + } + + /*! Returns the current compound */ + T *current() const + { + return m_li->current(); + } + + /*! Moves the iterator to the next element. + * \return the new "current" element, or zero if the iterator was + * already pointing at the last element. + */ + T *operator++() + { + return m_li->operator++(); + } + + /*! Moves the iterator to the previous element. + * \return the new "current" element, or zero if the iterator was + * already pointing at the first element. + */ + T *operator--() + { + return m_li->operator--(); + } + + private: + QListIterator<T> *m_li; + }; + + class IteratorDict; // first forward declare + friend class IteratorDict; // then make it a friend + /*! Simple iterator for SDict. It iterates in over the dictionary elements + * in an unsorted way, but does provide information about the element's key. + */ + class IteratorDict + { + public: + /*! Create an iterator given the dictionary. */ + IteratorDict(const SDict<T> &dict) + { + m_di = new QDictIterator<T>(*dict.m_dict); + } + + /*! Destroys the dictionary */ + virtual ~IteratorDict() + { + delete m_di; + } + + /*! Set the iterator to the first element in the list. + * \return The first compound, or zero if the list was empty. + */ + T *toFirst() const + { + return m_di->toFirst(); + } + + /*! Set the iterator to the last element in the list. + * \return The first compound, or zero if the list was empty. + */ + T *toLast() const + { + return m_di->toLast(); + } + + /*! Returns the current compound */ + T *current() const + { + return m_di->current(); + } + + /*! Returns the current key */ + QCString currentKey() const + { + return m_di->currentKey(); + } + + /*! Moves the iterator to the next element. + * \return the new "current" element, or zero if the iterator was + * already pointing at the last element. + */ + T *operator++() + { + return m_di->operator++(); + } + + /*! Moves the iterator to the previous element. + * \return the new "current" element, or zero if the iterator was + * already pointing at the first element. + */ + T *operator--() + { + return m_di->operator--(); + } + + private: + QDictIterator<T> *m_di; + }; +}; + +/*! internal wrapper class that redirects compareItems() to the + * dictionary + */ +template<class T> +class SIntList : public QList<T> +{ + public: + SIntList(SIntDict<T> *owner) : m_owner(owner) {} + virtual ~SIntList() {} + int compareItems(GCI item1,GCI item2) + { + return m_owner->compareItems(item1,item2); + } + private: + SIntDict<T> *m_owner; +}; + +/*! Ordered dictionary of elements of type T. + * Internally uses a QList<T> and a QIntDict<T>. + */ +template<class T> +class SIntDict +{ + private: + SIntList<T> *m_list; + QIntDict<T> *m_dict; + int m_sizeIndex; + + public: + /*! Create an ordered dictionary. + * \param size The size of the dictionary. Should be a prime number for + * best distribution of elements. + */ + SIntDict(int size) : m_sizeIndex(0) + { + m_list = new SIntList<T>(this); +#if AUTORESIZE + while ((uint)size>SDict_primes[m_sizeIndex]) m_sizeIndex++; + m_dict = new QIntDict<T>(SDict_primes[m_sizeIndex]); +#else + m_dict = new QIntDict<T>(size); +#endif + } + + /*! Destroys the dictionary */ + virtual ~SIntDict() + { + delete m_list; + delete m_dict; + } + + /*! Appends a compound to the dictionary. The element is owned by the + * dictionary. + * \param key The unique key to use to quicky find the item later on. + * \param d The compound to add. + * \sa find() + */ + void append(int key,const T *d) + { + m_list->append(d); + m_dict->insert(key,d); +#if AUTORESIZE + if (m_dict->size()>SDict_primes[m_sizeIndex]) + { + m_dict->resize(SDict_primes[++m_sizeIndex]); + } +#endif + } + + /*! Prepend a compound to the dictionary. The element is owned by the + * dictionary. + * \param key The unique key to use to quicky find the item later on. + * \param d The compound to add. + * \sa find() + */ + void prepend(int key,const T *d) + { + m_list->prepend(d); + m_dict->insert(key,d); +#if AUTORESIZE + if (m_dict->size()>SDict_primes[m_sizeIndex]) + { + m_dict->resize(SDict_primes[++m_sizeIndex]); + } +#endif + } + + /*! Remove an item from the dictionary */ + bool remove(int key) + { + T *item = m_dict->take(key); + return item ? m_list->remove(item) : FALSE; + } + + /*! Sorts the members of the dictionary. First appending a number + * of members and then sorting them is faster (O(NlogN) than using + * inSort() for each member (O(N^2)). + */ + void sort() + { + m_list->sort(); + } + + /*! Inserts a compound into the dictionary in a sorted way. + * \param key The unique key to use to quicky find the item later on. + * \param d The compound to add. + * \sa find() + */ + void inSort(int key,const T *d) + { + m_list->inSort(d); + m_dict->insert(key,d); +#if AUTORESIZE + if (m_dict->size()>SDict_primes[m_sizeIndex]) + { + m_dict->resize(SDict_primes[++m_sizeIndex]); + } +#endif + } + + /*! Indicates whether or not the dictionary owns its elements */ + void setAutoDelete(bool val) + { + m_list->setAutoDelete(val); + } + + /*! Looks up a compound given its key. + * \param key The key to identify this element. + * \return The requested compound or zero if it cannot be found. + * \sa append() + */ + T *find(int key) + { + return m_dict->find(key); + } + + /*! Equavalent to find(). */ + T *operator[](int key) const + { + return m_dict->find(key); + } + + /*! Returns the item at position \a i in the sorted dictionary */ + T *at(uint i) + { + return m_list->at(i); + } + + /*! Function that is used to compare two items when sorting. + * Overload this to properly sort items. + * \sa inSort() + */ + virtual int compareItems(GCI item1,GCI item2) + { + return item1!=item2; + } + + /*! Clears the dictionary. Will delete items if setAutoDelete() was + * set to \c TRUE. + * \sa setAutoDelete + */ + void clear() + { + m_list->clear(); + m_dict->clear(); + } + + /*! Returns the number of items stored in the dictionary + */ + int count() + { + return m_list->count(); + } + + class Iterator; // first forward declare + friend class Iterator; // then make it a friend + /*! Simple iterator for SDict. It iterates in the order in which the + * elements are stored. + */ + class Iterator + { + public: + /*! Create an iterator given the dictionary. */ + Iterator(const SIntDict<T> &dict) + { + m_li = new QListIterator<T>(*dict.m_list); + } + + /*! Destroys the dictionary */ + virtual ~Iterator() + { + delete m_li; + } + + /*! Set the iterator to the first element in the list. + * \return The first compound, or zero if the list was empty. + */ + T *toFirst() const + { + return m_li->toFirst(); + } + + /*! Set the iterator to the last element in the list. + * \return The first compound, or zero if the list was empty. + */ + T *toLast() const + { + return m_li->toLast(); + } + + /*! Returns the current compound */ + T *current() const + { + return m_li->current(); + } + + /*! Moves the iterator to the next element. + * \return the new "current" element, or zero if the iterator was + * already pointing at the last element. + */ + T *operator++() + { + return m_li->operator++(); + } + + /*! Moves the iterator to the previous element. + * \return the new "current" element, or zero if the iterator was + * already pointing at the first element. + */ + T *operator--() + { + return m_li->operator--(); + } + + private: + QListIterator<T> *m_li; + }; + +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/rtfdocvisitor.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/rtfdocvisitor.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/rtfdocvisitor.cpp (revision 1322) @@ -0,0 +1,1646 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include "rtfdocvisitor.h" +#include "docparser.h" +#include "language.h" +#include "doxygen.h" +#include "outputgen.h" +#include "dot.h" +#include "msc.h" +#include "util.h" +#include "rtfstyle.h" +#include "message.h" +#include <qfileinfo.h> +#include "parserintf.h" +#include "msc.h" + + +//#define DBG_RTF(x) m_t << x +#define DBG_RTF(x) do {} while(0) + +RTFDocVisitor::RTFDocVisitor(FTextStream &t,CodeOutputInterface &ci, + const char *langExt) + : DocVisitor(DocVisitor_RTF), m_t(t), m_ci(ci), m_insidePre(FALSE), + m_hide(FALSE), m_indentLevel(0), m_lastIsPara(FALSE), m_langExt(langExt) +{ +} + +QCString RTFDocVisitor::getStyle(const char *name) +{ + QCString n; + n.sprintf("%s%d",name,m_indentLevel); + StyleData *sd = rtf_Style[n]; + ASSERT(sd!=0); + return sd->reference; +} + +void RTFDocVisitor::incIndentLevel() +{ + if (m_indentLevel<rtf_maxIndentLevels-1) m_indentLevel++; +} + +void RTFDocVisitor::decIndentLevel() +{ + if (m_indentLevel>0) m_indentLevel--; +} + + //-------------------------------------- + // visitor functions for leaf nodes + //-------------------------------------- + +void RTFDocVisitor::visit(DocWord *w) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocWord)}\n"); + filter(w->word()); + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visit(DocLinkedWord *w) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocLinkedWord)}\n"); + startLink(w->ref(),w->file(),w->anchor()); + filter(w->word()); + endLink(w->ref()); + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visit(DocWhiteSpace *w) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocWhiteSpace)}\n"); + if (m_insidePre) + { + m_t << w->chars(); + } + else + { + m_t << " "; + } + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visit(DocSymbol *s) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocSymbol)}\n"); + switch(s->symbol()) + { + case DocSymbol::BSlash: m_t << "\\\\"; break; + case DocSymbol::At: m_t << "@"; break; + case DocSymbol::Less: m_t << "<"; break; + case DocSymbol::Greater: m_t << ">"; break; + case DocSymbol::Amp: m_t << "&"; break; + case DocSymbol::Dollar: m_t << "$"; break; + case DocSymbol::Hash: m_t << "#"; break; + case DocSymbol::DoubleColon: m_t << "::"; break; + case DocSymbol::Percent: m_t << "%"; break; + case DocSymbol::Copy: m_t << "(C)"; break; + case DocSymbol::Tm: m_t << "(TM)"; break; + case DocSymbol::Reg: m_t << "(R)"; break; + case DocSymbol::Apos: m_t << "'"; break; + case DocSymbol::Quot: m_t << "\""; break; + case DocSymbol::Lsquo: m_t << "`"; break; + case DocSymbol::Rsquo: m_t << "'"; break; + case DocSymbol::Ldquo: m_t << "\""; break; + case DocSymbol::Rdquo: m_t << "\""; break; + case DocSymbol::Ndash: m_t << "-"; break; + case DocSymbol::Mdash: m_t << "--"; break; + case DocSymbol::Uml: switch(s->letter()) + { + case 'A' : m_t << '\304'; break; + case 'E' : m_t << '\313'; break; + case 'I' : m_t << '\317'; break; + case 'O' : m_t << '\326'; break; + case 'U' : m_t << '\334'; break; + case 'Y' : m_t << 'Y'; break; + case 'a' : m_t << '\344'; break; + case 'e' : m_t << '\353'; break; + case 'i' : m_t << '\357'; break; + case 'o' : m_t << '\366'; break; + case 'u' : m_t << '\374'; break; + case 'y' : m_t << '\377'; break; + default: m_t << '?'; break; + } + break; + case DocSymbol::Acute: switch(s->letter()) + { + case 'A' : m_t << '\301'; break; + case 'E' : m_t << '\311'; break; + case 'I' : m_t << '\315'; break; + case 'O' : m_t << '\323'; break; + case 'U' : m_t << '\332'; break; + case 'Y' : m_t << '\335'; break; + case 'a' : m_t << '\341'; break; + case 'e' : m_t << '\351'; break; + case 'i' : m_t << '\355'; break; + case 'o' : m_t << '\363'; break; + case 'u' : m_t << '\372'; break; + case 'y' : m_t << '\375'; break; + default: m_t << '?'; break; + } + break; + case DocSymbol::Grave: switch(s->letter()) + { + case 'A' : m_t << '\300'; break; + case 'E' : m_t << '\310'; break; + case 'I' : m_t << '\314'; break; + case 'O' : m_t << '\322'; break; + case 'U' : m_t << '\331'; break; + case 'a' : m_t << '\340'; break; + case 'e' : m_t << '\350'; break; + case 'i' : m_t << '\354'; break; + case 'o' : m_t << '\362'; break; + case 'u' : m_t << '\371'; break; + default: m_t << '?'; break; + } + break; + case DocSymbol::Circ: switch(s->letter()) + { + case 'A' : m_t << '\302'; break; + case 'E' : m_t << '\312'; break; + case 'I' : m_t << '\316'; break; + case 'O' : m_t << '\324'; break; + case 'U' : m_t << '\333'; break; + case 'a' : m_t << '\342'; break; + case 'e' : m_t << '\352'; break; + case 'i' : m_t << '\356'; break; + case 'o' : m_t << '\364'; break; + case 'u' : m_t << '\373'; break; + default: m_t << '?'; break; + } + break; + case DocSymbol::Tilde: switch(s->letter()) + { + case 'A' : m_t << '\303'; break; + case 'N' : m_t << '\321'; break; + case 'O' : m_t << '\325'; break; + case 'a' : m_t << '\343'; break; + case 'n' : m_t << '\361'; break; + case 'o' : m_t << '\365'; break; + default: m_t << '?'; break; + } + break; + case DocSymbol::Cedil: switch(s->letter()) + { + case 'C' : m_t << '\307'; break; + case 'c' : m_t << '\347'; break; + default: m_t << '?'; break; + } + break; + case DocSymbol::Slash: switch(s->letter()) + { + case 'O' : m_t << '\330'; break; + case 'o' : m_t << '\370'; break; + default: m_t << '?'; break; + } + break; + case DocSymbol::Ring: switch(s->letter()) + { + case 'A' : m_t << '\305'; break; + case 'a' : m_t << '\345'; break; + default: m_t << '?'; break; + } + break; + case DocSymbol::Szlig: m_t << "\337"; break; + case DocSymbol::Nbsp: m_t << "\\~ "; break; + case DocSymbol::Aelig: m_t << "\346"; break; + case DocSymbol::AElig: m_t << "\306"; break; + default: + err("error: unknown symbol found\n"); + } + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visit(DocURL *u) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocURL)}\n"); + if (Config_getBool("RTF_HYPERLINKS")) + { + m_t << "{\\field " + "{\\*\\fldinst " + "{ HYPERLINK \\\\l \""; + if (u->isEmail()) m_t << "mailto:"; + m_t << u->url(); + m_t << "\" }" + "{}"; + m_t << "}" + "{\\fldrslt " + "{\\cs37\\ul\\cf2 "; + filter(u->url()); + m_t << "}" + "}" + "}" << endl; + } + else + { + m_t << "{\\f2 "; + filter(u->url()); + m_t << "}"; + } + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visit(DocLineBreak *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocLineBreak)}\n"); + m_t << "\\par"; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visit(DocHorRuler *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocHorRuler)}\n"); + m_t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" << endl; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visit(DocStyleChange *s) +{ + if (m_hide) return; + m_lastIsPara=FALSE; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocStyleChange)}\n"); + switch (s->style()) + { + case DocStyleChange::Bold: + if (s->enable()) m_t << "{\\b "; else m_t << "} "; + break; + case DocStyleChange::Italic: + if (s->enable()) m_t << "{\\i "; else m_t << "} "; + break; + case DocStyleChange::Code: + if (s->enable()) m_t << "{\\f2 "; else m_t << "} "; + break; + case DocStyleChange::Subscript: + if (s->enable()) m_t << "{\\sub "; else m_t << "} "; + break; + case DocStyleChange::Superscript: + if (s->enable()) m_t << "{\\super "; else m_t << "} "; + break; + case DocStyleChange::Center: + if (s->enable()) m_t << "{\\qc "; else m_t << "} "; + break; + case DocStyleChange::Small: + if (s->enable()) m_t << "{\\sub "; else m_t << "} "; + break; + case DocStyleChange::Preformatted: + if (s->enable()) + { + m_t << "{" << endl; + m_t << "\\par" << endl; + m_t << rtf_Style_Reset << getStyle("CodeExample"); + m_insidePre=TRUE; + } + else + { + m_insidePre=FALSE; + m_t << "\\par"; + m_t << "}" << endl; + } + m_lastIsPara=TRUE; + break; + case DocStyleChange::Div: /* HTML only */ break; + case DocStyleChange::Span: /* HTML only */ break; + } +} + +void RTFDocVisitor::visit(DocVerbatim *s) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocVerbatim)}\n"); + switch(s->type()) + { + case DocVerbatim::Code: // fall though + m_t << "{" << endl; + m_t << "\\par" << endl; + m_t << rtf_Style_Reset << getStyle("CodeExample"); + Doxygen::parserManager->getParser(m_langExt) + ->parseCode(m_ci,s->context(),s->text(), + s->isExample(),s->exampleFile()); + //m_t << "\\par" << endl; + m_t << "}" << endl; + break; + case DocVerbatim::Verbatim: + m_t << "{" << endl; + m_t << "\\par" << endl; + m_t << rtf_Style_Reset << getStyle("CodeExample"); + filter(s->text(),TRUE); + //m_t << "\\par" << endl; + m_t << "}" << endl; + break; + case DocVerbatim::HtmlOnly: + case DocVerbatim::LatexOnly: + case DocVerbatim::XmlOnly: + case DocVerbatim::ManOnly: + /* nothing */ + break; + case DocVerbatim::Dot: + { + static int dotindex = 1; + QCString fileName(4096); + + fileName.sprintf("%s%d%s", + (Config_getString("RTF_OUTPUT")+"/inline_dotgraph_").data(), + dotindex++, + ".dot" + ); + QFile file(fileName); + if (!file.open(IO_WriteOnly)) + { + err("Could not open file %s for writing\n",fileName.data()); + } + file.writeBlock( s->text(), s->text().length() ); + file.close(); + m_t << "\\par{\\qc "; // center picture + writeDotFile(fileName); + m_t << "} "; + if (Config_getBool("DOT_CLEANUP")) file.remove(); + } + break; + case DocVerbatim::Msc: + { + static int mscindex = 1; + QCString baseName(4096); + + baseName.sprintf("%s%d", + (Config_getString("RTF_OUTPUT")+"/inline_mscgraph_").data(), + mscindex++ + ); + QFile file(baseName+".msc"); + if (!file.open(IO_WriteOnly)) + { + err("Could not open file %s for writing\n",baseName.data()); + } + QCString text = "msc {"; + text+=s->text(); + text+="}"; + file.writeBlock( text, text.length() ); + file.close(); + m_t << "\\par{\\qc "; // center picture + writeMscFile(baseName); + m_t << "} "; + if (Config_getBool("DOT_CLEANUP")) file.remove(); + } + break; + } + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visit(DocAnchor *anc) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocAnchor)}\n"); + QCString anchor; + if (!anc->file().isEmpty()) + { + anchor+=anc->file(); + } + if (!anc->file().isEmpty() && !anc->anchor().isEmpty()) + { + anchor+="_"; + } + if (!anc->anchor().isEmpty()) + { + anchor+=anc->anchor(); + } + m_t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}" << endl; + m_t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}" << endl; + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visit(DocInclude *inc) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocInclude)}\n"); + switch(inc->type()) + { + case DocInclude::IncWithLines: + { + m_t << "{" << endl; + m_t << "\\par" << endl; + m_t << rtf_Style_Reset << getStyle("CodeExample"); + QFileInfo cfi( inc->file() ); + FileDef fd( cfi.dirPath(), cfi.fileName() ); + Doxygen::parserManager->getParser(inc->extension()) + ->parseCode(m_ci,inc->context(), + inc->text(), + inc->isExample(), + inc->exampleFile(), &fd); + m_t << "\\par"; + m_t << "}" << endl; + } + break; + case DocInclude::Include: + m_t << "{" << endl; + m_t << "\\par" << endl; + m_t << rtf_Style_Reset << getStyle("CodeExample"); + Doxygen::parserManager->getParser(inc->extension()) + ->parseCode(m_ci,inc->context(), + inc->text(),inc->isExample(), + inc->exampleFile()); + m_t << "\\par"; + m_t << "}" << endl; + break; + case DocInclude::DontInclude: + break; + case DocInclude::HtmlInclude: + break; + case DocInclude::VerbInclude: + m_t << "{" << endl; + m_t << "\\par" << endl; + m_t << rtf_Style_Reset << getStyle("CodeExample"); + filter(inc->text()); + m_t << "\\par"; + m_t << "}" << endl; + break; + } + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visit(DocIncOperator *op) +{ + //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n", + // op->type(),op->isFirst(),op->isLast(),op->text().data()); + DBG_RTF("{\\comment RTFDocVisitor::visit(DocIncOperator)}\n"); + if (op->isFirst()) + { + if (!m_hide) + { + m_t << "{" << endl; + m_t << "\\par" << endl; + m_t << rtf_Style_Reset << getStyle("CodeExample"); + } + pushEnabled(); + m_hide = TRUE; + } + if (op->type()!=DocIncOperator::Skip) + { + popEnabled(); + if (!m_hide) + { + Doxygen::parserManager->getParser(m_langExt) + ->parseCode(m_ci,op->context(),op->text(), + op->isExample(),op->exampleFile()); + } + pushEnabled(); + m_hide=TRUE; + } + if (op->isLast()) + { + popEnabled(); + if (!m_hide) + { + m_t << "\\par"; + m_t << "}" << endl; + } + m_lastIsPara=TRUE; + } + else + { + if (!m_hide) m_t << endl; + m_lastIsPara=FALSE; + } +} + +void RTFDocVisitor::visit(DocFormula *f) +{ + if (m_hide) return; + // TODO: do something sensible here, like including a bitmap + DBG_RTF("{\\comment RTFDocVisitor::visit(DocFormula)}\n"); + m_t << f->text(); + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visit(DocIndexEntry *i) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visit(DocIndexEntry)}\n"); + m_t << "{\\xe \\v " << i->entry() << "}" << endl; + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visit(DocSimpleSectSep *) +{ +} + +//-------------------------------------- +// visitor functions for compound nodes +//-------------------------------------- + +void RTFDocVisitor::visitPre(DocAutoList *l) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoList)}\n"); + m_t << "{" << endl; + rtf_listItemInfo[m_indentLevel].isEnum = l->isEnumList(); + rtf_listItemInfo[m_indentLevel].number = 1; + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocAutoList *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoList)}\n"); + m_t << "\\par"; + m_t << "}" << endl; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocAutoListItem *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoListItem)}\n"); + if (!m_lastIsPara) m_t << "\\par" << endl; + m_t << rtf_Style_Reset; + if (rtf_listItemInfo[m_indentLevel].isEnum) + { + m_t << getStyle("ListEnum") << endl; + m_t << rtf_listItemInfo[m_indentLevel].number << ".\\tab "; + rtf_listItemInfo[m_indentLevel].number++; + } + else + { + m_t << getStyle("ListBullet") << endl; + } + incIndentLevel(); + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocAutoListItem *) +{ + decIndentLevel(); + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoListItem)}\n"); +} + +void RTFDocVisitor::visitPre(DocPara *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n"); +} + +void RTFDocVisitor::visitPost(DocPara *p) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n"); + if (!m_lastIsPara && + !p->isLast() && // omit <p> for last paragraph + !(p->parent() && // and for parameters & sections + p->parent()->kind()==DocNode::Kind_ParamSect + ) + ) + { + m_t << "\\par" << endl; + m_lastIsPara=TRUE; + } +} + +void RTFDocVisitor::visitPre(DocRoot *r) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRoot)}\n"); + if (r->indent()) incIndentLevel(); + m_t << "{" << rtf_Style["BodyText"]->reference << endl; +} + +void RTFDocVisitor::visitPost(DocRoot *r) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRoot)}\n"); + if (!m_lastIsPara && !r->singleLine()) m_t << "\\par" << endl; + m_t << "}"; + m_lastIsPara=TRUE; + if (r->indent()) decIndentLevel(); +} + +void RTFDocVisitor::visitPre(DocSimpleSect *s) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n"); + if (!m_lastIsPara) m_t << "\\par" << endl; + m_t << "{"; // start desc + //m_t << "{\\b "; // start bold + m_t << "{" << rtf_Style["Heading5"]->reference << endl; + switch(s->type()) + { + case DocSimpleSect::See: + m_t << theTranslator->trSeeAlso(); break; + case DocSimpleSect::Return: + m_t << theTranslator->trReturns(); break; + case DocSimpleSect::Author: + m_t << theTranslator->trAuthor(TRUE,TRUE); break; + case DocSimpleSect::Authors: + m_t << theTranslator->trAuthor(TRUE,FALSE); break; + case DocSimpleSect::Version: + m_t << theTranslator->trVersion(); break; + case DocSimpleSect::Since: + m_t << theTranslator->trSince(); break; + case DocSimpleSect::Date: + m_t << theTranslator->trDate(); break; + case DocSimpleSect::Note: + m_t << theTranslator->trNote(); break; + case DocSimpleSect::Warning: + m_t << theTranslator->trWarning(); break; + case DocSimpleSect::Pre: + m_t << theTranslator->trPrecondition(); break; + case DocSimpleSect::Post: + m_t << theTranslator->trPostcondition(); break; + case DocSimpleSect::Invar: + m_t << theTranslator->trInvariant(); break; + case DocSimpleSect::Remark: + m_t << theTranslator->trRemarks(); break; + case DocSimpleSect::Attention: + m_t << theTranslator->trAttention(); break; + case DocSimpleSect::User: break; + case DocSimpleSect::Rcs: break; + case DocSimpleSect::Unknown: break; + } + + // special case 1: user defined title + if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs) + { + m_t << ":"; + m_t << "\\par"; + m_t << "}"; // end bold + incIndentLevel(); + m_t << rtf_Style_Reset << getStyle("DescContinue"); + } + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocSimpleSect *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n"); + if (!m_lastIsPara) m_t << "\\par" << endl; + decIndentLevel(); + m_t << "}"; // end desc + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocTitle *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocTitle)}\n"); +} + +void RTFDocVisitor::visitPost(DocTitle *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocTitle)}\n"); + m_t << "\\par" << endl; + m_t << "}"; // end bold + incIndentLevel(); + m_t << rtf_Style_Reset << getStyle("DescContinue"); + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPre(DocSimpleList *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n"); + m_t << "{" << endl; + rtf_listItemInfo[m_indentLevel].isEnum = FALSE; + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocSimpleList *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n"); + if (!m_lastIsPara) m_t << "\\par" << endl; + m_t << "}" << endl; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocSimpleListItem *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleListItem)}\n"); + m_t << "\\par" << rtf_Style_Reset << getStyle("ListBullet") << endl; + m_lastIsPara=FALSE; + incIndentLevel(); +} + +void RTFDocVisitor::visitPost(DocSimpleListItem *) +{ + decIndentLevel(); + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleListItem)}\n"); +} + +void RTFDocVisitor::visitPre(DocSection *s) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSection)}\n"); + if (!m_lastIsPara) m_t << "\\par" << endl; + m_t << "{\\bkmkstart " << rtfFormatBmkStr(s->file()+"_"+s->anchor()) << "}" << endl; + m_t << "{\\bkmkend " << rtfFormatBmkStr(s->file()+"_"+s->anchor()) << "}" << endl; + m_t << "{{" // start section + << rtf_Style_Reset; + QCString heading; + int level = QMIN(s->level()+1,4); + heading.sprintf("Heading%d",level); + // set style + m_t << rtf_Style[heading]->reference << endl; + // make table of contents entry + filter(s->title()); + m_t << endl << "\\par" << "}" << endl; + m_t << "{\\tc\\tcl" << level << " \\v "; + filter(s->title()); + m_t << "}" << endl; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPost(DocSection *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSection)}\n"); + m_t << "\\par}" << endl; // end section + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocHtmlList *l) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlList)}\n"); + m_t << "{" << endl; + rtf_listItemInfo[m_indentLevel].isEnum = l->type()==DocHtmlList::Ordered; + rtf_listItemInfo[m_indentLevel].number = 1; + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocHtmlList *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlList)}\n"); + m_t << "\\par" << "}" << endl; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocHtmlListItem *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlListItem)}\n"); + m_t << "\\par" << endl; + m_t << rtf_Style_Reset; + if (rtf_listItemInfo[m_indentLevel].isEnum) + { + m_t << getStyle("ListEnum") << endl; + m_t << rtf_listItemInfo[m_indentLevel].number << ".\\tab "; + rtf_listItemInfo[m_indentLevel].number++; + } + else + { + m_t << getStyle("ListBullet") << endl; + } + incIndentLevel(); + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocHtmlListItem *) +{ + decIndentLevel(); + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlListItem)}\n"); +} + +void RTFDocVisitor::visitPre(DocHtmlDescList *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescList)}\n"); + //m_t << "{" << endl; + //m_t << rtf_Style_Reset << getStyle("ListContinue"); + //m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocHtmlDescList *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescList)}\n"); + //m_t << "}" << endl; + //m_t << "\\par" << endl; + //m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocHtmlDescTitle *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescTitle)}\n"); + //m_t << "\\par" << endl; + //m_t << "{\\b "; + m_t << "{" << rtf_Style["Heading5"]->reference << endl; + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocHtmlDescTitle *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescTitle)}\n"); + m_t << "\\par" << endl; + m_t << "}" << endl; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocHtmlDescData *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescData)}\n"); + incIndentLevel(); + m_t << "{" << rtf_Style_Reset << getStyle("DescContinue"); +} + +void RTFDocVisitor::visitPost(DocHtmlDescData *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescData)}\n"); + m_t << "\\par"; + m_t << "}" << endl; + decIndentLevel(); + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocHtmlTable *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlTable)}\n"); + if (!m_lastIsPara) m_t << "\\par" << endl; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPost(DocHtmlTable *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlTable)}\n"); + m_t << "\\pard" << endl; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocHtmlCaption *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlCaption)}\n"); +} + +void RTFDocVisitor::visitPost(DocHtmlCaption *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCaption)}\n"); +} + +void RTFDocVisitor::visitPre(DocHtmlRow *r) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlRow)}\n"); + uint i,columnWidth=r->numCells()>0 ? rtf_pageWidth/r->numCells() : 10; + m_t << "\\trowd \\trgaph108\\trleft-108" + "\\trbrdrt\\brdrs\\brdrw10 " + "\\trbrdrl\\brdrs\\brdrw10 " + "\\trbrdrb\\brdrs\\brdrw10 " + "\\trbrdrr\\brdrs\\brdrw10 " + "\\trbrdrh\\brdrs\\brdrw10 " + "\\trbrdrv\\brdrs\\brdrw10 "<< endl; + for (i=0;i<r->numCells();i++) + { + m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 " + "\\clbrdrl\\brdrs\\brdrw10 " + "\\clbrdrb\\brdrs\\brdrw10 " + "\\clbrdrr \\brdrs\\brdrw10 " + "\\cltxlrtb " + "\\cellx" << ((i+1)*columnWidth) << endl; + } + m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl; + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocHtmlRow *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlRow)}\n"); + m_t << endl; + m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl; + m_t << "{\\row }" << endl; + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPre(DocHtmlCell *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlCell)}\n"); + m_t << "{"; + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocHtmlCell *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCell)}\n"); + m_t << "\\cell }"; + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPre(DocInternal *) +{ + if (m_hide) return; + //DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternal)}\n"); + //m_t << "{"; // start desc + //m_t << "{\\b "; // start bold + //m_t << theTranslator->trForInternalUseOnly(); + //m_t << "}"; // end bold + //m_t << "\\par" << endl; + //incIndentLevel(); + //m_t << rtf_Style_Reset << getStyle("DescContinue"); + //m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocInternal *) +{ + if (m_hide) return; + //DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternal)}\n"); + //m_t << "\\par"; + //decIndentLevel(); + //m_t << "}"; // end desc + //m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocHRef *href) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHRef)}\n"); + if (Config_getBool("RTF_HYPERLINKS")) + { + m_t << "{\\field " + "{\\*\\fldinst " + "{ HYPERLINK \\\\l \"" << href->url() << "\" " + "}{}" + "}" + "{\\fldrslt " + "{\\cs37\\ul\\cf2 "; + + } + else + { + m_t << "{\\f2 "; + } + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocHRef *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHRef)}\n"); + if (Config_getBool("RTF_HYPERLINKS")) + { + m_t << "}" + "}" + "}"; + } + else + { + m_t << "}"; + } + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPre(DocHtmlHeader *header) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlHeader)}\n"); + m_t << "{" // start section + << rtf_Style_Reset; + QCString heading; + int level = QMIN(header->level()+2,4); + heading.sprintf("Heading%d",level); + // set style + m_t << rtf_Style[heading]->reference; + // make table of contents entry + m_t << "{\\tc\\tcl \\v " << level << "}"; + m_lastIsPara=FALSE; + +} + +void RTFDocVisitor::visitPost(DocHtmlHeader *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlHeader)}\n"); + m_t << "\\par"; + m_t << "}" << endl; // end section + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocImage *img) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocImage)}\n"); + if (img->type()==DocImage::Rtf) + { + m_t << "\\par" << endl; + m_t << "{" << endl; + m_t << rtf_Style_Reset << endl; + m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; + m_t << img->name(); + m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; + m_t << "}" << endl; + m_lastIsPara=TRUE; + } + else // other format -> skip + { + } + // hide caption since it is not supported at the moment + pushEnabled(); + m_hide=TRUE; +} + +void RTFDocVisitor::visitPost(DocImage *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocImage)}\n"); + popEnabled(); +} + +void RTFDocVisitor::visitPre(DocDotFile *df) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocDotFile)}\n"); + writeDotFile(df->file()); + + // hide caption since it is not supported at the moment + pushEnabled(); + m_hide=TRUE; +} + +void RTFDocVisitor::visitPost(DocDotFile *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocDotFile)}\n"); + popEnabled(); +} +void RTFDocVisitor::visitPre(DocMscFile *df) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocMscFile)}\n"); + writeMscFile(df->file()); + + // hide caption since it is not supported at the moment + pushEnabled(); + m_hide=TRUE; +} + +void RTFDocVisitor::visitPost(DocMscFile *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocMscFile)}\n"); + popEnabled(); +} + +void RTFDocVisitor::visitPre(DocLink *lnk) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocLink)}\n"); + startLink(lnk->ref(),lnk->file(),lnk->anchor()); +} + +void RTFDocVisitor::visitPost(DocLink *lnk) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocLink)}\n"); + endLink(lnk->ref()); +} + +void RTFDocVisitor::visitPre(DocRef *ref) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRef)}\n"); + if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor()); + if (!ref->hasLinkText()) filter(ref->targetTitle()); +} + +void RTFDocVisitor::visitPost(DocRef *ref) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRef)}\n"); + if (!ref->file().isEmpty()) endLink(ref->ref()); + //m_t << " "; +} + + +void RTFDocVisitor::visitPre(DocSecRefItem *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefItem)}\n"); +} + +void RTFDocVisitor::visitPost(DocSecRefItem *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefItem)}\n"); +} + +void RTFDocVisitor::visitPre(DocSecRefList *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefList)}\n"); + m_t << "{" << endl; + incIndentLevel(); + m_t << rtf_Style_Reset << getStyle("LatexTOC") << endl; + m_t << "\\par" << endl; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPost(DocSecRefList *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefList)}\n"); + decIndentLevel(); + m_t << "\\par"; + m_t << "}" << endl; + m_lastIsPara=TRUE; +} + +//void RTFDocVisitor::visitPre(DocLanguage *l) +//{ +// DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocLanguage)}\n"); +// QCString langId = Config_getEnum("OUTPUT_LANGUAGE"); +// if (l->id().lower()!=langId.lower()) +// { +// pushEnabled(); +// m_hide = TRUE; +// } +//} +// +//void RTFDocVisitor::visitPost(DocLanguage *l) +//{ +// DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocLanguage)}\n"); +// QCString langId = Config_getEnum("OUTPUT_LANGUAGE"); +// if (l->id().lower()!=langId.lower()) +// { +// popEnabled(); +// } +//} + +void RTFDocVisitor::visitPre(DocParamSect *s) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamSect)}\n"); + m_t << "{"; // start param list + if (!m_lastIsPara) m_t << "\\par" << endl; + //m_t << "{\\b "; // start bold + m_t << "{" << rtf_Style["Heading5"]->reference << endl; + switch(s->type()) + { + case DocParamSect::Param: + m_t << theTranslator->trParameters(); break; + case DocParamSect::RetVal: + m_t << theTranslator->trReturnValues(); break; + case DocParamSect::Exception: + m_t << theTranslator->trExceptions(); break; + case DocParamSect::TemplateParam: + /* TODO: add this + m_t << theTranslator->trTemplateParam(); break; + */ + m_t << "Template Parameters"; break; + default: + ASSERT(0); + } + m_t << ":"; + m_t << "\\par"; + m_t << "}" << endl; + bool useTable = s->type()==DocParamSect::Param || + s->type()==DocParamSect::RetVal || + s->type()==DocParamSect::Exception || + s->type()==DocParamSect::TemplateParam; + if (!useTable) + { + incIndentLevel(); + } + m_t << rtf_Style_Reset << getStyle("DescContinue"); + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPost(DocParamSect *s) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamSect)}\n"); + //m_t << "\\par" << endl; + bool useTable = s->type()==DocParamSect::Param || + s->type()==DocParamSect::RetVal || + s->type()==DocParamSect::Exception || + s->type()==DocParamSect::TemplateParam; + if (!useTable) + { + decIndentLevel(); + } + m_t << "}" << endl; +} + +void RTFDocVisitor::visitPre(DocParamList *pl) +{ + static int columnPos[4][5] = + { { 2, 25, 100, 100, 100 }, // no inout, no type + { 3, 14, 35, 100, 100 }, // inout, no type + { 3, 25, 50, 100, 100 }, // no inout, type + { 4, 14, 35, 55, 100 }, // no inout, type + }; + int config=0; + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamList)}\n"); + + DocParamSect::Type parentType = DocParamSect::Unknown; + DocParamSect *sect = 0; + if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect) + { + parentType = ((DocParamSect*)pl->parent())->type(); + sect=(DocParamSect*)pl->parent(); + } + bool useTable = parentType==DocParamSect::Param || + parentType==DocParamSect::RetVal || + parentType==DocParamSect::Exception || + parentType==DocParamSect::TemplateParam; + if (sect && sect->hasInOutSpecifier()) config+=1; + if (sect && sect->hasTypeSpecifier()) config+=2; + if (useTable) + { + int i; + m_t << "\\trowd \\trgaph108\\trleft426\\tblind426" + "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 " + "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 " + "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 " + "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 " + "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 " + "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<< endl; + for (i=0;i<columnPos[config][0];i++) + { + m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 " + "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 " + "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 " + "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 " + "\\cltxlrtb " + "\\cellx" << (rtf_pageWidth*columnPos[config][i+1]/100) << endl; + } + m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl; + } + + if (sect && sect->hasInOutSpecifier()) + { + if (useTable) + { + m_t << "{"; + } + + // Put in the direction: in/out/in,out if specified. + if (pl->direction()!=DocParamSect::Unspecified) + { + if (pl->direction()==DocParamSect::In) + { + m_t << "in"; + } + else if (pl->direction()==DocParamSect::Out) + { + m_t << "out"; + } + else if (pl->direction()==DocParamSect::InOut) + { + m_t << "in,out"; + } + } + + if (useTable) + { + m_t << "\\cell }"; + } + } + + if (sect && sect->hasTypeSpecifier()) + { + if (useTable) + { + m_t << "{"; + } + QListIterator<DocNode> li(pl->paramTypes()); + DocNode *type; + bool first=TRUE; + for (li.toFirst();(type=li.current());++li) + { + if (!first) m_t << " | "; else first=FALSE; + if (type->kind()==DocNode::Kind_Word) + { + visit((DocWord*)type); + } + else if (type->kind()==DocNode::Kind_LinkedWord) + { + visit((DocLinkedWord*)type); + } + } + if (useTable) + { + m_t << "\\cell }"; + } + } + + + if (useTable) + { + m_t << "{"; + } + + m_t << "{\\i "; + //QStrListIterator li(pl->parameters()); + //const char *s; + QListIterator<DocNode> li(pl->parameters()); + DocNode *param; + bool first=TRUE; + for (li.toFirst();(param=li.current());++li) + { + if (!first) m_t << ","; else first=FALSE; + if (param->kind()==DocNode::Kind_Word) + { + visit((DocWord*)param); + } + else if (param->kind()==DocNode::Kind_LinkedWord) + { + visit((DocLinkedWord*)param); + } + } + m_t << "} "; + + if (useTable) + { + m_t << "\\cell }{"; + } + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPost(DocParamList *pl) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamList)}\n"); + + DocParamSect::Type parentType = DocParamSect::Unknown; + DocParamSect *sect = 0; + if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect) + { + parentType = ((DocParamSect*)pl->parent())->type(); + sect=(DocParamSect*)pl->parent(); + } + bool useTable = parentType==DocParamSect::Param || + parentType==DocParamSect::RetVal || + parentType==DocParamSect::Exception || + parentType==DocParamSect::TemplateParam; + if (useTable) + { + m_t << "\\cell }" << endl; + //m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl; + m_t << "{\\row }" << endl; + } + else + { + m_t << "\\par" << endl; + } + + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocXRefItem *x) +{ + if (m_hide) return; + bool anonymousEnum = x->file()=="@"; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocXRefItem)}\n"); + m_t << "{"; // start param list + //m_t << "{\\b "; // start bold + m_t << "{" << rtf_Style["Heading5"]->reference << endl; + if (Config_getBool("RTF_HYPERLINKS") && !anonymousEnum) + { + QCString refName; + if (!x->file().isEmpty()) + { + refName+=x->file(); + } + if (!x->file().isEmpty() && !x->anchor().isEmpty()) + { + refName+="_"; + } + if (!x->anchor().isEmpty()) + { + refName+=x->anchor(); + } + + m_t << "{\\field " + "{\\*\\fldinst " + "{ HYPERLINK \\\\l \"" << refName << "\" " + "}{}" + "}" + "{\\fldrslt " + "{\\cs37\\ul\\cf2 "; + filter(x->title()); + m_t << "}" + "}" + "}"; + } + else + { + filter(x->title()); + } + m_t << ":"; + m_t << "\\par"; + m_t << "}"; // end bold + incIndentLevel(); + m_t << rtf_Style_Reset << getStyle("DescContinue"); + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::visitPost(DocXRefItem *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocXRefItem)}\n"); + m_t << "\\par" << endl; + decIndentLevel(); + m_t << "}" << endl; // end xref item + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::visitPre(DocInternalRef *ref) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternalRef)}\n"); + startLink("",ref->file(),ref->anchor()); +} + +void RTFDocVisitor::visitPost(DocInternalRef *) +{ + if (m_hide) return; + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternalRef)}\n"); + endLink(""); + m_t << " "; +} + +void RTFDocVisitor::visitPre(DocCopy *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocCopy)}\n"); +} + +void RTFDocVisitor::visitPost(DocCopy *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocCopy)}\n"); +} + +void RTFDocVisitor::visitPre(DocText *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocText)}\n"); +} + +void RTFDocVisitor::visitPost(DocText *) +{ + DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocText)}\n"); +} + +//static char* getMultiByte(int c) +//{ +// static char s[10]; +// sprintf(s,"\\'%X",c); +// return s; +//} + +void RTFDocVisitor::filter(const char *str,bool verbatim) +{ + if (str) + { + const unsigned char *p=(const unsigned char *)str; + unsigned char c; + unsigned char pc='\0'; + while (*p) + { + //static bool MultiByte = FALSE; + c=*p++; + + //if ( MultiByte ) + //{ + // m_t << getMultiByte( c ); + // MultiByte = FALSE; + // continue; + //} + //if ( c >= 0x80 ) + //{ + // MultiByte = TRUE; + // m_t << getMultiByte( c ); + // continue; + //} + + switch (c) + { + case '{': m_t << "\\{"; break; + case '}': m_t << "\\}"; break; + case '\\': m_t << "\\\\"; break; + case '\n': if (verbatim) + { + m_t << "\\par" << endl; + } + else + { + m_t << '\n'; + } + break; + default: m_t << (char)c; + } + pc = c; + } + } +} + +void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor) +{ + if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS")) + { + QCString refName; + if (!file.isEmpty()) + { + refName+=file; + } + if (anchor) + { + refName+='_'; + refName+=anchor; + } + + m_t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \""; + m_t << rtfFormatBmkStr(refName); + m_t << "\" }{}"; + m_t << "}{\\fldrslt {\\cs37\\ul\\cf2 "; + } + else + { + m_t << "{\\b "; + } + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::endLink(const QCString &ref) +{ + if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS")) + { + m_t << "}}}"; + } + else + { + m_t << "}"; + } + m_lastIsPara=FALSE; +} + +void RTFDocVisitor::pushEnabled() +{ + m_enabled.push(new bool(m_hide)); +} + +void RTFDocVisitor::popEnabled() +{ + bool *v=m_enabled.pop(); + ASSERT(v!=0); + m_hide = *v; + delete v; +} + +void RTFDocVisitor::writeDotFile(const QCString &fileName) +{ + QCString baseName=fileName; + int i; + if ((i=baseName.findRev('/'))!=-1) + { + baseName=baseName.right(baseName.length()-i-1); + } + QCString outDir = Config_getString("RTF_OUTPUT"); + writeDotGraphFromFile(fileName,outDir,baseName,BITMAP); + if (!m_lastIsPara) m_t << "\\par" << endl; + m_t << "{" << endl; + m_t << rtf_Style_Reset; + m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; + m_t << baseName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); + m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; + m_t << "}" << endl; + m_lastIsPara=TRUE; +} + +void RTFDocVisitor::writeMscFile(const QCString &fileName) +{ + QCString baseName=fileName; + int i; + if ((i=baseName.findRev('/'))!=-1) + { + baseName=baseName.right(baseName.length()-i-1); + } + QCString outDir = Config_getString("RTF_OUTPUT"); + writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP); + if (!m_lastIsPara) m_t << "\\par" << endl; + m_t << "{" << endl; + m_t << rtf_Style_Reset; + m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; + m_t << baseName << ".png"; + m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; + m_t << "}" << endl; + m_lastIsPara=TRUE; +} + Index: branches/xZenu/src/util/doxygen/src/eclipsehelp.h =================================================================== --- branches/xZenu/src/util/doxygen/src/eclipsehelp.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/eclipsehelp.h (revision 1322) @@ -0,0 +1,77 @@ +/****************************************************************************** + * + * $Id: htmlgen.h,v 1.51 2001/03/19 19:27:40 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ +/* + * eclipsehelp.h + * + * Created on: 7.11.2009 + * Author: ondrej + */ + +#ifndef ECLIPSEHELP_H +#define ECLIPSEHELP_H + +#include "qtbc.h" +#include "index.h" +#include "ftextstream.h" + +/* -- forward declarations */ +class QFile; + +/*! + * \brief Generator of Eclipse help files + * + * This class generates the Eclipse specific help files. + * These files can be used to generate a help plugin readable + * by the Eclipse IDE. + */ +class EclipseHelp : public IndexIntf +{ + public: + EclipseHelp(); + virtual ~EclipseHelp(); + + /* -- index interface */ + virtual void initialize(); + virtual void finalize(); + virtual void incContentsDepth(); + virtual void decContentsDepth(); + virtual void addContentsItem(bool isDir, const char *name, const char *ref = 0, + const char *file = 0, const char *anchor = 0); + virtual void addIndexItem(Definition *context,MemberDef *md,const char *title); + virtual void addIndexFile(const char *name); + virtual void addImageFile(const char *name); + virtual void addStyleSheetFile(const char *name); + + private: + int m_depth; + bool m_endtag; + + QFile * m_tocfile; + FTextStream m_tocstream; + QCString m_pathprefix; + + /* -- avoid copying */ + EclipseHelp(const EclipseHelp &); + EclipseHelp & operator = (const EclipseHelp &); + + /* -- formatting helpers */ + void indent(); + void closedTag(); + void openedTag(); +}; + +#endif /* ECLIPSEHELP_H */ Index: branches/xZenu/src/util/doxygen/src/entry.h =================================================================== --- branches/xZenu/src/util/doxygen/src/entry.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/entry.h (revision 1322) @@ -0,0 +1,450 @@ +/****************************************************************************** + * + * $Id: entry.h,v 1.36 2001/03/19 19:27:40 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef ENTRY_H +#define ENTRY_H + +#include "qtbc.h" +#include <qlist.h> + +#include <qgstring.h> +#include "util.h" + +struct SectionInfo; +class QFile; +class EntryNav; +class FileDef; +class FileStorage; +class StorageIntf; + +enum Protection { Public, Protected, Private, Package } ; +enum Specifier { Normal, Virtual, Pure } ; +enum MethodTypes { Method, Signal, Slot, DCOP, Property, Event }; +enum RelatesType { Simple, Duplicate, MemberOf }; +enum Relationship { Member, Related, Foreign }; + +struct ListItemInfo +{ + QCString type; + int itemId; +}; + +/*! \brief This class stores information about an inheritance relation + */ +struct BaseInfo +{ + /*! Creates an object representing an inheritance relation */ + BaseInfo(const char *n,Protection p,Specifier v) : + name(n),prot(p),virt(v) {} + QCString name; //!< the name of the base class + Protection prot; //!< inheritance type + Specifier virt; //!< virtualness +}; + +/*! \brief This class contains the information about the argument of a + * function or template + * + */ +struct Argument +{ + /*! Construct a new argument. */ + Argument() {} + /*! Copy an argument (does a deep copy of all strings). */ + Argument(const Argument &a) + { + attrib=a.attrib.copy(); + type=a.type.copy(); + name=a.name.copy(); + defval=a.defval.copy(); + docs=a.docs.copy(); + array=a.array.copy(); + } + /*! Assignment of an argument (does a deep copy of all strings). */ + Argument &operator=(const Argument &a) + { + if (this!=&a) + { + attrib=a.attrib.copy(); + type=a.type.copy(); + name=a.name.copy(); + defval=a.defval.copy(); + docs=a.docs.copy(); + array=a.array.copy(); + } + return *this; + } + /*! return TRUE if this argument is documentation and the argument has a + * non empty name. + */ + bool hasDocumentation() const + { + return !name.isEmpty() && !docs.isEmpty(); + } + + QCString attrib; /*!< Argument's attribute (IDL only) */ + QCString type; /*!< Argument's type */ + QCString canType; /*!< Cached value of canonical type (after type resolution). Empty initially. */ + QCString name; /*!< Argument's name (may be empty) */ + QCString array; /*!< Argument's array specifier (may be empty) */ + QCString defval; /*!< Argument's default value (may be empty) */ + QCString docs; /*!< Argument's documentation (may be empty) */ +}; + +/*! \brief This class represents an function or template argument list. + * + * This class also stores some information about member that is typically + * put after the argument list, such as wether the member is const, + * volatile or pure virtual. + */ +class ArgumentList : public QList<Argument> +{ + public: + /*! Creates an empty argument list */ + ArgumentList() : QList<Argument>(), + constSpecifier(FALSE), + volatileSpecifier(FALSE), + pureSpecifier(FALSE) + { setAutoDelete(TRUE); } + /*! Destroys the argument list */ + ~ArgumentList() {} + bool hasDocumentation() const; + /*! Does the member modify the state of the class? default: FALSE. */ + bool constSpecifier; + /*! Is the member volatile? default: FALSE. */ + bool volatileSpecifier; + /*! Is this a pure virtual member? default: FALSE */ + bool pureSpecifier; +}; + +typedef QListIterator<Argument> ArgumentListIterator; + +/*! \brief This struct is used to capture the tag file information + * for an Entry. + */ +struct TagInfo +{ + QCString tagName; + QCString fileName; + QCString anchor; +}; + +struct Grouping +{ + enum GroupPri_t + { + GROUPING_LOWEST, + GROUPING_AUTO_WEAK = + GROUPING_LOWEST, //!< membership in group was defined via \@weakgroup + GROUPING_AUTO_ADD, //!< membership in group was defined via \@add[to]group + GROUPING_AUTO_DEF, //!< membership in group was defined via \@defgroup + GROUPING_AUTO_HIGHEST = GROUPING_AUTO_DEF, + GROUPING_INGROUP, //!< membership in group was defined by \@ingroup + GROUPING_HIGHEST = GROUPING_INGROUP + }; + + static const char *getGroupPriName( GroupPri_t priority ) + { + switch( priority ) + { + case GROUPING_AUTO_WEAK: + return "@weakgroup"; + case GROUPING_AUTO_ADD: + return "@addtogroup"; + case GROUPING_AUTO_DEF: + return "@defgroup"; + case GROUPING_INGROUP: + return "@ingroup"; + } + return "???"; + } + + Grouping( const char *gn, GroupPri_t p ) : groupname(gn), pri(p) {} + Grouping( const Grouping &g ) : groupname(g.groupname), pri(g.pri) {} + QCString groupname; //!< name of the group + GroupPri_t pri; //!< priority of this definition + +}; + +/*! \brief Represents an unstructured piece of information, about an + * entity found in the sources. + * + * parseMain() in scanner.l will generate a tree of these + * entries. + */ +class Entry +{ + public: + + /*! Kind of entries that are supported */ + enum Sections { + CLASS_SEC = 0x00000001, + NAMESPACE_SEC = 0x00000010, + COMPOUND_MASK = CLASS_SEC, + SCOPE_MASK = COMPOUND_MASK | NAMESPACE_SEC, + + CLASSDOC_SEC = 0x00000800, + STRUCTDOC_SEC = 0x00001000, + UNIONDOC_SEC = 0x00002000, + EXCEPTIONDOC_SEC = 0x00004000, + NAMESPACEDOC_SEC = 0x00008000, + INTERFACEDOC_SEC = 0x00010000, + PROTOCOLDOC_SEC = 0x00020000, + CATEGORYDOC_SEC = 0x00040000, + COMPOUNDDOC_MASK = CLASSDOC_SEC | STRUCTDOC_SEC | UNIONDOC_SEC | + INTERFACEDOC_SEC | EXCEPTIONDOC_SEC | PROTOCOLDOC_SEC | + CATEGORYDOC_SEC, + + SOURCE_SEC = 0x00400000, + HEADER_SEC = 0x00800000, + FILE_MASK = SOURCE_SEC | HEADER_SEC, + + ENUMDOC_SEC = 0x01000000, + ENUM_SEC = 0x02000000, + EMPTY_SEC = 0x03000000, + PAGEDOC_SEC = 0x04000000, + VARIABLE_SEC = 0x05000000, + FUNCTION_SEC = 0x06000000, + TYPEDEF_SEC = 0x07000000, + MEMBERDOC_SEC = 0x08000000, + OVERLOADDOC_SEC = 0x09000000, + EXAMPLE_SEC = 0x0a000000, + VARIABLEDOC_SEC = 0x0b000000, + FILEDOC_SEC = 0x0c000000, + DEFINEDOC_SEC = 0x0d000000, + INCLUDE_SEC = 0x0e000000, + DEFINE_SEC = 0x0f000000, + GROUPDOC_SEC = 0x10000000, + USINGDIR_SEC = 0x11000000, + MAINPAGEDOC_SEC = 0x12000000, + MEMBERGRP_SEC = 0x13000000, + USINGDECL_SEC = 0x14000000, + PACKAGE_SEC = 0x15000000, + PACKAGEDOC_SEC = 0x16000000, + OBJCIMPL_SEC = 0x17000000, + DIRDOC_SEC = 0x18000000 + }; + enum MemberSpecifier + { + Inline = 0x000001, + Explicit = 0x000002, + Mutable = 0x000004, + Settable = 0x000008, + Gettable = 0x000010, + Readable = 0x000020, + Writable = 0x000040, + Final = 0x000080, + Abstract = 0x000100, + Addable = 0x000200, + Removable = 0x000400, + Raisable = 0x000800, + Override = 0x001000, + New = 0x002000, + Sealed = 0x004000, + Initonly = 0x008000, + Optional = 0x010000, + Required = 0x020000, + NonAtomic = 0x040000, + Copy = 0x080000, + Retain = 0x100000, + Assign = 0x200000 + }; + enum ClassSpecifier + { + Template = 0x0001, + Generic = 0x0002, + Ref = 0x0004, + Value = 0x0008, + Interface = 0x0010, + Struct = 0x0020, + Union = 0x0040, + Exception = 0x0080, + Protocol = 0x0100, + Category = 0x0200, + SealedClass = 0x0400, + AbstractClass = 0x0800 + }; + enum GroupDocType + { + GROUPDOC_NORMAL, //!< defgroup + GROUPDOC_ADD, //!< addgroup + GROUPDOC_WEAK //!< weakgroup + }; //!< kind of group + + Entry(); + Entry(const Entry &); + ~Entry(); + int getSize(); + void addSpecialListItem(const char *listName,int index); + void createNavigationIndex(EntryNav *rootNav,FileStorage *storage,FileDef *fd); + + // while parsing a file these function can be used to navigate/build the tree + void setParent(Entry *parent) { m_parent = parent; } + Entry *parent() const { return m_parent; } + const QList<Entry> *children() const { return m_sublist; } + + /*! Adds entry \e as a child to this entry */ + void addSubEntry (Entry* e) ; + /*! Restore the state of this Entry to the default value it has + * at construction time. + */ + void reset(); + void marshall(StorageIntf *); + void unmarshall(StorageIntf *); + + public: + + // identification + int section; //!< entry type (see Sections); + QCString type; //!< member type + QCString name; //!< member name + TagInfo *tagInfo; //!< tag file info + + // content + Protection protection; //!< class protection + MethodTypes mtype; //!< signal, slot, (dcop) method, or property? + int spec; //!< class/member specifiers + int initLines; //!< define/variable initializer lines to show + bool stat; //!< static ? + bool explicitExternal; //!< explicitly defined as external? + bool proto; //!< prototype ? + bool subGrouping; //!< automatically group class members? + bool callGraph; //!< do we need to draw the call graph? + bool callerGraph; //!< do we need to draw the caller graph? + Specifier virt; //!< virtualness of the entry + QCString args; //!< member argument string + QCString bitfields; //!< member's bit fields + ArgumentList *argList; //!< member arguments as a list + QList<ArgumentList> *tArgLists; //!< template argument declarations + QGString program; //!< the program text + QGString initializer; //!< initial value (for variables) + QCString includeFile; //!< include file (2 arg of \\class, must be unique) + QCString includeName; //!< include name (3 arg of \\class) + QCString doc; //!< documentation block (partly parsed) + int docLine; //!< line number at which the documentation was found + QCString docFile; //!< file in which the documentation was found + QCString brief; //!< brief description (doc block) + int briefLine; //!< line number at which the brief desc. was found + QCString briefFile; //!< file in which the brief desc. was found + QCString inbodyDocs; //!< documentation inside the body of a function + int inbodyLine; //!< line number at which the body doc was found + QCString inbodyFile; //!< file in which the body doc was found + QCString relates; //!< related class (doc block) + RelatesType relatesType; //!< how relates is handled + QCString read; //!< property read accessor + QCString write; //!< property write accessor + QCString inside; //!< name of the class in which documents are found + QCString exception; //!< throw specification + ArgumentList *typeConstr; //!< where clause (C#) for type constraints + int bodyLine; //!< line number of the definition in the source + int endBodyLine; //!< line number where the definition ends + int mGrpId; //!< member group id + QList<BaseInfo> *extends; //!< list of base classes + QList<Grouping> *groups; //!< list of groups this entry belongs to + QList<SectionInfo> *anchors; //!< list of anchors defined in this entry + QCString fileName; //!< file this entry was extracted from + int startLine; //!< start line of entry in the source + QList<ListItemInfo> *sli; //!< special lists (test/todo/bug/deprecated/..) this entry is in + SrcLangExt lang; //!< programming language in which this entry was found + bool hidden; //!< does this represent an entity that is hidden from the output + bool artificial; //!< Artificially introduced item + GroupDocType groupDocType; + + static int num; //!< counts the total number of entries + + /// return the command name used to define GROUPDOC_SEC + const char *groupDocCmd() const + { + switch( groupDocType ) + { + case GROUPDOC_NORMAL: return "\\defgroup"; + case GROUPDOC_ADD: return "\\addgroup"; + case GROUPDOC_WEAK: return "\\weakgroup"; + default: return "unknown group command"; + } + } + Grouping::GroupPri_t groupingPri() const + { + if( section != GROUPDOC_SEC ) + { + return Grouping::GROUPING_LOWEST; + } + switch( groupDocType ) + { + case GROUPDOC_NORMAL: return Grouping::GROUPING_AUTO_DEF; + case GROUPDOC_ADD: return Grouping::GROUPING_AUTO_ADD; + case GROUPDOC_WEAK: return Grouping::GROUPING_AUTO_WEAK; + default: return Grouping::GROUPING_LOWEST; + } + } + + private: + void createSubtreeIndex(EntryNav *nav,FileStorage *storage,FileDef *fd); + Entry *m_parent; //!< parent node in the tree + QList<Entry> *m_sublist; //!< entries that are children of this one + Entry &operator=(const Entry &); +}; + +class EntryNav +{ + public: + EntryNav(EntryNav *parent,Entry *e); + ~EntryNav(); + void addChild(EntryNav *); + bool loadEntry(FileStorage *storage); + bool saveEntry(Entry *e,FileStorage *storage); + void setEntry(Entry *e); + void releaseEntry(); + void changeSection(int section) { m_section = section; } + void setFileDef(FileDef *fd) { m_fileDef = fd; } + + Entry *entry() const { return m_info; } + int section() const { return m_section; } + SrcLangExt lang() const { return m_lang; } + const QCString &type() const { return m_type; } + const QCString &name() const { return m_name; } + TagInfo *tagInfo() const { return m_tagInfo; } + const QList<EntryNav> *children() const { return m_subList; } + EntryNav *parent() const { return m_parent; } + FileDef *fileDef() const { return m_fileDef; } + + private: + + // navigation + EntryNav *m_parent; //!< parent node in the tree + QList<EntryNav> *m_subList; //!< entries that are children of this one + + // identification + int m_section; //!< entry type (see Sections); + QCString m_type; //!< member type + QCString m_name; //!< member name + TagInfo *m_tagInfo; //!< tag file info + FileDef *m_fileDef; + SrcLangExt m_lang; //!< programming language in which this entry was found + + Entry *m_info; + int64 m_offset; + bool m_noLoad; +}; + + +typedef QList<Entry> EntryList; +typedef QListIterator<Entry> EntryListIterator; + +typedef QList<EntryNav> EntryNavList; +typedef QListIterator<EntryNav> EntryNavListIterator; + +#endif Index: branches/xZenu/src/util/doxygen/src/navtree.css =================================================================== --- branches/xZenu/src/util/doxygen/src/navtree.css (revision 0) +++ branches/xZenu/src/util/doxygen/src/navtree.css (revision 1322) @@ -0,0 +1,123 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + padding:2px; + margin:0px; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 300px; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background:url("ftv2splitbar.png") repeat scroll right center transparent; + cursor:e-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: ##FA; +} + + + Index: branches/xZenu/src/util/doxygen/src/jquery_ui_js.h =================================================================== --- branches/xZenu/src/util/doxygen/src/jquery_ui_js.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/jquery_ui_js.h (revision 1322) @@ -0,0 +1,32 @@ +"/*\n" +" * jQuery UI 1.7.2\n" +" *\n" +" * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)\n" +" * Dual licensed under the MIT (MIT-LICENSE.txt)\n" +" * and GPL (GPL-LICENSE.txt) licenses.\n" +" *\n" +" * http://docs.jquery.com/UI\n" +" */\n" +"jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:\"1.7.2\",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css(\"overflow\")==\"hidden\"){return false}var j=(k&&k==\"left\")?\"scrollLeft\":\"scrollTop\",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h=\"http://www.w3.org/2005/07/aaa\",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j==\"role\"?(m?f.call(this,k,j,\"wairole:\"+l):(f.apply(this,arguments)||\"\").replace(b,\"\")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,\"aaa:\"),l):f.call(this,k,j.replace(a,\"aaa:\"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,\"\"))}):e.call(this,j))}}c.fn.extend({remove:function(){c(\"*\",this).add(this).each(function(){c(this).triggerHandler(\"remove\")});return i.apply(this,arguments)},enableSelection:function(){return this.attr(\"unselectable\",\"off\").css(\"MozUserSelect\",\"\").unbind(\"selectstart.ui\")},disableSelection:function(){return this.attr(\"unselectable\",\"on\").css(\"MozUserSelect\",\"none\").bind(\"selectstart.ui\",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css(\"position\")))||(/absolute/).test(this.css(\"position\"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,\"position\",1))&&(/(auto|scroll)/).test(c.curCSS(this,\"overflow\",1)+c.curCSS(this,\"overflow-y\",1)+c.curCSS(this,\"overflow-x\",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,\"overflow\",1)+c.curCSS(this,\"overflow-y\",1)+c.curCSS(this,\"overflow-x\",1))}).eq(0)}return(/fixed/).test(this.css(\"position\"))||!j.length?c(document):j}});c.extend(c.expr[\":\"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,\"tabindex\");return(/input|select|textarea|button|object/.test(l)?!k.disabled:\"a\"==l||\"area\"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)[\"area\"==l?\"parents\":\"closest\"](\":hidden\").length},tabbable:function(k){var j=c.attr(k,\"tabindex\");return(isNaN(j)||j>=0)&&c(k).is(\":focusable\")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p==\"string\"?p.split(/,?\\s+/):p)}var j=k(\"getter\");if(l.length==1&&typeof l[0]==\"string\"){j=j.concat(k(\"getterSetter\"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(\".\")[0];k=k.split(\".\")[1];c.fn[k]=function(p){var n=(typeof p==\"string\"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)==\"_\"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+\"-\"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind(\"setData.\"+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind(\"getData.\"+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind(\"remove\",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter=\"option\"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+\"-disabled \"+this.namespace+\"-state-disabled\").removeAttr(\"aria-disabled\")},option:function(l,m){var k=l,j=this;if(typeof l==\"string\"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j==\"disabled\"){this.element[k?\"addClass\":\"removeClass\"](this.widgetBaseClass+\"-disabled \"+this.namespace+\"-state-disabled\").attr(\"aria-disabled\",k)}},enable:function(){this._setData(\"disabled\",false)},disable:function(){this._setData(\"disabled\",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind(\"mousedown.\"+this.widgetName,function(k){return j._mouseDown(k)}).bind(\"click.\"+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr(\"unselectable\");this.element.attr(\"unselectable\",\"on\")}this.started=false},_mouseDestroy:function(){this.element.unbind(\".\"+this.widgetName);(c.browser.msie&&this.element.attr(\"unselectable\",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel==\"string\"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).bind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* * jQuery UI Resizable 1.7.2\n" +" *\n" +" * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)\n" +" * Dual licensed under the MIT (MIT-LICENSE.txt)\n" +" * and GPL (GPL-LICENSE.txt) licenses.\n" +" *\n" +" * http://docs.jquery.com/UI/Resizables\n" +" *\n" +" * Depends:\n" +" * ui.core.js\n" +" */\n" +"(function(c){c.widget(\"ui.resizable\",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass(\"ui-resizable\");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||\"ui-resizable-helper\":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css(\"position\"))&&c.browser.opera){this.element.css({position:\"relative\",top:\"auto\",left:\"auto\"})}this.element.wrap(c('<div class=\"ui-wrapper\" style=\"overflow: hidden;\"></div>').css({position:this.element.css(\"position\"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css(\"top\"),left:this.element.css(\"left\")}));this.element=this.element.parent().data(\"resizable\",this.element.data(\"resizable\"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css(\"marginLeft\"),marginTop:this.originalElement.css(\"marginTop\"),marginRight:this.originalElement.css(\"marginRight\"),marginBottom:this.originalElement.css(\"marginBottom\")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css(\"resize\");this.originalElement.css(\"resize\",\"none\");this._proportionallyResizeElements.push(this.originalElement.css({position:\"static\",zoom:1,display:\"block\"}));this.originalElement.css({margin:this.originalElement.css(\"margin\")});this._proportionallyResize()}this.handles=j.handles||(!c(\".ui-resizable-handle\",this.element).length?\"e,s,se\":{n:\".ui-resizable-n\",e:\".ui-resizable-e\",s:\".ui-resizable-s\",w:\".ui-resizable-w\",se:\".ui-resizable-se\",sw:\".ui-resizable-sw\",ne:\".ui-resizable-ne\",nw:\".ui-resizable-nw\"});if(this.handles.constructor==String){if(this.handles==\"all\"){this.handles=\"n,e,s,w,se,sw,ne,nw\"}var k=this.handles.split(\",\");this.handles={};for(var f=0;f<k.length;f++){var h=c.trim(k[f]),d=\"ui-resizable-\"+h;var g=c('<div class=\"ui-resizable-handle '+d+'\"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if(\"se\"==h){g.addClass(\"ui-icon ui-icon-gripsmall-diagonal-se\")}this.handles[h]=\".ui-resizable-\"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=[\"padding\",/ne|nw|n/.test(m)?\"Top\":/se|sw|s/.test(m)?\"Bottom\":/^e$/.test(m)?\"Right\":\"Left\"].join(\"\");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(\".ui-resizable-handle\",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:\"se\"}});if(j.autoHide){this._handles.hide();c(this.element).addClass(\"ui-resizable-autohide\").hover(function(){c(this).removeClass(\"ui-resizable-autohide\");e._handles.show()},function(){if(!e.resizing){c(this).addClass(\"ui-resizable-autohide\");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass(\"ui-resizable ui-resizable-disabled ui-resizable-resizing\").removeData(\"resizable\").unbind(\".resizable\").find(\".ui-resizable-handle\").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css(\"position\"),width:e.outerWidth(),height:e.outerHeight(),top:e.css(\"top\"),left:e.css(\"left\")})).end().remove()}this.originalElement.css(\"resize\",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(\".ui-draggable\")||(/absolute/).test(d.css(\"position\"))){d.css({position:\"absolute\",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css(\"position\"))){d.css({position:\"relative\",top:\"auto\",left:\"auto\"})}this._renderProxy();var j=b(this.helper.css(\"left\")),g=b(this.helper.css(\"top\"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio==\"number\")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(\".ui-resizable-\"+this.axis).css(\"cursor\");c(\"body\").css(\"cursor\",h==\"auto\"?this.axis+\"-resize\":h);d.addClass(\"ui-resizable-resizing\");this._propagate(\"start\",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate(\"resize\",d);g.css({top:this.position.top+\"px\",left:this.position.left+\"px\",width:this.size.width+\"px\",height:this.size.height+\"px\"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger(\"resize\",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],\"left\")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css(\"left\"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css(\"top\"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c(\"body\").css(\"cursor\",\"auto\");this.element.removeClass(\"ui-resizable-resizing\");this._propagate(\"stop\",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d==\"sw\"){g.left=i.left+(e.width-g.width);g.top=null}if(d==\"nw\"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidth<k.width),l=a(k.height)&&h.maxHeight&&(h.maxHeight<k.height),g=a(k.width)&&h.minWidth&&(h.minWidth>k.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css(\"borderTopWidth\"),g.css(\"borderRightWidth\"),g.css(\"borderBottomWidth\"),g.css(\"borderLeftWidth\")],h=[g.css(\"paddingTop\"),g.css(\"paddingRight\"),g.css(\"paddingBottom\"),g.css(\"paddingLeft\")];this.borderDif=c.map(d,function(k,m){var l=parseInt(k,10)||0,n=parseInt(h[m],10)||0;return l+n})}if(c.browser.msie&&!(!(c(f).is(\":hidden\")||c(f).parents(\":hidden\").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style=\"overflow:hidden;\"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:\"absolute\",left:this.elementOffset.left-f+\"px\",top:this.elementOffset.top-f+\"px\",zIndex:++h.zIndex});this.helper.appendTo(\"body\").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!=\"resize\"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:\"1.7.2\",eventPrefix:\"resize\",defaults:{alsoResize:false,animate:false,animateDuration:\"slow\",animateEasing:\"swing\",aspectRatio:false,autoHide:false,cancel:\":input,option\",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:\"e,s,se\",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add(\"resizable\",\"alsoResize\",{start:function(e,f){var d=c(this).data(\"resizable\"),g=d.options;_store=function(h){c(h).each(function(){c(this).data(\"resizable-alsoresize\",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css(\"left\"),10),top:parseInt(c(this).css(\"top\"),10)})})};if(typeof(g.alsoResize)==\"object\"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data(\"resizable\"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data(\"resizable-alsoresize\"),o={},n=m&&m.length?m:[\"width\",\"height\",\"top\",\"left\"];c.each(n||[\"width\",\"height\",\"top\",\"left\"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css(\"position\"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:\"absolute\",top:\"auto\",left:\"auto\"})}p.css(o)})};if(typeof(i.alsoResize)==\"object\"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data(\"resizable\");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:\"relative\"})}c(this).removeData(\"resizable-alsoresize-start\")}});c.ui.plugin.add(\"resizable\",\"animate\",{stop:function(h,m){var n=c(this).data(\"resizable\"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],\"left\")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css(\"left\"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css(\"top\"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css(\"width\"),10),height:parseInt(n.element.css(\"height\"),10),top:parseInt(n.element.css(\"top\"),10),left:parseInt(n.element.css(\"left\"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate(\"resize\",h)}})}});c.ui.plugin.add(\"resizable\",\"containment\",{start:function(e,q){var s=c(this).data(\"resizable\"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c([\"Top\",\"Right\",\"Left\",\"Bottom\"]).each(function(p,o){h[p]=b(m.css(\"padding\"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,\"left\")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data(\"resizable\"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css(\"position\"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0))\n" +"{s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css(\"position\"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data(\"resizable\"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css(\"position\"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css(\"position\"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add(\"resizable\",\"ghost\",{start:function(f,g){var d=c(this).data(\"resizable\"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:\"block\",position:\"relative\",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass(\"ui-resizable-ghost\").addClass(typeof h.ghost==\"string\"?h.ghost:\"\");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data(\"resizable\"),g=d.options;if(d.ghost){d.ghost.css({position:\"relative\",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data(\"resizable\"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add(\"resizable\",\"grid\",{resize:function(d,l){var n=c(this).data(\"resizable\"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid==\"number\"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;\n" +"/**\n" +" * jQuery.ScrollTo - Easy element scrolling using jQuery.\n" +" * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com\n" +" * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).\n" +" * Date: 2/8/2008\n" +" * @author Ariel Flesler\n" +" * @version 1.3.2\n" +" */\n" +";(function($){var o=$.scrollTo=function(a,b,c){o.window().scrollTo(a,b,c)};o.defaults={axis:'y',duration:1};o.window=function(){return $($.browser.safari?'body':'html')};$.fn.scrollTo=function(l,m,n){if(typeof m=='object'){n=m;m=0}n=$.extend({},o.defaults,n);m=m||n.speed||n.duration;n.queue=n.queue&&n.axis.length>1;if(n.queue)m/=2;n.offset=j(n.offset);n.over=j(n.over);return this.each(function(){var a=this,b=$(a),t=l,c,d={},w=b.is('html,body');switch(typeof t){case'number':case'string':if(/^([+-]=)?\\d+(px)?$/.test(t)){t=j(t);break}t=$(t,this);case'object':if(t.is||t.style)c=(t=$(t)).offset()}$.each(n.axis.split(''),function(i,f){var P=f=='x'?'Left':'Top',p=P.toLowerCase(),k='scroll'+P,e=a[k],D=f=='x'?'Width':'Height';if(c){d[k]=c[p]+(w?0:e-b.offset()[p]);if(n.margin){d[k]-=parseInt(t.css('margin'+P))||0;d[k]-=parseInt(t.css('border'+P+'Width'))||0}d[k]+=n.offset[p]||0;if(n.over[p])d[k]+=t[D.toLowerCase()]()*n.over[p]}else d[k]=t[p];if(/^\\d+$/.test(d[k]))d[k]=d[k]<=0?0:Math.min(d[k],h(D));if(!i&&n.queue){if(e!=d[k])g(n.onAfterFirst);delete d[k]}});g(n.onAfter);function g(a){b.animate(d,m,n.easing,a&&function(){a.call(this,l)})};function h(D){var b=w?$.browser.opera?document.body:document.documentElement:a;return b['scroll'+D]-b['client'+D]}})};function j(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);\n" +"\n" Index: branches/xZenu/src/util/doxygen/src/code.h =================================================================== --- branches/xZenu/src/util/doxygen/src/code.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/code.h (revision 1322) @@ -0,0 +1,35 @@ +/****************************************************************************** + * + * $Id: code.h,v 1.9 2001/03/19 19:27:39 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef CODE_H +#define CODE_H + +#include "qtbc.h" +#include <stdio.h> + +class CodeOutputInterface; +class FileDef; +class MemberDef; + +void parseCCode(CodeOutputInterface &,const char *,const QCString &, + bool ,const char *,FileDef *fd=0, + int startLine=-1,int endLine=-1,bool inlineFragment=FALSE, + MemberDef *memberDef=0,bool showLineNumbers=TRUE); +void resetCCodeParserState(); +void codeFreeScanner(); + +#endif Index: branches/xZenu/src/util/doxygen/src/libdoxygen.pro =================================================================== --- branches/xZenu/src/util/doxygen/src/libdoxygen.pro (revision 0) +++ branches/xZenu/src/util/doxygen/src/libdoxygen.pro (revision 1322) @@ -0,0 +1,265 @@ +# +# This file was generated from libdoxygen.pro.in on Mon Mar 28 15:09:00 CEST 2011 +# + +# +# $Id: libdoxygen.pro.in,v 1.1 2001/03/19 19:27:41 root Exp $ +# +# Copyright (C) 1997-2011 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. +# +# TMake project file for doxygen + +TEMPLATE = libdoxygen.t +CONFIG = console warn_on staticlib debug +HEADERS = bufstr.h \ + classdef.h \ + classlist.h \ + cmdmapper.h \ + code.h \ + commentcnv.h \ + commentscan.h \ + compound_xsd.h \ + config.h \ + constexp.h \ + cppvalue.h \ + debug.h \ + declinfo.h \ + defargs.h \ + defgen.h \ + define.h \ + definition.h \ + diagram.h \ + dirdef.h \ + docparser.h \ + docsets.h \ + doctokenizer.h \ + docvisitor.h \ + dot.h \ + doxygen.h \ + doxygen_css.h \ + eclipsehelp.h \ + entry.h \ + example.h \ + filedef.h \ + filename.h \ + formula.h \ + ftextstream.h \ + ftvhelp.h \ + groupdef.h \ + htags.h \ + htmlattrib.h \ + htmldocvisitor.h \ + htmlgen.h \ + htmlhelp.h \ + indexlog.h \ + image.h \ + index.h \ + index_xsd.h \ + instdox.h \ + jquery_js.h \ + jquery_ui_js.h \ + sizzle_js.h \ + language.h \ + latexdocvisitor.h \ + latexgen.h \ + layout.h \ + layout_default.h \ + lockingptr.h \ + logos.h \ + mandocvisitor.h \ + mangen.h \ + marshal.h \ + memberdef.h \ + membergroup.h \ + memberlist.h \ + membername.h \ + message.h \ + msc.h \ + namespacedef.h \ + navtree_css.h \ + navtree_js.h \ + objcache.h \ + outputgen.h \ + outputlist.h \ + pagedef.h \ + perlmodgen.h \ + lodepng.h \ + pre.h \ + printdocvisitor.h \ + pycode.h \ + pyscanner.h \ + fortrancode.h \ + fortranscanner.h \ + dbusxmlscanner.h \ + qhp.h \ + qhpxmlwriter.h \ + qtbc.h \ + reflist.h \ + resize_js.h \ + rtfdocvisitor.h \ + rtfgen.h \ + rtfstyle.h \ + scanner.h \ + searchindex.h \ + search_css.h \ + search_js.h \ + search_php.h \ + section.h \ + sortdict.h \ + store.h \ + tagreader.h \ + textdocvisitor.h \ + translator.h \ + translator_adapter.h \ + translator_br.h \ + translator_ca.h \ + translator_cn.h \ + translator_cz.h \ + translator_de.h \ + translator_dk.h \ + translator_en.h \ + translator_es.h \ + translator_fi.h \ + translator_fr.h \ + translator_gr.h \ + translator_hr.h \ + translator_hu.h \ + translator_id.h \ + translator_it.h \ + translator_je.h \ + translator_jp.h \ + translator_ke.h \ + translator_kr.h \ + translator_nl.h \ + translator_no.h \ + translator_mk.h \ + translator_pl.h \ + translator_pt.h \ + translator_ro.h \ + translator_ru.h \ + translator_se.h \ + translator_si.h \ + translator_sk.h \ + translator_sr.h \ + translator_tw.h \ + translator_ua.h \ + translator_vi.h \ + translator_za.h \ + unistd.h \ + util.h \ + version.h \ + vhdlcode.h \ + vhdldocgen.h \ + vhdlscanner.h \ + xmldocvisitor.h \ + xmlgen.h + +SOURCES = ce_lex.cpp \ + ce_parse.cpp \ + classdef.cpp \ + classlist.cpp \ + cmdmapper.cpp \ + code.cpp \ + commentcnv.cpp \ + commentscan.cpp \ + cppvalue.cpp \ + debug.cpp \ + defgen.cpp \ + declinfo.cpp \ + defargs.cpp \ + define.cpp \ + definition.cpp \ + diagram.cpp \ + dirdef.cpp \ + docparser.cpp \ + docsets.cpp \ + doctokenizer.cpp \ + dot.cpp \ + doxygen.cpp \ + eclipsehelp.cpp \ + entry.cpp \ + filedef.cpp \ + filename.cpp \ + formula.cpp \ + ftextstream.cpp \ + ftvhelp.cpp \ + fortrancode.cpp \ + fortranscanner.cpp \ + groupdef.cpp \ + htags.cpp \ + htmldocvisitor.cpp \ + htmlgen.cpp \ + htmlhelp.cpp \ + indexlog.cpp \ + image.cpp \ + index.cpp \ + instdox.cpp \ + language.cpp \ + latexdocvisitor.cpp \ + latexgen.cpp \ + layout.cpp \ + lodepng.cpp \ + logos.cpp \ + mandocvisitor.cpp \ + mangen.cpp \ + marshal.cpp \ + memberdef.cpp \ + membergroup.cpp \ + memberlist.cpp \ + membername.cpp \ + message.cpp \ + msc.cpp \ + namespacedef.cpp \ + objcache.cpp \ + outputgen.cpp \ + outputlist.cpp \ + pagedef.cpp \ + perlmodgen.cpp \ + pre.cpp \ + pycode.cpp \ + pyscanner.cpp \ + qhp.cpp \ + qhpxmlwriter.cpp \ + reflist.cpp \ + rtfdocvisitor.cpp \ + rtfgen.cpp \ + rtfstyle.cpp \ + scanner.cpp \ + searchindex.cpp \ + store.cpp \ + tagreader.cpp \ + textdocvisitor.cpp \ + translator.cpp \ + util.cpp \ + version.cpp \ + vhdlcode.cpp \ + vhdldocgen.cpp \ + vhdlscanner.cpp \ + xmldocvisitor.cpp \ + xmlgen.cpp \ + dbusxmlscanner.cpp \ + +win32:TMAKE_CXXFLAGS += -DQT_NODLL +win32-msvc:TMAKE_CXXFLAGS += -Zm200 +win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti +linux-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti +INCLUDEPATH += ../qtools +#INCLUDEPATH += ../libpng +INCLUDEPATH += ../libmd5 +win32:INCLUDEPATH += . +#win32-g++:INCLUDEPATH = ../qtools /usr/include/libpng12 ../libmd5 +win32-g++:INCLUDEPATH = ../qtools ../libmd5 +DESTDIR = ../lib +TARGET = doxygen +OBJECTS_DIR = ../objects + +TMAKE_MOC = /usr/bin/moc Index: branches/xZenu/src/util/doxygen/src/code.l =================================================================== --- branches/xZenu/src/util/doxygen/src/code.l (revision 0) +++ branches/xZenu/src/util/doxygen/src/code.l (revision 1322) @@ -0,0 +1,3473 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +%{ + +/* + * includes + */ +#include <stdio.h> +#include <assert.h> +#include <ctype.h> +#include <qregexp.h> +#include <qdir.h> + +#include "qtbc.h" +#include "entry.h" +#include "doxygen.h" +#include "message.h" +#include "outputlist.h" +#include "util.h" +#include "membername.h" +#include "searchindex.h" + +#define YY_NEVER_INTERACTIVE 1 + +// Toggle for some debugging info +//#define DBG_CTX(x) fprintf x +#define DBG_CTX(x) do { } while(0) + +#define CLASSBLOCK (int *)4 +#define SCOPEBLOCK (int *)8 +#define INNERBLOCK (int *)12 + +/* ----------------------------------------------------------------- + * statics + */ + +static CodeOutputInterface * g_code; + +static ClassSDict *g_codeClassSDict = 0; +static QCString g_curClassName; +static QStrList g_curClassBases; + +static QCString g_parmType; +static QCString g_parmName; + +static const char * g_inputString; //!< the code fragment as text +static int g_inputPosition; //!< read offset during parsing +static int g_inputLines; //!< number of line in the code fragment +static int g_yyLineNr; //!< current line number +static bool g_needsTermination; + +static bool g_exampleBlock; +static QCString g_exampleName; +static QCString g_exampleFile; + +static bool g_insideTemplate = FALSE; +static QCString g_type; +static QCString g_name; +static QCString g_args; +static QCString g_classScope; +static QCString g_realScope; +static QStack<int> g_scopeStack; //!< 1 if bracket starts a scope, + // 2 for internal blocks +static int g_anchorCount; +static FileDef * g_sourceFileDef; +static bool g_lineNumbers; +static Definition * g_currentDefinition; +static MemberDef * g_currentMemberDef; +static bool g_includeCodeFragment; +static const char * g_currentFontClass; +static bool g_searchingForBody; +static bool g_insideBody; +static int g_bodyCurlyCount; +static QCString g_saveName; +static QCString g_saveType; + +static int g_bracketCount = 0; +static int g_curlyCount = 0; +static int g_sharpCount = 0; +static bool g_inFunctionTryBlock = FALSE; +static bool g_inForEachExpression = FALSE; + +static int g_lastTemplCastContext; +static int g_lastSpecialCContext; +static int g_lastStringContext; +static int g_lastSkipCppContext; +static int g_lastVerbStringContext; +static int g_memCallContext; +static int g_lastCContext; + +static bool g_insideObjC; +static bool g_insideProtocolList; + +static bool g_lexInit = FALSE; + +static QStack<int> g_classScopeLengthStack; + +// context for an Objective-C method call +struct ObjCCallCtx +{ + int id; + QCString methodName; + QCString objectTypeOrName; + ClassDef *objectType; + MemberDef *objectVar; + MemberDef *method; + QCString format; + int lexState; + int braceCount; +}; + +// globals for objective-C method calls +static ObjCCallCtx *g_currentCtx=0; +static int g_currentCtxId=0; +static int g_currentNameId=0; +static int g_currentObjId=0; +static int g_currentWordId=0; +static QStack<ObjCCallCtx> g_contextStack; +static QIntDict<ObjCCallCtx> g_contextDict; +static QIntDict<QCString> g_nameDict; +static QIntDict<QCString> g_objectDict; +static QIntDict<QCString> g_wordDict; +static int g_braceCount=0; + +static void saveObjCContext(); +static void restoreObjCContext(); + + + +//------------------------------------------------------------------- + +/*! Represents a stack of variable to class mappings as found in the + * code. Each scope is enclosed in pushScope() and popScope() calls. + * Variables are added by calling addVariables() and one can search + * for variable using findVariable(). + */ +class VariableContext +{ + public: + static const ClassDef *dummyContext; + + class Scope : public SDict<ClassDef> + { + public: + Scope() : SDict<ClassDef>(17) {} + }; + + VariableContext() + { + m_scopes.setAutoDelete(TRUE); + } + virtual ~VariableContext() + { + } + + void pushScope() + { + m_scopes.append(new Scope); + DBG_CTX((stderr,"** Push var context %d\n",m_scopes.count())); + } + + void popScope() + { + if (m_scopes.count()>0) + { + DBG_CTX((stderr,"** Pop var context %d\n",m_scopes.count())); + m_scopes.remove(m_scopes.count()-1); + } + else + { + DBG_CTX((stderr,"** ILLEGAL: Pop var context\n")); + } + } + + void clear() + { + m_scopes.clear(); + m_globalScope.clear(); + } + + void clearExceptGlobal() + { + DBG_CTX((stderr,"** Clear var context\n")); + m_scopes.clear(); + } + + void addVariable(const QCString &type,const QCString &name); + ClassDef *findVariable(const QCString &name); + + int count() const { return m_scopes.count(); } + + private: + Scope m_globalScope; + QList<Scope> m_scopes; +}; + +void VariableContext::addVariable(const QCString &type,const QCString &name) +{ + //printf("VariableContext::addVariable(%s,%s)\n",type.data(),name.data()); + QCString ltype = type.simplifyWhiteSpace(); + QCString lname = name.simplifyWhiteSpace(); + if (ltype.left(7)=="struct ") + { + ltype = ltype.right(ltype.length()-7); + } + else if (ltype.left(6)=="union ") + { + ltype = ltype.right(ltype.length()-6); + } + if (ltype.isEmpty() || lname.isEmpty()) return; + DBG_CTX((stderr,"** addVariable trying: type='%s' name='%s' g_currentDefinition=%s\n", + ltype.data(),lname.data(),g_currentDefinition?g_currentDefinition->name().data():"<none>")); + Scope *scope = m_scopes.count()==0 ? &m_globalScope : m_scopes.getLast(); + ClassDef *varType; + int i=0; + if ( + (varType=g_codeClassSDict->find(ltype)) || // look for class definitions inside the code block + (varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,ltype)) // look for global class definitions + ) + { + DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",ltype.data(),lname.data())); + scope->append(lname,varType); // add it to a list + } + else if ((i=ltype.find('<'))!=-1) + { + // probably a template class + QCString typeName(ltype.left(i)); + ClassDef* newDef = 0; + QCString templateArgs(ltype.right(ltype.length() - i)); + if ( + ( // look for class definitions inside the code block + (varType=g_codeClassSDict->find(typeName)) || + // otherwise look for global class definitions + (varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,typeName)) + ) && // and it must be a template + varType->templateArguments()) + { + newDef = varType->getVariableInstance( templateArgs ); + } + if (newDef) + { + DBG_CTX((stderr,"** addVariable type='%s' templ='%s' name='%s'\n",typeName.data(),templateArgs.data(),lname.data())); + scope->append(lname, newDef); + } + else + { + // Doesn't seem to be a template. Try just the base name. + addVariable(typeName,name); + } + } + else + { + if (m_scopes.count()>0) // for local variables add a dummy entry so the name + // is hidden to avoid false links to global variables with the same name + // TODO: make this work for namespaces as well! + { + DBG_CTX((stderr,"** addVariable: dummy context for '%s'\n",lname.data())); + scope->append(lname,dummyContext); + } + else + { + DBG_CTX((stderr,"** addVariable: not adding variable!\n")); + } + } +} + +ClassDef *VariableContext::findVariable(const QCString &name) +{ + if (name.isEmpty()) return 0; + ClassDef *result = 0; + //QListIterator<Scope> sli(m_scopes); + Scope *scope; + QCString key = name; + // search from inner to outer scope + scope = m_scopes.last(); + //for (sli.toLast();(scope=sli.current());--sli) + while (scope) + { + result = scope->find(key); + if (result) + { + DBG_CTX((stderr,"** findVariable(%s)=%p\n",name.data(),result)); + return result; + } + scope = m_scopes.prev(); + } + // nothing found -> also try the global scope + result=m_globalScope.find(name); + DBG_CTX((stderr,"** findVariable(%s)=%p\n",name.data(),result)); + return result; +} + +static VariableContext g_theVarContext; +const ClassDef *VariableContext::dummyContext = (ClassDef*)0x8; + +//------------------------------------------------------------------- + +class CallContext +{ + public: + struct Ctx + { + Ctx() : name(g_name), type(g_type), cd(0) {} + QCString name; + QCString type; + ClassDef *cd; + }; + + CallContext() + { + m_classList.append(new Ctx); + m_classList.setAutoDelete(TRUE); + } + virtual ~CallContext() {} + void setClass(ClassDef *cd) + { + Ctx *ctx = m_classList.getLast(); + if (ctx) + { + DBG_CTX((stderr,"** Set call context %s (%p)\n",cd==0 ? "<null>" : cd->name().data(),cd)); + ctx->cd=cd; + } + } + void pushScope() + { + m_classList.append(new Ctx); + DBG_CTX((stderr,"** Push call context %d\n",m_classList.count())); + } + void popScope() + { + if (m_classList.count()>1) + { + DBG_CTX((stderr,"** Pop call context %d\n",m_classList.count())); + Ctx *ctx = m_classList.getLast(); + if (ctx) + { + g_name = ctx->name; + g_type = ctx->type; + } + m_classList.removeLast(); + } + else + { + DBG_CTX((stderr,"** ILLEGAL: Pop call context\n")); + } + } + void clear() + { + DBG_CTX((stderr,"** Clear call context\n")); + m_classList.clear(); + m_classList.append(new Ctx); + } + ClassDef *getClass() const + { + Ctx *ctx = m_classList.getLast(); + if (ctx) return ctx->cd; else return 0; + } + + private: + QList<Ctx> m_classList; +}; + +static CallContext g_theCallContext; + +//------------------------------------------------------------------- + +/*! add class/namespace name s to the scope */ +static void pushScope(const char *s) +{ + g_classScopeLengthStack.push(new int(g_classScope.length())); + if (g_classScope.isEmpty()) + { + g_classScope = s; + } + else + { + g_classScope += "::"; + g_classScope += s; + } + //printf("pushScope(%s) result: `%s'\n",s,g_classScope.data()); +} + +/*! remove the top class/namespace name from the scope */ +static void popScope() +{ + if (!g_classScopeLengthStack.isEmpty()) + { + int *pLength = g_classScopeLengthStack.pop(); + g_classScope.truncate(*pLength); + delete pLength; + } + else + { + //err("Error: Too many end of scopes found!\n"); + } + //printf("popScope() result: `%s'\n",g_classScope.data()); +} + +static void setCurrentDoc(const QCString &name,const QCString &base,const QCString &anchor="") +{ + if (Doxygen::searchIndex) + { + Doxygen::searchIndex->setCurrentDoc(name,base,anchor); + } +} + +static void addToSearchIndex(const char *text) +{ + if (Doxygen::searchIndex) + { + Doxygen::searchIndex->addWord(text,FALSE); + } +} + +static void setClassScope(const QCString &name) +{ + //printf("setClassScope(%s)\n",name.data()); + QCString n=name; + n=n.simplifyWhiteSpace(); + int ts=n.find('<'); // start of template + int te=n.findRev('>'); // end of template + //printf("ts=%d te=%d\n",ts,te); + if (ts!=-1 && te!=-1 && te>ts) + { + // remove template from scope + n=n.left(ts)+n.right(n.length()-te-1); + } + while (!g_classScopeLengthStack.isEmpty()) + { + popScope(); + } + g_classScope.resize(0); + int i; + while ((i=n.find("::"))!=-1) + { + pushScope(n.left(i)); + n = n.mid(i+2); + } + pushScope(n); + //printf("--->New class scope `%s'\n",g_classScope.data()); +} + +/*! start a new line of code, inserting a line number if g_sourceFileDef + * is TRUE. If a definition starts at the current line, then the line + * number is linked to the documentation of that definition. + */ +static void startCodeLine() +{ + //if (g_currentFontClass) { g_code->endFontClass(); } + if (g_sourceFileDef && g_lineNumbers) + { + //QCString lineNumber,lineAnchor; + //lineNumber.sprintf("%05d",g_yyLineNr); + //lineAnchor.sprintf("l%05d",g_yyLineNr); + + Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr); + //printf("%s:startCodeLine(%d)=%p\n",g_sourceFileDef->name().data(),g_yyLineNr,d); + if (!g_includeCodeFragment && d) + { + g_currentDefinition = d; + g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr); + //printf("->startCodeLine(%s)=%p\n",d->name().data(),g_currentMemberDef); + g_insideBody = FALSE; + g_searchingForBody = TRUE; + g_realScope = d->name().copy(); + g_type.resize(0); + g_name.resize(0); + g_args.resize(0); + g_parmType.resize(0); + g_parmName.resize(0); + //printf("Real scope: `%s'\n",g_realScope.data()); + g_bodyCurlyCount = 0; + QCString lineAnchor; + lineAnchor.sprintf("l%05d",g_yyLineNr); + if (g_currentMemberDef) + { + g_code->writeLineNumber(g_currentMemberDef->getReference(), + g_currentMemberDef->getOutputFileBase(), + g_currentMemberDef->anchor(),g_yyLineNr); + setCurrentDoc( + g_currentMemberDef->qualifiedName(), + g_sourceFileDef->getSourceFileBase(), + lineAnchor); + } + else if (d->isLinkableInProject()) + { + g_code->writeLineNumber(d->getReference(), + d->getOutputFileBase(), + 0,g_yyLineNr); + setCurrentDoc( + d->qualifiedName(), + g_sourceFileDef->getSourceFileBase(), + lineAnchor); + } + } + else + { + g_code->writeLineNumber(0,0,0,g_yyLineNr); + } + } + g_code->startCodeLine(); + if (g_currentFontClass) + { + g_code->startFontClass(g_currentFontClass); + } +} + + +static void endFontClass(); +static void startFontClass(const char *s); + +static void endCodeLine() +{ + endFontClass(); + g_code->endCodeLine(); +} + +static void nextCodeLine() +{ + const char * fc = g_currentFontClass; + endCodeLine(); + if (g_yyLineNr<g_inputLines) + { + g_currentFontClass = fc; + startCodeLine(); + } +} + +/*! write a code fragment `text' that may span multiple lines, inserting + * line numbers for each line. + */ +static void codifyLines(char *text) +{ + //printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text); + char *p=text,*sp=p; + char c; + bool done=FALSE; + while (!done) + { + sp=p; + while ((c=*p++) && c!='\n') { } + if (c=='\n') + { + g_yyLineNr++; + *(p-1)='\0'; + g_code->codify(sp); + nextCodeLine(); + } + else + { + g_code->codify(sp); + done=TRUE; + } + } +} + +/*! writes a link to a fragment \a text that may span multiple lines, inserting + * line numbers for each line. If \a text contains newlines, the link will be + * split into multiple links with the same destination, one for each line. + */ +static void writeMultiLineCodeLink(CodeOutputInterface &ol, + const char *ref,const char *file, + const char *anchor,const char *text, + const char *tooltip) +{ + bool done=FALSE; + char *p=(char *)text; + while (!done) + { + char *sp=p; + char c; + while ((c=*p++) && c!='\n') { } + if (c=='\n') + { + g_yyLineNr++; + *(p-1)='\0'; + //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp); + ol.writeCodeLink(ref,file,anchor,sp,tooltip); + nextCodeLine(); + } + else + { + //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp); + ol.writeCodeLink(ref,file,anchor,sp,tooltip); + done=TRUE; + } + } +} + +static void addType() +{ + if (g_name=="const") { g_name.resize(0); return; } + if (!g_type.isEmpty()) g_type += ' ' ; + g_type += g_name ; + g_name.resize(0) ; + if (!g_type.isEmpty()) g_type += ' ' ; + g_type += g_args ; + g_args.resize(0) ; +} + +static void addParmType() +{ + if (g_parmName=="const") { g_parmName.resize(0); return; } + if (!g_parmType.isEmpty()) g_parmType += ' ' ; + g_parmType += g_parmName ; + g_parmName.resize(0) ; +} + +static void addUsingDirective(const char *name) +{ + if (g_sourceFileDef && name) + { + NamespaceDef *nd = Doxygen::namespaceSDict->find(name); + if (nd) + { + g_sourceFileDef->addUsingDirective(nd); + } + } +} + +static void setParameterList(MemberDef *md) +{ + g_classScope = md->getClassDef() ? md->getClassDef()->name().data() : ""; + LockingPtr<ArgumentList> al = md->argumentList(); + if (al==0) return; + Argument *a = al->first(); + while (a) + { + g_parmName = a->name.copy(); + g_parmType = a->type.copy(); + int i = g_parmType.find('*'); + if (i!=-1) g_parmType = g_parmType.left(i); + i = g_parmType.find('&'); + if (i!=-1) g_parmType = g_parmType.left(i); + g_parmType.stripPrefix("const "); + g_parmType=g_parmType.stripWhiteSpace(); + g_theVarContext.addVariable(g_parmType,g_parmName); + a = al->next(); + } +} + +static ClassDef *stripClassName(const char *s) +{ + int pos=0; + QCString type = s; + QCString className; + QCString templSpec; + while (extractClassNameFromType(type,pos,className,templSpec)!=-1) + { + QCString clName=className+templSpec; + ClassDef *cd=0; + if (!g_classScope.isEmpty()) + { + cd=getResolvedClass(g_currentDefinition,g_sourceFileDef,g_classScope+"::"+clName); + } + if (cd==0) + { + cd=getResolvedClass(g_currentDefinition,g_sourceFileDef,clName); + } + //printf("stripClass trying `%s' = %p\n",clName.data(),cd); + if (cd) + { + return cd; + } + } + + return 0; +} + +static MemberDef *setCallContextForVar(const QCString &name) +{ + if (name.isEmpty()) return 0; + //fprintf(stderr,"setCallContextForVar(%s) g_classScope=%s\n",name.data(),g_classScope.data()); + + int scopeEnd = name.findRev("::"); + if (scopeEnd!=-1) // name with explicit scope + { + QCString scope = name.left(scopeEnd); + QCString locName = name.right(name.length()-scopeEnd-2); + //printf("explicit scope: name=%s scope=%s\n",locName.data(),scope.data()); + ClassDef *mcd = getClass(scope); + if (mcd && !locName.isEmpty()) + { + MemberDef *md=mcd->getMemberByName(locName); + if (md) + { + //printf("name=%s scope=%s\n",locName.data(),scope.data()); + g_theCallContext.setClass(stripClassName(md->typeString())); + return md; + } + } + else // check namespace as well + { + NamespaceDef *mnd = getResolvedNamespace(scope); + if (mnd && !locName.isEmpty()) + { + MemberDef *md=mnd->getMemberByName(locName); + if (md) + { + //printf("name=%s scope=%s\n",locName.data(),scope.data()); + g_theCallContext.setClass(stripClassName(md->typeString())); + return md; + } + } + } + } + + MemberName *mn; + ClassDef *mcd = g_theVarContext.findVariable(name); + if (mcd) // local variable + { + //fprintf(stderr,"local variable\n"); + if (mcd!=VariableContext::dummyContext) + { + //fprintf(stderr,"local var `%s' mcd=%s\n",name.data(),mcd->name().data()); + g_theCallContext.setClass(mcd); + } + } + else + { + // look for a class member + mcd = getClass(g_classScope); + if (mcd) + { + //fprintf(stderr,"Inside class %s\n",mcd->name().data()); + MemberDef *md=mcd->getMemberByName(name); + if (md) + { + //fprintf(stderr,"Found member %s\n",md->name().data()); + if (g_scopeStack.top()!=CLASSBLOCK) + { + //fprintf(stderr,"class member `%s' mcd=%s\n",name.data(),mcd->name().data()); + g_theCallContext.setClass(stripClassName(md->typeString())); + } + return md; + } + } + } + + // look for a global member + if ((mn=Doxygen::functionNameSDict->find(name))) + { + //printf("global var `%s'\n",name.data()); + if (mn->count()==1) // global defined only once + { + MemberDef *md=mn->getFirst(); + if (!md->isStatic() || md->getBodyDef()==g_sourceFileDef) + { + g_theCallContext.setClass(stripClassName(md->typeString())); + return md; + } + return 0; + } + else if (mn->count()>1) // global defined more than once + { + MemberDef *md=mn->first(); + while (md) + { + //printf("mn=%p md=%p md->getBodyDef()=%p g_sourceFileDef=%p\n", + // mn,md, + // md->getBodyDef(),g_sourceFileDef); + + // in case there are multiple members we could link to, we + // only link to members if defined in the same file or + // defined as external. + if (!md->isStatic() || md->getBodyDef()==g_sourceFileDef) + { + g_theCallContext.setClass(stripClassName(md->typeString())); + //printf("returning member %s in source file %s\n",md->name().data(),g_sourceFileDef->name().data()); + return md; + } + md=mn->next(); + } + return 0; + } + } + return 0; +} + +static void addDocCrossReference(MemberDef *src,MemberDef *dst) +{ + static bool referencedByRelation = Config_getBool("REFERENCED_BY_RELATION"); + static bool referencesRelation = Config_getBool("REFERENCES_RELATION"); + static bool callerGraph = Config_getBool("CALLER_GRAPH"); + static bool callGraph = Config_getBool("CALL_GRAPH"); + + //printf("--> addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data()); + if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types + if ((referencedByRelation || callerGraph || dst->hasCallerGraph()) && + (src->isFunction() || src->isSlot()) + ) + { + dst->addSourceReferencedBy(src); + MemberDef *mdDef = dst->memberDefinition(); + if (mdDef) + { + mdDef->addSourceReferencedBy(src); + } + MemberDef *mdDecl = dst->memberDeclaration(); + if (mdDecl) + { + mdDecl->addSourceReferencedBy(src); + } + } + if ((referencesRelation || callGraph || src->hasCallGraph()) && + (src->isFunction() || src->isSlot()) + ) + { + src->addSourceReferences(dst); + MemberDef *mdDef = src->memberDefinition(); + if (mdDef) + { + mdDef->addSourceReferences(dst); + } + MemberDef *mdDecl = src->memberDeclaration(); + if (mdDecl) + { + mdDecl->addSourceReferences(dst); + } + } + +} + +static bool getLinkInScope(const QCString &c, // scope + const QCString &m, // member + const char *memberText, // exact text + CodeOutputInterface &ol, + const char *text, + bool varOnly=FALSE + ) +{ + MemberDef *md; + ClassDef *cd; + FileDef *fd; + NamespaceDef *nd; + GroupDef *gd; + //fprintf(stderr,"getLinkInScope: trying `%s'::`%s' varOnly=%d\n",c.data(),m.data(),varOnly); + if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) && + md->isLinkable() && (!varOnly || md->isVariable())) + { + if (g_exampleBlock) + { + QCString anchor; + anchor.sprintf("a%d",g_anchorCount); + //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(), + // g_exampleFile.data()); + if (md->addExample(anchor,g_exampleName,g_exampleFile)) + { + ol.writeCodeAnchor(anchor); + g_anchorCount++; + } + } + + Definition *d = md->getOuterScope()==Doxygen::globalScope ? + md->getBodyDef() : md->getOuterScope(); + if (md->getGroupDef()) d = md->getGroupDef(); + //fprintf(stderr,"d=%p linkable=%d\n",d,d?d->isLinkable():0); + if (d && d->isLinkable()) + { + g_theCallContext.setClass(stripClassName(md->typeString())); + //printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n", + // g_currentDefinition,g_currentMemberDef,g_insideBody); + + if (g_currentDefinition && g_currentMemberDef && + md!=g_currentMemberDef && g_insideBody) + { + addDocCrossReference(g_currentMemberDef,md); + } + //printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data()); + + ol.linkableSymbol(g_yyLineNr,md->name(),md, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + writeMultiLineCodeLink(ol,md->getReference(), + md->getOutputFileBase(), + md->anchor(), + text ? text : memberText, + md->briefDescriptionAsTooltip()); + addToSearchIndex(text ? text : memberText); + return TRUE; + } + } + return FALSE; +} + +static bool getLink(const char *className, + const char *memberName, + CodeOutputInterface &ol, + const char *text=0, + bool varOnly=FALSE) +{ + //printf("getLink(%s,%s) g_curClassName=%s\n",className,memberName,g_curClassName.data()); + QCString m=removeRedundantWhiteSpace(memberName); + QCString c=className; + if (!getLinkInScope(c,m,memberName,ol,text,varOnly)) + { + if (!g_curClassName.isEmpty()) + { + if (!c.isEmpty()) c.prepend("::"); + c.prepend(g_curClassName); + return getLinkInScope(c,m,memberName,ol,text,varOnly); + } + return FALSE; + } + return TRUE; +} + +static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, + bool typeOnly=FALSE,bool varOnly=FALSE) +{ + int i=0; + if (*clName=='~') // correct for matching negated values i.s.o. destructors. + { + g_code->codify("~"); + clName++; + } + QCString className=clName; + if (className.isEmpty()) return; + if (g_insideProtocolList) // for Obj-C + { + className+="-p"; + } + ClassDef *cd=0,*lcd=0; + MemberDef *md=0; + bool isLocal=FALSE; + + //printf("generateClassOrGlobalLink(className=%s)\n",className.data()); + if ((lcd=g_theVarContext.findVariable(className))==0) // not a local variable + { + Definition *d = g_currentDefinition; + //printf("d=%p g_sourceFileDef=%p\n",d,g_currentDefinition); + cd = getResolvedClass(d,g_sourceFileDef,className,&md); + //fprintf(stderr,"non-local variable name=%s context=%d cd=%s md=%s!\n", + // className.data(),g_theVarContext.count(),cd?cd->name().data():"<none>", + // md?md->name().data():"<none>"); + if (cd==0 && md==0 && (i=className.find('<'))!=-1) + { + QCString bareName = className.left(i); //stripTemplateSpecifiersFromScope(className); + //fprintf(stderr,"bareName=%s\n",bareName.data()); + if (bareName!=className) + { + cd=getResolvedClass(d,g_sourceFileDef,bareName,&md); // try unspecialized version + } + } + //printf("md=%s\n",md?md->name().data():"<none>"); + //fprintf(stderr,"is found as a type %s\n",cd?cd->name().data():"<null>"); + if (cd==0 && md==0) // also see if it is variable or enum or enum value + { + if (getLink(g_classScope,clName,ol,clName,varOnly)) + { + return; + } + } + } + else + { + //printf("local variable!\n"); + if (lcd!=VariableContext::dummyContext) + { + //printf("non-dummy context lcd=%s!\n",lcd->name().data()); + g_theCallContext.setClass(lcd); + + // to following is needed for links to a global variable, but is + // no good for a link to a local variable that is also a global symbol. + + //if (getLink(g_classScope,clName,ol,clName)) + //{ + //return; + //} + } + isLocal=TRUE; + //fprintf(stderr,"is a local variable cd=%p!\n",cd); + } + if (cd && cd->isLinkable()) // is it a linkable class + { + //fprintf(stderr,"is linkable class %s\n",clName); + if (g_exampleBlock) + { + QCString anchor; + anchor.sprintf("_a%d",g_anchorCount); + //printf("addExampleClass(%s,%s,%s)\n",anchor.data(),g_exampleName.data(), + // g_exampleFile.data()); + if (cd->addExample(anchor,g_exampleName,g_exampleFile)) + { + ol.writeCodeAnchor(anchor); + g_anchorCount++; + } + } + ol.linkableSymbol(g_yyLineNr,cd->name(),cd, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + writeMultiLineCodeLink(ol,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),clName,cd->briefDescriptionAsTooltip()); + addToSearchIndex(className); + g_theCallContext.setClass(cd); + if (md) + { + Definition *d = md->getOuterScope()==Doxygen::globalScope ? + md->getBodyDef() : md->getOuterScope(); + if (md->getGroupDef()) d = md->getGroupDef(); + if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef) + { + addDocCrossReference(g_currentMemberDef,md); + } + } + } + else // not a class, maybe a global member + { + //fprintf(stderr,"class %s not linkable! cd=%p md=%p typeOnly=%d\n",clName,cd,md,typeOnly); + if (!isLocal && (md!=0 || (cd==0 && !typeOnly))) // not a class, see if it is a global enum/variable/typedef. + { + if (md==0) // not found as a typedef + { + md = setCallContextForVar(clName); + //printf("setCallContextForVar(%s) md=%p g_currentDefinition=%p\n",clName,md,g_currentDefinition); + if (md && g_currentDefinition) + { + //fprintf(stderr,"%s accessible from %s? %d md->getOuterScope=%s\n", + // md->name().data(),g_currentDefinition->name().data(), + // isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md), + // md->getOuterScope()->name().data()); + } + + if (md && g_currentDefinition && + isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md)==-1) + { + md=0; // variable not accessible + } + } + if (md && (!varOnly || md->isVariable())) + { + //fprintf(stderr,"is a global md=%p g_currentDefinition=%s linkable=%d\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>",md->isLinkable()); + if (md->isLinkable()) + { + ol.linkableSymbol(g_yyLineNr,md->name(),md, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName,md->briefDescriptionAsTooltip()); + addToSearchIndex(clName); + if (g_currentMemberDef) + { + addDocCrossReference(g_currentMemberDef,md); + } + return; + } + } + } + + // nothing found, just write out the word + //fprintf(stderr,"not found!\n"); + ol.linkableSymbol(g_yyLineNr,clName,0, + g_currentMemberDef?g_currentMemberDef:g_currentDefinition); + codifyLines(clName); + addToSearchIndex(clName); + } +} + +static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const char *memName) +{ + // extract class definition of the return type in order to resolve + // a->b()->c() like call chains + + //printf("type=`%s' args=`%s' class=%s\n", + // xmd->typeString(),xmd->argsString(), + // xmd->getClassDef()->name().data()); + + if (g_exampleBlock) + { + QCString anchor; + anchor.sprintf("a%d",g_anchorCount); + //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(), + // g_exampleFile.data()); + if (xmd->addExample(anchor,g_exampleName,g_exampleFile)) + { + ol.writeCodeAnchor(anchor); + g_anchorCount++; + } + } + + ClassDef *typeClass = stripClassName(removeAnonymousScopes(xmd->typeString())); + //fprintf(stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass); + g_theCallContext.setClass(typeClass); + + Definition *xd = xmd->getOuterScope()==Doxygen::globalScope ? + xmd->getBodyDef() : xmd->getOuterScope(); + if (xmd->getGroupDef()) xd = xmd->getGroupDef(); + if (xd && xd->isLinkable()) + { + + //printf("g_currentDefiniton=%p g_currentMemberDef=%p xmd=%p g_insideBody=%d\n",g_currentDefinition,g_currentMemberDef,xmd,g_insideBody); + + if (xmd->templateMaster()) xmd = xmd->templateMaster(); + + if (xmd->isLinkable()) + { + // add usage reference + if (g_currentDefinition && g_currentMemberDef && + /*xmd!=g_currentMemberDef &&*/ g_insideBody) + { + addDocCrossReference(g_currentMemberDef,xmd); + } + + // write the actual link + ol.linkableSymbol(g_yyLineNr,xmd->name(),xmd, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + writeMultiLineCodeLink(ol,xmd->getReference(), + xmd->getOutputFileBase(),xmd->anchor(),memName,xmd->briefDescriptionAsTooltip()); + addToSearchIndex(memName); + return TRUE; + } + } + + return FALSE; +} + +static bool generateClassMemberLink(CodeOutputInterface &ol,ClassDef *mcd,const char *memName) +{ + if (mcd) + { + MemberDef *xmd = mcd->getMemberByName(memName); + //printf("generateClassMemberLink(class=%s,member=%s)=%p\n",mcd->name().data(),memName,xmd); + if (xmd) + { + return generateClassMemberLink(ol,xmd,memName); + } + } + + return FALSE; +} + +static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName, + char *memName) +{ + //printf("generateMemberLink(object=%s,mem=%s) classScope=%s\n", + // varName.data(),memName,g_classScope.data()); + + if (varName.isEmpty()) return; + + // look for the variable in the current context + ClassDef *vcd = g_theVarContext.findVariable(varName); + if (vcd) + { + if (vcd!=VariableContext::dummyContext) + { + //printf("Class found!\n"); + if (getLink(vcd->name(),memName,ol)) + { + //printf("Found result!\n"); + return; + } + if (vcd->baseClasses()) + { + BaseClassListIterator bcli(*vcd->baseClasses()); + for ( ; bcli.current() ; ++bcli) + { + if (getLink(bcli.current()->classDef->name(),memName,ol)) + { + //printf("Found result!\n"); + return; + } + } + } + } + } + else // variable not in current context, maybe it is in a parent context + { + vcd = getResolvedClass(g_currentDefinition,g_sourceFileDef,g_classScope); + if (vcd && vcd->isLinkable()) + { + //printf("Found class %s for variable `%s'\n",g_classScope.data(),varName.data()); + MemberName *vmn=Doxygen::memberNameSDict->find(varName); + if (vmn==0) + { + int vi; + QCString vn=varName; + QCString scope; + if ((vi=vn.findRev("::"))!=-1 || (vi=vn.findRev('.'))!=-1) // explicit scope A::b(), probably static member + { + ClassDef *jcd = getClass(vn.left(vi)); + vn=vn.right(vn.length()-vi-2); + vmn=Doxygen::memberNameSDict->find(vn); + //printf("Trying name `%s' scope=%s\n",vn.data(),scope.data()); + if (vmn) + { + MemberNameIterator vmni(*vmn); + MemberDef *vmd; + for (;(vmd=vmni.current());++vmni) + { + if (/*(vmd->isVariable() || vmd->isFunction()) && */ + vmd->getClassDef()==jcd) + { + //printf("Found variable type=%s\n",vmd->typeString()); + ClassDef *mcd=stripClassName(vmd->typeString()); + if (mcd && mcd->isLinkable()) + { + if (generateClassMemberLink(ol,mcd,memName)) return; + } + } + } + } + } + } + if (vmn) + { + //printf("There is a variable with name `%s'\n",varName); + MemberNameIterator vmni(*vmn); + MemberDef *vmd; + for (;(vmd=vmni.current());++vmni) + { + if (/*(vmd->isVariable() || vmd->isFunction()) && */ + vmd->getClassDef()==vcd) + { + //printf("Found variable type=%s\n",vmd->typeString()); + ClassDef *mcd=stripClassName(vmd->typeString()); + if (mcd && mcd->isLinkable()) + { + if (generateClassMemberLink(ol,mcd,memName)) return; + } + } + } + } + } + } + // nothing found -> write result as is + ol.linkableSymbol(g_yyLineNr,memName,0, + g_currentMemberDef?g_currentMemberDef:g_currentDefinition); + codifyLines(memName); + addToSearchIndex(memName); + return; +} + +static void generateFunctionLink(CodeOutputInterface &ol,char *funcName) +{ + if (g_currentMemberDef && g_currentMemberDef->getClassDef() && + funcName==g_currentMemberDef->localName() && + g_currentMemberDef->getDefLine()==g_yyLineNr && + generateClassMemberLink(ol,g_currentMemberDef,funcName) + ) + { + // special case where funcName is the name of a method that is also + // defined on this line. In this case we can directly link to + // g_currentMemberDef, which is not only faster, but + // in case of overloaded methods, this will make sure that we link to + // the correct method, and thereby get the correct reimplemented relations. + // See also bug 549022. + return; + } + //CodeClassDef *ccd=0; + ClassDef *ccd=0; + QCString locScope=g_classScope; + QCString locFunc=removeRedundantWhiteSpace(funcName); + //fprintf(stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data()); + int len=2; + int i=locFunc.findRev("::"); + if (i==-1) i=locFunc.findRev("."),len=1; + if (i>0) + { + if (locScope.isEmpty()) + { + locScope=locFunc.left(i); + } + else + { + locScope+="::"+locFunc.left(i); + } + locFunc=locFunc.right(locFunc.length()-i-len).stripWhiteSpace(); + int ts=locScope.find('<'); // start of template + int te=locScope.findRev('>'); // end of template + //printf("ts=%d te=%d\n",ts,te); + if (ts!=-1 && te!=-1 && te>ts) + { + // remove template from scope + locScope=locScope.left(ts)+locScope.right(locScope.length()-te-1); + } + } + //printf("generateFunctionLink(%s) classScope=`%s'\n",locFunc.data(),locScope.data()); + if (!locScope.isEmpty() && (ccd=g_codeClassSDict->find(locScope))) + { + //printf("using classScope %s\n",g_classScope.data()); + if (ccd->baseClasses()) + { + BaseClassListIterator bcli(*ccd->baseClasses()); + for ( ; bcli.current() ; ++bcli) + { + if (getLink(bcli.current()->classDef->name(),locFunc,ol,funcName)) + { + return; + } + } + } + } + if (!getLink(locScope,locFunc,ol,funcName)) + { + generateClassOrGlobalLink(ol,funcName); + } + return; +} + +/*! counts the number of lines in the input */ +static int countLines() +{ + const char *p=g_inputString; + char c; + int count=1; + while ((c=*p)) + { + p++ ; + if (c=='\n') count++; + } + if (p>g_inputString && *(p-1)!='\n') + { // last line does not end with a \n, so we add an extra + // line and explicitly terminate the line after parsing. + count++, + g_needsTermination=TRUE; + } + return count; +} + +static void endFontClass() +{ + if (g_currentFontClass) + { + g_code->endFontClass(); + g_currentFontClass=0; + } +} + +static void startFontClass(const char *s) +{ + endFontClass(); + g_code->startFontClass(s); + g_currentFontClass=s; +} + +//---------------------------------------------------------------------------- + +// recursively writes a linkified Objective-C method call +static void writeObjCMethodCall(ObjCCallCtx *ctx) +{ + if (ctx==0) return; + char c; + const char *p = ctx->format.data(); + if (!ctx->methodName.isEmpty()) + { + //printf("writeObjCMethodCall(%s) obj=%s method=%s\n", + // ctx->format.data(),ctx->objectTypeOrName.data(),ctx->methodName.data()); + if (!ctx->objectTypeOrName.isEmpty() && ctx->objectTypeOrName.at(0)!='$') + { + //printf("Looking for object=%s method=%s\n",ctx->objectTypeOrName.data(), + // ctx->methodName.data()); + ClassDef *cd = g_theVarContext.findVariable(ctx->objectTypeOrName); + if (cd==0) // not a local variable + { + if (ctx->objectTypeOrName=="self") + { + if (g_currentDefinition && + g_currentDefinition->definitionType()==Definition::TypeClass) + { + ctx->objectType = (ClassDef *)g_currentDefinition; + } + } + else + { + ctx->objectType = getResolvedClass( + g_currentDefinition, + g_sourceFileDef, + ctx->objectTypeOrName, + &ctx->method); + } + //printf(" object is class? %p\n",ctx->objectType); + if (ctx->objectType) // found class + { + ctx->method = ctx->objectType->getMemberByName(ctx->methodName); + //printf(" yes->method=%s\n",ctx->method?ctx->method->name().data():"<none>"); + } + else if (ctx->method==0) // search for class variable with the same name + { + //printf(" no\n"); + //printf("g_currentDefinition=%p\n",g_currentDefinition); + if (g_currentDefinition && + g_currentDefinition->definitionType()==Definition::TypeClass) + { + ctx->objectVar = ((ClassDef *)g_currentDefinition)->getMemberByName(ctx->objectTypeOrName); + //printf(" ctx->objectVar=%p\n",ctx->objectVar); + if (ctx->objectVar) + { + ctx->objectType = stripClassName(ctx->objectVar->typeString()); + //printf(" ctx->objectType=%p\n",ctx->objectType); + if (ctx->objectType) + { + ctx->method = ctx->objectType->getMemberByName(ctx->methodName); + //printf(" ctx->method=%p\n",ctx->method); + } + } + } + } + } + else // local variable + { + //printf(" object is local variable\n"); + if (cd!=VariableContext::dummyContext) + { + ctx->method = cd->getMemberByName(ctx->methodName); + //printf(" class=%p method=%p\n",cd,ctx->method); + } + } + } + } + + //printf("["); + while ((c=*p++)) // for each character in ctx->format + { + if (c=='$') + { + char nc=*p++; + if (nc=='$') // escaped $ + { + g_code->codify("$"); + } + else // name fragment or reference to a nested call + { + if (nc=='n') // name fragment + { + nc=*p++; + QCString refIdStr; + while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; } + p--; + int refId=refIdStr.toInt(); + QCString *pName = g_nameDict.find(refId); + if (pName) + { + if (ctx->method && ctx->method->isLinkable()) + { + g_code->linkableSymbol(g_yyLineNr,ctx->method->name(),ctx->method, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + writeMultiLineCodeLink(*g_code, + ctx->method->getReference(), + ctx->method->getOutputFileBase(), + ctx->method->anchor(), + pName->data(), + ctx->method->briefDescriptionAsTooltip()); + if (g_currentMemberDef) + { + addDocCrossReference(g_currentMemberDef,ctx->method); + } + } + else + { + g_code->linkableSymbol(g_yyLineNr,pName->data(),0, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + codifyLines(pName->data()); + } + } + else + { + //printf("Invalid name: id=%d\n",refId); + } + } + else if (nc=='o') // reference to potential object name + { + nc=*p++; + QCString refIdStr; + while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; } + p--; + int refId=refIdStr.toInt(); + QCString *pObject = g_objectDict.find(refId); + if (pObject) + { + if (*pObject=="self") + { + if (g_currentDefinition && + g_currentDefinition->definitionType()==Definition::TypeClass) + { + ctx->objectType = (ClassDef *)g_currentDefinition; + if (ctx->objectType->categoryOf()) + { + ctx->objectType = ctx->objectType->categoryOf(); + } + if (ctx->objectType) + { + ctx->method = ctx->objectType->getMemberByName(ctx->methodName); + } + } + startFontClass("keyword"); + codifyLines(pObject->data()); + endFontClass(); + } + else if (*pObject=="super") + { + if (g_currentDefinition && + g_currentDefinition->definitionType()==Definition::TypeClass) + { + ClassDef *cd = (ClassDef *)g_currentDefinition; + if (cd->categoryOf()) + { + cd = cd->categoryOf(); + } + BaseClassList *bcd = cd->baseClasses(); + if (bcd) // get direct base class (there should be only one) + { + BaseClassListIterator bli(*bcd); + BaseClassDef *bclass; + for (bli.toFirst();(bclass=bli.current());++bli) + { + if (bclass->classDef->compoundType()!=ClassDef::Protocol) + { + ctx->objectType = bclass->classDef; + if (ctx->objectType) + { + ctx->method = ctx->objectType->getMemberByName(ctx->methodName); + } + } + } + } + } + startFontClass("keyword"); + codifyLines(pObject->data()); + endFontClass(); + } + else if (ctx->objectVar && ctx->objectVar->isLinkable()) // object is class variable + { + g_code->linkableSymbol(g_yyLineNr,ctx->objectVar->name(),ctx->objectVar, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + writeMultiLineCodeLink(*g_code, + ctx->objectVar->getReference(), + ctx->objectVar->getOutputFileBase(), + ctx->objectVar->anchor(), + pObject->data(), + ctx->objectVar->briefDescriptionAsTooltip()); + if (g_currentMemberDef) + { + addDocCrossReference(g_currentMemberDef,ctx->objectVar); + } + } + else if (ctx->objectType && + ctx->objectType!=VariableContext::dummyContext && + ctx->objectType->isLinkable() + ) // object is class name + { + ClassDef *cd = ctx->objectType; + g_code->linkableSymbol(g_yyLineNr,cd->name(),cd, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + writeMultiLineCodeLink(*g_code, + cd->getReference(), + cd->getOutputFileBase(), + cd->anchor(), + pObject->data(), + cd->briefDescriptionAsTooltip()); + } + else // object still needs to be resolved + { + ClassDef *cd = getResolvedClass(g_currentDefinition, + g_sourceFileDef, *pObject); + if (cd && cd->isLinkable()) + { + if (ctx->objectType==0) ctx->objectType=cd; + g_code->linkableSymbol(g_yyLineNr,cd->name(),cd, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + writeMultiLineCodeLink(*g_code, + cd->getReference(), + cd->getOutputFileBase(), + cd->anchor(), + pObject->data(), + cd->briefDescriptionAsTooltip()); + } + else + { + g_code->linkableSymbol(g_yyLineNr,pObject->data(),0, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + codifyLines(pObject->data()); + } + } + } + else + { + //printf("Invalid object: id=%d\n",refId); + } + } + else if (nc=='c') // reference to nested call + { + nc=*p++; + QCString refIdStr; + while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; } + p--; + int refId=refIdStr.toInt(); + ObjCCallCtx *ictx = g_contextDict.find(refId); + if (ictx) // recurse into nested call + { + writeObjCMethodCall(ictx); + if (ictx->method) // link to nested call successfully + { + // get the ClassDef representing the method's return type + if (QCString(ictx->method->typeString())=="id") + { + // see if the method name is unique, if so we link to it + MemberName *mn=Doxygen::memberNameSDict->find(ctx->methodName); + //printf("mn->count=%d ictx->method=%s ctx->methodName=%s\n", + // mn==0?-1:(int)mn->count(), + // ictx->method->name().data(), + // ctx->methodName.data()); + if (mn && mn->count()==1) // member name unique + { + ctx->method = mn->getFirst(); + } + } + else + { + ctx->objectType = stripClassName(ictx->method->typeString()); + if (ctx->objectType) + { + ctx->method = ctx->objectType->getMemberByName(ctx->methodName); + } + } + //printf(" ***** method=%s -> object=%p\n",ictx->method->name().data(),ctx->objectType); + } + } + else + { + //printf("Invalid context: id=%d\n",refId); + } + } + else if (nc=='w') // some word + { + nc=*p++; + QCString refIdStr; + while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; } + p--; + int refId=refIdStr.toInt(); + QCString *pWord = g_wordDict.find(refId); + if (pWord) + { + g_code->linkableSymbol(g_yyLineNr,pWord->data(),0, + g_currentMemberDef ? g_currentMemberDef : g_currentDefinition); + codifyLines(pWord->data()); + } + } + else // illegal marker + { + ASSERT(!"invalid escape sequence"); + } + } + } + else // normal non-marker character + { + char s[2]; + s[0]=c;s[1]=0; + codifyLines(s); + } + } + //printf("%s %s]\n",ctx->objectTypeOrName.data(),ctx->methodName.data()); + //printf("}=(type='%s',name='%s')", + // ctx->objectTypeOrName.data(), + // ctx->methodName.data()); +} + +// Replaces an Objective-C method name fragment s by a marker of the form +// $n12, the number (12) can later be used as a key for obtaining the name +// fragment, from g_nameDict +static QCString escapeName(const char *s) +{ + QCString result; + result.sprintf("$n%d",g_currentNameId); + g_nameDict.insert(g_currentNameId,new QCString(s)); + g_currentNameId++; + return result; +} + +static QCString escapeObject(const char *s) +{ + QCString result; + result.sprintf("$o%d",g_currentObjId); + g_objectDict.insert(g_currentObjId,new QCString(s)); + g_currentObjId++; + return result; +} + +static QCString escapeWord(const char *s) +{ + QCString result; + result.sprintf("$w%d",g_currentWordId); + g_wordDict.insert(g_currentWordId,new QCString(s)); + g_currentWordId++; + return result; +} + +/* ----------------------------------------------------------------- + */ +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); + +static int yyread(char *buf,int max_size) +{ + int c=0; + while( c < max_size && g_inputString[g_inputPosition] ) + { + *buf = g_inputString[g_inputPosition++] ; + c++; buf++; + } + return c; +} + +%} + +B [ \t] +BN [ \t\n\r] +ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]* +SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) +TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">" +SCOPETNAME ((({ID}{TEMPLIST}?){BN}*"::"{BN}*)*)((~{BN}*)?{ID}) +SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*"::"{BN}*)+ +KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property") +KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"set"|"sizeof"|"static"|"struct"|"__super"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|{KEYWORD_OBJC}) +FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"for"|"foreach"|"for each"|"goto"|"if"|"return"|"switch"|"throw"|"throws"|"try"|"while"|"@try"|"@catch"|"@finally") +TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string") +CASTKW ("const_cast"|"dynamic_cast"|"reinterpret_cast"|"static_cast") +CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) +ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++" +ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|=" +LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!" +BITOP "&"|"|"|"^"|"<<"|">>"|"~" +OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} +%option noyywrap + +%x SkipString +%x SkipStringS +%x SkipVerbString +%x SkipCPP +%x SkipComment +%x SkipCxxComment +%x RemoveSpecialCComment +%x StripSpecialCComment +%x Body +%x FuncCall +%x MemberCall +%x MemberCall2 +%x SkipInits +%x ClassName +%x PackageName +%x ClassVar +%x CppCliTypeModifierFollowup +%x Bases +%x SkipSharp +%x ReadInclude +%x TemplDecl +%x TemplCast +%x CallEnd +%x ObjCMethod +%x ObjCParams +%x ObjCParamType +%x ObjCCall +%x ObjCMName +%x ObjCSkipStr +%x OldStyleArgs +%x UsingName + +%% + +<*>\x0d +<Body>^([ \t]*"#"[ \t]*("include"|"import")[ \t]*)("<"|"\"") { + startFontClass("preprocessor"); + g_code->codify(yytext); + BEGIN( ReadInclude ); + } +<Body>("@interface"|"@implementation"|"@protocol")[ \t\n]+ { + g_insideObjC=TRUE; + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + if (!g_insideTemplate) + BEGIN( ClassName ); + } +<Body>(("public"|"private"){B}+)?("ref"|"value"|"interface"|"enum"){B}+("class"|"struct") { + if (g_insideTemplate) REJECT; + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + BEGIN( ClassName ); + } +<Body>"property"|"event"/{BN}* { + if (g_insideTemplate) REJECT; + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + } +<Body>(KEYWORD_CPPCLI_DATATYPE|("partial"{B}+)?"class"|"struct"|"union"|"namespace"){B}+ { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + if (!g_insideTemplate) + BEGIN( ClassName ); + } +<Body>("package")[ \t\n]+ { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + BEGIN( PackageName ); + } +<ClassVar>\n { + if (!g_insideObjC) REJECT; + codifyLines(yytext); + BEGIN(Body); + } +<Body,ClassVar,Bases>"-"|"+" { + if (!g_insideObjC || g_insideBody) + { + g_code->codify(yytext); + } + else // Start of Objective-C method + { + //printf("Method!\n"); + g_code->codify(yytext); + BEGIN(ObjCMethod); + } + } +<ObjCMethod>":" { + g_code->codify(yytext); + BEGIN(ObjCParams); + } +<ObjCParams>"(" { + g_code->codify(yytext); + BEGIN(ObjCParamType); + } +<ObjCParams,ObjCMethod>";"|"{" { + g_code->codify(yytext); + if (*yytext=='{') + { + g_curlyCount++; + if (g_searchingForBody) + { + g_searchingForBody=FALSE; + g_insideBody=TRUE; + } + if (g_insideBody) g_bodyCurlyCount++; + if (!g_curClassName.isEmpty()) // valid class name + { + pushScope(g_curClassName); + DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n")); + g_scopeStack.push(SCOPEBLOCK); + } + } + g_type.resize(0); + g_name.resize(0); + BEGIN(Body); + } +<ObjCParams>{ID}{B}*":" { + g_code->codify(yytext); + } +<ObjCParamType>{TYPEKW} { + startFontClass("keywordtype"); + g_code->codify(yytext); + endFontClass(); + g_parmType=yytext; + } +<ObjCParamType>{ID} { + generateClassOrGlobalLink(*g_code,yytext); + g_parmType=yytext; + } +<ObjCParamType>")" { + g_code->codify(yytext); + BEGIN(ObjCParams); + } +<ObjCParams>{ID} { + g_code->linkableSymbol(g_yyLineNr,yytext,0, + g_currentMemberDef?g_currentMemberDef:g_currentDefinition); + g_code->codify(yytext); + g_parmName=yytext; + g_theVarContext.addVariable(g_parmType,g_parmName); + g_parmType.resize(0);g_parmName.resize(0); + } +<ObjCMethod,ObjCParams,ObjCParamType>{ID} { + generateClassOrGlobalLink(*g_code,yytext); + } +<ObjCMethod,ObjCParams,ObjCParamType>. { + g_code->codify(yytext); + } +<ObjCMethod,ObjCParams,ObjCParamType>\n { + codifyLines(yytext); + } +<ReadInclude>[^\n\"\>]+/(">"|"\"") { + //FileInfo *f; + bool ambig; + bool found=FALSE; + //QCString absPath = yytext; + //if (g_sourceFileDef && QDir::isRelativePath(absPath)) + //{ + // absPath = QDir::cleanDirPath(g_sourceFileDef->getPath()+"/"+absPath); + //} + + FileDef *fd=findFileDef(Doxygen::inputNameDict,yytext,ambig); + //printf("looking for include %s -> %s fd=%p\n",yytext,absPath.data(),fd); + if (fd && fd->isLinkable()) + { + if (ambig) // multiple input files match the name + { + //printf("===== yes %s is ambiguous\n",yytext); + QCString name = convertToQCString(QDir::cleanDirPath(yytext)); + if (!name.isEmpty() && g_sourceFileDef) + { + FileName *fn = Doxygen::inputNameDict->find(name); + if (fn) + { + FileNameIterator fni(*fn); + // for each include name + for (fni.toFirst();!found && (fd=fni.current());++fni) + { + // see if this source file actually includes the file + found = g_sourceFileDef->isIncluded(fd->absFilePath()); + //printf(" include file %s found=%d\n",fd->absFilePath().data(),found); + } + } + } + } + else // not ambiguous + { + found = TRUE; + } + } + //printf(" include file %s found=%d\n",fd ? fd->absFilePath().data() : "<none>",found); + if (found) + { + g_code->writeCodeLink(fd->getReference(),fd->getOutputFileBase(),0,yytext,fd->briefDescriptionAsTooltip()); + } + else + { + g_code->codify(yytext); + } + char c=yyinput(); + QCString text; + text+=c; + g_code->codify(text); + endFontClass(); + BEGIN( Body ); + } +<Body,Bases>^[ \t]*"#" { + startFontClass("preprocessor"); + g_lastSkipCppContext = YY_START; + g_code->codify(yytext); + BEGIN( SkipCPP ) ; + } +<SkipCPP>. { + g_code->codify(yytext); + } +<SkipCPP>[^\n\/\\]+ { + g_code->codify(yytext); + } +<SkipCPP>\\[\r]?\n { + codifyLines(yytext); + } +<SkipCPP>"//" { + g_code->codify(yytext); + } +<Body,FuncCall>"{" { + g_theVarContext.pushScope(); + + DBG_CTX((stderr,"** scope stack push INNERBLOCK\n")); + g_scopeStack.push(INNERBLOCK); + + if (g_searchingForBody) + { + g_searchingForBody=FALSE; + g_insideBody=TRUE; + } + g_code->codify(yytext); + g_curlyCount++; + if (g_insideBody) + { + g_bodyCurlyCount++; + } + g_type.resize(0); + g_name.resize(0); + BEGIN( Body ); + } +<Body,MemberCall,MemberCall2>"}" { + g_theVarContext.popScope(); + g_type.resize(0); + g_name.resize(0); + + int *scope = g_scopeStack.pop(); + DBG_CTX((stderr,"** scope stack pop SCOPEBLOCK=%d\n",scope==SCOPEBLOCK)); + if (scope==SCOPEBLOCK || scope==CLASSBLOCK) + { + popScope(); + } + + g_code->codify(yytext); + + //fprintf(stderr,"g_bodyCurlyCount=%d\n",g_bodyCurlyCount); + if (--g_bodyCurlyCount<=0) + { + g_insideBody=FALSE; + g_currentMemberDef=0; + if (g_currentDefinition) + g_currentDefinition=g_currentDefinition->getOuterScope(); + } + BEGIN(Body); + } +<Body,ClassVar>"@end" { + //printf("End of objc scope fd=%s\n",g_sourceFileDef->name().data()); + if (g_sourceFileDef) + { + FileDef *fd=g_sourceFileDef; + g_insideObjC = fd->name().lower().right(2)==".m" || + fd->name().lower().right(3)==".mm"; + //printf("insideObjC=%d\n",g_insideObjC); + } + else + { + g_insideObjC = FALSE; + } + if (g_insideBody) + { + g_theVarContext.popScope(); + + int *scope = g_scopeStack.pop(); + DBG_CTX((stderr,"** scope stack pop SCOPEBLOCK=%d\n",scope==SCOPEBLOCK)); + if (scope==SCOPEBLOCK || scope==CLASSBLOCK) + { + popScope(); + } + g_insideBody=FALSE; + } + + startFontClass("keyword"); + g_code->codify(yytext); + endFontClass(); + + g_currentMemberDef=0; + if (g_currentDefinition) + g_currentDefinition=g_currentDefinition->getOuterScope(); + BEGIN(Body); + } +<ClassName,ClassVar>";" { + g_code->codify(yytext); + g_searchingForBody=FALSE; + BEGIN( Body ); + } +<ClassName,ClassVar>[*&^%]+ { + g_type=g_curClassName.copy(); + g_name.resize(0); + g_code->codify(yytext); + BEGIN( Body ); // variable of type struct * + } +<ClassName>"__declspec"{B}*"("{B}*{ID}{B}*")" { + startFontClass("keyword"); + g_code->codify(yytext); + endFontClass(); + } +<ClassName>{ID}("::"{ID})* { + g_curClassName=yytext; + addType(); + generateClassOrGlobalLink(*g_code,yytext); + BEGIN( ClassVar ); + } +<PackageName>{ID}("."{ID})* { + g_curClassName=yytext; + g_curClassName=substitute(g_curClassName,".","::"); + //printf("found package: %s\n",g_curClassName.data()); + addType(); + codifyLines(yytext); + } +<ClassVar>"=" { + unput(*yytext); + BEGIN( Body ); + } +<ClassVar>("extends"|"implements") { // Java + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + g_curClassBases.clear(); + BEGIN( Bases ); + } +<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") { + //fprintf(stderr,"***** C++/CLI modifier %s on g_curClassName=%s\n",yytext,g_curClassName.data()); + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + BEGIN( CppCliTypeModifierFollowup ); + } +<ClassVar>{ID} { + g_type = g_curClassName.copy(); + g_name = yytext; + if (g_insideBody) + { + g_theVarContext.addVariable(g_type,g_name); + } + generateClassOrGlobalLink(*g_code,yytext); + } +<ClassName,ClassVar,CppCliTypeModifierFollowup>{B}*":"{B}* { + codifyLines(yytext); + g_curClassBases.clear(); + BEGIN( Bases ); + } +<PackageName>[ \t]*";" | +<Bases,ClassName,ClassVar,CppCliTypeModifierFollowup>{B}*"{"{B}* { + g_theVarContext.pushScope(); + g_code->codify(yytext); + g_curlyCount++; + if (YY_START==ClassVar && g_curClassName.isEmpty()) + { + g_curClassName = g_name.copy(); + } + if (g_searchingForBody) + { + g_searchingForBody=FALSE; + g_insideBody=TRUE; + } + if (g_insideBody) g_bodyCurlyCount++; + if (!g_curClassName.isEmpty()) // valid class name + { + DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n")); + g_scopeStack.push(CLASSBLOCK); + pushScope(g_curClassName); + //fprintf(stderr,"***** g_curClassName=%s\n",g_curClassName.data()); + if (getResolvedClass(g_currentDefinition,g_sourceFileDef,g_curClassName)==0) + { + //printf("Adding new class %s\n",g_curClassName.data()); + ClassDef *ncd=new ClassDef("<code>",1, + g_curClassName,ClassDef::Class,0,0,FALSE); + g_codeClassSDict->append(g_curClassName,ncd); + // insert base classes. + char *s=g_curClassBases.first(); + while (s) + { + ClassDef *bcd; + bcd=g_codeClassSDict->find(s); + if (bcd==0) bcd=getResolvedClass(g_currentDefinition,g_sourceFileDef,s); + if (bcd && bcd!=ncd) + { + ncd->insertBaseClass(bcd,s,Public,Normal); + } + s=g_curClassBases.next(); + } + } + //printf("g_codeClassList.count()=%d\n",g_codeClassList.count()); + } + else // not a class name -> assume inner block + { + DBG_CTX((stderr,"** scope stack push INNERBLOCK\n")); + g_scopeStack.push(INNERBLOCK); + } + g_curClassName.resize(0); + g_curClassBases.clear(); + BEGIN( Body ); + } +<Bases>"virtual"|"public"|"protected"|"private"|"@public"|"@private"|"@protected" { + startFontClass("keyword"); + g_code->codify(yytext); + endFontClass(); + } +<Bases>{ID} { + //printf("%s:addBase(%s)\n",g_ccd.name.data(),yytext); + g_curClassBases.inSort(yytext); + generateClassOrGlobalLink(*g_code,yytext); + } +<Bases>"<" { + g_code->codify(yytext); + if (!g_insideObjC) + { + g_sharpCount=1; + BEGIN ( SkipSharp ); + } + else + { + g_insideProtocolList=TRUE; + } + } +<Bases>">" { + g_code->codify(yytext); + g_insideProtocolList=FALSE; + } +<SkipSharp>"<" { + g_code->codify(yytext); + ++g_sharpCount; + } +<SkipSharp>">" { + g_code->codify(yytext); + if (--g_sharpCount<=0) + BEGIN ( Bases ); + } +<Bases>"(" { + g_code->codify(yytext); + g_sharpCount=1; + BEGIN ( SkipSharp ); + } +<SkipSharp>"(" { + g_code->codify(yytext); + ++g_sharpCount; + } +<SkipSharp>")" { + g_code->codify(yytext); + if (--g_sharpCount<=0) + BEGIN ( Bases ); + } + + +<Bases>"," { + g_code->codify(yytext); + } + + +<Body>{SCOPEPREFIX}?"operator"{B}*"()"{B}*/"(" { + addType(); + generateFunctionLink(*g_code,yytext); + g_bracketCount=0; + g_args.resize(0); + g_name+=yytext; + BEGIN( FuncCall ); + } +<Body>{SCOPEPREFIX}?"operator"{B}*[^\(\n]+/"(" { + addType(); + generateFunctionLink(*g_code,yytext); + g_bracketCount=0; + g_args.resize(0); + g_name+=yytext; + BEGIN( FuncCall ); + } +<Body,TemplDecl>("template"|"generic")/([^a-zA-Z0-9]) { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + g_insideTemplate=TRUE; + g_sharpCount=0; + } +<Body>"using"{BN}+"namespace"{BN}+ { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + BEGIN(UsingName); + } +<UsingName>{ID}("::"{ID})* { addUsingDirective(yytext); + generateClassOrGlobalLink(*g_code,yytext); + DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n")); + g_scopeStack.push(CLASSBLOCK); + pushScope(yytext); + BEGIN(Body); + } +<UsingName>\n { codifyLines(yytext); BEGIN(Body); } +<UsingName>. { codifyLines(yytext); BEGIN(Body); } +<Body,FuncCall>"$"?"this"("->"|".") { g_code->codify(yytext); // this-> for C++, this. for C# + } +<Body>{KEYWORD}/([^a-z_A-Z0-9]) { + startFontClass("keyword"); + codifyLines(yytext); + if (QCString(yytext)=="typedef") + { + addType(); + g_name+=yytext; + } + endFontClass(); + } +<Body>{KEYWORD}/{B}* { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + } +<Body>{KEYWORD}/{BN}*"(" { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + g_name.resize(0);g_type.resize(0); + } +<FuncCall>"in"/{BN}* { + if (!g_inForEachExpression) REJECT; + startFontClass("keywordflow"); + codifyLines(yytext); + endFontClass(); + // insert the variable in the parent scope, see bug 546158 + g_theVarContext.popScope(); + g_theVarContext.addVariable(g_parmType,g_parmName); + g_theVarContext.pushScope(); + g_name.resize(0);g_type.resize(0); + } +<Body>{FLOWKW}/{BN}*"(" { + startFontClass("keywordflow"); + codifyLines(yytext); + endFontClass(); + g_name.resize(0);g_type.resize(0); + g_inForEachExpression = (strcmp(yytext,"for each")==0 || strcmp(yytext, "foreach")==0); + BEGIN(FuncCall); + } +<Body>{FLOWKW}/([^a-z_A-Z0-9]) { + startFontClass("keywordflow"); + codifyLines(yytext); + endFontClass(); + if (g_inFunctionTryBlock && (strcmp(yytext,"catch")==0 || strcmp(yytext,"finally")==0)) + { + g_inFunctionTryBlock=FALSE; + } + } +<Body>{FLOWKW}/{B}* { + startFontClass("keywordflow"); + codifyLines(yytext); + endFontClass(); + } +<Body>[\\|\)\+\-\/\%\~\!] { + g_code->codify(yytext); + g_name.resize(0);g_type.resize(0); + if (*yytext==')') + { + g_theCallContext.popScope(); + g_bracketCount--; + BEGIN(FuncCall); + } + } +<Body,TemplDecl,ObjCMethod>{TYPEKW}/{B}* { + startFontClass("keywordtype"); + g_code->codify(yytext); + endFontClass(); + addType(); + g_name+=yytext; + } +<Body>"generic"/{B}*"<"[^\n\/\-\.\{\"\>]*">"{B}* { + startFontClass("keyword"); + g_code->codify(yytext); + endFontClass(); + g_sharpCount=0; + BEGIN(TemplDecl); + } +<Body>"template"/{B}*"<"[^\n\/\-\.\{\"\>]*">"{B}* { // template<...> + startFontClass("keyword"); + g_code->codify(yytext); + endFontClass(); + g_sharpCount=0; + BEGIN(TemplDecl); + } +<TemplDecl>"class"|"typename" { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + } +<TemplDecl>"<" { + g_code->codify(yytext); + g_sharpCount++; + } +<TemplDecl>">" { + g_code->codify(yytext); + g_sharpCount--; + if (g_sharpCount<=0) + { + BEGIN(Body); + } + } +<TemplCast>">" { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + BEGIN( g_lastTemplCastContext ); + } +<TemplCast>{ID}("::"{ID})* { + generateClassOrGlobalLink(*g_code,yytext); + } +<TemplCast>("const"|"volatile"){B}* { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + } +<TemplCast>[*^]* { + codifyLines(yytext); + } +<Body,FuncCall>{CASTKW}"<" { // static_cast<T>( + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + g_lastTemplCastContext = YY_START; + BEGIN(TemplCast); + } +<Body,TemplCast>{SCOPENAME}{B}*"<"[^\n\/\-\.\{\"\>]*">"("::"{ID})*/{B}* { // A<T> *pt; + int i=QCString(yytext).find('<'); + QCString kw = QCString(yytext).left(i).stripWhiteSpace(); + if (kw.right(5)=="_cast" && YY_START==Body) + { + REJECT; + } + addType(); + generateClassOrGlobalLink(*g_code,yytext); + g_name+=yytext; + } +<Body>{SCOPENAME}/{BN}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" + addType(); + // changed this to generateFunctionLink, see bug 624514 + //generateClassOrGlobalLink(*g_code,yytext,FALSE,TRUE); + generateFunctionLink(*g_code,yytext); + g_name+=yytext; + } +<Body>{SCOPENAME}/{B}* { // p->func() + addType(); + generateClassOrGlobalLink(*g_code,yytext); + g_name+=yytext; + } +<Body>"("{B}*("*"{B}*)+{SCOPENAME}*{B}*")"/{B}* { // (*p)->func() but not "if (p) ..." + g_code->codify(yytext); + int s=0;while (s<(int)yyleng && !isId(yytext[s])) s++; + int e=(int)yyleng-1;while (e>=0 && !isId(yytext[e])) e--; + QCString varname = ((QCString)yytext).mid(s,e-s+1); + addType(); + g_name=varname; + } +<Body>{SCOPETNAME}/{BN}*"(" { // a() or c::a() or t<A,B>::a() + addType(); + generateFunctionLink(*g_code,yytext); + //printf("---> g_classScope=%s\n",g_classScope.data()); + //g_theVarContext.addVariable(g_type,yytext); + g_bracketCount=0; + g_args.resize(0); + g_name+=yytext; + BEGIN( FuncCall ); + } +<FuncCall,Body,MemberCall,MemberCall2,SkipInits>\" { + startFontClass("stringliteral"); + g_code->codify(yytext); + g_lastStringContext=YY_START; + g_inForEachExpression = FALSE; + BEGIN( SkipString ); + } +<FuncCall,Body,MemberCall,MemberCall2,SkipInits>\' { + startFontClass("stringliteral"); + g_code->codify(yytext); + g_lastStringContext=YY_START; + g_inForEachExpression = FALSE; + BEGIN( SkipStringS ); + } +<SkipString>[^\"\\\r\n]* { + g_code->codify(yytext); + } +<SkipStringS>[^\'\\\r\n]* { + g_code->codify(yytext); + } +<SkipString,SkipStringS>"//"|"/*" { + g_code->codify(yytext); + } +<SkipString>@?\" { + g_code->codify(yytext); + endFontClass(); + BEGIN( g_lastStringContext ); + } +<SkipStringS>\' { + g_code->codify(yytext); + endFontClass(); + BEGIN( g_lastStringContext ); + } +<SkipString,SkipStringS>\\. { + g_code->codify(yytext); + } +<SkipVerbString>[^"\n]+ { + g_code->codify(yytext); + } +<SkipVerbString>\"\" { // escaped quote + g_code->codify(yytext); + } +<SkipVerbString>\" { // end of string + g_code->codify(yytext); + endFontClass(); + BEGIN( g_lastVerbStringContext ); + } +<SkipVerbString>. { + g_code->codify(yytext); + } +<SkipVerbString>\n { + codifyLines(yytext); + } +<Body>":" { + g_code->codify(yytext); + g_name.resize(0);g_type.resize(0); + } +<Body>"<" { + if (g_insideTemplate) + { + g_sharpCount++; + } + g_code->codify(yytext); + } +<Body>">" { + if (g_insideTemplate) + { + if (--g_sharpCount<=0) + { + g_insideTemplate=FALSE; + } + } + g_code->codify(yytext); + } +<Body,MemberCall,MemberCall2,FuncCall>"'"((\\0[Xx0-9]+)|(\\.)|(.))"'" { + startFontClass("charliteral"); + g_code->codify(yytext); + endFontClass(); + } +<Body>"."|"->" { + g_code->codify(yytext); + g_memCallContext = YY_START; + BEGIN( MemberCall ); + } +<MemberCall>{SCOPETNAME}/{BN}*"(" { + if (g_theCallContext.getClass()) + { + if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext)) + { + g_code->linkableSymbol(g_yyLineNr,yytext,0, + g_currentMemberDef?g_currentMemberDef:g_currentDefinition); + g_code->codify(yytext); + addToSearchIndex(yytext); + } + g_name.resize(0); + } + else + { + g_code->linkableSymbol(g_yyLineNr,yytext,0, + g_currentMemberDef?g_currentMemberDef:g_currentDefinition); + g_code->codify(yytext); + addToSearchIndex(yytext); + g_name.resize(0); + } + g_type.resize(0); + g_bracketCount=0; + if (g_memCallContext==Body) + { + BEGIN(FuncCall); + } + else + { + BEGIN(g_memCallContext); + } + } +<MemberCall>{SCOPENAME}/{B}* { + if (g_theCallContext.getClass()) + { + //fprintf(stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.getClass()); + if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext)) + { + g_code->linkableSymbol(g_yyLineNr,yytext,0, + g_currentMemberDef?g_currentMemberDef:g_currentDefinition); + g_code->codify(yytext); + addToSearchIndex(yytext); + } + g_name.resize(0); + } + else + { + //fprintf(stderr,"no class context!\n"); + g_code->codify(yytext); + addToSearchIndex(yytext); + g_name.resize(0); + } + g_type.resize(0); + BEGIN(g_memCallContext); + } +<Body>[,=;\[] { + if (g_insideObjC && *yytext=='[') + { + //printf("Found start of ObjC call!\n"); + // start of a method call + g_contextDict.setAutoDelete(TRUE); + g_nameDict.setAutoDelete(TRUE); + g_objectDict.setAutoDelete(TRUE); + g_wordDict.setAutoDelete(TRUE); + g_contextDict.clear(); + g_nameDict.clear(); + g_objectDict.clear(); + g_wordDict.clear(); + g_currentCtxId = 0; + g_currentNameId = 0; + g_currentObjId = 0; + g_currentCtx = 0; + g_braceCount = 0; + unput('['); + BEGIN(ObjCCall); + } + else + { + g_code->codify(yytext); + g_saveName = g_name.copy(); + g_saveType = g_type.copy(); + if (*yytext!='[' && !g_type.isEmpty()) + { + //printf("g_scopeStack.bottom()=%p\n",g_scopeStack.bottom()); + if (g_scopeStack.top()!=CLASSBLOCK) + { + //printf("AddVariable: '%s' '%s' context=%d\n", + // g_type.data(),g_name.data(),g_theVarContext.count()); + g_theVarContext.addVariable(g_type,g_name); + } + g_name.resize(0); + } + if (*yytext==';' || *yytext=='=') + { + g_type.resize(0); + g_name.resize(0); + } + else if (*yytext=='[') + { + g_theCallContext.pushScope(); + } + g_args.resize(0); + g_parmType.resize(0); + g_parmName.resize(0); + } + } + /* +<ObjCMemberCall>{ID} { + if (strcmp(yytext,"self")==0 || strcmp(yytext,"super")==0) + { + // TODO: get proper base class for "super" + g_theCallContext.setClass(getClass(g_curClassName)); + startFontClass("keyword"); + g_code->codify(yytext); + endFontClass(); + } + else + { + generateClassOrGlobalLink(*g_code,yytext); + } + g_name.resize(0); + BEGIN(ObjCMemberCall2); + } +<ObjCMemberCall>"[" { + g_code->codify(yytext); + g_theCallContext.pushScope(); + } +<ObjCMemberCall2>{ID}":"? { + g_name+=yytext; + if (g_theCallContext.getClass()) + { + //printf("Calling method %s\n",g_name.data()); + if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),g_name)) + { + g_code->codify(yytext); + addToSearchIndex(g_name); + } + } + else + { + g_code->codify(yytext); + addToSearchIndex(g_name); + } + g_name.resize(0); + BEGIN(ObjCMemberCall3); + } +<ObjCMemberCall2,ObjCMemberCall3>"]" { + g_theCallContext.popScope(); + g_code->codify(yytext); + BEGIN(Body); + } + */ +<ObjCCall,ObjCMName>"[" { + saveObjCContext(); + g_currentCtx->format+=*yytext; + BEGIN(ObjCCall); + //printf("open\n"); + } +<ObjCCall,ObjCMName>"]" { + g_currentCtx->format+=*yytext; + restoreObjCContext(); + BEGIN(ObjCMName); + if (g_currentCtx==0) + { + // end of call + writeObjCMethodCall(g_contextDict.find(0)); + BEGIN(Body); + } + //printf("close\n"); + } +<ObjCCall>{ID} { + g_currentCtx->format+=escapeObject(yytext); + if (g_braceCount==0) + { + g_currentCtx->objectTypeOrName=yytext; + //printf("new type=%s\n",g_currentCtx->objectTypeOrName.data()); + BEGIN(ObjCMName); + } + } +<ObjCMName>{ID}/{BN}*"]" { + if (g_braceCount==0 && + g_currentCtx->methodName.isEmpty()) + { + g_currentCtx->methodName=yytext; + g_currentCtx->format+=escapeName(yytext); + } + else + { + g_currentCtx->format+=escapeWord(yytext); + } + } +<ObjCMName>{ID}/{BN}*":" { + if (g_braceCount==0) + { + g_currentCtx->methodName+=yytext; + g_currentCtx->methodName+=":"; + } + g_currentCtx->format+=escapeName(yytext); + } +<ObjCSkipStr>[^\n\"$\\]* { g_currentCtx->format+=yytext; } +<ObjCSkipStr>\\. { g_currentCtx->format+=yytext; } +<ObjCSkipStr>"\"" { g_currentCtx->format+=yytext; + BEGIN(g_lastStringContext); + } +<ObjCCall,ObjCMName>{CHARLIT} { g_currentCtx->format+=yytext; } +<ObjCCall,ObjCMName>"@"?"\"" { g_currentCtx->format+=yytext; + g_lastStringContext=YY_START; + BEGIN(ObjCSkipStr); + } +<ObjCCall,ObjCMName,ObjCSkipStr>"$" { g_currentCtx->format+="$$"; } +<ObjCCall,ObjCMName>"(" { g_currentCtx->format+=*yytext; g_braceCount++; } +<ObjCCall,ObjCMName>")" { g_currentCtx->format+=*yytext; g_braceCount--; } +<ObjCSkipStr>"@"/"\"" { // needed to prevent matching the global rule (for C#) + g_currentCtx->format+=yytext; + } +<ObjCCall,ObjCMName,ObjCSkipStr>{ID} { g_currentCtx->format+=escapeWord(yytext); } +<ObjCCall,ObjCMName,ObjCSkipStr>. { g_currentCtx->format+=*yytext; } +<ObjCCall,ObjCMName,ObjCSkipStr>\n { g_currentCtx->format+=*yytext; } + +<Body>"]" { + g_theCallContext.popScope(); + g_code->codify(yytext); + // TODO: nested arrays like: a[b[0]->func()]->func() + g_name = g_saveName.copy(); + g_type = g_saveType.copy(); + } +<Body>[0-9]+ { + g_code->codify(yytext); + } +<Body>[0-9]+[xX][0-9A-Fa-f]+ { + g_code->codify(yytext); + } +<MemberCall2,FuncCall>{KEYWORD}/([^a-z_A-Z0-9]) { + //addParmType(); + //g_parmName=yytext; + startFontClass("keyword"); + g_code->codify(yytext); + endFontClass(); + } +<MemberCall2,FuncCall,OldStyleArgs,TemplCast>{TYPEKW}/([^a-z_A-Z0-9]) { + addParmType(); + g_parmName=yytext; + startFontClass("keywordtype"); + g_code->codify(yytext); + endFontClass(); + } +<MemberCall2,FuncCall>{FLOWKW}/([^a-z_A-Z0-9]) { + addParmType(); + g_parmName=yytext; + startFontClass("keywordflow"); + g_code->codify(yytext); + endFontClass(); + } +<MemberCall2,FuncCall>{ID}(({B}*"<"[^\n\[\](){}<>]*">")?({B}*"::"{B}*{ID})?)* { + addParmType(); + g_parmName=yytext; + generateClassOrGlobalLink(*g_code,yytext,!g_insideBody); + } +<FuncCall>";" { // probably a cast, not a function call + g_code->codify(yytext); + g_inForEachExpression = FALSE; + BEGIN( Body ); + } +<MemberCall2,FuncCall>, { + g_code->codify(yytext); + g_theVarContext.addVariable(g_parmType,g_parmName); + g_parmType.resize(0);g_parmName.resize(0); + } +<MemberCall2,FuncCall>"(" { + g_parmType.resize(0);g_parmName.resize(0); + g_code->codify(yytext); + g_bracketCount++; + g_theCallContext.pushScope(); + if (YY_START==FuncCall && !g_insideBody) + { + g_theVarContext.pushScope(); + } + } +<MemberCall2,FuncCall>{OPERATOR} { // operator + if (strcmp(yytext,"*") && + strcmp(yytext,"&") && + strcmp(yytext,"^") && + strcmp(yytext,"%")) // typically a pointer or reference + { + // not a * or &, or C++/CLI's ^ or % + g_parmType.resize(0);g_parmName.resize(0); + } + g_code->codify(yytext); + } +<MemberCall,MemberCall2,FuncCall>")" { + g_theVarContext.addVariable(g_parmType,g_parmName); + g_theCallContext.popScope(); + g_inForEachExpression = FALSE; + //g_theCallContext.setClass(0); // commented out, otherwise a()->b() does not work for b(). + g_code->codify(yytext); + if (--g_bracketCount<=0) + { + if (g_name.isEmpty()) + { + BEGIN( Body ); + } + else + { + BEGIN( CallEnd ); + } + } + } +<CallEnd>[ \t\n]* { codifyLines(yytext); } + /* +<MemberCall2,FuncCall>")"[ \t\n]*[;:] { + */ +<CallEnd>[;:] { + codifyLines(yytext); + g_bracketCount=0; + if (*yytext==';') g_searchingForBody=FALSE; + if (!g_type.isEmpty()) + { + //fprintf(stderr,"add variable g_type=%s g_name=%s)\n",g_type.data(),g_name.data()); + g_theVarContext.addVariable(g_type,g_name); + } + g_parmType.resize(0);g_parmName.resize(0); + g_theCallContext.setClass(0); + if (*yytext==';' || g_insideBody) + { + if (!g_insideBody) + { + g_theVarContext.popScope(); + } + g_name.resize(0);g_type.resize(0); + BEGIN( Body ); + } + else + { + g_bracketCount=0; + BEGIN( SkipInits ); + } + } +<CallEnd>("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"sealed"|"override"))*/{BN}*(";"|"="|"throw"{BN}*"(") { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + } +<CallEnd,OldStyleArgs>("const"|"volatile"|"sealed"|"override")*({BN}+("const"|"volatile"|"sealed"|"override"))*{BN}*"{" { + if (g_insideBody) + { + g_theVarContext.pushScope(); + } + g_theVarContext.addVariable(g_parmType,g_parmName); + //g_theCallContext.popScope(); + g_parmType.resize(0);g_parmName.resize(0); + int index = g_name.findRev("::"); + if (index!=-1) + { + QCString scope = g_name.left(index); + if (!g_classScope.isEmpty()) scope.prepend(g_classScope+"::"); + ClassDef *cd=getResolvedClass(Doxygen::globalScope,g_sourceFileDef,scope); + if (cd) + { + setClassScope(cd->name()); + g_scopeStack.push(SCOPEBLOCK); + DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n")); + } + else + { + //setClassScope(g_realScope); + g_scopeStack.push(INNERBLOCK); + DBG_CTX((stderr,"** scope stack push INNERBLOCK\n")); + } + } + else + { + DBG_CTX((stderr,"** scope stack push INNERBLOCK\n")); + g_scopeStack.push(INNERBLOCK); + } + yytext[yyleng-1]='\0'; + QCString cv(yytext); + if (!cv.stripWhiteSpace().isEmpty()) + { + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + } + else // just whitespace + { + codifyLines(yytext); + } + g_code->codify("{"); + if (g_searchingForBody) + { + g_searchingForBody=FALSE; + g_insideBody=TRUE; + } + if (g_insideBody) g_bodyCurlyCount++; + g_curlyCount++; + g_type.resize(0); g_name.resize(0); + BEGIN( Body ); + } +<CallEnd>"try" { // function-try-block + startFontClass("keyword"); + g_code->codify(yytext); + endFontClass(); + g_inFunctionTryBlock=TRUE; + } +<CallEnd>{ID} { + if (g_insideBody || !g_parmType.isEmpty()) + { + REJECT; + } + // could be K&R style definition + addParmType(); + g_parmName=yytext; + generateClassOrGlobalLink(*g_code,yytext,!g_insideBody); + BEGIN(OldStyleArgs); + } +<OldStyleArgs>{ID} { + addParmType(); + g_parmName=yytext; + generateClassOrGlobalLink(*g_code,yytext,!g_insideBody); + } +<OldStyleArgs>[,;] { + g_code->codify(yytext); + g_theVarContext.addVariable(g_parmType,g_parmName); + if (*yytext==';') g_parmType.resize(0); + g_parmName.resize(0); + } +<CallEnd,OldStyleArgs>"#" { + startFontClass("preprocessor"); + g_lastSkipCppContext = Body; + g_code->codify(yytext); + BEGIN( SkipCPP ); + } +<CallEnd>. { + unput(*yytext); + if (!g_insideBody) + { + g_theVarContext.popScope(); + } + g_name.resize(0);g_args.resize(0); + g_parmType.resize(0);g_parmName.resize(0); + BEGIN( Body ); + } +<SkipInits>";" { + g_code->codify(yytext); + g_type.resize(0); g_name.resize(0); + BEGIN( Body ); + } +<SkipInits>"{" { + g_code->codify(yytext); + g_curlyCount++; + if (g_searchingForBody) + { + g_searchingForBody=FALSE; + g_insideBody=TRUE; + } + if (g_insideBody) g_bodyCurlyCount++; + if (g_name.find("::")!=-1) + { + DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n")); + g_scopeStack.push(SCOPEBLOCK); + setClassScope(g_realScope); + } + else + { + DBG_CTX((stderr,"** scope stack push INNERBLOCK\n")); + g_scopeStack.push(INNERBLOCK); + } + g_type.resize(0); g_name.resize(0); + BEGIN( Body ); + } +<SkipInits>{ID} { + generateClassOrGlobalLink(*g_code,yytext); + } +<FuncCall>{ID}/"(" { + generateFunctionLink(*g_code,yytext); + } +<FuncCall>{ID}/("."|"->") { + g_name=yytext; + generateClassOrGlobalLink(*g_code,yytext); + BEGIN( MemberCall2 ); + } +<FuncCall,MemberCall2>("("{B}*("*"{B}*)+{ID}*{B}*")"{B}*)/("."|"->") { + g_code->codify(yytext); + int s=0;while (!isId(yytext[s])) s++; + int e=yyleng-1;while (!isId(yytext[e])) e--; + g_name=((QCString)yytext).mid(s,e-s+1); + BEGIN( MemberCall2 ); + } +<MemberCall2>{ID}/([ \t\n]*"(") { + if (!g_args.isEmpty()) + generateMemberLink(*g_code,g_args,yytext); + else + generateClassOrGlobalLink(*g_code,yytext); + g_args.resize(0); + BEGIN( FuncCall ); + } +<MemberCall2>{ID}/([ \t\n]*("."|"->")) { + //g_code->codify(yytext); + g_name=yytext; + generateClassOrGlobalLink(*g_code,yytext); + BEGIN( MemberCall2 ); + } +<MemberCall2>"->"|"." { + g_code->codify(yytext); + g_memCallContext = YY_START; + BEGIN( MemberCall ); + } +<SkipComment>"/*"("!"?)"*/" { + g_code->codify(yytext); + endFontClass(); + BEGIN( g_lastCContext ) ; + } +<SkipComment>"//"|"/*" { + g_code->codify(yytext); + } +<SkipComment>[^*/\n]+ { + g_code->codify(yytext); + } +<SkipComment>[ \t]*"*/" { + g_code->codify(yytext); + endFontClass(); + BEGIN( g_lastCContext ) ; + } +<SkipCxxComment>[^\r\n]*"\\"[\r]?\n { // line continuation + codifyLines(yytext); + } +<SkipCxxComment>[^\r\n]+ { + g_code->codify(yytext); + } +<SkipCxxComment>\r +<SkipCxxComment>\n { + unput('\n'); + endFontClass(); + BEGIN( g_lastCContext ) ; + } +<SkipCxxComment>. { + g_code->codify(yytext); + } +<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n)?{B}*"/*"[*!]/[^/*] { + g_yyLineNr+=QCString(yytext).contains('\n'); + } +<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n)? { + g_yyLineNr+=QCString(yytext).contains('\n'); + nextCodeLine(); + if (g_lastSpecialCContext==SkipCxxComment) + { // force end of C++ comment here + endFontClass(); + BEGIN( g_lastCContext ) ; + } + else + { + BEGIN(g_lastSpecialCContext); + } + } +<RemoveSpecialCComment>"*/" { + BEGIN(g_lastSpecialCContext); + } +<RemoveSpecialCComment>[^*\n]+ +<RemoveSpecialCComment>"//"|"/*" +<RemoveSpecialCComment>\n { g_yyLineNr++; } +<RemoveSpecialCComment>. +<MemberCall>[^a-z_A-Z0-9(\n] { + g_code->codify(yytext); + g_type.resize(0); + g_name.resize(0); + BEGIN(g_memCallContext); + } +<*>\n({B}*"//"[!/][^\n]*\n)+ { // remove special one-line comment + if (YY_START==SkipCPP) REJECT; + if (Config_getBool("STRIP_CODE_COMMENTS")) + { + g_yyLineNr+=((QCString)yytext).contains('\n'); + nextCodeLine(); + } + else + { + startFontClass("comment"); + codifyLines(yytext); + endFontClass(); + } + if (YY_START==SkipCxxComment) + { + endFontClass(); + BEGIN( g_lastCContext ) ; + } + } +<SkipCPP>\n/.*\n { + codifyLines(yytext); + endFontClass(); + BEGIN( g_lastSkipCppContext ) ; + } +<*>\n{B}*"//@"[{}].*\n { // remove one-line group marker + if (Config_getBool("STRIP_CODE_COMMENTS")) + { + g_yyLineNr+=2; + nextCodeLine(); + } + else + { + startFontClass("comment"); + codifyLines(yytext); + endFontClass(); + } + if (YY_START==SkipCxxComment) + { + endFontClass(); + BEGIN( g_lastCContext ) ; + } + } +<*>\n{B}*"/*@"[{}] { // remove one-line group marker + if (Config_getBool("STRIP_CODE_COMMENTS")) + { + g_lastSpecialCContext = YY_START; + g_yyLineNr++; + BEGIN(RemoveSpecialCComment); + } + else + { + // check is to prevent getting stuck in skipping C++ comments + if (YY_START != SkipCxxComment) + { + g_lastCContext = YY_START ; + } + startFontClass("comment"); + codifyLines(yytext); + BEGIN(SkipComment); + } + } +<*>^{B}*"//@"[{}].*\n { // remove one-line group marker + if (Config_getBool("STRIP_CODE_COMMENTS")) + { + g_yyLineNr++; + nextCodeLine(); + } + else + { + startFontClass("comment"); + codifyLines(yytext); + endFontClass(); + } + } +<*>^{B}*"/*@"[{}] { // remove multi-line group marker + if (Config_getBool("STRIP_CODE_COMMENTS")) + { + g_lastSpecialCContext = YY_START; + BEGIN(RemoveSpecialCComment); + } + else + { + // check is to prevent getting stuck in skipping C++ comments + if (YY_START != SkipCxxComment) + { + g_lastCContext = YY_START ; + } + startFontClass("comment"); + g_code->codify(yytext); + BEGIN(SkipComment); + } + } +<*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment + if (Config_getBool("STRIP_CODE_COMMENTS")) + { + g_yyLineNr++; + nextCodeLine(); + } + else + { + startFontClass("comment"); + codifyLines(yytext); + endFontClass(); + } + } +<*>"//"[!/][^\n]*\n { // strip special one-line comment + if (YY_START==SkipComment || YY_START==SkipString || YY_START==SkipCPP) REJECT; + if (Config_getBool("STRIP_CODE_COMMENTS")) + { + char c[2]; c[0]='\n'; c[1]=0; + codifyLines(c); + } + else + { + startFontClass("comment"); + codifyLines(yytext); + endFontClass(); + } + } +<*>\n{B}*"/*"[!*]/[^/*] { + if (Config_getBool("STRIP_CODE_COMMENTS")) + { + g_lastSpecialCContext = YY_START; + g_yyLineNr++; + BEGIN(RemoveSpecialCComment); + } + else + { + // check is to prevent getting stuck in skipping C++ comments + if (YY_START != SkipCxxComment) + { + g_lastCContext = YY_START ; + } + startFontClass("comment"); + codifyLines(yytext); + BEGIN(SkipComment); + } + } +<*>^{B}*"/*"[!*]/[^/*] { // special C comment block at a new line + if (Config_getBool("STRIP_CODE_COMMENTS")) + { + g_lastSpecialCContext = YY_START; + BEGIN(RemoveSpecialCComment); + } + else + { + // check is to prevent getting stuck in skipping C++ comments + if (YY_START != SkipCxxComment) + { + g_lastCContext = YY_START ; + } + startFontClass("comment"); + g_code->codify(yytext); + BEGIN(SkipComment); + } + } +<*>"/*"[!*]/[^/*] { // special C comment block half way a line + if (YY_START==SkipString) REJECT; + if (Config_getBool("STRIP_CODE_COMMENTS")) + { + g_lastSpecialCContext = YY_START; + BEGIN(RemoveSpecialCComment); + } + else + { + // check is to prevent getting stuck in skipping C++ comments + if (YY_START != SkipCxxComment) + { + g_lastCContext = YY_START ; + } + startFontClass("comment"); + g_code->codify(yytext); + BEGIN(SkipComment); + } + } +<*>"/*"("!"?)"*/" { + if (YY_START==SkipString) REJECT; + if (!Config_getBool("STRIP_CODE_COMMENTS")) + { + startFontClass("comment"); + g_code->codify(yytext); + endFontClass(); + } + } +<*>"/*" { + startFontClass("comment"); + g_code->codify(yytext); + // check is to prevent getting stuck in skipping C++ comments + if (YY_START != SkipCxxComment) + { + g_lastCContext = YY_START ; + } + BEGIN( SkipComment ) ; + } +<*>@\" { // C# verbatim string + startFontClass("stringliteral"); + g_code->codify(yytext); + g_lastVerbStringContext=YY_START; + BEGIN(SkipVerbString); + } +<*>"//" { + startFontClass("comment"); + g_code->codify(yytext); + g_lastCContext = YY_START ; + BEGIN( SkipCxxComment ) ; + } +<*>"("|"[" { + g_code->codify(yytext); + g_theCallContext.pushScope(); + } +<*>")"|"]" { + g_code->codify(yytext); + g_theCallContext.popScope(); + } +<*>\n { + codifyLines(yytext); + } +<*>. { + g_code->codify(yytext); + } + /* +<*>([ \t\n]*"\n"){2,} { // combine multiple blank lines + //QCString sepLine=yytext; + //g_code->codify("\n\n"); + //g_yyLineNr+=sepLine.contains('\n'); + //char sepLine[3]="\n\n"; + codifyLines(yytext); + } + */ + +%% + +/*@ ---------------------------------------------------------------------------- + */ + +static void saveObjCContext() +{ + if (g_currentCtx) + { + g_currentCtx->format+=QCString().sprintf("$c%d",g_currentCtxId); + if (g_braceCount==0 && YY_START==ObjCCall) + { + g_currentCtx->objectTypeOrName=g_currentCtx->format.mid(1); + //printf("new type=%s\n",g_currentCtx->objectTypeOrName.data()); + } + g_contextStack.push(g_currentCtx); + } + else + { + //printf("Trying to save NULL context!\n"); + } + ObjCCallCtx *newCtx = new ObjCCallCtx; + newCtx->id = g_currentCtxId; + newCtx->lexState = YY_START; + newCtx->braceCount = g_braceCount; + newCtx->objectType = 0; + newCtx->objectVar = 0; + newCtx->method = 0; + //printf("save state=%d\n",YY_START); + g_contextDict.insert(g_currentCtxId,newCtx); + g_currentCtx = newCtx; + g_braceCount = 0; + g_currentCtxId++; +} + +static void restoreObjCContext() +{ + //printf("restore state=%d->%d\n",YY_START,g_currentCtx->lexState); + BEGIN(g_currentCtx->lexState); + g_braceCount = g_currentCtx->braceCount; + if (!g_contextStack.isEmpty()) + { + g_currentCtx = g_contextStack.pop(); + } + else + { + g_currentCtx = 0; + //printf("Trying to pop context while g_contextStack is empty!\n"); + } +} + +void resetCCodeParserState() +{ + //printf("***initParseCodeContext()\n"); + g_theVarContext.clear(); + g_classScopeLengthStack.setAutoDelete(TRUE); + g_classScopeLengthStack.clear(); + delete g_codeClassSDict; + g_codeClassSDict = new ClassSDict(17); + g_codeClassSDict->setAutoDelete(TRUE); + g_codeClassSDict->clear(); + g_curClassBases.clear(); + g_anchorCount = 0; +} + +void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s, + bool exBlock, const char *exName,FileDef *fd, + int startLine,int endLine,bool inlineFragment, + MemberDef *memberDef,bool showLineNumbers) +{ + //printf("***parseCode() exBlock=%d exName=%s fd=%p className=%s\n", + // exBlock,exName,fd,className); + if (s.isEmpty()) return; + if (g_codeClassSDict==0) + { + resetCCodeParserState(); + } + g_code = &od; + g_inputString = s; + g_inputPosition = 0; + g_currentFontClass = 0; + g_needsTermination = FALSE; + g_inFunctionTryBlock = FALSE; + if (endLine!=-1) + g_inputLines = endLine+1; + else + g_inputLines = countLines(); + + if (startLine!=-1) + g_yyLineNr = startLine; + else + g_yyLineNr = 1; + + g_curlyCount = 0; + g_bodyCurlyCount = 0; + g_bracketCount = 0; + g_sharpCount = 0; + g_insideTemplate = FALSE; + g_theCallContext.clear(); + g_scopeStack.clear(); + g_classScope = className; + //printf("parseCCode %s\n",className); + g_exampleBlock = exBlock; + g_exampleName = exName; + g_sourceFileDef = fd; + g_lineNumbers = fd!=0 && showLineNumbers; + bool cleanupSourceDef = FALSE; + if (/* exBlock */ fd==0) + { + // create a dummy filedef for the example + g_sourceFileDef = new FileDef("",(exName?exName:"generated")); + cleanupSourceDef = TRUE; + } + if (g_sourceFileDef) + { + setCurrentDoc(g_sourceFileDef->name(),g_sourceFileDef->getSourceFileBase()); + g_insideObjC = g_sourceFileDef->name().lower().right(2)==".m" || + g_sourceFileDef->name().lower().right(3)==".mm"; + } + g_currentDefinition = 0; + g_currentMemberDef = 0; + g_searchingForBody = exBlock; + g_insideBody = FALSE; + g_bracketCount = 0; + if (!g_exampleName.isEmpty()) + { + g_exampleFile = convertNameToFile(g_exampleName+"-example",FALSE,TRUE); + //printf("g_exampleFile=%s\n",g_exampleFile.data()); + } + g_includeCodeFragment = inlineFragment; + //printf("** exBlock=%d exName=%s include=%d\n",exBlock,exName,inlineFragment); + startCodeLine(); + g_type.resize(0); + g_name.resize(0); + g_args.resize(0); + g_parmName.resize(0); + g_parmType.resize(0); + if (memberDef) setParameterList(memberDef); + codeYYrestart( codeYYin ); + BEGIN( Body ); + codeYYlex(); + g_lexInit=TRUE; + if (g_needsTermination) + { + endFontClass(); + g_code->endCodeLine(); + } + if (cleanupSourceDef) + { + // delete the temporary file definition used for this example + delete g_sourceFileDef; + g_sourceFileDef=0; + } + return; +} + +void codeFreeScanner() +{ +#if defined(YY_FLEX_SUBMINOR_VERSION) + if (g_lexInit) + { + codeYYlex_destroy(); + } +#endif +} + + + +#if !defined(YY_FLEX_SUBMINOR_VERSION) +extern "C" { // some bogus code to keep the compiler happy + void codeYYdummy() { yy_flex_realloc(0,0); } +} +#elif YY_FLEX_SUBMINOR_VERSION<33 +#error "You seem to be using a version of flex newer than 2.5.4 but older than 2.5.33. These versions do NOT work with doxygen! Please use version <=2.5.4 or >=2.5.33 or expect things to be parsed wrongly!" +#endif + Index: branches/xZenu/src/util/doxygen/src/translatordecoder.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translatordecoder.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translatordecoder.h (revision 1322) @@ -0,0 +1,750 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef TRANSLATORDECODER_H +#define TRANSLATORDECODER_H + +#include "translator.h" +#include "portable.h" + +class TranslatorDecoder : public Translator +{ + public: + + TranslatorDecoder(Translator *translator) : m_translator(translator) + { + m_toUtf8 = portable_iconv_open("UTF-8",translator->idLanguageCharset()); + m_fromUtf8 = portable_iconv_open(translator->idLanguageCharset(),"UTF-8"); + } + virtual ~TranslatorDecoder() + { + if (m_toUtf8!=(void *)(-1)) portable_iconv_close(m_toUtf8); + if (m_fromUtf8!=(void *)(-1)) portable_iconv_close(m_fromUtf8); + delete m_translator; + } + + /*! This method is used to provide warning message that is displayed + * if the user chooses a language whose translation is not up to date. + * It is implemented by the adapter classes. + */ + virtual QCString updateNeededMessage() { return m_translator->updateNeededMessage(); } + + // Please, have a look at comments inside the translator_en.h file + // to learn the meaning of the following methods. The translator_en.h + // file contains the TranslatorEnglish implementation, which is + // always up-to-date (by definition). + + // --- Language control methods ------------------- + + QCString idLanguage() + { return m_translator->idLanguage(); } + QCString latexLanguageSupportCommand() + { return m_translator->latexLanguageSupportCommand(); } + QCString idLanguageCharset() + { return m_translator->idLanguageCharset(); } + + QCString recode(const QCString &s,void *cd) + { + if (cd==(void*)(-1)) return s; + int iSize = s.length(); + int oSize = iSize*4+1; + QCString output(oSize); + size_t iLeft = iSize; + size_t oLeft = oSize; + const char *iPtr = s.data(); + char *oPtr = output.data(); + if (!portable_iconv(cd,&iPtr,&iLeft,&oPtr,&oLeft)) + { + oSize -= oLeft; + output.resize(oSize+1); + output.at(oSize)='\0'; + return output; + } + else + { + return s; + } + } + QCString toUtf8(const QCString &s) + { + return recode(s,m_toUtf8); + } + QCString fromUtf8(const QCString &s) + { + return recode(s,m_fromUtf8); + } + + // --- Language translation methods ------------------- + + QCString trRelatedFunctions() + { return toUtf8(m_translator->trRelatedFunctions()); } + QCString trRelatedSubscript() + { return toUtf8(m_translator->trRelatedSubscript()); } + QCString trDetailedDescription() + { return toUtf8(m_translator->trDetailedDescription()); } + QCString trMemberTypedefDocumentation() + { return toUtf8(m_translator->trMemberTypedefDocumentation()); } + QCString trMemberEnumerationDocumentation() + { return toUtf8(m_translator->trMemberEnumerationDocumentation()); } + + QCString trMemberFunctionDocumentation() + { return toUtf8(m_translator->trMemberFunctionDocumentation()); } + QCString trMemberDataDocumentation() + { return toUtf8(m_translator->trMemberDataDocumentation()); } + QCString trMore() + { return toUtf8(m_translator->trMore()); } + QCString trListOfAllMembers() + { return toUtf8(m_translator->trListOfAllMembers()); } + QCString trMemberList() + { return toUtf8(m_translator->trMemberList()); } + QCString trThisIsTheListOfAllMembers() + { return toUtf8(m_translator->trThisIsTheListOfAllMembers()); } + QCString trIncludingInheritedMembers() + { return toUtf8(m_translator->trIncludingInheritedMembers()); } + QCString trGeneratedAutomatically(const char *s) + { return toUtf8(m_translator->trGeneratedAutomatically(fromUtf8(s))); } + QCString trEnumName() + { return toUtf8(m_translator->trEnumName()); } + QCString trEnumValue() + { return toUtf8(m_translator->trEnumValue()); } + QCString trDefinedIn() + { return toUtf8(m_translator->trDefinedIn()); } + + // quick reference sections + + QCString trModules() + { return toUtf8(m_translator->trModules()); } + QCString trClassHierarchy() + { return toUtf8(m_translator->trClassHierarchy()); } + QCString trCompoundList() + { return toUtf8(m_translator->trCompoundList()); } + + QCString trFileList() + { return toUtf8(m_translator->trFileList()); } + QCString trCompoundMembers() + { return toUtf8(m_translator->trCompoundMembers()); } + QCString trFileMembers() + { return toUtf8(m_translator->trFileMembers()); } + QCString trRelatedPages() + { return toUtf8(m_translator->trRelatedPages()); } + QCString trExamples() + { return toUtf8(m_translator->trExamples()); } + QCString trSearch() + { return toUtf8(m_translator->trSearch()); } + QCString trClassHierarchyDescription() + { return toUtf8(m_translator->trClassHierarchyDescription()); } + QCString trFileListDescription(bool extractAll) + { return toUtf8(m_translator->trFileListDescription(extractAll)); } + QCString trCompoundListDescription() + { return toUtf8(m_translator->trCompoundListDescription()); } + QCString trCompoundMembersDescription(bool extractAll) + { return toUtf8(m_translator->trCompoundMembersDescription(extractAll)); } + QCString trFileMembersDescription(bool extractAll) + { return toUtf8(m_translator->trFileMembersDescription(extractAll)); } + QCString trExamplesDescription() + { return toUtf8(m_translator->trExamplesDescription()); } + QCString trRelatedPagesDescription() + { return toUtf8(m_translator->trRelatedPagesDescription()); } + QCString trModulesDescription() + { return toUtf8(m_translator->trModulesDescription()); } + + // index titles (the project name is prepended for these) + + QCString trDocumentation() + { return toUtf8(m_translator->trDocumentation()); } + QCString trModuleIndex() + { return toUtf8(m_translator->trModuleIndex()); } + QCString trHierarchicalIndex() + { return toUtf8(m_translator->trHierarchicalIndex()); } + QCString trCompoundIndex() + { return toUtf8(m_translator->trCompoundIndex()); } + QCString trFileIndex() + { return toUtf8(m_translator->trFileIndex()); } + QCString trModuleDocumentation() + { return toUtf8(m_translator->trModuleDocumentation()); } + QCString trClassDocumentation() + { return toUtf8(m_translator->trClassDocumentation()); } + QCString trFileDocumentation() + { return toUtf8(m_translator->trFileDocumentation()); } + QCString trExampleDocumentation() + { return toUtf8(m_translator->trExampleDocumentation()); } + QCString trPageDocumentation() + { return toUtf8(m_translator->trPageDocumentation()); } + QCString trReferenceManual() + { return toUtf8(m_translator->trReferenceManual()); } + QCString trDefines() + { return toUtf8(m_translator->trDefines()); } + QCString trFuncProtos() + { return toUtf8(m_translator->trFuncProtos()); } + QCString trTypedefs() + { return toUtf8(m_translator->trTypedefs()); } + QCString trEnumerations() + { return toUtf8(m_translator->trEnumerations()); } + QCString trFunctions() + { return toUtf8(m_translator->trFunctions()); } + QCString trVariables() + { return toUtf8(m_translator->trVariables()); } + QCString trEnumerationValues() + { return toUtf8(m_translator->trEnumerationValues()); } + QCString trDefineDocumentation() + { return toUtf8(m_translator->trDefineDocumentation()); } + QCString trFunctionPrototypeDocumentation() + { return toUtf8(m_translator->trFunctionPrototypeDocumentation()); } + QCString trTypedefDocumentation() + { return toUtf8(m_translator->trTypedefDocumentation()); } + QCString trEnumerationTypeDocumentation() + { return toUtf8(m_translator->trEnumerationTypeDocumentation()); } + QCString trFunctionDocumentation() + { return toUtf8(m_translator->trFunctionDocumentation()); } + QCString trVariableDocumentation() + { return toUtf8(m_translator->trVariableDocumentation()); } + QCString trCompounds() + { return toUtf8(m_translator->trCompounds()); } + QCString trGeneratedAt(const char *date,const char *projName) + { return toUtf8(m_translator->trGeneratedAt(fromUtf8(date),fromUtf8(projName))); } + QCString trWrittenBy() + { return toUtf8(m_translator->trWrittenBy()); } + QCString trClassDiagram(const char *clName) + { return toUtf8(m_translator->trClassDiagram(fromUtf8(clName))); } + QCString trForInternalUseOnly() + { return toUtf8(m_translator->trForInternalUseOnly()); } + QCString trWarning() + { return toUtf8(m_translator->trWarning()); } + QCString trVersion() + { return toUtf8(m_translator->trVersion()); } + QCString trDate() + { return toUtf8(m_translator->trDate()); } + QCString trReturns() + { return toUtf8(m_translator->trReturns()); } + QCString trSeeAlso() + { return toUtf8(m_translator->trSeeAlso()); } + QCString trParameters() + { return toUtf8(m_translator->trParameters()); } + QCString trExceptions() + { return toUtf8(m_translator->trExceptions()); } + QCString trGeneratedBy() + { return toUtf8(m_translator->trGeneratedBy()); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + QCString trNamespaceList() + { return toUtf8(m_translator->trNamespaceList()); } + QCString trNamespaceListDescription(bool extractAll) + { return toUtf8(m_translator->trNamespaceListDescription(extractAll)); } + QCString trFriends() + { return toUtf8(m_translator->trFriends()); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + QCString trRelatedFunctionDocumentation() + { return toUtf8(m_translator->trRelatedFunctionDocumentation()); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { return toUtf8(m_translator->trCompoundReference(fromUtf8(clName),compType,isTemplate)); } + + + QCString trFileReference(const char *fileName) + { return toUtf8(m_translator->trFileReference(fromUtf8(fileName))); } + QCString trNamespaceReference(const char *namespaceName) + { return toUtf8(m_translator->trNamespaceReference(fromUtf8(namespaceName))); } + + QCString trPublicMembers() + { return toUtf8(m_translator->trPublicMembers()); } + QCString trPublicSlots() + { return toUtf8(m_translator->trPublicSlots()); } + QCString trSignals() + { return toUtf8(m_translator->trSignals()); } + QCString trStaticPublicMembers() + { return toUtf8(m_translator->trStaticPublicMembers()); } + QCString trProtectedMembers() + { return toUtf8(m_translator->trProtectedMembers()); } + QCString trProtectedSlots() + { return toUtf8(m_translator->trProtectedSlots()); } + QCString trStaticProtectedMembers() + { return toUtf8(m_translator->trStaticProtectedMembers()); } + QCString trPrivateMembers() + { return toUtf8(m_translator->trPrivateMembers()); } + QCString trPrivateSlots() + { return toUtf8(m_translator->trPrivateSlots()); } + QCString trStaticPrivateMembers() + { return toUtf8(m_translator->trStaticPrivateMembers()); } + QCString trWriteList(int numEntries) + { return toUtf8(m_translator->trWriteList(numEntries)); } + QCString trInheritsList(int numEntries) + { return toUtf8(m_translator->trInheritsList(numEntries)); } + QCString trInheritedByList(int numEntries) + { return toUtf8(m_translator->trInheritedByList(numEntries)); } + QCString trReimplementedFromList(int numEntries) + { return toUtf8(m_translator->trReimplementedFromList(numEntries)); } + QCString trReimplementedInList(int numEntries) + { return toUtf8(m_translator->trReimplementedInList(numEntries)); } + QCString trNamespaceMembers() + { return toUtf8(m_translator->trNamespaceMembers()); } + QCString trNamespaceMemberDescription(bool extractAll) + { return toUtf8(m_translator->trNamespaceMemberDescription(extractAll)); } + + QCString trNamespaceIndex() + { return toUtf8(m_translator->trNamespaceIndex()); } + QCString trNamespaceDocumentation() + { return toUtf8(m_translator->trNamespaceDocumentation()); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + QCString trNamespaces() + { return toUtf8(m_translator->trNamespaces()); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { return toUtf8(m_translator->trGeneratedFromFiles(compType,single)); } + + + QCString trAlphabeticalList() + { return toUtf8(m_translator->trAlphabeticalList()); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + QCString trReturnValues() + { return toUtf8(m_translator->trReturnValues()); } + QCString trMainPage() + { return toUtf8(m_translator->trMainPage()); } + QCString trPageAbbreviation() + { return toUtf8(m_translator->trPageAbbreviation()); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + QCString trDefinedAtLineInSourceFile() + { return toUtf8(m_translator->trDefinedAtLineInSourceFile()); } + QCString trDefinedInSourceFile() + { return toUtf8(m_translator->trDefinedInSourceFile()); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + QCString trDeprecated() + { return toUtf8(m_translator->trDeprecated()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + QCString trCollaborationDiagram(const char *clName) + { return toUtf8(m_translator->trCollaborationDiagram(fromUtf8(clName))); } + QCString trInclDepGraph(const char *fName) + { return toUtf8(m_translator->trInclDepGraph(fromUtf8(fName))); } + QCString trConstructorDocumentation() + { return toUtf8(m_translator->trConstructorDocumentation()); } + QCString trGotoSourceCode() + { return toUtf8(m_translator->trGotoSourceCode()); } + QCString trGotoDocumentation() + { return toUtf8(m_translator->trGotoDocumentation()); } + QCString trPrecondition() + { return toUtf8(m_translator->trPrecondition()); } + QCString trPostcondition() + { return toUtf8(m_translator->trPostcondition()); } + QCString trInvariant() + { return toUtf8(m_translator->trInvariant()); } + QCString trInitialValue() + { return toUtf8(m_translator->trInitialValue()); } + QCString trCode() + { return toUtf8(m_translator->trCode()); } + + QCString trGraphicalHierarchy() + { return toUtf8(m_translator->trGraphicalHierarchy()); } + QCString trGotoGraphicalHierarchy() + { return toUtf8(m_translator->trGotoGraphicalHierarchy()); } + QCString trGotoTextualHierarchy() + { return toUtf8(m_translator->trGotoTextualHierarchy()); } + QCString trPageIndex() + { return toUtf8(m_translator->trPageIndex()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + QCString trNote() + { return toUtf8(m_translator->trNote()); } + QCString trPublicTypes() + { return toUtf8(m_translator->trPublicTypes()); } + QCString trPublicAttribs() + { return toUtf8(m_translator->trPublicAttribs()); } + QCString trStaticPublicAttribs() + { return toUtf8(m_translator->trStaticPublicAttribs()); } + QCString trProtectedTypes() + { return toUtf8(m_translator->trProtectedTypes()); } + QCString trProtectedAttribs() + { return toUtf8(m_translator->trProtectedAttribs()); } + QCString trStaticProtectedAttribs() + { return toUtf8(m_translator->trStaticProtectedAttribs()); } + QCString trPrivateTypes() + { return toUtf8(m_translator->trPrivateTypes()); } + QCString trPrivateAttribs() + { return toUtf8(m_translator->trPrivateAttribs()); } + QCString trStaticPrivateAttribs() + { return toUtf8(m_translator->trStaticPrivateAttribs()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + QCString trTodo() + { return toUtf8(m_translator->trTodo()); } + QCString trTodoList() + { return toUtf8(m_translator->trTodoList()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + QCString trReferencedBy() + { return toUtf8(m_translator->trReferencedBy()); } + QCString trRemarks() + { return toUtf8(m_translator->trRemarks()); } + QCString trAttention() + { return toUtf8(m_translator->trAttention()); } + QCString trInclByDepGraph() + { return toUtf8(m_translator->trInclByDepGraph()); } + QCString trSince() + { return toUtf8(m_translator->trSince()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + QCString trLegendTitle() + { return toUtf8(m_translator->trLegendTitle()); } + QCString trLegendDocs() + { return toUtf8(m_translator->trLegendDocs()); } + QCString trLegend() + { return toUtf8(m_translator->trLegend()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + QCString trTest() + { return toUtf8(m_translator->trTest()); } + QCString trTestList() + { return toUtf8(m_translator->trTestList()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + QCString trDCOPMethods() + { return toUtf8(m_translator->trDCOPMethods()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + QCString trProperties() + { return toUtf8(m_translator->trProperties()); } + QCString trPropertyDocumentation() + { return toUtf8(m_translator->trPropertyDocumentation()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + QCString trClasses() + { return toUtf8(m_translator->trClasses()); } + QCString trPackage(const char *name) + { return toUtf8(m_translator->trPackage(fromUtf8(name))); } + QCString trPackageList() + { return toUtf8(m_translator->trPackageList()); } + QCString trPackageListDescription() + { return toUtf8(m_translator->trPackageListDescription()); } + QCString trPackages() + { return toUtf8(m_translator->trPackages()); } + QCString trDefineValue() + { return toUtf8(m_translator->trDefineValue()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + QCString trBug() + { return toUtf8(m_translator->trBug()); } + QCString trBugList() + { return toUtf8(m_translator->trBugList()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + + QCString trRTFansicp() + { return toUtf8(m_translator->trRTFansicp()); } + QCString trRTFCharSet() + { return toUtf8(m_translator->trRTFCharSet()); } + QCString trRTFGeneralIndex() + { return toUtf8(m_translator->trRTFGeneralIndex()); } + + // Translation of the word + + QCString trClass(bool first_capital, bool singular) + { return toUtf8(m_translator->trClass(first_capital,singular)); } + QCString trFile(bool first_capital, bool singular) + { return toUtf8(m_translator->trFile(first_capital,singular)); } + QCString trNamespace(bool first_capital, bool singular) + { return toUtf8(m_translator->trNamespace(first_capital,singular)); } + + QCString trGroup(bool first_capital, bool singular) + { return toUtf8(m_translator->trGroup(first_capital,singular)); } + QCString trPage(bool first_capital, bool singular) + { return toUtf8(m_translator->trPage(first_capital,singular)); } + QCString trMember(bool first_capital, bool singular) + { return toUtf8(m_translator->trMember(first_capital,singular)); } + QCString trGlobal(bool first_capital, bool singular) + { return toUtf8(m_translator->trGlobal(first_capital,singular)); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + QCString trAuthor(bool first_capital, bool singular) + { return toUtf8(m_translator->trAuthor(first_capital,singular)); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + QCString trReferences() + { return toUtf8(m_translator->trReferences()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + QCString trImplementedFromList(int numEntries) + { return toUtf8(m_translator->trImplementedFromList(numEntries)); } + QCString trImplementedInList(int numEntries) + { return toUtf8(m_translator->trImplementedInList(numEntries)); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + QCString trRTFTableOfContents() + { return toUtf8(m_translator->trRTFTableOfContents()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + QCString trDeprecatedList() + { return toUtf8(m_translator->trDeprecatedList()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + QCString trEvents() + { return toUtf8(m_translator->trEvents()); } + QCString trEventDocumentation() + { return toUtf8(m_translator->trEventDocumentation()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + QCString trPackageTypes() + { return toUtf8(m_translator->trPackageTypes()); } + QCString trPackageMembers() + { return toUtf8(m_translator->trPackageMembers()); } + QCString trStaticPackageMembers() + { return toUtf8(m_translator->trStaticPackageMembers()); } + QCString trPackageAttribs() + { return toUtf8(m_translator->trPackageAttribs()); } + QCString trStaticPackageAttribs() + { return toUtf8(m_translator->trStaticPackageAttribs()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + QCString trAll() + { return toUtf8(m_translator->trAll()); } + QCString trCallGraph() + { return toUtf8(m_translator->trCallGraph()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + QCString trSearchForIndex() + { return toUtf8(m_translator->trSearchForIndex()); } + QCString trSearchResultsTitle() + { return toUtf8(m_translator->trSearchResultsTitle()); } + QCString trSearchResults(int numDocuments) + { return toUtf8(m_translator->trSearchResults(numDocuments)); } + QCString trSearchMatches() + { return toUtf8(m_translator->trSearchMatches()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + QCString trSourceFile(QCString& filename) + { return toUtf8(m_translator->trSourceFile(filename)); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + QCString trDirIndex() + { return toUtf8(m_translator->trDirIndex()); } + QCString trDirDocumentation() + { return toUtf8(m_translator->trDirDocumentation()); } + QCString trDirectories() + { return toUtf8(m_translator->trDirectories()); } + QCString trDirDescription() + { return toUtf8(m_translator->trDirDescription()); } + QCString trDirReference(const char *dirName) + { return toUtf8(m_translator->trDirReference(fromUtf8(dirName))); } + QCString trDir(bool first_capital, bool singular) + { return toUtf8(m_translator->trDir(first_capital,singular)); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + QCString trOverloadText() + { return toUtf8(m_translator->trOverloadText()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + QCString trCallerGraph() + { return toUtf8(m_translator->trCallerGraph()); } + QCString trEnumerationValueDocumentation() + { return toUtf8(m_translator->trEnumerationValueDocumentation()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 +////////////////////////////////////////////////////////////////////////// + + QCString trMemberFunctionDocumentationFortran() + { return toUtf8(m_translator->trMemberFunctionDocumentationFortran()); } + QCString trCompoundListFortran() + { return toUtf8(m_translator->trCompoundListFortran()); } + QCString trCompoundMembersFortran() + { return toUtf8(m_translator->trCompoundMembersFortran()); } + QCString trCompoundListDescriptionFortran() + { return toUtf8(m_translator->trCompoundListDescriptionFortran()); } + QCString trCompoundMembersDescriptionFortran(bool extractAll) + { return toUtf8(m_translator->trCompoundMembersDescriptionFortran(extractAll)); } + QCString trCompoundIndexFortran() + { return toUtf8(m_translator->trCompoundIndexFortran()); } + QCString trTypeDocumentation() + { return toUtf8(m_translator->trTypeDocumentation()); } + QCString trSubprograms() + { return toUtf8(m_translator->trSubprograms()); } + QCString trSubprogramDocumentation() + { return toUtf8(m_translator->trSubprogramDocumentation()); } + QCString trDataTypes() + { return toUtf8(m_translator->trDataTypes()); } + QCString trModulesList() + { return toUtf8(m_translator->trModulesList()); } + QCString trModulesListDescription(bool extractAll) + { return toUtf8(m_translator->trModulesListDescription(extractAll)); } + QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { return toUtf8(m_translator->trCompoundReferenceFortran(fromUtf8(clName),compType,isTemplate)); } + QCString trModuleReference(const char *namespaceName) + { return toUtf8(m_translator->trModuleReference(fromUtf8(namespaceName))); } + QCString trModulesMembers() + { return toUtf8(m_translator->trModulesMembers()); } + QCString trModulesMemberDescription(bool extractAll) + { return toUtf8(m_translator->trModulesMemberDescription(extractAll)); } + QCString trModulesIndex() + { return toUtf8(m_translator->trModulesIndex()); } + QCString trModule(bool first_capital, bool singular) + { return toUtf8(m_translator->trModule(first_capital,singular)); } + QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool single) + { return toUtf8(m_translator->trGeneratedFromFilesFortran(compType,single)); } + QCString trType(bool first_capital, bool singular) + { return toUtf8(m_translator->trType(first_capital,singular)); } + QCString trSubprogram(bool first_capital, bool singular) + { return toUtf8(m_translator->trSubprogram(first_capital,singular)); } + QCString trTypeConstraints() + { return toUtf8(m_translator->trTypeConstraints()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.0 +////////////////////////////////////////////////////////////////////////// + + QCString trDirRelation(const char *name) + { return toUtf8(m_translator->trDirRelation(fromUtf8(name))); } + QCString trLoading() + { return toUtf8(m_translator->trLoading()); } + QCString trGlobalNamespace() + { return toUtf8(m_translator->trGlobalNamespace()); } + QCString trSearching() + { return toUtf8(m_translator->trSearching()); } + QCString trNoMatches() + { return toUtf8(m_translator->trNoMatches()); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 +////////////////////////////////////////////////////////////////////////// + + QCString trDirDependency(const char *name) + { return toUtf8(m_translator->trDirDependency(fromUtf8(name))); } + QCString trFileIn(const char *name) + { return toUtf8(m_translator->trFileIn(fromUtf8(name))); } + QCString trIncludesFileIn(const char *name) + { return toUtf8(m_translator->trIncludesFileIn(fromUtf8(name))); } + QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds,bool includeTime) + { return toUtf8(m_translator->trDateTime(year,month,day,dayOfWeek, + hour,minutes,seconds,includeTime)); + } + + +////////////////////////////////////////////////////////////////////////// + private: + Translator *m_translator; + void *m_toUtf8; + void *m_fromUtf8; + +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/translator_hr.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator_hr.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator_hr.h (revision 1322) @@ -0,0 +1,1557 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * +*/ +// translation by Boris Bralo <boris.bralo@gmail.com> +// Updates: +// -------- +// 2000/08/20 +// - Better handling of ISO-8859-2/ WIN 1250 stuff based on (actualy stolen from :-)) Czech translations +// implemented by Petr Prikryl (prikrylp@skil.cz). +// As opposed to Czech translation this one assumes that Doxygen strings are written in Linux ( it's true, +// I don't have QT pro licence ) , and uses ISOToWin function when built in WIN32 +// +// 2000/09/18 +// - Added strings from 1.2.1 +// - Removed unneeeded decode() calls +// - Changed some CS terminology +// +// 2001/01/22 +// - Added strings from 1.2.4 +// +// 2001/05/25 +// - Added strings and up to and including 1.2.7_20010524 +// - Removed obsolete method trFiles() +// - Removed obsolete method trAuthor() +// - Removed obsolete method trAuthor() +// - Removed obsolete method trVerbatimHeadert() +// - Method latexBabelPackage() removed, ude latexLanguageSupportCommand +// +// 2001/11/13 +// - inherits from Translator +// - Added strings for 1.2.11 +// - better output for C documentation (trCompoundMembersDescription(), trClassDocumentation()) +// +// 2001/11/13 +// - Added strings for 1.2.13 +// +// 2003/02/26 +// - Added strings for 1.2.18 +// +// 2003/04/29 +// - Added strings for 1.3.0 +// +// 2004/06/21 +// - Added strings for 1.3.8 +// +// 2004/09/15 +// - Added strings for 1.3.9 +// +// 2005/02/28 +// - Removed obsolete (unused) methods +// +// 2005/03/21 +// - Added strings for 1.4.1 +// +// 2006/06/11 +// - Added strings for 1.4.6 +// +// 2009/01/09 +// - Updated trLegendDocs +// +// 2010/03/04 +// - Updates for "new since 1.6.0 (mainly for the new search engine)". +// - UTF-8 +// - removed decode() +// +// 2010/05/27 +// - Updates for 1.6.3 +#ifndef TRANSLATOR_HR_H +#define TRANSLATOR_HR_H + +class TranslatorCroatian : public Translator +{ + private: + + public: + QCString idLanguage() + { return "croatian"; } + QCString idLanguageCharset() + { + return "utf-8"; + } + QCString latexLanguageSupportCommand() + { return "\\usepackage[croatian]{babel}\n"; } + QCString trRelatedFunctions() + { return "Povezane funkcije"; } + QCString trRelatedSubscript() + { return "(To nisu member funkcije.)"; } + QCString trDetailedDescription() + { return "Detaljno objaÅ¡njenje"; } + QCString trMemberTypedefDocumentation() + { return "Dokumentacija typedef Älanova"; } + QCString trMemberEnumerationDocumentation() + { return "Dokumentacija enumeracijskih Älanova"; } + QCString trMemberFunctionDocumentation() + { return "Dokumentacija funkcija"; } + QCString trMemberDataDocumentation() + { return "Documentacija varijabli"; } + QCString trMore() + { return "OpÅ¡irnije..."; } + QCString trListOfAllMembers() + { return "Popis svih Älanova."; } + QCString trMemberList() + { return "Popis Älanova."; } + QCString trThisIsTheListOfAllMembers() + { return "Ovo je popis svih Älanova"; } + QCString trIncludingInheritedMembers() + { return ", ukljuÄujući naslijeÄ‘ene Älanove."; } + QCString trGeneratedAutomatically(const char *s) + { QCString result="napravljeno automatski Doxygen-om"; + if (s) result+=(QCString)" za "+s; + result+=" iz programskog koda."; + return result; + } + QCString trEnumName() + { return "enum ime"; } + QCString trEnumValue() + { return "enum vrijednost"; } + QCString trDefinedIn() + { return "definirano u"; } + QCString trModules() + { return "Moduli"; } + QCString trClassHierarchy() + { return "Stablo klasa"; } + QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Sve strukture"; + } + else + { + return "Sve klase"; + } + } + QCString trFileList() + { return "Popis datoteka"; } + QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + return "Svi Älanovi struktura"; + else + return "Svi Älanovi klasa"; + } + QCString trFileMembers() + { return "Älanovi klasa u datoteci"; } + QCString trRelatedPages() + { return "Stranice povezane s ovom"; } + QCString trExamples() + { return "Primjeri"; } + QCString trSearch() + { return "Traži"; } + QCString trClassHierarchyDescription() + { return "Stablo naslijeÄ‘ivanja je složeno " + "približno po abecedi:"; + } + QCString trFileListDescription(bool extractAll) + { + QCString result="Popis svih "; + if (!extractAll) result+="dokumentiranih "; + result+="datoteka, s kratkim opisom:"; + return result; + } + QCString trCompoundListDescription() + { return "Popis svih klasa, unija i struktura " + "s kratkim opisom :"; + } + QCString trCompoundMembersDescription(bool extractAll) + { + QCString result="Popis svih "; + if (!extractAll) + result+="dokumentiranih "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + result+="Älanova klasa s linkovima na "; + else + result+="Älanova struktura s linkovima na "; + + if (!extractAll) + { + result+="dokumentaciju svakog Älana:"; + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + result+="dokumentaciju klase :"; + else + result +="dokumentaciju strukture"; + } + return result; + } + QCString trFileMembersDescription(bool extractAll) + { + QCString result="Popis svih "; + if (!extractAll) + result+="dokumentiranih "; + result+="Älanova s linkovima na "; + if (extractAll) + result+="dokumentaciju datoteke u kojima se nalaze:"; + else + result+="datoteke u kojima se nalaze:"; + return result; + } + QCString trExamplesDescription() + { return "Popis primjera :"; } + QCString trRelatedPagesDescription() + { return "Popis povezanih stranica:"; } + QCString trModulesDescription() + { return "Popis svih modula:"; } + + QCString trDocumentation() + { return "Dokumentacija"; } + QCString trModuleIndex() + { return "Kazalo modula"; } + QCString trHierarchicalIndex() + { return "Hijerarhijsko kazalo"; } + QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Kazalo struktura podataka"; + } + else + { + return "Skupno kazalo "; + } + } + QCString trFileIndex() + { return "Kazalo datoteka"; } + QCString trModuleDocumentation() + { return "Dokumentacija modula"; } + QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dokumentacija struktura podataka"; + } + else + { + return "Dokumentacija klasa"; + } + } + QCString trFileDocumentation() + { return "Dokumentacija datoteka"; } + QCString trExampleDocumentation() + { return "Dokumentacija primjera"; } + QCString trPageDocumentation() + { return "Dokumentacija vezane stranice"; } + QCString trReferenceManual() + { return "PriruÄnik"; } + + QCString trDefines() + { return "Definicije"; } + QCString trFuncProtos() + { return "Prototipi funkcija"; } + QCString trTypedefs() + { return "Typedef-ovi"; } + QCString trEnumerations() + { return "Enumeracije"; } + QCString trFunctions() + { return "Funkcije"; } + QCString trVariables() + { return "Varijable"; } + QCString trEnumerationValues() + { return "Vrijednosti enumeracija"; } + QCString trDefineDocumentation() + { return "Dokumentacija definicija"; } + QCString trFunctionPrototypeDocumentation() + { return "Dokumentacija prototipa funkcije"; } + QCString trTypedefDocumentation() + { return "Dokumentacija typedef-a"; } + QCString trEnumerationTypeDocumentation() + { return "Dokumentacija enumeracijskog tipa"; } + QCString trFunctionDocumentation() + { return "Dokumentacije funkcija"; } + QCString trVariableDocumentation() + { return "Dokumentacija varijable"; } + QCString trCompounds() + { return "Strukture"; } + QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result=(QCString)"Napravljeno "+date; + if (projName) result+=(QCString)" projekt: "+projName; + result+=" generator: "; + return result; + } + QCString trWrittenBy() + { + return "napisao "; + } + QCString trClassDiagram(const char *clName) + { + return QCString("Dijagram klasa za ")+clName; + } + QCString trForInternalUseOnly() + { return "IskljuÄivo za internu uporabu."; } + QCString trWarning() + { return "Upozorenje"; } + QCString trVersion() + { return "Verzija"; } + QCString trDate() + { return "Datum"; } + QCString trReturns() + { return "Povratne vrijednosti"; } + QCString trSeeAlso() + { return "Vidi takoÄ‘er"; } + QCString trParameters() + { return "Parametri"; } + QCString trExceptions() + { return "Iznimke"; } + QCString trGeneratedBy() + { return "Generirao"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + QCString trNamespaceList() + { return "Popis imenika"; } + QCString trNamespaceListDescription(bool extractAll) + { + QCString result="Popis svih "; + if (!extractAll) result+="dokumentiranih "; + result+="imenika s kratkim opisom:"; + return result; + } + QCString trFriends() + { return "Friend-ovi "; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + QCString trRelatedFunctionDocumentation() + { return "Dokumentacija povezanih funkcija"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool /*isTemplate*/) + // used as the title of the HTML page of a class/struct/union + { + QCString result="Opis "; + switch(compType) + { + case ClassDef::Class: result+=" klase "; break; + case ClassDef::Struct: result+=" strukture "; break; + case ClassDef::Union: result+=" unije "; break; + case ClassDef::Interface: result+=" suÄelja (interface) "; break; + case ClassDef::Protocol: result+=" protokola "; break; + case ClassDef::Category: result+=" kategorije "; break; + case ClassDef::Exception: result+=" iznimke (exception) "; break; + } + result += clName; + + return result; + } + QCString trFileReference(const char *fileName) + // used as the title of the HTML page of a file + { + QCString result="Opis datoteke "; + result+=fileName; + return result; + } + QCString trNamespaceReference(const char *namespaceName) + // used as the title of the HTML page of a namespace + { + QCString result ="Opis imenika "; + result+=namespaceName; + + return result; + } + + // these are for the member sections of a class, struct or union + QCString trPublicMembers() + { return "Public Älanovi"; } + QCString trPublicSlots() + { return "Public slotovi"; } + QCString trSignals() + { return "Signali"; } + QCString trStaticPublicMembers() + { return "Static public Älanovi"; } + QCString trProtectedMembers() + { return "Protected Älanovi"; } + QCString trProtectedSlots() + { return "Protected slotovi"; } + QCString trStaticProtectedMembers() + { return "Static protected Älanovi"; } + QCString trPrivateMembers() + { return "Privatni Älanovi"; } + QCString trPrivateSlots() + { return "Privatni slotovi"; } + QCString trStaticPrivateMembers() + { return "StatiÄni privatni Älanovi"; } + // end of member sections + + QCString trWriteList(int numEntries) + { + // this function is used to produce a comma-separated list of items. + // use generateMarker(i) to indicate where item i should be put. + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i<numEntries;i++) + { + // use generateMarker to generate placeholders for the class links! + result+=generateMarker(i); // generate marker for entry i in the list + // (order is left to right) + + if (i!=numEntries-1) // not the last entry, so we need a separator + { + if (i<numEntries-2) // not the fore last entry + result+=", "; + else // the fore last entry + result+=""; + } + } + return result; + } + + QCString trInheritsList(int numEntries) + // used in class documentation to produce a list of base classes, + // if class diagrams are disabled. + { + return "NaslijeÄ‘uje od "+trWriteList(numEntries)+"."; + } + QCString trInheritedByList(int numEntries) + // used in class documentation to produce a list of super classes, + // if class diagrams are disabled. + { + return "NaslijeÄ‘ena u "+trWriteList(numEntries)+"."; + } + QCString trReimplementedFromList(int numEntries) + // used in member documentation blocks to produce a list of + // members that are hidden by this one. + { + return "Reimplementirano od "+trWriteList(numEntries)+"."; + } + QCString trReimplementedInList(int numEntries) + { + // used in member documentation blocks to produce a list of + // all member that overwrite the implementation of this member. + return "Reimplementacija u "+trWriteList(numEntries)+"."; + } + + QCString trNamespaceMembers() + // This is put above each page as a link to all members of namespaces. + { return "Älanovi imenika"; } + QCString trNamespaceMemberDescription(bool extractAll) + // This is an introduction to the page with all namespace members + { + QCString result="Lista svih "; + if (!extractAll) result+="dokumentiranih "; + result+="Älanova imenika s linkovima na "; + if (extractAll) + result+="imeniÄku dokumentaciju svakog Älana:"; + else + result+="imenike kojima pripadaju:"; + return result; + } + QCString trNamespaceIndex() + // This is used in LaTeX as the title of the chapter with the + // index of all namespaces. + { return "Kazalo imenika"; } + QCString trNamespaceDocumentation() + // This is used in LaTeX as the title of the chapter containing + // the documentation of all namespaces. + { return "Dokumentacija namespace-a"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + QCString trNamespaces() + { + return "Imenici"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Class", " Struct" or " Union" + // single is true implies a single file + QCString result="Dokumentacija "; + switch(compType) + { + case ClassDef::Class: result+="klase"; break; + case ClassDef::Struct: result+="strukture"; break; + case ClassDef::Union: result+="unije"; break; + case ClassDef::Interface: result+="suÄelja (interface)"; break; + case ClassDef::Protocol: result+="protokola"; break; + case ClassDef::Category: result+="kategorije"; break; + case ClassDef::Exception: result+="iznimke (exception)"; break; + } + result+=" je napravljena iz " + trFile(FALSE, single) + ": "; + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + QCString trAlphabeticalList() + { return "Abecedni popis"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + QCString trReturnValues() + { return "Povratna vrijednost"; } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + QCString trMainPage() + { return "Glavna stranica"; } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + QCString trPageAbbreviation() + { return "str."; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991106 +////////////////////////////////////////////////////////////////////////// + + QCString trDefinedAtLineInSourceFile() + { + return "Definirano u liniji @0 datoteke @1."; + } + QCString trDefinedInSourceFile() + { + return "Definirano u datoteci @0."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + QCString trDeprecated() + { + return "Zastarjelo"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + QCString trCollaborationDiagram(const char *clName) + { + return (QCString)"Kolaboracijski dijagram za "+clName+ ":"; + } + /*! this text is put before an include dependency graph */ + QCString trInclDepGraph(const char *fName) + { + return (QCString)"Graf include meÄ‘uovisnosti za "+fName+":"; + } + /*! header that is put before the list of constructor/destructors. */ + QCString trConstructorDocumentation() + { + return "Dokumentacija konstruktora i destruktora "; + } + /*! Used in the file documentation to point to the corresponding sources. */ + QCString trGotoSourceCode() + { + return "Izvorni kod"; + } + /*! Used in the file sources to point to the corresponding documentation. */ + QCString trGotoDocumentation() + { + return "Dokumenacija za ovu datoteku."; + } + /*! Text for the \\pre command */ + QCString trPrecondition() + { + return "Preduvjeti"; + } + /*! Text for the \\post command */ + QCString trPostcondition() + { + return "Postuvjeti"; + } + /*! Text for the \\invariant command */ + QCString trInvariant() + { + return "Invarijanta"; + } + /*! Text shown before a multi-line variable/enum initialization */ + QCString trInitialValue() + { + return "PoÄetna vrijednost:"; + } + /*! Text used the source code in the file index */ + QCString trCode() + { + return "kod"; + } + QCString trGraphicalHierarchy() + { + return "GrafiÄko stablo klasa"; + } + QCString trGotoGraphicalHierarchy() + { + return "GrafiÄko stablo klasa"; + } + QCString trGotoTextualHierarchy() + { + return "Tekstualno stablo klasa"; + } + QCString trPageIndex() + { + return "Indeks stranice"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + QCString trNote() + { + return "Primjedba"; + } + QCString trPublicTypes() + { + return "Public tipovi"; + } + QCString trPublicAttribs() + { + return "Public atributi"; + } + QCString trStaticPublicAttribs() + { + return "Static public atributi"; + } + QCString trProtectedTypes() + { + return "Protected tipovi"; + } + QCString trProtectedAttribs() + { + return "Protected atributi"; + } + QCString trStaticProtectedAttribs() + { + return "Static protected atributi"; + } + QCString trPrivateTypes() + { + return "Private tipovi"; + } + QCString trPrivateAttribs() + { + return "Private atributi"; + } + QCString trStaticPrivateAttribs() + { + return "Static private atributi"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a todo item */ + virtual QCString trTodo() + { + return "Za uraditi"; + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return "Ostalo za uraditi"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { + return "Referencirano od"; + } + virtual QCString trRemarks() + { + return "Napomene"; + } + virtual QCString trAttention() + { + return "Pažnja"; + } + virtual QCString trInclByDepGraph() + { + return "Ovaj graf pokazuje koje datoteke izravno " + "ili neizravno ukljuÄuju ovu datoteku:"; + } + virtual QCString trSince() + { + return "Od"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return "Legenda"; + } + /*! page explaining how the dot graph's should be interpreted */ + virtual QCString trLegendDocs() + { + return + "Ova stranica objaÅ¡njava kako interpretirati grafikone koje je generirao " + "doxygen.<p>\n" + "Na primjer:\n" + "\\code\n" + "/*! Nevidljiva klasa (neće stati na graf date visine) */\n" + "class Invisible { };\n\n" + "/*! Odrezana klasa, inheritance je skriven (klase se vidi na grafu, ali ne i sve bazne klase) */\n" + "class Truncated : public Invisible { };\n\n" + "/* Nedokumentirana klasa */\n" + "class Undocumented { };\n\n" + "/*! Klasa koja je naslijeÄ‘ena public */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! A template class */\n" + "template<class T> class Templ { };\n\n" + "/*! Klasa koje je naslijeÄ‘ena protected */\n" + "class ProtectedBase { };\n\n" + "/*! Klasa koje je naslijeÄ‘ena private */\n" + "class PrivateBase { };\n\n" + "/*! Klasa koja se koristi agregacijom */\n" + "class Used { };\n\n" + "/*! Super klasa koja naslijeÄ‘uje/koristi ostale */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented,\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "To će rezultirati grafikonom:" + "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "Pravokutnici imaju slijedeće znaÄenje:\n" + "<ul>\n" + "<li>Puni crni predstavlja klasu za koji je napravljen graf.\n" + "<li>Pravokutnik s crnim rubom predstavlja dokumentiranu klasu.\n" + "<li>Pravokutnik s sivim rubom predstavlja nedokumentiranu klasu.\n" + "<li>Pravokutnik s crvenim rubom predstavlja dokumentiranu klasu\n" + "Za koju nije prikazan graf naslijeÄ‘ivanja. Graf je odrezan " + "ako ne stane unutar odreÄ‘enih granica." + "</ul>\n" + "Strelice imaju slijedeće znaÄenje:\n" + "<ul>\n" + "<li>Tamnoplava strelica oznaÄava public naslijeÄ‘ivanje.\n" + "<li>Tamnozelena strelica oznaÄava protected naslijeÄ‘ivanje.\n" + "<li>Tamnocrvena strelica oznaÄava private naslijeÄ‘ivanje.\n" + "<li>LjubiÄasta isprekidana strelica se koristi ako je klasa dio " + "druge klase ili ako se klasa koristi u drugoj klasi. Natpis na " + "strelici je ime varijable u drugoj klasi\n" + "Strelica je oznaÄena imenom varijable.\n" + "<li>Žuta isprekidana strelica oznaÄava relaciju izmeÄ‘u template instance " + "i template klase. OznaÄena je imenom template parametra\n" + "</ul>\n"; + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return "legenda"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return "Test"; + } + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return "Test lista"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return "DCOP metode"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return "Svojstva (property)"; + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return "Dokumentacija svojstava"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + return "Klase"; + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)"Paket "+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return "Lista paketa"; + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return "Paketi s kratkim opisom (ukoliko postoji):"; + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return "Paketi"; + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return "Vrijednost:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return "GreÅ¡ka"; + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return "Popis greÅ¡aka"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + /*! Used as ansicpg for RTF file */ + virtual QCString trRTFansicp() + { + return "1252"; + } + /*! Used as ansicpg for RTF fcharset */ + virtual QCString trRTFCharSet() + { + return "238"; + } + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return "Sadržaj"; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + QCString result((first_capital ? "Klas" : "klas")); + result+= (singular ? "a" : "e"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + QCString result((first_capital ? "Datotek" : "datotek")); + result+= (singular ? "a" : "e"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + QCString result; + if (singular) + result = ((first_capital ? "Imenik" : "imenik")); + else + result = ((first_capital ? "Imenici" : "imenici")); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + QCString result((first_capital ? "Grup" : "grup")); + result+= (singular ? "a" : "e"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + QCString result((first_capital ? "Stranic" : "stranic")); + result+= (singular ? "a" : "e"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + QCString result((first_capital ? "Älan" : "Älan")); + if (!singular) result+="ovi"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + QCString result((first_capital ? "G" : "g")); + if( singular ) + result += "lobalna varijabla"; + else + result += "lobalne varijable"; + + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + QCString result((first_capital ? "Autor" : "autor")); + if (!singular) result+="i"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return "Reference"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Implementira "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implementation this member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Implementirano u "+trWriteList(numEntries)+"."; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return "Sadržaj"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Popis zastarjelih metoda"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "DogaÄ‘aji"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Dokumentacija dogaÄ‘aja"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return "Tipovi u paketu"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return "Funkcije u paketu"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return "StatiÄke funkcije u paketu"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return "Atributi u paketu"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return "StatiÄki atributi u paketu"; + } + ////////////////////////////////////////////////////////////////////////// + // new since 1.3.1 + ////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "Sve"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Ovo je dijagram poziva za ovu funkciju:"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.3.3 + ////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + return "Traži"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "Rezultati pretrage"; + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return "Nema dokumenta koji odgovaraju vaÅ¡em upitu"; + } + else if (numDocuments==1) + { + return "NaÄ‘en <b>1</b> dokument koji odgovara vaÅ¡em upitu."; + } + else if (numDocuments<5) + { + // Croatian (AFAIK all Slavic languages except Macedonian and Bulgarian) + // have different plural form for 2,3,4. + return "NaÄ‘ena <b>$num</b> dokumenta koji odgovaraju vaÅ¡em upitu." + "Najbolji su prikazani prvi."; + } + else + { + return "NaÄ‘eno <b>$num</b> dokumenata koji odgovaraju vaÅ¡em upitu." + "Najbolji su prikazani prvi."; + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "PronaÄ‘eno:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return "Izvorni kod datoteke " + filename; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return "Stablo direktorija"; } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return "Dokumentacija direktorija"; } + + /*! This is used as the title of the directory index and also in the + * Quick links of a HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return "Direktoriji"; } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { return "Stablo direktorija sortirano abecednim redom:"; } + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { QCString result= "Opis direktorija "; result += dirName; return result; } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool first_capital, bool singular) + { + QCString result((first_capital ? "Direktorij" : "direktorij")); + if (!singular) result+="i"; + return result; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return "Ovo je preopterećena funkcija (overload). " + "Razlikuje se od navedene metode " + "samo po vrsti argumenata koje prihvaća."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + /*! This is used to introduce a caller (or called-by) graph */ + virtual QCString trCallerGraph() + { + return "Ovo je graf funkcija koje pozivaju ovu funkciju:"; + } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { return "Dokumentacija enumeracija"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 (mainly for Fortran) +////////////////////////////////////////////////////////////////////////// + + /*! header that is put before the list of member subprograms (Fortran). */ + virtual QCString trMemberFunctionDocumentationFortran() + { return "Dokumentacija member funkcija/subrutina"; } + + /*! This is put above each page as a link to the list of annotated data types (Fortran). */ + virtual QCString trCompoundListFortran() + { return "Lista tipova podataka"; } + + /*! This is put above each page as a link to all members of compounds (Fortran). */ + virtual QCString trCompoundMembersFortran() + { return "Polja"; } + + /*! This is an introduction to the annotated compound list (Fortran). */ + virtual QCString trCompoundListDescriptionFortran() + { return "Tipovi podataka s kratkim opisom:"; } + + /*! This is an introduction to the page with all data types (Fortran). */ + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) + { + QCString result="Lista svih "; + if (!extractAll) + { + result+="dokumentiranih "; + } + result+="polja"; + result+=" s linkovima na "; + if (!extractAll) + { + result+="dokumentaciju struktura podataka za svako polje"; + } + else + { + result+="strukture kojima pripadaju:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index (Fortran). + */ + virtual QCString trCompoundIndexFortran() + { return "Kazalo data tipova"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all data types (Fortran). + */ + virtual QCString trTypeDocumentation() + { return "Dokumentacija tipova podataka"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) subprograms (Fortran). + */ + virtual QCString trSubprograms() + { return "Funkcije/Subrutine"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for subprograms (Fortran) + */ + virtual QCString trSubprogramDocumentation() + { return "Documentacija funkcija/subrutina"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds (Fortran) + */ + virtual QCString trDataTypes() + { return "Tipovi podataka"; } + + /*! used as the title of page containing all the index of all modules (Fortran). */ + virtual QCString trModulesList() + { return "Popis modula"; } + + /*! used as an introduction to the modules list (Fortran) */ + virtual QCString trModulesListDescription(bool extractAll) + { + QCString result="Lista svih "; + if (!extractAll) result+="dokumentiranih "; + result+="modula s kratkim opisom:"; + return result; + } + + /*! used as the title of the HTML page of a module/type (Fortran) */ + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=(QCString)clName; + switch(compType) + { + case ClassDef::Class: result+=" Modul"; break; + case ClassDef::Struct: result+=" Tip"; break; + case ClassDef::Union: result+=" Unija"; break; + case ClassDef::Interface: result+=" SuÄelje"; break; + case ClassDef::Protocol: result+=" Protokol"; break; + case ClassDef::Category: result+=" Kategorija"; break; + case ClassDef::Exception: result+=" Iznimka"; break; + } + if (isTemplate) result+=" Predložak"; + result+=" Referenca"; + return result; + } + /*! used as the title of the HTML page of a module (Fortran) */ + virtual QCString trModuleReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" - Sadržaj modula"; + return result; + } + + /*! This is put above each page as a link to all members of modules. (Fortran) */ + virtual QCString trModulesMembers() + { return "Älanovi modula"; } + + /*! This is an introduction to the page with all modules members (Fortran) */ + virtual QCString trModulesMemberDescription(bool extractAll) + { + QCString result="Lista svih "; + if (!extractAll) result+="dokumentiranih "; + result+="Älanova modula s linkovima na "; + if (extractAll) + { + result+="dokumentaciju modula za svaki Älan:"; + } + else + { + result+="modul kojem pripadaju:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all modules (Fortran). + */ + virtual QCString trModulesIndex() + { return "Kazalo modula"; } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trModule(bool first_capital, bool singular) + { + QCString result((first_capital ? "Modul" : "modul")); + if (!singular) result+="i"; + return result; + } + /*! This is put at the bottom of a module documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool) + { // here s is one of " Module", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Dokumentacija ovog "; + switch(compType) + { + case ClassDef::Class: result+="modula"; break; + case ClassDef::Struct: result+="tipa"; break; + case ClassDef::Union: result+="unije"; break; + case ClassDef::Interface: result+="suÄelja"; break; + case ClassDef::Protocol: result+="protokola"; break; + case ClassDef::Category: result+="kategorije"; break; + case ClassDef::Exception: result+="iznimke"; break; + } + result+=" je napravljena iz :"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trType(bool first_capital, bool singular) + { + QCString result((first_capital ? "Tip" : "tip")); + if (!singular) result+="ovi"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trSubprogram(bool first_capital, bool singular) + { + QCString result((first_capital ? "Subprogram" : "subprogram")); + if (!singular) result+="i"; + return result; + } + + /*! C# Type Constraint list */ + virtual QCString trTypeConstraints() + { + return "OgraniÄenja tipova (Type Constraints)"; + } + ////////////////////////////////////////////////////////////////////////// + // new since 1.6.0 (mainly for the new search engine) + ////////////////////////////////////////////////////////////////////////// + + /*! directory relation for \a name */ + virtual QCString trDirRelation(const char *name) + { + return QCString("Relacije ") + QCString(name); + } + + /*! Loading message shown when loading search results */ + virtual QCString trLoading() + { + return "UÄitavam..."; + } + + /*! Label used for search results in the global namespace */ + virtual QCString trGlobalNamespace() + { + return "Globalni namespace"; + } + + /*! Message shown while searching */ + virtual QCString trSearching() + { + return "Tražim..."; + } + + /*! Text shown when no search results are found */ + virtual QCString trNoMatches() + { + return "Nema traženih podataka"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Graf povezanih direktorija za "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"Datoteka u "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"UkljuÄuje datotake u "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "Pon","Uto","Sri","ÄŒet","Pet","Sub","Ned" }; + static const char *months[] = { "Sje","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro" }; + QCString sdate; + sdate.sprintf("%s %s %d %d",days[dayOfWeek-1],months[month-1],day,year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + +}; + +#endif + + Index: branches/xZenu/src/util/doxygen/src/docvisitor.h =================================================================== --- branches/xZenu/src/util/doxygen/src/docvisitor.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/docvisitor.h (revision 1322) @@ -0,0 +1,189 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef _DOCVISITOR_H +#define _DOCVISITOR_H + +// ids +const int DocVisitor_Html = 0; +const int DocVisitor_Latex = 1; +const int DocVisitor_XML = 2; +const int DocVisitor_RTF = 3; +const int DocVisitor_Man = 4; +const int DocVisitor_Text = 5; +const int DocVisitor_Other = 6; + +// forward declarations +class DocWord; +class DocWhiteSpace; +class DocAutoList; +class DocAutoListItem; +class DocPara; +class DocRoot; +class DocSymbol; +class DocURL; +class DocStyleChange; +class DocSimpleSect; +class DocTitle; +class DocSimpleList; +class DocSimpleListItem; +class DocSection; +class DocVerbatim; +class DocXRefItem; +class DocHtmlList; +class DocHtmlListItem; +class DocHtmlDescList; +class DocHtmlDescTitle; +class DocHtmlDescData; +class DocHtmlTable; +class DocHtmlRow; +class DocHtmlCell; +class DocHtmlCaption; +class DocLineBreak; +class DocHorRuler; +class DocAnchor; +class DocIndexEntry; +class DocInternal; +class DocHRef; +class DocInclude; +class DocIncOperator; +class DocHtmlHeader; +class DocImage; +class DocDotFile; +class DocMscFile; +class DocLink; +class DocRef; +class DocFormula; +class DocSecRefItem; +class DocSecRefList; +//class DocLanguage; +class DocLinkedWord; +class DocParamSect; +class DocParamList; +class DocInternalRef; +class DocCopy; +class DocText; +class DocSimpleSectSep; + +/*! @brief Abstract visitor that participates in the visitor pattern. + */ +class DocVisitor +{ + int m_id; + public: + DocVisitor(int id) : m_id(id) {} + virtual ~DocVisitor() {} + int id() const { return m_id; } + + /*! @name Visitor functions for leaf nodes + * @{ + */ + virtual void visit(DocWord *) = 0; + virtual void visit(DocWhiteSpace *) = 0; + virtual void visit(DocSymbol *) = 0; + virtual void visit(DocURL *) = 0; + virtual void visit(DocStyleChange *) = 0; + virtual void visit(DocVerbatim *) = 0; + virtual void visit(DocLineBreak *) = 0; + virtual void visit(DocHorRuler *) = 0; + virtual void visit(DocAnchor *) = 0; + virtual void visit(DocInclude *) = 0; + virtual void visit(DocIncOperator *) = 0; + virtual void visit(DocFormula *) = 0; + virtual void visit(DocLinkedWord *) = 0; + virtual void visit(DocIndexEntry *) = 0; + virtual void visit(DocSimpleSectSep *) = 0; + /*! @} */ + + /*! @name Visitor functions for internal nodes + * @{ + */ + virtual void visitPre(DocAutoList *) = 0; + virtual void visitPost(DocAutoList *) = 0; + virtual void visitPre(DocAutoListItem *) = 0; + virtual void visitPost(DocAutoListItem *) = 0; + virtual void visitPre(DocPara *) = 0; + virtual void visitPost(DocPara *) = 0; + virtual void visitPre(DocRoot *) = 0; + virtual void visitPost(DocRoot *) = 0; + virtual void visitPre(DocSimpleSect *) = 0; + virtual void visitPost(DocSimpleSect *) = 0; + virtual void visitPre(DocTitle *) = 0; + virtual void visitPost(DocTitle *) = 0; + virtual void visitPre(DocSimpleList *) = 0; + virtual void visitPost(DocSimpleList *) = 0; + virtual void visitPre(DocSimpleListItem *) = 0; + virtual void visitPost(DocSimpleListItem *) = 0; + virtual void visitPre(DocSection *) = 0; + virtual void visitPost(DocSection *) = 0; + virtual void visitPre(DocHtmlList *) = 0; + virtual void visitPost(DocHtmlListItem *) = 0; + virtual void visitPre(DocHtmlListItem *) = 0; + virtual void visitPost(DocHtmlList *) = 0; + virtual void visitPre(DocHtmlDescList *) = 0; + virtual void visitPost(DocHtmlDescList *) = 0; + virtual void visitPre(DocHtmlDescTitle *) = 0; + virtual void visitPost(DocHtmlDescTitle *) = 0; + virtual void visitPre(DocHtmlDescData *) = 0; + virtual void visitPost(DocHtmlDescData *) = 0; + virtual void visitPre(DocHtmlTable *) = 0; + virtual void visitPost(DocHtmlRow *) = 0; + virtual void visitPre(DocHtmlCell *) = 0; + virtual void visitPost(DocHtmlCell *) = 0; + virtual void visitPre(DocHtmlRow *) = 0; + virtual void visitPost(DocHtmlTable *) = 0; + virtual void visitPre(DocHtmlCaption *) = 0; + virtual void visitPost(DocHtmlCaption *) = 0; + virtual void visitPre(DocInternal *) = 0; + virtual void visitPost(DocInternal *) = 0; + virtual void visitPre(DocHRef *) = 0; + virtual void visitPost(DocHRef *) = 0; + virtual void visitPre(DocHtmlHeader *) = 0; + virtual void visitPost(DocHtmlHeader *) = 0; + virtual void visitPre(DocImage *) = 0; + virtual void visitPost(DocImage *) = 0; + virtual void visitPre(DocDotFile *) = 0; + virtual void visitPost(DocDotFile *) = 0; + virtual void visitPre(DocMscFile *) = 0; + virtual void visitPost(DocMscFile *) = 0; + virtual void visitPre(DocLink *) = 0; + virtual void visitPost(DocLink *) = 0; + virtual void visitPre(DocRef *) = 0; + virtual void visitPost(DocRef *) = 0; + virtual void visitPre(DocSecRefItem *) = 0; + virtual void visitPost(DocSecRefItem *) = 0; + virtual void visitPre(DocSecRefList *) = 0; + virtual void visitPost(DocSecRefList *) = 0; + //virtual void visitPre(DocLanguage *) = 0; + //virtual void visitPost(DocLanguage *) = 0; + virtual void visitPre(DocParamSect *) = 0; + virtual void visitPost(DocParamSect *) = 0; + virtual void visitPre(DocParamList *) = 0; + virtual void visitPost(DocParamList *) = 0; + virtual void visitPre(DocXRefItem *) = 0; + virtual void visitPost(DocXRefItem *) = 0; + virtual void visitPre(DocInternalRef *) = 0; + virtual void visitPost(DocInternalRef *) = 0; + virtual void visitPre(DocCopy *) = 0; + virtual void visitPost(DocCopy *) = 0; + virtual void visitPre(DocText *) = 0; + virtual void visitPost(DocText *) = 0; + /*! @} */ +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/translator_lt.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator_lt.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator_lt.h (revision 1322) @@ -0,0 +1,1563 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +/* Translation from English to Lithanian by Tomas Simonaitis, Mindaugas Radzius and Aidas Berukstis + * (haden@homelan.lt/mindaugasradzius@takas.lt/aidasber@takas.lt) + * We tried to keep meaning close to original, + * if you have any suggestions drop us an email + * ------------------------------------------- + * Project start :13.May.2k4 + * Last Doxygen version covered : 1.4.3 + * + * Revisions: + * Updated to 1.3.9 25.Oct.2k4 + * +*/ + +#ifndef TRANSLATOR_LT_H +#define TRANSLATOR_LT_H + + +class TranslatorLithuanian : public TranslatorAdapter_1_4_6 +{ + public: + + // --- Language control methods ------------------- + + /*! Used for identification of the language. The identification + * should not be translated. It should be replaced by the name + * of the language in English using lower-case characters only + * (e.g. "czech", "japanese", "russian", etc.). It should be equal to + * the identification used in language.cpp. + */ + virtual QCString idLanguage() + { return "lithuanian"; } + + /*! Used to get the LaTeX command(s) for the language support. + * This method should return string with commands that switch + * LaTeX to the desired language. For example + * <pre>"\\usepackage[german]{babel}\n" + * </pre> + * or + * <pre>"\\usepackage{polski}\n" + * "\\usepackage[latin2]{inputenc}\n" + * "\\usepackage[T1]{fontenc}\n" + * </pre> + * + * The English LaTeX does not use such commands. Because of this + * the empty string is returned in this implementation. + */ + virtual QCString latexLanguageSupportCommand() + { + return "\\usepackage[T2A]{fontenc}\n" + "\\usepackage[lithuanian]{babel}\n"; + } + + /*! return the language charset. This will be used for the HTML output */ + virtual QCString idLanguageCharset() + { + return "iso-8859-13"; + } + + // --- Language translation methods ------------------- + + /*! used in the compound documentation before a list of related functions. */ + virtual QCString trRelatedFunctions() + { return "Susijæ Funkcijos"; } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return "Atkreipkite dëmesá, èià ne metodai"; } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return "Smulkus apraðymas"; } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return "Tipo Apraðymo Dokumentacija"; } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + { return "Iðvardinimo Dokumentacija"; } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { return "Metodø Dokumentacija"; } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Lauko apraðymas"; + } + else + { + return "Atributø Dokumentacija"; + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return "Daugiau..."; } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return "Visø nariø sàraðas."; } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return "Nariø sàraðas"; } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return "Tai galutinis nariø sàraðas "; } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return ", átraukiant visus paveldëtus narius."; } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ + virtual QCString trGeneratedAutomatically(const char *s) + { QCString result="Automatiðkai sugeneruota Doxygen árankiu"; + if (s) result+=(QCString)" "+s; + result+=" ið programos kodo."; + return result; + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return "iðvardinimo vardas"; } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return "iðvardinimo reikðmë"; } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return "apibrëþta"; } + + // quick reference sections + + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \\group command). + */ + virtual QCString trModules() + { return "Moduliai"; } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return "Klasiø hierarchija"; } + + /*! This is put above each page as a link to the list of annotated classes */ + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Duomenø Struktûros"; + } + else + { + return "Klasës"; + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return "Failai"; } + + /*! This is put above each page as a link to all members of compounds. */ + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Duomenø Laukai"; + } + else + { + return "Klasiø Nariai"; + } + } + + /*! This is put above each page as a link to all members of files. */ + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Globalûs Nariai"; + } + else + { + return "Globalûs Nariai"; + } + } + + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return "Susijæ Puslapiai"; } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return "Pavyzdþiai"; } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return "Paieðka"; } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { return "Ðis paveldëjimo sàraðas yra beveik surikiuotas " + "abëcëlës tvarka:"; + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool extractAll) + { + QCString result="Visø "; + if (!extractAll) result+="dokumentuotø "; + result+="failø sàraðas su trumpais apraðymais:"; + return result; + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Duomenø struktûros su trumpais apraðymais:"; + } + else + { + return "Klasës, struktûros, " + "sàjungos ir sàsajos su trumpais apraðymais:"; + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result="Visø "; + if (!extractAll) + { + result+="dokumentuotø "; + } + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="struktûrø ir sàjungø laukø sàraðas"; + } + else + { + result+="klasiø nariai"; + } + result+=" su ryðiais á "; + if (!extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="struktûrø/sàjungø kiekvieno lauko dokumentacijà:"; + } + else + { + result+="klasës dokumentacija kiekvienam nariui:"; + } + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="struktûros/sàjungos, kurios priklauso:"; + } + else + { + result+="klasës, kurios priklauso:"; + } + } + return result; + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool extractAll) + { + QCString result="Sàraðas visø "; + if (!extractAll) result+="dokumentuotø "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="funkcijø, kintamøjø, apibrëþimø, iðvardinimø, ir tipø apibrëþimø"; + } + else + { + result+="globaliø nariø"; + } + result+=" su ryðiais á "; + if (extractAll) + result+="failus, kuriems jie priklauso:"; + else + result+="dokumentacija:"; + return result; + } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return "Visø pavyzdþiø sàraðas:"; } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return "Visø susijusiø dokumentacijos puslapiø sàraðas:"; } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return "Visø moduliø sàraðas:"; } + + // index titles (the project name is prepended for these) + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return "Dokumentacija"; } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return "Modulio Indeksas"; } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return "Hierarchijos Indeksas"; } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Duomenø Struktûros Indeksas"; + } + else + { + return "Klasës Indeksas"; + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return "Failo Indeksas"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return "Modulio Dokumentacija"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Duomenø Struktûros Dokumentacija"; + } + else + { + return "Klasës Dokumentacija"; + } + } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return "Failo Dokumentacija"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return "Pavyzdþio Dokumentacija"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return "Puslapio Dokumentacija"; } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return "Informacinis Vadovas"; } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return "Apibrëþimai"; } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return "Funkcijø Prototipai"; } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return "Tipø apibrëþimai"; } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return "Iðvardinimai"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return "Funkcijos"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return "Kintamieji"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return "Iðvardinimø reikðmës"; } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return "Apibrëþimø Dokumentacija"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return "Funkcijø Prototipø Dokumentacija"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return "Tipø apibrëþimø Dokumentacija"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return "Iðvardinimo Tipo Dokumentacija"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return "Funkcijos Dokumentacija"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return "Kintamojo Dokumentacija"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Duomenø struktøros"; + } + else + { + return "Klasës"; + } + } + + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ + virtual QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result=(QCString)"Sugeneruota "+date;/*FIXME*/ + if (projName) result+=(QCString)" "+projName;/*FIXME*/ + result+=(QCString)" ";/*FIXME*/ + return result; + } + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return "paraðyta"; + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return (QCString)"Paveldimumo diagrama "+clName+":"; /*FIXME*/ + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return "Tiktai vidiniam naudojimui."; } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return "Áspëjimas"; } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return "Versija"; } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return "Data"; } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return "Graþina"; } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return "Taip pat þiûrëti"; } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return "Parametrai"; } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return "Iðimtys"; } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return "Sugeneruota"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return "Varø Srities Sàraðas"; } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool extractAll) + { + QCString result="Sàraðas visø "; + if (!extractAll) result+="dokumentuotø "; + result+="vardø srièiø su trumpais apraðymais:"; + return result; + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return "Draugai"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return "Draugiðkø Ir Susijusiø Funkcijø Dokumentacija"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=(QCString)clName; + switch(compType) + { + case ClassDef::Class: result+=" Klasë"; break; + case ClassDef::Struct: result+=" Struktûra"; break; + case ClassDef::Union: result+=" Sàjunga"; break; + case ClassDef::Interface: result+=" Sàsaja"; break; + case ClassDef::Protocol: result+=" Protokolas"; break; + case ClassDef::Category: result+=" Kategorija"; break; + case ClassDef::Exception: result+=" Iðimtis"; break; + } + if (isTemplate) result+=" Ðablonas"; + return result; + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result=fileName; + result+=" Failo Nuoroda"; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" Vardø Srities Nuoroda"; + return result; + } + + virtual QCString trPublicMembers() + { return "Vieði Metodai"; } + virtual QCString trPublicSlots() + { return "Vieði Slotai"; } /*FIXME*/ + virtual QCString trSignals() + { return "Signalai"; } + virtual QCString trStaticPublicMembers() + { return "Statiniai Vieði Metodai"; } + virtual QCString trProtectedMembers() + { return "Apsaugoti Metodai"; } + virtual QCString trProtectedSlots() + { return "Apsaugoti Slotai"; }/*FIXME*/ + virtual QCString trStaticProtectedMembers() + { return "Statiniai Apsaugoti Metodai"; } + virtual QCString trPrivateMembers() + { return "Privatatûs Metodai"; } + virtual QCString trPrivateSlots() + { return "Privatûs Slotai"; }/*FIXME*/ + virtual QCString trStaticPrivateMembers() + { return "Statiniai Privatûs Metodai"; } + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + virtual QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i<numEntries;i++) + { + // use generateMarker to generate placeholders for the class links! + result+=generateMarker(i); // generate marker for entry i in the list + // (order is left to right) + + if (i!=numEntries-1) // not the last entry, so we need a separator + { + if (i<numEntries-2) // not the fore last entry + result+=", "; + else // the fore last entry + result+=", ir "; + } + } + return result; + } + + /*! used in class documentation to produce a list of base classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritsList(int numEntries) + { + return "Paveldi "+trWriteList(numEntries)+"."; + } + + /*! used in class documentation to produce a list of super classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritedByList(int numEntries) + { + return "Paveldëta "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * members that are hidden by this one. + */ + virtual QCString trReimplementedFromList(int numEntries) + { + return "Perkrauna metodà ið "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all member that overwrite the implementation of this member. + */ + virtual QCString trReimplementedInList(int numEntries) + { + return "Metodas perkraunamas "+trWriteList(numEntries)+"."; + } + + /*! This is put above each page as a link to all members of namespaces. */ + virtual QCString trNamespaceMembers() + { return "Vardø Srities Nariai"; } + + /*! This is an introduction to the page with all namespace members */ + virtual QCString trNamespaceMemberDescription(bool extractAll) + { + QCString result="Sàraðas visø "; + if (!extractAll) result+="dokumentuotø "; + result+="vardø srities nariø su nuorodomis á "; + if (extractAll) + result+="vardø srities dokumentacijà kiekvienam nariui:"; + else + result+="vardø sritis, kurioms jos priklauso:"; + return result; + } + /*! This is used in LaTeX as the title of the chapter with the + * index of all namespaces. + */ + virtual QCString trNamespaceIndex() + { return "Vardø Srities Indeksas"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all namespaces. + */ + virtual QCString trNamespaceDocumentation() + { return "Vardø Srities Dokumentacija"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + virtual QCString trNamespaces() + { return "Vardø Sritys"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Class", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Dokumentacija "; + switch(compType) + { + case ClassDef::Class: result+="ðiai klasei"; break; + case ClassDef::Struct: result+="ðiai struktûrai"; break; + case ClassDef::Union: result+="ðiai sàjungai"; break; + case ClassDef::Interface: result+="ðiai sàsajai"; break; + case ClassDef::Protocol: result+="ðiam protocolui"; break; + case ClassDef::Category: result+="ðiai kategorijai"; break; + case ClassDef::Exception: result+="ðiai iðimèiai"; break; + } + result+=" sugeneruota ið "; + if (single) result+="ðio failo:"; else result+="ðiø failø:"; + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + virtual QCString trAlphabeticalList() + { return "Abëcëlinis Sàraðas"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + virtual QCString trReturnValues() + { return "Graþinamos reikðmës"; } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + virtual QCString trMainPage() + { return "Pagrindinis Puslapis"; } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + virtual QCString trPageAbbreviation() + { return "psl."; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDefinedAtLineInSourceFile() + { + return "Apibrëþimas failo @1 eilutëje @0."; + } + virtual QCString trDefinedInSourceFile() + { + return "Apibrëþimas faile @0."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() + { + return "Smerktina"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + virtual QCString trCollaborationDiagram(const char *clName) + { + return (QCString)"Bendradarbiavimo diagrama "+clName+":";/*FIXME*/ + } + /*! this text is put before an include dependency graph */ + virtual QCString trInclDepGraph(const char *fName) + { + return (QCString)"Átraukimo priklausomybiø diagrama "+fName+":";/*FIXME*/ + } + /*! header that is put before the list of constructor/destructors. */ + virtual QCString trConstructorDocumentation() + { + return "Konstruktoriaus ir Destruktoriaus Dokumentacija"; + } + /*! Used in the file documentation to point to the corresponding sources. */ + virtual QCString trGotoSourceCode() + { + return "Eiti á ðio failo programos kodà."; + } + /*! Used in the file sources to point to the corresponding documentation. */ + virtual QCString trGotoDocumentation() + { + return "Eiti á ðio failo dokumentacijà."; + } + /*! Text for the \\pre command */ + virtual QCString trPrecondition() + { + return "Iðakstinë sàlyga"; + } + /*! Text for the \\post command */ + virtual QCString trPostcondition() + { + return "Postcondition";/*FIXME*/ + } + /*! Text for the \\invariant command */ + virtual QCString trInvariant() + { + return "Pastovus"; + } + /*! Text shown before a multi-line variable/enum initialization */ + virtual QCString trInitialValue() + { + return "Pradinë reikðmë:"; + } + /*! Text used the source code in the file index */ + virtual QCString trCode() + { + return "tekstas";/*FIXME*/ + } + virtual QCString trGraphicalHierarchy() + { + return "Grafinë Klasës Hierarchija"; + } + virtual QCString trGotoGraphicalHierarchy() + { + return "Eiti á grafinæ klasës hierarchijà"; + } + virtual QCString trGotoTextualHierarchy() + { + return "Eiti á tekstinæ klasës hierarchijà"; + } + virtual QCString trPageIndex() + { + return "Puslapio Indeksas"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() + { + return "Pastaba"; + } + virtual QCString trPublicTypes() + { + return "Vieði Tipai"; + } + virtual QCString trPublicAttribs() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Duomenø Laukai"; + } + else + { + return "Vieði Atributai"; + } + } + virtual QCString trStaticPublicAttribs() + { + return "Statiniai Vieði Atributai"; + } + virtual QCString trProtectedTypes() + { + return "Apsaugoti Tipai"; + } + virtual QCString trProtectedAttribs() + { + return "Apsaugoti Atributai"; + } + virtual QCString trStaticProtectedAttribs() + { + return "Statiniai Apsaugoti Atributai"; + } + virtual QCString trPrivateTypes() + { + return "Privatûs Tipai"; + } + virtual QCString trPrivateAttribs() + { + return "Privatûs Atributai"; + } + virtual QCString trStaticPrivateAttribs() + { + return "Statiniai Privatûs Atributai"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\todo item */ + virtual QCString trTodo() + { + return "Daryti"; + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return "Tolimesni Darbai"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { + return "Naudojamas"; + } + virtual QCString trRemarks() + { + return "Pastabos"; + } + virtual QCString trAttention() + { + return "Attention"; + } + virtual QCString trInclByDepGraph() + { + return "Ðis grafas rodo, kuris failas tiesiogiai ar " + "netiesiogiai átraukia ðá failà:"; + } + virtual QCString trSince() + { + return "Nuo"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return "Grafo Legenda"; + } + /*! page explaining how the dot graph's should be interpreted + * The %A in the text below are to prevent link to classes called "A". + */ + virtual QCString trLegendDocs() + { + return + "Ðis puslapis paaiðkina, kaip interpretuoti sugeneruotus grafus " + "su Doxygen árankiu.<p>\n" + "Panagrinëkite pavyzdá:\n" + "\\kodo pradþia\n" + "/*! Invisible class because of truncation */\n" + "class Invisible { };\n\n" + "/*! Truncated class, inheritance relation is hidden */\n" + "class Truncated : public Invisible { };\n\n" + "/* Class not documented with doxygen comments */\n" + "class Undocumented { };\n\n" + "/*! Class that is inherited using public inheritance */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! A template class */\n" + "template<class T> class Templ { };\n\n" + "/*! Class that is inherited using protected inheritance */\n" + "class ProtectedBase { };\n\n" + "/*! Class that is inherited using private inheritance */\n" + "class PrivateBase { };\n\n" + "/*! Class that is used by the Inherited class */\n" + "class Used { };\n\n" + "/*! Super class that inherits a number of other classes */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented,\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "If the \\c MAX_DOT_GRAPH_HEIGHT tag in the configuration file " + "is set to 240 this will result in the following graph:" + "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "The boxes in the above graph have the following meaning:\n" + "<ul>\n" + "<li>%A filled black box represents the struct or class for which the " + "graph is generated.\n" + "<li>%A box with a black border denotes a documented struct or class.\n" + "<li>%A box with a grey border denotes an undocumented struct or class.\n" + "<li>%A box with a red border denotes a documented struct or class for" + "which not all inheritance/containment relations are shown. %A graph is " + "truncated if it does not fit within the specified boundaries.\n" + "</ul>\n" + "The arrows have the following meaning:\n" + "<ul>\n" + "<li>%A dark blue arrow is used to visualize a public inheritance " + "relation between two classes.\n" + "<li>%A dark green arrow is used for protected inheritance.\n" + "<li>%A dark red arrow is used for private inheritance.\n" + "<li>%A purple dashed arrow is used if a class is contained or used " + "by another class. The arrow is labeled with the variable(s) " + "through which the pointed class or struct is accessible.\n" + "<li>%A yellow dashed arrow denotes a relation between a template instance and " + "the template class it was instantiated from. The arrow is labeled with " + "the template parameters of the instance.\n" + "</ul>\n"; + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return "legenda"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return "Testas"; + } + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return "Testo Sàraðas"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return "DCOP Metodai"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return "Savybës"; + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return "Savybës Dokumentacija"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Duomenø Struktûros"; + } + else + { + return "Klasës"; + } + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)"Paketas "+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return "Paketo Sàraðas"; + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return "Paketai su trumpu apraðymu:"; + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return "Paketai"; + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return "Reikðmë:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return "Klaida"; + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return "Klaidø Sàraðas"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file + * + * The following table shows the correlation of Charset name, Charset Value and + * <pre> + * Codepage number: + * Charset Name Charset Value(hex) Codepage number + * ------------------------------------------------------ + * DEFAULT_CHARSET 1 (x01) + * SYMBOL_CHARSET 2 (x02) + * OEM_CHARSET 255 (xFF) + * ANSI_CHARSET 0 (x00) 1252 + * RUSSIAN_CHARSET 204 (xCC) 1251 + * EE_CHARSET 238 (xEE) 1250 + * GREEK_CHARSET 161 (xA1) 1253 + * TURKISH_CHARSET 162 (xA2) 1254 + * BALTIC_CHARSET 186 (xBA) 1257 + * HEBREW_CHARSET 177 (xB1) 1255 + * ARABIC _CHARSET 178 (xB2) 1256 + * SHIFTJIS_CHARSET 128 (x80) 932 + * HANGEUL_CHARSET 129 (x81) 949 + * GB2313_CHARSET 134 (x86) 936 + * CHINESEBIG5_CHARSET 136 (x88) 950 + * </pre> + * + */ + virtual QCString trRTFansicp() + { + return "1252"; + } + + + /*! Used as ansicpg for RTF fcharset + * \see trRTFansicp() for a table of possible values. + */ + virtual QCString trRTFCharSet() + { + return "0"; + } + + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return "Indeksas"; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + QCString result((first_capital ? "Klasë" : "klasë")); + if (!singular) result+="s"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + QCString result((first_capital ? "Faila" : "faila")); + if (!singular) result+="i"; + else result+="s"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + QCString result((first_capital ? "Vardø srit" : "vardø srit")); + if (!singular) result+="ys"; + else result+="is"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + QCString result((first_capital ? "Grupë" : "grupë")); + if (!singular) result+="s"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + QCString result((first_capital ? "Puslapi" : "puslapi")); + if (!singular) result+="ai"; + else result+="s"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + QCString result((first_capital ? "Nar" : "nar")); + if (!singular) result+="iai"; + else result+="ys"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + QCString result((first_capital ? "Global" : "global")); + if (!singular) result+="ûs"; + else result+="us"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + QCString result((first_capital ? "Autori" : "autori")); + if (!singular) result+="ai"; + else result+="us"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return "Ryðiai"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Realizuoja "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this abstract member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Realizuota "+trWriteList(numEntries)+"."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return "Turinys"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Smerktinumø Sàraðas"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Ávykiai"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Ávykio Dokumentacija"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return "Paketo Tipai"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return "Paketo Funkcijos"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return "Statinës Paketo Funkcijos"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return "Paketo Atributai"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return "Statiniai Paketo Atributai"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "Visi"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Funkcijos kvietimo grafas:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + return "Ieðkoti"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "Paieðkos Rezultatai"; + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return "Atsipraðome, jokiø dokumentø nerasta pagal Jûsø uþklausà."; + } + else if (numDocuments==1) + { + return "Surasta <b>1</b> dokumentas, atitinkantis Jûsø uþklausà."; + } + else + { + return "Surasta <b>$num</b> dokumentø, atitinkanèiø Jûsø uþklausà. " + "Pirmiausiai rodomi labiausiai tenkinantys uþklausà."; + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "Atitikmenys:"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return filename + " iðeities tekstas"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return "Direktorijø hierarchija"; } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return "Direktorijø dokumentacija"; } + + /*! This is used as the title of the directory index and also in the + * Quick links of a HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return "Direktorijos"; } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { return "Ði direktorjø strûktûra grubiai surikiuota abëcëlës tvarka:"; + } + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { QCString result=dirName; result+=" Directorijos apraðas"; return result; } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool first_capital, bool singular) + { + QCString result((first_capital ? "Direktorij" : "direktorij")); + if (singular) result+="a"; else result+="os"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return "Perkraunamas metodas sukurtas patogumui. " + "Jis skiriasi nuo aukðèiau minëto tik argumetais."; + } + + +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/qtbc.h =================================================================== --- branches/xZenu/src/util/doxygen/src/qtbc.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/qtbc.h (revision 1322) @@ -0,0 +1,45 @@ +/****************************************************************************** + * + * $Id: qtbc.h,v 1.4 2001/03/19 19:27:41 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef QTBC_H +#define QTBC_H + +/*! This file contains some hacks to make Doxygen work with + * Qt version 2.00 and Qt version 1.xx + */ + +#include <qglobal.h> + +#if QT_VERSION >= 200 + +#include <locale.h> + +#define GCI QCollection::Item + +#include <qcstring.h> +#include <qstring.h> +inline QCString convertToQCString(const QString &s) { return s.utf8(); } + +#else /* QT_VERSION < 200 */ + +#include <qstring.h> +#define QCString QString +inline QCString convertToQCString(const QCString &s) { return s; } + +#endif + +#endif Index: branches/xZenu/src/util/doxygen/src/translator.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator.h (revision 1322) @@ -0,0 +1,503 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef TRANSLATOR_H +#define TRANSLATOR_H + +#include "qtbc.h" +#include "classdef.h" +#include "util.h" +#include "config.h" + +class Translator +{ + private: + /* Tables for encoding conversions. */ + static const char Win1250ToISO88592Tab[]; + static const char ISO88592ToWin1250Tab[]; + static const unsigned char Koi8RToWindows1251Tab[128]; + static const unsigned char Windows1251ToKoi8RTab[128]; + + protected: + /*! Returns the string converted from windows-1250 to iso-8859-2. */ + QCString Win1250ToISO88592(const QCString & sInput); + + /*! Returns the string converted from iso-8859-2 to windows-1250. */ + QCString ISO88592ToWin1250(const QCString & sInput); + + /*! Returns the string converted from koi8-r to windows-1251. */ + QCString Koi8RToWindows1251( const QCString & sInput ); + + /*! Returns the string converted from windows-1251 to koi8-r. */ + QCString Windows1251ToKoi8R( const QCString & sInput ); + + /*! Returns the string converted from Japanese-EUC to SJIS. */ + QCString JapaneseEucToSjis( const QCString & sInput ); + + public: + + /*! This method is used to provide warning message that is displayed + * if the user chooses a language whose translation is not up to date. + * It is implemented by the adapter classes. + */ + virtual QCString updateNeededMessage() { return ""; } + virtual ~Translator() {} + + // Please, have a look at comments inside the translator_en.h file + // to learn the meaning of the following methods. The translator_en.h + // file contains the TranslatorEnglish implementation, which is + // always up-to-date (by definition). + + // --- Language control methods ------------------- + + virtual QCString idLanguage() = 0; + virtual QCString latexLanguageSupportCommand() = 0; + virtual QCString idLanguageCharset() = 0; + + // --- Language translation methods ------------------- + + virtual QCString trRelatedFunctions() = 0; + virtual QCString trRelatedSubscript() = 0; + virtual QCString trDetailedDescription() = 0; + virtual QCString trMemberTypedefDocumentation() = 0; + virtual QCString trMemberEnumerationDocumentation() = 0; + virtual QCString trMemberFunctionDocumentation() = 0; + virtual QCString trMemberDataDocumentation() = 0; + virtual QCString trMore() = 0; + virtual QCString trListOfAllMembers() = 0; + virtual QCString trMemberList() = 0; + virtual QCString trThisIsTheListOfAllMembers() = 0; + virtual QCString trIncludingInheritedMembers() = 0; + virtual QCString trGeneratedAutomatically(const char *s) = 0; + virtual QCString trEnumName() = 0; + virtual QCString trEnumValue() = 0; + virtual QCString trDefinedIn() = 0; + + // quick reference sections + + virtual QCString trModules() = 0; + virtual QCString trClassHierarchy() = 0; + virtual QCString trCompoundList() = 0; + virtual QCString trFileList() = 0; + //virtual QCString trHeaderFiles() = 0; + virtual QCString trCompoundMembers() = 0; + virtual QCString trFileMembers() = 0; + virtual QCString trRelatedPages() = 0; + virtual QCString trExamples() = 0; + virtual QCString trSearch() = 0; + virtual QCString trClassHierarchyDescription() = 0; + virtual QCString trFileListDescription(bool extractAll) = 0; + virtual QCString trCompoundListDescription() = 0; + virtual QCString trCompoundMembersDescription(bool extractAll) = 0; + virtual QCString trFileMembersDescription(bool extractAll) = 0; + //virtual QCString trHeaderFilesDescription() = 0; + virtual QCString trExamplesDescription() = 0; + virtual QCString trRelatedPagesDescription() = 0; + virtual QCString trModulesDescription() = 0; + //virtual QCString trNoDescriptionAvailable() = 0; + + // index titles (the project name is prepended for these) + + virtual QCString trDocumentation() = 0; + virtual QCString trModuleIndex() = 0; + virtual QCString trHierarchicalIndex() = 0; + virtual QCString trCompoundIndex() = 0; + virtual QCString trFileIndex() = 0; + virtual QCString trModuleDocumentation() = 0; + virtual QCString trClassDocumentation() = 0; + virtual QCString trFileDocumentation() = 0; + virtual QCString trExampleDocumentation() = 0; + virtual QCString trPageDocumentation() = 0; + virtual QCString trReferenceManual() = 0; + virtual QCString trDefines() = 0; + virtual QCString trFuncProtos() = 0; + virtual QCString trTypedefs() = 0; + virtual QCString trEnumerations() = 0; + virtual QCString trFunctions() = 0; + virtual QCString trVariables() = 0; + virtual QCString trEnumerationValues() = 0; + virtual QCString trDefineDocumentation() = 0; + virtual QCString trFunctionPrototypeDocumentation() = 0; + virtual QCString trTypedefDocumentation() = 0; + virtual QCString trEnumerationTypeDocumentation() = 0; + virtual QCString trFunctionDocumentation() = 0; + virtual QCString trVariableDocumentation() = 0; + virtual QCString trCompounds() = 0; + virtual QCString trGeneratedAt(const char *date,const char *projName) = 0; + virtual QCString trWrittenBy() = 0; + virtual QCString trClassDiagram(const char *clName) = 0; + virtual QCString trForInternalUseOnly() = 0; + //virtual QCString trReimplementedForInternalReasons() = 0; + virtual QCString trWarning() = 0; + //virtual QCString trBugsAndLimitations() = 0; + virtual QCString trVersion() = 0; + virtual QCString trDate() = 0; + virtual QCString trReturns() = 0; + virtual QCString trSeeAlso() = 0; + virtual QCString trParameters() = 0; + virtual QCString trExceptions() = 0; + virtual QCString trGeneratedBy() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNamespaceList() = 0; + virtual QCString trNamespaceListDescription(bool extractAll) = 0; + virtual QCString trFriends() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trRelatedFunctionDocumentation() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) = 0; + + virtual QCString trFileReference(const char *fileName) = 0; + virtual QCString trNamespaceReference(const char *namespaceName) = 0; + + virtual QCString trPublicMembers() = 0; + virtual QCString trPublicSlots() = 0; + virtual QCString trSignals() = 0; + virtual QCString trStaticPublicMembers() = 0; + virtual QCString trProtectedMembers() = 0; + virtual QCString trProtectedSlots() = 0; + virtual QCString trStaticProtectedMembers() = 0; + virtual QCString trPrivateMembers() = 0; + virtual QCString trPrivateSlots() = 0; + virtual QCString trStaticPrivateMembers() = 0; + virtual QCString trWriteList(int numEntries) = 0; + virtual QCString trInheritsList(int numEntries) = 0; + virtual QCString trInheritedByList(int numEntries) = 0; + virtual QCString trReimplementedFromList(int numEntries) = 0; + virtual QCString trReimplementedInList(int numEntries) = 0; + virtual QCString trNamespaceMembers() = 0; + virtual QCString trNamespaceMemberDescription(bool extractAll) = 0; + virtual QCString trNamespaceIndex() = 0; + virtual QCString trNamespaceDocumentation() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNamespaces() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) = 0; + virtual QCString trAlphabeticalList() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReturnValues() = 0; + virtual QCString trMainPage() = 0; + virtual QCString trPageAbbreviation() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + //virtual QCString trSources() = 0; + virtual QCString trDefinedAtLineInSourceFile() = 0; + virtual QCString trDefinedInSourceFile() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trCollaborationDiagram(const char *clName) = 0; + virtual QCString trInclDepGraph(const char *fName) = 0; + virtual QCString trConstructorDocumentation() = 0; + virtual QCString trGotoSourceCode() = 0; + virtual QCString trGotoDocumentation() = 0; + virtual QCString trPrecondition() = 0; + virtual QCString trPostcondition() = 0; + virtual QCString trInvariant() = 0; + virtual QCString trInitialValue() = 0; + virtual QCString trCode() = 0; + + virtual QCString trGraphicalHierarchy() = 0; + virtual QCString trGotoGraphicalHierarchy() = 0; + virtual QCString trGotoTextualHierarchy() = 0; + virtual QCString trPageIndex() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() = 0; + virtual QCString trPublicTypes() = 0; + virtual QCString trPublicAttribs() = 0; + virtual QCString trStaticPublicAttribs() = 0; + virtual QCString trProtectedTypes() = 0; + virtual QCString trProtectedAttribs() = 0; + virtual QCString trStaticProtectedAttribs() = 0; + virtual QCString trPrivateTypes() = 0; + virtual QCString trPrivateAttribs() = 0; + virtual QCString trStaticPrivateAttribs() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trTodo() = 0; + virtual QCString trTodoList() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() = 0; + virtual QCString trRemarks() = 0; + virtual QCString trAttention() = 0; + virtual QCString trInclByDepGraph() = 0; + virtual QCString trSince() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trLegendTitle() = 0; + virtual QCString trLegendDocs() = 0; + virtual QCString trLegend() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trTest() = 0; + virtual QCString trTestList() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDCOPMethods() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trProperties() = 0; + virtual QCString trPropertyDocumentation() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + //virtual QCString trInterfaces() = 0; + virtual QCString trClasses() = 0; + virtual QCString trPackage(const char *name) = 0; + virtual QCString trPackageList() = 0; + virtual QCString trPackageListDescription() = 0; + virtual QCString trPackages() = 0; + //virtual QCString trPackageDocumentation() = 0; + virtual QCString trDefineValue() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trBug() = 0; + virtual QCString trBugList() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trRTFansicp() = 0; + virtual QCString trRTFCharSet() = 0; + virtual QCString trRTFGeneralIndex() = 0; + + // Translation of the word + + virtual QCString trClass(bool first_capital, bool singular) = 0; + virtual QCString trFile(bool first_capital, bool singular) = 0; + virtual QCString trNamespace(bool first_capital, bool singular) = 0; + virtual QCString trGroup(bool first_capital, bool singular) = 0; + virtual QCString trPage(bool first_capital, bool singular) = 0; + virtual QCString trMember(bool first_capital, bool singular) = 0; + //virtual QCString trField(bool first_capital, bool singular) = 0; + virtual QCString trGlobal(bool first_capital, bool singular) = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trAuthor(bool first_capital, bool singular) = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferences() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trImplementedFromList(int numEntries) = 0; + virtual QCString trImplementedInList(int numEntries) = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trRTFTableOfContents() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecatedList() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trEvents() = 0; + virtual QCString trEventDocumentation() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trPackageTypes() = 0; + virtual QCString trPackageMembers() = 0; + virtual QCString trStaticPackageMembers() = 0; + virtual QCString trPackageAttribs() = 0; + virtual QCString trStaticPackageAttribs() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trAll() = 0; + virtual QCString trCallGraph() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trSearchForIndex() = 0; + virtual QCString trSearchResultsTitle() = 0; + virtual QCString trSearchResults(int numDocuments) = 0; + virtual QCString trSearchMatches() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trSourceFile(QCString& filename) = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDirIndex() = 0; + virtual QCString trDirDocumentation() = 0; + virtual QCString trDirectories() = 0; + virtual QCString trDirDescription() = 0; + virtual QCString trDirReference(const char *dirName) = 0; + virtual QCString trDir(bool first_capital, bool singular) = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trOverloadText() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trCallerGraph() = 0; + virtual QCString trEnumerationValueDocumentation() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trMemberFunctionDocumentationFortran() = 0; + virtual QCString trCompoundListFortran() = 0; + virtual QCString trCompoundMembersFortran() = 0; + virtual QCString trCompoundListDescriptionFortran() = 0; + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) = 0; + virtual QCString trCompoundIndexFortran() = 0; + virtual QCString trTypeDocumentation() = 0; + virtual QCString trSubprograms() = 0; + virtual QCString trSubprogramDocumentation() = 0; + virtual QCString trDataTypes() = 0; + virtual QCString trModulesList() = 0; + virtual QCString trModulesListDescription(bool extractAll) = 0; + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) = 0; + virtual QCString trModuleReference(const char *namespaceName) = 0; + virtual QCString trModulesMembers() = 0; + virtual QCString trModulesMemberDescription(bool extractAll) = 0; + virtual QCString trModulesIndex() = 0; + virtual QCString trModule(bool first_capital, bool singular) = 0; + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool single) = 0; + virtual QCString trType(bool first_capital, bool singular) = 0; + virtual QCString trSubprogram(bool first_capital, bool singular) = 0; + virtual QCString trTypeConstraints() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDirRelation(const char *name) = 0; + virtual QCString trLoading() = 0; + virtual QCString trGlobalNamespace() = 0; + virtual QCString trSearching() = 0; + virtual QCString trNoMatches() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDirDependency(const char *name) = 0; + virtual QCString trFileIn(const char *name) = 0; + virtual QCString trIncludesFileIn(const char *name) = 0; + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) = 0; + + +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/search.js =================================================================== --- branches/xZenu/src/util/doxygen/src/search.js (revision 0) +++ branches/xZenu/src/util/doxygen/src/search.js (revision 1322) @@ -0,0 +1,709 @@ +function convertToId(search) +{ + var result = ''; + for (i=0;i<search.length;i++) + { + var c = search.charAt(i); + var cn = c.charCodeAt(0); + if (c.match(/[a-z0-9]/)) + { + result+=c; + } + else if (cn<16) + { + result+="_0"+cn.toString(16); + } + else + { + result+="_"+cn.toString(16); + } + } + return result; +} + +function getXPos(item) +{ + var x = 0; + if (item.offsetWidth) + { + while (item && item!=document.body) + { + x += item.offsetLeft; + item = item.offsetParent; + } + } + return x; +} + +function getYPos(item) +{ + var y = 0; + if (item.offsetWidth) + { + while (item && item!=document.body) + { + y += item.offsetTop; + item = item.offsetParent; + } + } + return y; +} + +/* A class handling everything associated with the search panel. + + Parameters: + name - The name of the global variable that will be + storing this instance. Is needed to be able to set timeouts. + resultPath - path to use for external files +*/ +function SearchBox(name, resultsPath, inFrame, label) +{ + if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } + + // ---------- Instance variables + this.name = name; + this.resultsPath = resultsPath; + this.keyTimeout = 0; + this.keyTimeoutLength = 500; + this.closeSelectionTimeout = 300; + this.lastSearchValue = ""; + this.lastResultsPage = ""; + this.hideTimeout = 0; + this.searchIndex = 0; + this.searchActive = false; + this.insideFrame = inFrame; + this.searchLabel = label; + + // ----------- DOM Elements + + this.DOMSearchField = function() + { return document.getElementById("MSearchField"); } + + this.DOMSearchSelect = function() + { return document.getElementById("MSearchSelect"); } + + this.DOMSearchSelectWindow = function() + { return document.getElementById("MSearchSelectWindow"); } + + this.DOMPopupSearchResults = function() + { return document.getElementById("MSearchResults"); } + + this.DOMPopupSearchResultsWindow = function() + { return document.getElementById("MSearchResultsWindow"); } + + this.DOMSearchClose = function() + { return document.getElementById("MSearchClose"); } + + this.DOMSearchBox = function() + { return document.getElementById("MSearchBox"); } + + // ------------ Event Handlers + + // Called when focus is added or removed from the search field. + this.OnSearchFieldFocus = function(isActive) + { + this.Activate(isActive); + } + + this.OnSearchSelectShow = function() + { + var searchSelectWindow = this.DOMSearchSelectWindow(); + var searchField = this.DOMSearchSelect(); + + if (this.insideFrame) + { + var left = getXPos(searchField); + var top = getYPos(searchField); + left += searchField.offsetWidth + 6; + top += searchField.offsetHeight; + + // show search selection popup + searchSelectWindow.style.display='block'; + left -= searchSelectWindow.offsetWidth; + searchSelectWindow.style.left = left + 'px'; + searchSelectWindow.style.top = top + 'px'; + } + else + { + var left = getXPos(searchField); + var top = getYPos(searchField); + top += searchField.offsetHeight; + + // show search selection popup + searchSelectWindow.style.display='block'; + searchSelectWindow.style.left = left + 'px'; + searchSelectWindow.style.top = top + 'px'; + } + + // stop selection hide timer + if (this.hideTimeout) + { + clearTimeout(this.hideTimeout); + this.hideTimeout=0; + } + return false; // to avoid "image drag" default event + } + + this.OnSearchSelectHide = function() + { + this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()", + this.closeSelectionTimeout); + } + + // Called when the content of the search field is changed. + this.OnSearchFieldChange = function(evt) + { + if (this.keyTimeout) // kill running timer + { + clearTimeout(this.keyTimeout); + this.keyTimeout = 0; + } + + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 || e.keyCode==13) + { + if (e.shiftKey==1) + { + this.OnSearchSelectShow(); + var win=this.DOMSearchSelectWindow(); + for (i=0;i<win.childNodes.length;i++) + { + var child = win.childNodes[i]; // get span within a + if (child.className=='SelectItem') + { + child.focus(); + return; + } + } + return; + } + else if (window.frames.MSearchResults.searchResults) + { + var elem = window.frames.MSearchResults.searchResults.NavNext(0); + if (elem) elem.focus(); + } + } + else if (e.keyCode==27) // Escape out of the search field + { + this.DOMSearchField().blur(); + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.lastSearchValue = ''; + this.Activate(false); + return; + } + + // strip whitespaces + var searchValue = this.DOMSearchField().value.replace(/ +/g, ""); + + if (searchValue != this.lastSearchValue) // search value has changed + { + if (searchValue != "") // non-empty search + { + // set timer for search update + this.keyTimeout = setTimeout(this.name + '.Search()', + this.keyTimeoutLength); + } + else // empty search field + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.lastSearchValue = ''; + } + } + } + + this.SelectItemCount = function(id) + { + var count=0; + var win=this.DOMSearchSelectWindow(); + for (i=0;i<win.childNodes.length;i++) + { + var child = win.childNodes[i]; // get span within a + if (child.className=='SelectItem') + { + count++; + } + } + return count; + } + + this.SelectItemSet = function(id) + { + var i,j=0; + var win=this.DOMSearchSelectWindow(); + for (i=0;i<win.childNodes.length;i++) + { + var child = win.childNodes[i]; // get span within a + if (child.className=='SelectItem') + { + var node = child.firstChild; + if (j==id) + { + node.innerHTML='•'; + } + else + { + node.innerHTML=' '; + } + j++; + } + } + } + + // Called when an search filter selection is made. + // set item with index id as the active item + this.OnSelectItem = function(id) + { + this.searchIndex = id; + this.SelectItemSet(id); + var searchValue = this.DOMSearchField().value.replace(/ +/g, ""); + if (searchValue!="" && this.searchActive) // something was found -> do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down + { + this.searchIndex++; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==38 && this.searchIndex>0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var hexCode; + if (code<16) + { + hexCode="0"+code.toString(16); + } + else + { + hexCode=code.toString(16); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') + { + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location.href = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of <Search()>. + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} Index: branches/xZenu/src/util/doxygen/src/doxytag.pro.in =================================================================== --- branches/xZenu/src/util/doxygen/src/doxytag.pro.in (revision 0) +++ branches/xZenu/src/util/doxygen/src/doxytag.pro.in (revision 1322) @@ -0,0 +1,31 @@ +# +# $Id: doxytag.pro,v 1.13 1999/04/04 10:16:11 root Exp $ +# +# Copyright (C) 1997-2011 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. +# +# TMake project file for doxytag + +TEMPLATE = doxytag.t +CONFIG = console warn_on $extraopts +HEADERS = logos.h version.h +SOURCES = doxytag.cpp logos.cpp version.cpp +unix:LIBS += -L../lib -lqtools +win32:INCLUDEPATH += . +win32-mingw:LIBS += -L../lib -lqtools +win32-msvc:LIBS += qtools.lib shell32.lib +win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib +win32-borland:LIBS += qtools.lib shell32.lib +win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk +win32:TMAKE_CXXFLAGS += -DQT_NODLL +INCLUDEPATH += ../qtools +OBJECTS_DIR = ../objects +TARGET = ../bin/doxytag Index: branches/xZenu/src/util/doxygen/src/config.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/config.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/config.cpp (revision 1322) @@ -0,0 +1,3528 @@ + +#line 3 "<stdout>" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer configYY_create_buffer +#define yy_delete_buffer configYY_delete_buffer +#define yy_flex_debug configYY_flex_debug +#define yy_init_buffer configYY_init_buffer +#define yy_flush_buffer configYY_flush_buffer +#define yy_load_buffer_state configYY_load_buffer_state +#define yy_switch_to_buffer configYY_switch_to_buffer +#define yyin configYYin +#define yyleng configYYleng +#define yylex configYYlex +#define yylineno configYYlineno +#define yyout configYYout +#define yyrestart configYYrestart +#define yytext configYYtext +#define yywrap configYYwrap +#define yyalloc configYYalloc +#define yyrealloc configYYrealloc +#define yyfree configYYfree + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <stdlib.h> + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include <inttypes.h> +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE configYYrestart(configYYin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t configYYleng; + +extern FILE *configYYin, *configYYout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up configYYtext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up configYYtext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via configYYrestart()), so that the user can continue scanning by + * just pointing configYYin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when configYYtext is formed. */ +static char yy_hold_char; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t configYYleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow configYYwrap()'s to do buffer switches + * instead of setting up a fresh configYYin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void configYYrestart (FILE *input_file ); +void configYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE configYY_create_buffer (FILE *file,int size ); +void configYY_delete_buffer (YY_BUFFER_STATE b ); +void configYY_flush_buffer (YY_BUFFER_STATE b ); +void configYYpush_buffer_state (YY_BUFFER_STATE new_buffer ); +void configYYpop_buffer_state (void ); + +static void configYYensure_buffer_stack (void ); +static void configYY_load_buffer_state (void ); +static void configYY_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER configYY_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE configYY_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE configYY_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE configYY_scan_bytes (yyconst char *bytes,yy_size_t len ); + +void *configYYalloc (yy_size_t ); +void *configYYrealloc (void *,yy_size_t ); +void configYYfree (void * ); + +#define yy_new_buffer configYY_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + configYYensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + configYY_create_buffer(configYYin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + configYYensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + configYY_create_buffer(configYYin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define configYYwrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *configYYin = (FILE *) 0, *configYYout = (FILE *) 0; + +typedef int yy_state_type; + +extern int configYYlineno; + +int configYYlineno = 1; + +extern char *configYYtext; +#define yytext_ptr configYYtext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up configYYtext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + configYYleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 24 +#define YY_END_OF_BUFFER 25 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[100] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 25, 22, 23, 22, 22, 2, 8, 22, 8, 19, + 22, 9, 13, 12, 2, 12, 12, 17, 18, 11, + 10, 18, 18, 16, 14, 14, 16, 16, 7, 22, + 7, 7, 0, 21, 0, 8, 0, 0, 0, 8, + 3, 0, 20, 12, 12, 17, 18, 11, 18, 15, + 7, 0, 7, 0, 0, 4, 12, 18, 7, 7, + 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 5, 0 + + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 5, 6, 1, 1, 1, 1, 1, + 1, 1, 7, 1, 1, 1, 1, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 1, 1, 1, + 10, 1, 1, 11, 12, 13, 14, 15, 16, 13, + 13, 17, 18, 13, 13, 19, 13, 20, 13, 21, + 13, 13, 13, 22, 23, 13, 13, 13, 13, 13, + 1, 24, 1, 1, 25, 1, 13, 13, 13, 26, + + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 27, + 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[29] = + { 0, + 1, 2, 3, 4, 3, 5, 6, 7, 7, 6, + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 1, 7, 8, 8, 1 + } ; + +static yyconst flex_int16_t yy_base[112] = + { 0, + 0, 1, 29, 0, 55, 56, 82, 108, 135, 162, + 190, 0, 217, 244, 58, 65, 66, 68, 271, 298, + 145, 408, 408, 3, 117, 408, 0, 125, 6, 408, + 7, 408, 408, 0, 0, 15, 115, 0, 0, 133, + 408, 18, 107, 408, 408, 408, 62, 106, 0, 0, + 70, 104, 73, 408, 122, 0, 109, 93, 118, 95, + 408, 105, 408, 0, 118, 0, 0, 123, 116, 408, + 0, 117, 113, 94, 105, 408, 92, 91, 408, 90, + 408, 82, 0, 0, 0, 75, 66, 62, 102, 13, + 408, 41, 48, 5, 9, 89, 113, 408, 408, 326, + + 334, 342, 350, 358, 360, 367, 375, 4, 383, 391, + 399 + } ; + +static yyconst flex_int16_t yy_def[112] = + { 0, + 100, 100, 99, 3, 100, 100, 100, 100, 101, 101, + 99, 11, 102, 102, 103, 103, 100, 100, 104, 104, + 99, 99, 99, 99, 99, 99, 105, 99, 106, 99, + 99, 99, 99, 107, 107, 107, 107, 108, 109, 99, + 99, 109, 109, 99, 99, 99, 99, 99, 110, 111, + 110, 110, 99, 99, 99, 105, 99, 99, 99, 106, + 99, 99, 99, 107, 107, 108, 109, 99, 109, 99, + 110, 111, 110, 99, 99, 99, 107, 109, 99, 110, + 99, 99, 107, 109, 110, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 0, 99, + + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99 + } ; + +static yyconst flex_int16_t yy_nxt[437] = + { 0, + 99, 99, 23, 23, 53, 54, 53, 58, 62, 63, + 62, 66, 59, 99, 90, 61, 53, 54, 53, 53, + 54, 53, 91, 24, 24, 96, 95, 25, 25, 22, + 22, 23, 22, 22, 26, 22, 27, 27, 22, 28, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 24, 29, 29, 29, 25, 30, 30, 94, + 45, 93, 46, 53, 54, 53, 70, 45, 23, 46, + 23, 53, 54, 53, 53, 54, 53, 89, 31, 31, + 88, 47, 25, 25, 32, 48, 33, 26, 47, 24, + 97, 24, 48, 25, 58, 25, 58, 87, 98, 59, + + 86, 59, 61, 90, 61, 24, 62, 63, 62, 25, + 32, 91, 33, 26, 97, 85, 84, 83, 82, 81, + 80, 79, 98, 78, 68, 77, 92, 76, 75, 74, + 73, 24, 55, 69, 68, 25, 22, 32, 22, 33, + 35, 65, 57, 55, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 36, 99, + 99, 99, 37, 22, 32, 22, 33, 35, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 36, 99, 99, 99, 37, + 22, 22, 32, 22, 22, 26, 22, 22, 22, 22, + + 22, 38, 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 24, 22, 38, 38, 25, 40, 41, + 22, 33, 26, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 42, 99, 99, 99, 43, 40, 41, 22, 33, 26, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 42, 99, 99, + 99, 43, 22, 23, 22, 50, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 51, 99, 99, 99, 52, 22, + + 23, 22, 50, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 51, 99, 99, 99, 52, 22, 22, 22, 22, + 22, 22, 22, 22, 34, 34, 34, 34, 34, 34, + 34, 34, 39, 39, 39, 39, 39, 39, 39, 39, + 44, 44, 44, 44, 44, 44, 44, 44, 49, 49, + 49, 49, 49, 49, 49, 49, 56, 56, 60, 99, + 99, 99, 60, 60, 60, 64, 99, 99, 99, 64, + 64, 64, 64, 67, 99, 99, 99, 99, 67, 67, + 67, 71, 99, 99, 99, 71, 71, 71, 71, 72, + + 72, 99, 72, 72, 72, 72, 72, 21, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99 + } ; + +static yyconst flex_int16_t yy_chk[437] = + { 0, + 0, 0, 1, 2, 24, 24, 24, 29, 31, 31, + 31, 108, 29, 0, 90, 29, 36, 36, 36, 42, + 42, 42, 90, 1, 2, 95, 94, 1, 2, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 5, 6, 93, + 15, 92, 15, 47, 47, 47, 47, 16, 17, 16, + 18, 51, 51, 51, 53, 53, 53, 88, 5, 6, + 87, 15, 5, 6, 7, 15, 7, 7, 16, 17, + 96, 18, 16, 17, 58, 18, 60, 86, 96, 58, + + 82, 60, 58, 89, 60, 7, 62, 62, 62, 7, + 8, 89, 8, 8, 97, 80, 78, 77, 75, 74, + 73, 72, 97, 69, 68, 65, 89, 59, 57, 55, + 52, 8, 48, 43, 40, 8, 9, 9, 9, 9, + 9, 37, 28, 25, 21, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, + 0, 0, 9, 10, 10, 10, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, + 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 0, 0, 0, 13, 14, 14, 14, 14, 14, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, + 0, 14, 19, 19, 19, 19, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 19, 0, 0, 0, 19, 20, + + 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 20, 0, 0, 0, 20, 100, 100, 100, 100, + 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, + 101, 101, 102, 102, 102, 102, 102, 102, 102, 102, + 103, 103, 103, 103, 103, 103, 103, 103, 104, 104, + 104, 104, 104, 104, 104, 104, 105, 105, 106, 0, + 0, 0, 106, 106, 106, 107, 0, 0, 0, 107, + 107, 107, 107, 109, 0, 0, 0, 0, 109, 109, + 109, 110, 0, 0, 0, 110, 110, 110, 110, 111, + + 111, 0, 111, 111, 111, 111, 111, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int configYY_flex_debug; +int configYY_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *configYYtext; +#line 1 "config.l" +/****************************************************************************** + * + * $Id: config_templ.l,v 1.8 2001/01/01 10:15:16 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ +#line 16 "config.l" + +/* + * includes + */ +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <ctype.h> +#include <stdarg.h> +#include <errno.h> + +#include <qfileinfo.h> +#include <qdir.h> +#include <qtextstream.h> +#include <qregexp.h> +#include <qstack.h> +#include <qglobal.h> + +#include "config.h" +#include "version.h" +#include "portable.h" +#include "util.h" + +#include "lang_cfg.h" +#include "configoptions.h" + +#undef Config_getString +#undef Config_getInt +#undef Config_getList +#undef Config_getEnum +#undef Config_getBool + +// use in-class definitions +#define Config_getString(val) getString(__FILE__,__LINE__,val) +#define Config_getInt(val) getInt(__FILE__,__LINE__,val) +#define Config_getList(val) getList(__FILE__,__LINE__,val) +#define Config_getEnum(val) getEnum(__FILE__,__LINE__,val) +#define Config_getBool(val) getBool(__FILE__,__LINE__,val) + +void config_err(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); +} +void config_warn(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); +} + +static QCString configStringRecode( + const QCString &str, + const char *fromEncoding, + const char *toEncoding); + +#define MAX_INCLUDE_DEPTH 10 +#define YY_NEVER_INTERACTIVE 1 + +/* ----------------------------------------------------------------- + */ +QCString ConfigOption::convertToComment(const QCString &s) +{ + QCString result; + if (s.isEmpty()) return result; + else + { + QCString tmp=s.stripWhiteSpace(); + char *p=tmp.data(); + char c; + result+="#"; + if (*p && *p!='\n') + result+=" "; + while ((c=*p++)) + { + if (c=='\n') + { + result+="\n#"; + if (*p && *p!='\n') + result+=" "; + } + else result+=c; + } + result+='\n'; + } + return result; +} + +void ConfigOption::writeBoolValue(FTextStream &t,bool v) +{ + t << " "; + if (v) t << "YES"; else t << "NO"; +} + +void ConfigOption::writeIntValue(FTextStream &t,int i) +{ + t << " " << i; +} + +void ConfigOption::writeStringValue(FTextStream &t,QCString &s) +{ + char c; + bool needsEscaping=FALSE; + // convert the string back to it original encoding + QCString se = configStringRecode(s,"UTF-8",m_encoding); + const char *p=se.data(); + if (p) + { + t << " "; + while ((c=*p++)!=0 && !needsEscaping) + needsEscaping = (c==' ' || c=='\n' || c=='\t' || c=='"' || c=='#'); + if (needsEscaping) + { + t << "\""; + p=se.data(); + while (*p) + { + if (*p==' ' && *(p+1)=='\0') break; // skip inserted space at the end + if (*p=='"') t << "\\"; // escape quotes + t << *p++; + } + t << "\""; + } + else + { + t << se; + } + } +} + +void ConfigOption::writeStringList(FTextStream &t,QStrList &l) +{ + const char *p = l.first(); + bool first=TRUE; + while (p) + { + QCString s=p; + if (!first) + t << " "; + first=FALSE; + writeStringValue(t,s); + p = l.next(); + if (p) t << " \\" << endl; + } +} + +/* ----------------------------------------------------------------- + */ + +Config *Config::m_instance = 0; + +void ConfigInt::convertStrToVal() +{ + if (!m_valueString.isEmpty()) + { + bool ok; + int val = m_valueString.toInt(&ok); + if (!ok || val<m_minVal || val>m_maxVal) + { + config_warn("warning: argument `%s' for option %s is not a valid number in the range [%d..%d]!\n" + "Using the default: %d!\n",m_valueString.data(),m_name.data(),m_minVal,m_maxVal,m_value); + } + m_value=val; + } +} + +void ConfigBool::convertStrToVal() +{ + QCString val = m_valueString.stripWhiteSpace().lower(); + if (!val.isEmpty()) + { + if (val=="yes" || val=="true" || val=="1" || val=="all") + { + m_value=TRUE; + } + else if (val=="no" || val=="false" || val=="0" || val=="none") + { + m_value=FALSE; + } + else + { + config_warn("warning: argument `%s' for option %s is not a valid boolean value\n" + "Using the default: %s!\n",m_valueString.data(),m_name.data(),m_value?"YES":"NO"); + } + } +} + +QCString &Config::getString(const char *fileName,int num,const char *name) const +{ + ConfigOption *opt = m_dict->find(name); + if (opt==0) + { + config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + exit(1); + } + else if (opt->kind()!=ConfigOption::O_String) + { + config_err("%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name); + exit(1); + } + return *((ConfigString *)opt)->valueRef(); +} + +QStrList &Config::getList(const char *fileName,int num,const char *name) const +{ + ConfigOption *opt = m_dict->find(name); + if (opt==0) + { + config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + exit(1); + } + else if (opt->kind()!=ConfigOption::O_List) + { + config_err("%d<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name); + exit(1); + } + return *((ConfigList *)opt)->valueRef(); +} + +QCString &Config::getEnum(const char *fileName,int num,const char *name) const +{ + ConfigOption *opt = m_dict->find(name); + if (opt==0) + { + config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + exit(1); + } + else if (opt->kind()!=ConfigOption::O_Enum) + { + config_err("%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name); + exit(1); + } + return *((ConfigEnum *)opt)->valueRef(); +} + +int &Config::getInt(const char *fileName,int num,const char *name) const +{ + ConfigOption *opt = m_dict->find(name); + if (opt==0) + { + config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + exit(1); + } + else if (opt->kind()!=ConfigOption::O_Int) + { + config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); + exit(1); + } + return *((ConfigInt *)opt)->valueRef(); +} + +bool &Config::getBool(const char *fileName,int num,const char *name) const +{ + ConfigOption *opt = m_dict->find(name); + if (opt==0) + { + config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + exit(1); + } + else if (opt->kind()!=ConfigOption::O_Bool) + { + config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); + exit(1); + } + return *((ConfigBool *)opt)->valueRef(); +} + +/* ----------------------------------------------------------------- + */ + +void ConfigInt::writeXML(FTextStream& t) +{ + t << " <option type='int' " + "id='" << convertToXML(name()) << "' " + "docs='\n" << convertToXML(docs()) << "' " + "minval='" << m_minVal << "' " + "maxval='" << m_maxVal << "' " + "defval='" << m_defValue << "'"; + if (!m_dependency.isEmpty()) t << " depends='" << m_dependency << "'"; + t << "/>" << endl; +} + +void ConfigBool::writeXML(FTextStream& t) +{ + t << " <option type='bool' " + "id='" << convertToXML(name()) << "' " + "docs='\n" << convertToXML(docs()) << "' " + "defval='" << m_defValue << "'"; + if (!m_dependency.isEmpty()) t << " depends='" << m_dependency << "'"; + t << "/>" << endl; +} + +void ConfigString::writeXML(FTextStream& t) +{ + QString format; + switch (m_widgetType) + { + case String: format="string"; break; + case File: format="file"; break; + case Dir: format="dir"; break; + } + t << " <option type='string' " + "id='" << convertToXML(name()) << "' " + "format='" << format << "' " + "docs='\n" << convertToXML(docs()) << "' " + "defval='" << convertToXML(m_defValue) << "'"; + if (!m_dependency.isEmpty()) t << " depends='" << m_dependency << "'"; + t << "/>" << endl; +} + +void ConfigEnum::writeXML(FTextStream &t) +{ + t << " <option type='enum' " + "id='" << convertToXML(name()) << "' " + "defval='" << convertToXML(m_defValue) << "' " + "docs='\n" << convertToXML(docs()) << "'"; + if (!m_dependency.isEmpty()) t << " depends='" << m_dependency << "'"; + t << ">" << endl; + + char *enumVal = m_valueRange.first(); + while (enumVal) + { + t << " <value name='" << convertToXML(enumVal) << "'/>" << endl; + enumVal = m_valueRange.next(); + } + + t << " </option>" << endl; +} + +void ConfigList::writeXML(FTextStream &t) +{ + QString format; + switch (m_widgetType) + { + case String: format="string"; break; + case File: format="file"; break; + case Dir: format="dir"; break; + case FileAndDir: format="filedir"; break; + } + t << " <option type='list' " + "id='" << convertToXML(name()) << "' " + "format='" << format << "' " + "docs='\n" << convertToXML(docs()) << "'"; + if (!m_dependency.isEmpty()) t << " depends='" << m_dependency << "'"; + t << ">" << endl; + char *enumVal = m_value.first(); + while (enumVal) + { + t << " <value name='" << convertToXML(enumVal) << "'/>" << endl; + enumVal = m_value.next(); + } + + t << " </option>" << endl; +} + +void ConfigObsolete::writeXML(FTextStream &t) +{ + t << " <option type='obsolete' " + "id='" << convertToXML(name()) << "'/>" << endl; +} + + +/* ----------------------------------------------------------------- + * + * static variables + */ + +struct ConfigFileState +{ + int lineNr; + FILE *filePtr; + YY_BUFFER_STATE oldState; + YY_BUFFER_STATE newState; + QCString fileName; +}; + +static const char *inputString; +static int inputPosition; +static int yyLineNr; +static QCString yyFileName; +static QCString tmpString; +static QCString *s=0; +static bool *b=0; +static QStrList *l=0; +static int lastState; +static QCString elemStr; +static QCString includeName; +static QStrList includePathList; +static QStack<ConfigFileState> includeStack; +static int includeDepth; + +static QCString tabSizeString; +static QCString maxInitLinesString; +static QCString colsInAlphaIndexString; +static QCString enumValuesPerLineString; +static QCString treeViewWidthString; +static QCString maxDotGraphWidthString; +static QCString maxDotGraphHeightString; +static QCString encoding; + +static Config *config; + +/* ----------------------------------------------------------------- + */ +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); + +static int yyread(char *buf,int max_size) +{ + // no file included + if (includeStack.isEmpty()) + { + int c=0; + if (inputString==0) return c; + while( c < max_size && inputString[inputPosition] ) + { + *buf = inputString[inputPosition++] ; + c++; buf++; + } + return c; + } + else + { + //assert(includeStack.current()->newState==YY_CURRENT_BUFFER); + return (int)fread(buf,1,max_size,includeStack.current()->filePtr); + } +} + + +static QCString configStringRecode( + const QCString &str, + const char *fromEncoding, + const char *toEncoding) +{ + QCString inputEncoding = fromEncoding; + QCString outputEncoding = toEncoding; + if (inputEncoding.isEmpty() || outputEncoding.isEmpty() || inputEncoding==outputEncoding) return str; + int inputSize=str.length(); + size_t outputSize=inputSize*4+1; + QCString output(outputSize); + void *cd = portable_iconv_open(outputEncoding,inputEncoding); + if (cd==(void *)(-1)) + { + fprintf(stderr,"error: unsupported character conversion: '%s'->'%s'\n", + inputEncoding.data(),outputEncoding.data()); + exit(1); + } + size_t iLeft=inputSize; + size_t oLeft=outputSize; + const char *inputPtr = str.data(); + char *outputPtr = output.data(); + if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft)) + { + outputSize-=oLeft; + output.resize(outputSize+1); + output.at(outputSize)='\0'; + //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data()); + } + else + { + fprintf(stderr,"error: failed to translate characters from %s to %s: %s\n", + inputEncoding.data(),outputEncoding.data(),strerror(errno)); + exit(1); + } + portable_iconv_close(cd); + return output; +} + +static void checkEncoding() +{ + ConfigString *option = (ConfigString*)config->get("DOXYFILE_ENCODING"); + encoding = *option->valueRef(); +} + +static FILE *tryPath(const char *path,const char *fileName) +{ + QCString absName=(path ? (QCString)path+"/"+fileName : (QCString)fileName); + QFileInfo fi(absName); + if (fi.exists() && fi.isFile()) + { + FILE *f=portable_fopen(absName,"r"); + if (!f) config_err("error: could not open file %s for reading\n",absName.data()); + return f; + } + return 0; +} + +static void substEnvVarsInStrList(QStrList &sl); +static void substEnvVarsInString(QCString &s); + +static bool isAbsolute(const char * fileName) +{ +# ifdef _WIN32 + if (isalpha (fileName [0]) && fileName[1] == ':') + fileName += 2; +# endif + char const fst = fileName [0]; + if (fst == '/') { + return true; + } +# ifdef _WIN32 + if (fst == '\\') + return true; +# endif + return false; +} + +static FILE *findFile(const char *fileName) +{ + if(isAbsolute(fileName)) + return tryPath(NULL, fileName); + substEnvVarsInStrList(includePathList); + char *s=includePathList.first(); + while (s) // try each of the include paths + { + FILE *f = tryPath(s,fileName); + if (f) return f; + s=includePathList.next(); + } + // try cwd if includePathList fails + return tryPath(".",fileName); +} + +static void readIncludeFile(const char *incName) +{ + if (includeDepth==MAX_INCLUDE_DEPTH) { + config_err("error: maximum include depth (%d) reached, %s is not included. Aborting...\n", + MAX_INCLUDE_DEPTH,incName); + exit(1); + } + + QCString inc = incName; + substEnvVarsInString(inc); + inc = inc.stripWhiteSpace(); + uint incLen = inc.length(); + if (inc.at(0)=='"' && inc.at(incLen-1)=='"') // strip quotes + { + inc=inc.mid(1,incLen-2); + } + + FILE *f; + + if ((f=findFile(inc))) // see if the include file can be found + { + // For debugging +#if SHOW_INCLUDES + for (i=0;i<includeStack.count();i++) msg(" "); + msg("@INCLUDE = %s: parsing...\n",inc.data()); +#endif + + // store the state of the old file + ConfigFileState *fs=new ConfigFileState; + fs->oldState=YY_CURRENT_BUFFER; + fs->lineNr=yyLineNr; + fs->fileName=yyFileName; + fs->filePtr=f; + // push the state on the stack + includeStack.push(fs); + // set the scanner to the include file + configYY_switch_to_buffer(configYY_create_buffer(f,YY_BUF_SIZE)); + fs->newState=YY_CURRENT_BUFFER; + yyFileName=inc; + includeDepth++; + } + else + { + config_err("error: @INCLUDE = %s: not found!\n",inc.data()); + exit(1); + } +} + + + + + + + + + + + +#line 1199 "<stdout>" + +#define INITIAL 0 +#define Start 1 +#define SkipComment 2 +#define SkipInvalid 3 +#define GetString 4 +#define GetBool 5 +#define GetStrList 6 +#define GetQuotedString 7 +#define GetEnvVar 8 +#define Include 9 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include <unistd.h> +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int configYYlex_destroy (void ); + +int configYYget_debug (void ); + +void configYYset_debug (int debug_flag ); + +YY_EXTRA_TYPE configYYget_extra (void ); + +void configYYset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *configYYget_in (void ); + +void configYYset_in (FILE * in_str ); + +FILE *configYYget_out (void ); + +void configYYset_out (FILE * out_str ); + +yy_size_t configYYget_leng (void ); + +char *configYYget_text (void ); + +int configYYget_lineno (void ); + +void configYYset_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int configYYwrap (void ); +#else +extern int configYYwrap (void ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO fwrite( configYYtext, configYYleng, 1, configYYout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( configYYin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( configYYin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, configYYin))==0 && ferror(configYYin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(configYYin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int configYYlex (void); + +#define YY_DECL int configYYlex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after configYYtext and configYYleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 606 "config.l" + + +#line 1391 "<stdout>" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! configYYin ) + configYYin = stdin; + + if ( ! configYYout ) + configYYout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + configYYensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + configYY_create_buffer(configYYin,YY_BUF_SIZE ); + } + + configYY_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of configYYtext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 100 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 408 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 608 "config.l" + + YY_BREAK +case 2: +YY_RULE_SETUP +#line 609 "config.l" +{ BEGIN(SkipComment); } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 610 "config.l" +{ QCString cmd=configYYtext; + cmd=cmd.left(cmd.length()-1).stripWhiteSpace(); + ConfigOption *option = config->get(cmd); + if (option==0) // oops not known + { + config_err("warning: ignoring unsupported tag `%s' at line %d, file %s\n", + configYYtext,yyLineNr,yyFileName.data()); + BEGIN(SkipInvalid); + } + else // known tag + { + option->setEncoding(encoding); + switch(option->kind()) + { + case ConfigOption::O_Info: + // shouldn't get here! + BEGIN(SkipInvalid); + break; + case ConfigOption::O_List: + l = ((ConfigList *)option)->valueRef(); + l->clear(); + elemStr=""; + BEGIN(GetStrList); + break; + case ConfigOption::O_Enum: + s = ((ConfigEnum *)option)->valueRef(); + s->resize(0); + BEGIN(GetString); + break; + case ConfigOption::O_String: + s = ((ConfigString *)option)->valueRef(); + s->resize(0); + BEGIN(GetString); + break; + case ConfigOption::O_Int: + s = ((ConfigInt *)option)->valueStringRef(); + s->resize(0); + BEGIN(GetString); + break; + case ConfigOption::O_Bool: + s = ((ConfigBool *)option)->valueStringRef(); + s->resize(0); + BEGIN(GetString); + break; + case ConfigOption::O_Obsolete: + config_err("warning: Tag `%s' at line %d of file %s has become obsolete.\n" + "To avoid this warning please update your configuration " + "file using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data()); + BEGIN(SkipInvalid); + break; + } + } + } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 663 "config.l" +{ QCString cmd=configYYtext; + cmd=cmd.left(cmd.length()-2).stripWhiteSpace(); + ConfigOption *option = config->get(cmd); + if (option==0) // oops not known + { + config_err("warning: ignoring unsupported tag `%s' at line %d, file %s\n", + configYYtext,yyLineNr,yyFileName.data()); + BEGIN(SkipInvalid); + } + else // known tag + { + switch(option->kind()) + { + case ConfigOption::O_Info: + // shouldn't get here! + BEGIN(SkipInvalid); + break; + case ConfigOption::O_List: + l = ((ConfigList *)option)->valueRef(); + elemStr=""; + BEGIN(GetStrList); + break; + case ConfigOption::O_Enum: + case ConfigOption::O_String: + case ConfigOption::O_Int: + case ConfigOption::O_Bool: + config_err("warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n", + configYYtext,yyLineNr,yyFileName.data()); + BEGIN(SkipInvalid); + break; + case ConfigOption::O_Obsolete: + config_err("warning: Tag `%s' at line %d of file %s has become obsolete.\n" + "To avoid this warning please update your configuration " + "file using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data()); + BEGIN(SkipInvalid); + break; + } + } + } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 702 "config.l" +{ BEGIN(GetStrList); l=&includePathList; l->clear(); elemStr=""; } + YY_BREAK +/* include a config file */ +case 6: +YY_RULE_SETUP +#line 704 "config.l" +{ BEGIN(Include);} + YY_BREAK +case 7: +YY_RULE_SETUP +#line 705 "config.l" +{ + readIncludeFile(configStringRecode(configYYtext,encoding,"UTF-8")); + BEGIN(Start); + } + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(Start): +case YY_STATE_EOF(SkipComment): +case YY_STATE_EOF(SkipInvalid): +case YY_STATE_EOF(GetString): +case YY_STATE_EOF(GetBool): +case YY_STATE_EOF(GetStrList): +case YY_STATE_EOF(GetQuotedString): +case YY_STATE_EOF(GetEnvVar): +case YY_STATE_EOF(Include): +#line 709 "config.l" +{ + //printf("End of include file\n"); + //printf("Include stack depth=%d\n",g_includeStack.count()); + if (includeStack.isEmpty()) + { + //printf("Terminating scanner!\n"); + yyterminate(); + } + else + { + ConfigFileState *fs=includeStack.pop(); + fclose(fs->filePtr); + YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER; + configYY_switch_to_buffer(fs->oldState ); + configYY_delete_buffer(oldBuf ); + yyLineNr=fs->lineNr; + yyFileName=fs->fileName; + delete fs; fs=0; + includeDepth--; + } + } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 731 "config.l" +{ config_err("warning: ignoring unknown tag `%s' at line %d, file %s\n",configYYtext,yyLineNr,yyFileName.data()); } + YY_BREAK +case 9: +/* rule 9 can match eol */ +YY_RULE_SETUP +#line 732 "config.l" +{ yyLineNr++; BEGIN(Start); } + YY_BREAK +case 10: +/* rule 10 can match eol */ +YY_RULE_SETUP +#line 733 "config.l" +{ + yyLineNr++; + if (!elemStr.isEmpty()) + { + //printf("elemStr1=`%s'\n",elemStr.data()); + l->append(elemStr); + } + BEGIN(Start); + } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 742 "config.l" +{ + if (!elemStr.isEmpty()) + { + //printf("elemStr2=`%s'\n",elemStr.data()); + l->append(elemStr); + } + elemStr.resize(0); + } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 750 "config.l" +{ (*s)+=configStringRecode(configYYtext,encoding,"UTF-8"); + checkEncoding(); + } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 753 "config.l" +{ lastState=YY_START; + BEGIN(GetQuotedString); + tmpString.resize(0); + } + YY_BREAK +case 14: +/* rule 14 can match eol */ +YY_RULE_SETUP +#line 757 "config.l" +{ + // we add a bogus space to signal that the string was quoted. This space will be stripped later on. + tmpString+=" "; + //printf("Quoted String = `%s'\n",tmpString.data()); + if (lastState==GetString) + { + (*s)+=configStringRecode(tmpString,encoding,"UTF-8"); + checkEncoding(); + } + else + { + elemStr+=configStringRecode(tmpString,encoding,"UTF-8"); + } + if (*configYYtext=='\n') + { + config_err("warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data()); + yyLineNr++; + } + BEGIN(lastState); + } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 777 "config.l" +{ + tmpString+='"'; + } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 780 "config.l" +{ tmpString+=*configYYtext; } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 781 "config.l" +{ + QCString bs=configYYtext; + bs=bs.upper(); + if (bs=="YES" || bs=="1") + *b=TRUE; + else if (bs=="NO" || bs=="0") + *b=FALSE; + else + { + *b=FALSE; + config_warn("warning: Invalid value `%s' for " + "boolean tag in line %d, file %s; use YES or NO\n", + bs.data(),yyLineNr,yyFileName.data()); + } + } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 796 "config.l" +{ + elemStr+=configStringRecode(configYYtext,encoding,"UTF-8"); + } + YY_BREAK +case 19: +/* rule 19 can match eol */ +YY_RULE_SETUP +#line 799 "config.l" +{ yyLineNr++; BEGIN(Start); } + YY_BREAK +case 20: +/* rule 20 can match eol */ +YY_RULE_SETUP +#line 800 "config.l" +{ yyLineNr++; BEGIN(Start); } + YY_BREAK +case 21: +/* rule 21 can match eol */ +YY_RULE_SETUP +#line 801 "config.l" +{ yyLineNr++; } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 802 "config.l" + + YY_BREAK +case 23: +/* rule 23 can match eol */ +YY_RULE_SETUP +#line 803 "config.l" +{ yyLineNr++ ; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 805 "config.l" +ECHO; + YY_BREAK +#line 1785 "<stdout>" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed configYYin at a new source and called + * configYYlex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = configYYin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( configYYwrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * configYYtext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of configYYlex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + configYYrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + configYYrestart(configYYin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) configYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 28); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 100 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 28; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 100 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 99); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + configYYrestart(configYYin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( configYYwrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve configYYtext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void configYYrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + configYYensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + configYY_create_buffer(configYYin,YY_BUF_SIZE ); + } + + configYY_init_buffer(YY_CURRENT_BUFFER,input_file ); + configYY_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void configYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * configYYpop_buffer_state(); + * configYYpush_buffer_state(new_buffer); + */ + configYYensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + configYY_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (configYYwrap()) processing, but the only time this flag + * is looked at is after configYYwrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void configYY_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + configYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE configYY_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) configYYalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in configYY_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) configYYalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in configYY_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + configYY_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with configYY_create_buffer() + * + */ + void configYY_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + configYYfree((void *) b->yy_ch_buf ); + + configYYfree((void *) b ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a configYYrestart() or at EOF. + */ + static void configYY_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + configYY_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then configYY_init_buffer was _probably_ + * called from configYYrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void configYY_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + configYY_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void configYYpush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + configYYensure_buffer_stack(); + + /* This block is copied from configYY_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from configYY_switch_to_buffer. */ + configYY_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void configYYpop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + configYY_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + configYY_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void configYYensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)configYYalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in configYYensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)configYYrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in configYYensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE configYY_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) configYYalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in configYY_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + configYY_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to configYYlex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * configYY_scan_bytes() instead. + */ +YY_BUFFER_STATE configYY_scan_string (yyconst char * yystr ) +{ + + return configYY_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to configYYlex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE configYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n, i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) configYYalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in configYY_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = configYY_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in configYY_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up configYYtext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + configYYtext[configYYleng] = (yy_hold_char); \ + (yy_c_buf_p) = configYYtext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + configYYleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int configYYget_lineno (void) +{ + + return configYYlineno; +} + +/** Get the input stream. + * + */ +FILE *configYYget_in (void) +{ + return configYYin; +} + +/** Get the output stream. + * + */ +FILE *configYYget_out (void) +{ + return configYYout; +} + +/** Get the length of the current token. + * + */ +yy_size_t configYYget_leng (void) +{ + return configYYleng; +} + +/** Get the current token. + * + */ + +char *configYYget_text (void) +{ + return configYYtext; +} + +/** Set the current line number. + * @param line_number + * + */ +void configYYset_lineno (int line_number ) +{ + + configYYlineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see configYY_switch_to_buffer + */ +void configYYset_in (FILE * in_str ) +{ + configYYin = in_str ; +} + +void configYYset_out (FILE * out_str ) +{ + configYYout = out_str ; +} + +int configYYget_debug (void) +{ + return configYY_flex_debug; +} + +void configYYset_debug (int bdebug ) +{ + configYY_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from configYYlex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + configYYin = stdin; + configYYout = stdout; +#else + configYYin = (FILE *) 0; + configYYout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * configYYlex_init() + */ + return 0; +} + +/* configYYlex_destroy is for both reentrant and non-reentrant scanners. */ +int configYYlex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + configYY_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + configYYpop_buffer_state(); + } + + /* Destroy the stack itself. */ + configYYfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * configYYlex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *configYYalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *configYYrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void configYYfree (void * ptr ) +{ + free( (char *) ptr ); /* see configYYrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 805 "config.l" + + + +/*@ ---------------------------------------------------------------------------- + */ + +void Config::writeTemplate(FTextStream &t,bool sl,bool upd) +{ + t << "# Doxyfile " << versionString << endl << endl; + if (!sl) + { + t << "# This file describes the settings to be used by the documentation system\n"; + t << "# doxygen (www.doxygen.org) for a project.\n"; + t << "#\n"; + t << "# All text after a hash (#) is considered a comment and will be ignored.\n"; + t << "# The format is:\n"; + t << "# TAG = value [value, ...]\n"; + t << "# For lists items can also be appended using:\n"; + t << "# TAG += value [value, ...]\n"; + t << "# Values that contain spaces should be placed between quotes (\" \").\n"; + } + ConfigOption *option = m_options->first(); + while (option) + { + option->writeTemplate(t,sl,upd); + option = m_options->next(); + } +} + +void Config::writeXML(FTextStream &t) +{ + t << "<doxygenconfig>" << endl; + bool first=TRUE; + ConfigOption *option = m_options->first(); + while (option) + { + if (option->kind()==ConfigOption::O_Info) + { + if (!first) t << " </group>" << endl; + t << " <group name='" << option->name() << "' " + "docs='" << option->docs() << "'>" << endl; + first=FALSE; + } + else + { + option->writeXML(t); + } + option = m_options->next(); + } + option = m_obsolete->first(); + while (option) + { + option->writeXML(t); + option = m_obsolete->next(); + } + if (!first) t << " </group>" << endl; + t << "</doxygenconfig>" << endl; +} + +void Config::convertStrToVal() +{ + ConfigOption *option = m_options->first(); + while (option) + { + option->convertStrToVal(); + option = m_options->next(); + } +} + +static void substEnvVarsInString(QCString &s) +{ + static QRegExp re("\\$\\([a-z_A-Z0-9]+\\)"); + if (s.isEmpty()) return; + int p=0; + int i,l; + //printf("substEnvVarInString(%s) start\n",s.data()); + while ((i=re.match(s,p,&l))!=-1) + { + //printf("Found environment var s.mid(%d,%d)=`%s'\n",i+2,l-3,s.mid(i+2,l-3).data()); + QCString env=portable_getenv(s.mid(i+2,l-3)); + substEnvVarsInString(env); // recursively expand variables if needed. + s = s.left(i)+env+s.right(s.length()-i-l); + p=i+env.length(); // next time start at the end of the expanded string + } + s=s.stripWhiteSpace(); // to strip the bogus space that was added when an argument + // has quotes + //printf("substEnvVarInString(%s) end\n",s.data()); +} + +static void substEnvVarsInStrList(QStrList &sl) +{ + char *s = sl.first(); + while (s) + { + QCString result(s); + // an argument with quotes will have an extra space at the end, so wasQuoted will be TRUE. + bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1); + // here we strip the quote again + substEnvVarsInString(result); + + //printf("Result %s was quoted=%d\n",result.data(),wasQuoted); + + if (!wasQuoted) /* as a result of the expansion, a single string + may have expanded into a list, which we'll + add to sl. If the orginal string already + contained multiple elements no further + splitting is done to allow quoted items with spaces! */ + { + int l=result.length(); + int i,p=0; + // skip spaces + // search for a "word" + for (i=0;i<l;i++) + { + char c=0; + // skip until start of new word + while (i<l && ((c=result.at(i))==' ' || c=='\t')) i++; + p=i; // p marks the start index of the word + // skip until end of a word + while (i<l && ((c=result.at(i))!=' ' && c!='\t' && c!='"')) i++; + if (i<l) // not at the end of the string + { + if (c=='"') // word within quotes + { + p=i+1; + for (i++;i<l;i++) + { + c=result.at(i); + if (c=='"') // end quote + { + // replace the string in the list and go to the next item. + sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item. + sl.next(); // current item is now the old item + p=i+1; + break; + } + else if (c=='\\') // skip escaped stuff + { + i++; + } + } + } + else if (c==' ' || c=='\t') // separator + { + // replace the string in the list and go to the next item. + sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item. + sl.next(); // current item is now the old item + p=i+1; + } + } + } + if (p!=l) // add the leftover as a string + { + // replace the string in the list and go to the next item. + sl.insert(sl.at(),result.right(l-p)); // insert new item before current item. + sl.next(); // current item is now the old item + } + } + else // just goto the next element in the list + { + sl.insert(sl.at(),result); + sl.next(); + } + // remove the old unexpanded string from the list + int i=sl.at(); + sl.remove(); // current item index changes if the last element is removed. + if (sl.at()==i) // not last item + s = sl.current(); + else // just removed last item + s = 0; + } +} + +void ConfigString::substEnvVars() +{ + substEnvVarsInString(m_value); +} + +void ConfigList::substEnvVars() +{ + substEnvVarsInStrList(m_value); +} + +void ConfigBool::substEnvVars() +{ + substEnvVarsInString(m_valueString); +} + +void ConfigInt::substEnvVars() +{ + substEnvVarsInString(m_valueString); +} + +void ConfigEnum::substEnvVars() +{ + substEnvVarsInString(m_value); +} + +void Config::substituteEnvironmentVars() +{ + ConfigOption *option = m_options->first(); + while (option) + { + option->substEnvVars(); + option = m_options->next(); + } +} + +static void cleanUpPaths(QStrList &str) +{ + char *sfp = str.first(); + while (sfp) + { + register char *p = sfp; + if (p) + { + char c; + while ((c=*p)) + { + if (c=='\\') *p='/'; + p++; + } + } + QCString path = sfp; + if ((path.at(0)!='/' && (path.length()<=2 || path.at(1)!=':')) || + path.at(path.length()-1)!='/' + ) + { + QFileInfo fi(path); + if (fi.exists() && fi.isDir()) + { + int i = str.at(); + str.remove(); + if (str.at()==i) // did not remove last item + str.insert(i,fi.absFilePath()+"/"); + else + str.append(fi.absFilePath()+"/"); + } + } + sfp = str.next(); + } +} + +void Config::check() +{ + //if (!projectName.isEmpty()) + //{ + // projectName[0]=toupper(projectName[0]); + //} + + QCString &warnFormat = Config_getString("WARN_FORMAT"); + if (warnFormat.stripWhiteSpace().isEmpty()) + { + warnFormat="$file:$line $text"; + } + else + { + if (warnFormat.find("$file")==-1) + { + config_err("warning: warning format does not contain a $file tag!\n"); + } + if (warnFormat.find("$line")==-1) + { + config_err("warning: warning format does not contain a $line tag!\n"); + } + if (warnFormat.find("$text")==-1) + { + config_err("warning: warning format foes not contain a $text tag!\n"); + } + } + + QCString &manExtension = Config_getString("MAN_EXTENSION"); + + // set default man page extension if non is given by the user + if (manExtension.isEmpty()) + { + manExtension=".3"; + } + + QCString &paperType = Config_getEnum("PAPER_TYPE"); + paperType=paperType.lower().stripWhiteSpace(); + if (paperType.isEmpty()) + { + paperType = "a4"; + } + if (paperType!="a4" && paperType!="a4wide" && paperType!="letter" && + paperType!="legal" && paperType!="executive") + { + config_err("error: Unknown page type specified"); + } + + QCString &outputLanguage=Config_getEnum("OUTPUT_LANGUAGE"); + outputLanguage=outputLanguage.stripWhiteSpace(); + if (outputLanguage.isEmpty()) + { + outputLanguage = "English"; + } + + QCString &htmlFileExtension=Config_getString("HTML_FILE_EXTENSION"); + htmlFileExtension=htmlFileExtension.stripWhiteSpace(); + if (htmlFileExtension.isEmpty()) + { + htmlFileExtension = ".html"; + } + + // expand the relative stripFromPath values + QStrList &stripFromPath = Config_getList("STRIP_FROM_PATH"); + char *sfp = stripFromPath.first(); + if (sfp==0) // by default use the current path + { + stripFromPath.append(QDir::currentDirPath()+"/"); + } + else + { + cleanUpPaths(stripFromPath); + } + + // expand the relative stripFromPath values + QStrList &stripFromIncPath = Config_getList("STRIP_FROM_INC_PATH"); + cleanUpPaths(stripFromIncPath); + + // Test to see if HTML header is valid + QCString &headerFile = Config_getString("HTML_HEADER"); + if (!headerFile.isEmpty()) + { + QFileInfo fi(headerFile); + if (!fi.exists()) + { + config_err("error: tag HTML_HEADER: header file `%s' " + "does not exist\n",headerFile.data()); + exit(1); + } + } + // Test to see if HTML footer is valid + QCString &footerFile = Config_getString("HTML_FOOTER"); + if (!footerFile.isEmpty()) + { + QFileInfo fi(footerFile); + if (!fi.exists()) + { + config_err("error: tag HTML_FOOTER: footer file `%s' " + "does not exist\n",footerFile.data()); + exit(1); + } + } + // Test to see if LaTeX header is valid + QCString &latexHeaderFile = Config_getString("LATEX_HEADER"); + if (!latexHeaderFile.isEmpty()) + { + QFileInfo fi(latexHeaderFile); + if (!fi.exists()) + { + config_err("error: tag LATEX_HEADER: header file `%s' " + "does not exist\n",latexHeaderFile.data()); + exit(1); + } + } + // check include path + QStrList &includePath = Config_getList("INCLUDE_PATH"); + char *s=includePath.first(); + while (s) + { + QFileInfo fi(s); + if (!fi.exists()) config_err("warning: tag INCLUDE_PATH: include path `%s' " + "does not exist\n",s); + s=includePath.next(); + } + + // check aliases + QStrList &aliasList = Config_getList("ALIASES"); + s=aliasList.first(); + while (s) + { + QRegExp re1("[a-z_A-Z][a-z_A-Z0-9]*[ \t]*="); // alias without argument + QRegExp re2("[a-z_A-Z][a-z_A-Z0-9]*{[0-9]*}[ \t]*="); // alias with argument + QCString alias=s; + alias=alias.stripWhiteSpace(); + if (alias.find(re1)!=0 && alias.find(re2)!=0) + { + config_err("Illegal alias format `%s'. Use \"name=value\" or \"name(n)=value\", where n is the number of arguments\n", + alias.data()); + } + s=aliasList.next(); + } + + // check if GENERATE_TREEVIEW and GENERATE_HTMLHELP are both enabled + if (Config_getBool("GENERATE_TREEVIEW") && Config_getBool("GENERATE_HTMLHELP")) + { + config_err("When enabling GENERATE_HTMLHELP the tree view (GENERATE_TREEVIEW) should be disabled. I'll do it for you.\n"); + Config_getBool("GENERATE_TREEVIEW")=FALSE; + } + if (Config_getBool("SEARCHENGINE") && Config_getBool("GENERATE_HTMLHELP")) + { + config_err("When enabling GENERATE_HTMLHELP the search engine (SEARCHENGINE) should be disabled. I'll do it for you.\n"); + Config_getBool("SEARCHENGINE")=FALSE; + } + + // check if SEPARATE_MEMBER_PAGES and INLINE_GROUPED_CLASSES are both enabled + if (Config_getBool("SEPARATE_MEMBER_PAGES") && Config_getBool("INLINE_GROUPED_CLASSES")) + { + config_err("When enabling INLINE_GROUPED_CLASSES the SEPARATE_MEMBER_PAGES option should be disabled. I'll do it for you.\n"); + Config_getBool("SEPARATE_MEMBER_PAGES")=FALSE; + } + + // check dot image format + QCString &dotImageFormat=Config_getEnum("DOT_IMAGE_FORMAT"); + dotImageFormat=dotImageFormat.stripWhiteSpace(); + if (dotImageFormat.isEmpty()) + { + dotImageFormat = "png"; + } + //else if (dotImageFormat!="gif" && dotImageFormat!="png" && dotImageFormat!="jpg") + //{ + // config_err("Invalid value for DOT_IMAGE_FORMAT: `%s'. Using the default.\n",dotImageFormat.data()); + // dotImageFormat = "png"; + //} + + + // check dot path + QCString &dotPath = Config_getString("DOT_PATH"); + if (!dotPath.isEmpty()) + { + QFileInfo dp(dotPath+"/dot"+portable_commandExtension()); + if (!dp.exists() || !dp.isFile()) + { + config_err("warning: the dot tool could not be found at %s\n",dotPath.data()); + dotPath=""; + } + else + { + dotPath=dp.dirPath(TRUE)+"/"; +#if defined(_WIN32) // convert slashes + uint i=0,l=dotPath.length(); + for (i=0;i<l;i++) if (dotPath.at(i)=='/') dotPath.at(i)='\\'; +#endif + } + } + else // make sure the string is empty but not null! + { + dotPath=""; + } + + // check mscgen path + QCString &mscgenPath = Config_getString("MSCGEN_PATH"); + if (!mscgenPath.isEmpty()) + { + QFileInfo dp(mscgenPath+"/mscgen"+portable_commandExtension()); + if (!dp.exists() || !dp.isFile()) + { + config_err("warning: the mscgen tool could not be found at %s\n",mscgenPath.data()); + mscgenPath=""; + } + else + { + mscgenPath=dp.dirPath(TRUE)+"/"; +#if defined(_WIN32) // convert slashes + uint i=0,l=mscgenPath.length(); + for (i=0;i<l;i++) if (mscgenPath.at(i)=='/') mscgenPath.at(i)='\\'; +#endif + } + } + else // make sure the string is empty but not null! + { + mscgenPath=""; + } + + + // check input + QStrList &inputSources=Config_getList("INPUT"); + if (inputSources.count()==0) + { + // use current dir as the default + inputSources.append(QDir::currentDirPath()); + } + else + { + s=inputSources.first(); + while (s) + { + QFileInfo fi(s); + if (!fi.exists()) + { + config_err("warning: tag INPUT: input source `%s' does not exist\n",s); + } + s=inputSources.next(); + } + } + + // add default pattern if needed + QStrList &filePatternList = Config_getList("FILE_PATTERNS"); + if (filePatternList.isEmpty()) + { + filePatternList.append("*.c"); + filePatternList.append("*.cc"); + filePatternList.append("*.cxx"); + filePatternList.append("*.cpp"); + filePatternList.append("*.c++"); + filePatternList.append("*.d"); + filePatternList.append("*.java"); + filePatternList.append("*.ii"); + filePatternList.append("*.ixx"); + filePatternList.append("*.ipp"); + filePatternList.append("*.i++"); + filePatternList.append("*.inl"); + filePatternList.append("*.h"); + filePatternList.append("*.hh"); + filePatternList.append("*.hxx"); + filePatternList.append("*.hpp"); + filePatternList.append("*.h++"); + filePatternList.append("*.idl"); + filePatternList.append("*.odl"); + filePatternList.append("*.cs"); + filePatternList.append("*.php"); + filePatternList.append("*.php3"); + filePatternList.append("*.inc"); + filePatternList.append("*.m"); + filePatternList.append("*.mm"); + filePatternList.append("*.dox"); + filePatternList.append("*.py"); + filePatternList.append("*.f90"); + filePatternList.append("*.f"); + filePatternList.append("*.for"); + filePatternList.append("*.vhd"); + filePatternList.append("*.vhdl"); + if (portable_fileSystemIsCaseSensitive()) + { + // unix => case sensitive match => also include useful uppercase versions + filePatternList.append("*.C"); + filePatternList.append("*.CC"); + filePatternList.append("*.C++"); + filePatternList.append("*.II"); + filePatternList.append("*.I++"); + filePatternList.append("*.H"); + filePatternList.append("*.HH"); + filePatternList.append("*.H++"); + filePatternList.append("*.CS"); + filePatternList.append("*.PHP"); + filePatternList.append("*.PHP3"); + filePatternList.append("*.M"); + filePatternList.append("*.MM"); + filePatternList.append("*.PY"); + filePatternList.append("*.F90"); + filePatternList.append("*.F"); + filePatternList.append("*.VHD"); + filePatternList.append("*.VHDL"); + } + } + + // add default pattern if needed + QStrList &examplePatternList = Config_getList("EXAMPLE_PATTERNS"); + if (examplePatternList.isEmpty()) + { + examplePatternList.append("*"); + } + + // if no output format is enabled, warn the user + if (!Config_getBool("GENERATE_HTML") && + !Config_getBool("GENERATE_LATEX") && + !Config_getBool("GENERATE_MAN") && + !Config_getBool("GENERATE_RTF") && + !Config_getBool("GENERATE_XML") && + !Config_getBool("GENERATE_PERLMOD") && + !Config_getBool("GENERATE_RTF") && + !Config_getBool("GENERATE_AUTOGEN_DEF") && + Config_getString("GENERATE_TAGFILE").isEmpty() + ) + { + config_err("warning: No output formats selected! Set at least one of the main GENERATE_* options to YES.\n"); + } + + // check HTMLHELP creation requirements + if (!Config_getBool("GENERATE_HTML") && + Config_getBool("GENERATE_HTMLHELP")) + { + config_err("warning: GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n"); + } + + // check QHP creation requirements + if (Config_getBool("GENERATE_QHP")) + { + if (Config_getString("QHP_NAMESPACE").isEmpty()) + { + config_err("error: GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n"); + Config_getString("QHP_NAMESPACE")="org.doxygen.doc"; + } + + if (Config_getString("QHP_VIRTUAL_FOLDER").isEmpty()) + { + config_err("error: GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n"); + Config_getString("QHP_VIRTUAL_FOLDER")="doc"; + } + } + + if (Config_getBool("OPTIMIZE_OUTPUT_JAVA") && Config_getBool("INLINE_INFO")) + { + // don't show inline info for Java output, since Java has no inline + // concept. + Config_getBool("INLINE_INFO")=FALSE; + } + + int &depth = Config_getInt("MAX_DOT_GRAPH_DEPTH"); + if (depth==0) + { + depth=1000; + } + + int &hue = Config_getInt("HTML_COLORSTYLE_HUE"); + if (hue<0) + { + hue=0; + } + else if (hue>=360) + { + hue=hue%360; + } + + int &sat = Config_getInt("HTML_COLORSTYLE_SAT"); + if (sat<0) + { + sat=0; + } + else if (sat>255) + { + sat=255; + } + int &gamma = Config_getInt("HTML_COLORSTYLE_GAMMA"); + if (gamma<40) + { + gamma=40; + } + else if (gamma>240) + { + gamma=240; + } + + + // add default words if needed + QStrList &annotationFromBrief = Config_getList("ABBREVIATE_BRIEF"); + if (annotationFromBrief.isEmpty()) + { + annotationFromBrief.append("The $name class"); + annotationFromBrief.append("The $name widget"); + annotationFromBrief.append("The $name file"); + annotationFromBrief.append("is"); + annotationFromBrief.append("provides"); + annotationFromBrief.append("specifies"); + annotationFromBrief.append("contains"); + annotationFromBrief.append("represents"); + annotationFromBrief.append("a"); + annotationFromBrief.append("an"); + annotationFromBrief.append("the"); + } + + // some default settings for vhdl + if (Config_getBool("OPTIMIZE_OUTPUT_VHDL") && + (Config_getBool("INLINE_INHERITED_MEMB") || + Config_getBool("INHERIT_DOCS") || + !Config_getBool("HIDE_SCOPE_NAMES") || + !Config_getBool("EXTRACT_PRIVATE") + ) + ) + { + bool b1 = Config_getBool("INLINE_INHERITED_MEMB"); + bool b2 = Config_getBool("INHERIT_DOCS"); + bool b3 = Config_getBool("HIDE_SCOPE_NAMES"); + bool b4 = Config_getBool("EXTRACT_PRIVATE"); + const char *s1,*s2,*s3,*s4; + if (b1) s1=" INLINDE_INHERITED_MEMB = NO (was YES)\n"; else s1=""; + if (b2) s2=" INHERIT_DOCS = NO (was YES)\n"; else s2=""; + if (!b3) s3=" HIDE_SCOPE_NAMES = YES (was NO)\n"; else s3=""; + if (!b4) s4=" EXTRACT_PRIVATE = YES (was NO)\n"; else s4=""; + + config_err("warning: enabling OPTIMIZE_OUTPUT_VHDL assumes the following settings:\n" + "%s%s%s%s",s1,s2,s3,s4 + ); + + Config_getBool("INLINE_INHERITED_MEMB") = FALSE; + Config_getBool("INHERIT_DOCS") = FALSE; + Config_getBool("HIDE_SCOPE_NAMES") = TRUE; + Config_getBool("EXTRACT_PRIVATE") = TRUE; + } + +} + +void Config::init() +{ + ConfigOption *option = m_options->first(); + while (option) + { + option->init(); + option = m_options->next(); + } +} + +void Config::create() +{ + if (m_initialized) return; + m_initialized = TRUE; + addConfigOptions(this); +} + +static QCString configFileToString(const char *name) +{ + if (name==0 || name[0]==0) return 0; + QFile f; + + bool fileOpened=FALSE; + if (name[0]=='-' && name[1]==0) // read from stdin + { + fileOpened=f.open(IO_ReadOnly,stdin); + if (fileOpened) + { + const int bSize=4096; + QCString contents(bSize); + int totalSize=0; + int size; + while ((size=f.readBlock(contents.data()+totalSize,bSize))==bSize) + { + totalSize+=bSize; + contents.resize(totalSize+bSize); + } + totalSize+=size+2; + contents.resize(totalSize); + contents.at(totalSize-2)='\n'; // to help the scanner + contents.at(totalSize-1)='\0'; + return contents; + } + } + else // read from file + { + QFileInfo fi(name); + if (!fi.exists() || !fi.isFile()) + { + config_err("error: file `%s' not found\n",name); + return ""; + } + f.setName(name); + fileOpened=f.open(IO_ReadOnly); + if (fileOpened) + { + int fsize=f.size(); + QCString contents(fsize+2); + f.readBlock(contents.data(),fsize); + f.close(); + if (fsize==0 || contents[fsize-1]=='\n') + contents[fsize]='\0'; + else + contents[fsize]='\n'; // to help the scanner + contents[fsize+1]='\0'; + return contents; + } + } + if (!fileOpened) + { + config_err("error: cannot open file `%s' for reading\n",name); + } + return ""; +} + +bool Config::parseString(const char *fn,const char *str) +{ + config = Config::instance(); + inputString = str; + inputPosition = 0; + yyFileName = fn; + yyLineNr = 1; + includeStack.setAutoDelete(TRUE); + includeStack.clear(); + includeDepth = 0; + configYYrestart( configYYin ); + BEGIN( Start ); + configYYlex(); + inputString = 0; + return TRUE; +} + +bool Config::parse(const char *fn) +{ + encoding = "UTF-8"; + return parseString(fn,configFileToString(fn)); +} + +extern "C" { // some bogus code to keep the compiler happy + //int configYYwrap() { return 1 ; } +} + Index: branches/xZenu/src/util/doxygen/src/configgen.py =================================================================== --- branches/xZenu/src/util/doxygen/src/configgen.py (revision 0) +++ branches/xZenu/src/util/doxygen/src/configgen.py (revision 1322) @@ -0,0 +1,137 @@ +# python script to generate configoptions.cpp from config.xml +# +# Copyright (C) 1997-2008 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. +# +import xml.dom.minidom +from xml.dom import minidom, Node + +def addValues(var,node): + for n in node.childNodes: + if n.nodeType == Node.ELEMENT_NODE: + name = n.getAttribute('name'); + print " %s->addValue(\"%s\");" % (var,name) + +def parseOption(node): + name = node.getAttribute('id') + type = node.getAttribute('type') + format = node.getAttribute('format') + doc = node.getAttribute('docs') + defval = node.getAttribute('defval') + adefval = node.getAttribute('altdefval') + depends = node.getAttribute('depends') + # replace \ by \\, replace " by \", and ' ' by a newline with end string and start string at next line + docC = doc.strip().replace('\\','\\\\').replace('"','\\"').replace(' ','\\n"\n "') + print " //----" + if type=='bool': + if len(adefval)>0: + enabled = adefval + else: + enabled = "TRUE" if defval=='1' else "FALSE" + print " cb = cfg->addBool(" + print " \"%s\"," % (name) + print " \"%s\"," % (docC) + print " %s" % (enabled) + print " );" + if depends!='': + print " cb->addDependency(\"%s\");" % (depends) + elif type=='string': + print " cs = cfg->addString(" + print " \"%s\"," % (name) + print " \"%s\"" % (docC) + print " );" + if defval!='': + print " cs->setDefaultValue(\"%s\");" % (defval) + if format=='file': + print " cs->setWidgetType(ConfigString::File);" + elif format=='dir': + print " cs->setWidgetType(ConfigString::Dir);" + if depends!='': + print " cs->addDependency(\"%s\");" % (depends) + elif type=='enum': + print " ce = cfg->addEnum(" + print " \"%s\"," % (name) + print " \"%s\"," % (docC) + print " \"%s\"" % (defval) + print " );" + addValues("ce",node) + if depends!='': + print " ce->addDependency(\"%s\");" % (depends) + elif type=='int': + minval = node.getAttribute('minval') + maxval = node.getAttribute('maxval') + print " ci = cfg->addInt(" + print " \"%s\"," % (name) + print " \"%s\"," % (docC) + print " %s,%s,%s" % (minval,maxval,defval) + print " );" + if depends!='': + print " ci->addDependency(\"%s\");" % (depends) + elif type=='list': + print " cl = cfg->addList(" + print " \"%s\"," % (name) + print " \"%s\"" % (docC) + print " );" + addValues("cl",node) + if depends!='': + print " cl->addDependency(\"%s\");" % (depends) + if format=='file': + print " cl->setWidgetType(ConfigList::File);" + elif format=='dir': + print " cl->setWidgetType(ConfigList::Dir);" + elif format=='filedir': + print " cl->setWidgetType(ConfigList::FileAndDir);" + elif type=='obsolete': + print " cfg->addObsolete(\"%s\");" % (name) + + + + +def parseGroups(node): + name = node.getAttribute('name') + doc = node.getAttribute('docs') + print " //---------------------------------------------------------------------------"; + print " cfg->addInfo(\"%s\",\"%s\");" % (name,doc) + print " //---------------------------------------------------------------------------"; + print + for n in node.childNodes: + if n.nodeType == Node.ELEMENT_NODE: + parseOption(n) + + +def main(): + doc = xml.dom.minidom.parse("config.xml") + elem = doc.documentElement + print "/* WARNING: This file is generated!" + print " * Do not edit this file, but edit config.xml instead and run" + print " * python configgen.py to regenerate this file!" + print " */" + print "" + print "#include \"configoptions.h\"" + print "#include \"config.h\"" + print "#include \"portable.h\"" + print "" + print "void addConfigOptions(Config *cfg)" + print "{" + print " ConfigString *cs;" + print " ConfigEnum *ce;" + print " ConfigList *cl;" + print " ConfigInt *ci;" + print " ConfigBool *cb;" + print "" + for n in elem.childNodes: + if n.nodeType == Node.ELEMENT_NODE: + parseGroups(n) + print "}" + +if __name__ == '__main__': + main() + Property changes on: branches/xZenu/src/util/doxygen/src/configgen.py ___________________________________________________________________ Added: svn:executable + * Index: branches/xZenu/src/util/doxygen/src/portable.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/portable.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/portable.cpp (revision 1322) @@ -0,0 +1,401 @@ +#include <stdlib.h> +#include <ctype.h> +#if defined(_WIN32) && !defined(__CYGWIN__) +#undef UNICODE +#include <windows.h> +#else +#include <unistd.h> +#include <stdlib.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <errno.h> +extern char **environ; +#endif + +#include <qglobal.h> +#include <qdatetime.h> + +#if defined(_MSC_VER) || defined(__BORLANDC__) +#define popen _popen +#define pclose _pclose +#endif + +#include "portable.h" +#ifndef NODEBUG +#include "debug.h" +#endif +//#include "doxygen.h" + +static double g_sysElapsedTime; +static QTime g_time; + +int portable_system(const char *command,const char *args,bool commandHasConsole) +{ + + if (command==0) return 1; + + QCString fullCmd=command; + fullCmd=fullCmd.stripWhiteSpace(); + if (fullCmd.at(0)!='"' && fullCmd.find(' ')!=-1) + { + // add quotes around command as it contains spaces and is not quoted already + fullCmd="\""+fullCmd+"\""; + } + fullCmd += " "; + fullCmd += args; +#ifndef NODEBUG + Debug::print(Debug::ExtCmd,0,"Executing external command `%s`\n",fullCmd.data()); +#endif + +#if !defined(_WIN32) || defined(__CYGWIN__) + commandHasConsole=commandHasConsole; + /*! taken from the system() manpage on my Linux box */ + int pid,status=0; + +#ifdef _OS_SOLARIS // for Solaris we use vfork since it is more memory efficient + + // on Solaris fork() duplicates the memory usage + // so we use vfork instead + + // spawn shell + if ((pid=vfork())<0) + { + status=-1; + } + else if (pid==0) + { + execl("/bin/sh","sh","-c",fullCmd.data(),(char*)0); + _exit(127); + } + else + { + while (waitpid(pid,&status,0 )<0) + { + if (errno!=EINTR) + { + status=-1; + break; + } + } + } + return status; + +#else // Other Unices just use fork + + pid = fork(); + if (pid==-1) return -1; + if (pid==0) + { + const char * argv[4]; + argv[0] = "sh"; + argv[1] = "-c"; + argv[2] = fullCmd.data(); + argv[3] = 0; + execve("/bin/sh",(char * const *)argv,environ); + exit(127); + } + for (;;) + { + if (waitpid(pid,&status,0)==-1) + { + if (errno!=EINTR) return -1; + } + else + { + if (WIFEXITED(status)) + { + return WEXITSTATUS(status); + } + else + { + return status; + } + } + } +#endif // !_OS_SOLARIS + +#else // Win32 specific + if (commandHasConsole) + { + return system(fullCmd); + } + else + { + // gswin32 is a GUI api which will pop up a window and run + // asynchronously. To prevent both, we use ShellExecuteEx and + // WaitForSingleObject (thanks to Robert Golias for the code) + + SHELLEXECUTEINFO sInfo = { + sizeof(SHELLEXECUTEINFO), /* structure size */ + SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI, /* tell us the process + * handle so we can wait till it's done | + * do not display msg box if error + */ + NULL, /* window handle */ + NULL, /* action to perform: open */ + command, /* file to execute */ + args, /* argument list */ + NULL, /* use current working dir */ + SW_HIDE, /* minimize on start-up */ + 0, /* application instance handle */ + NULL, /* ignored: id list */ + NULL, /* ignored: class name */ + NULL, /* ignored: key class */ + 0, /* ignored: hot key */ + NULL, /* ignored: icon */ + NULL /* resulting application handle */ + }; + if (!ShellExecuteEx(&sInfo)) + { + return -1; + } + else if (sInfo.hProcess) /* executable was launched, wait for it to finish */ + { + WaitForSingleObject(sInfo.hProcess,INFINITE); + CloseHandle(sInfo.hProcess); + } + } + return 0; +#endif + +} + +uint portable_pid() +{ + uint pid; +#if !defined(_WIN32) || defined(__CYGWIN__) + pid = (uint)getpid(); +#else + pid = (uint)GetCurrentProcessId(); +#endif + return pid; +} + +static char **last_environ; + +void portable_setenv(const char *name,const char *value) +{ + if (value==0) value=""; +#if defined(_WIN32) && !defined(__CYGWIN__) + SetEnvironmentVariable(name,value); +#else + register char **ep = 0; + register size_t size; + const size_t namelen=strlen(name); + const size_t vallen=strlen(value) + 1; + + size = 0; + if (environ!=0) + { + for (ep = environ; *ep; ++ep) + { + if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=') + break; + else + ++size; + } + } + + if (environ==0 || *ep==0) /* add new string */ + { + char **new_environ; + if (environ == last_environ && environ!=0) + { + // We allocated this space; we can extend it. + new_environ = (char **) realloc (last_environ, (size + 2) * sizeof (char *)); + } + else + { + new_environ = (char **) malloc ((size + 2) * sizeof (char *)); + } + + if (new_environ==0) // no more memory + { + return; + } + + new_environ[size] = (char *)malloc (namelen + 1 + vallen); + if (new_environ[size]==0) + { + free (new_environ); + return; + } + + if (environ != last_environ) + { + memcpy ((char *) new_environ, environ, size * sizeof (char *)); + } + + memcpy(new_environ[size], name, namelen); + new_environ[size][namelen] = '='; + memcpy(&new_environ[size][namelen + 1], value, vallen); + new_environ[size + 1] = 0; + last_environ = environ = new_environ; + } + else /* replace existing string */ + { + size_t len = strlen (*ep); + if (len + 1 < namelen + 1 + vallen) + { + /* The existing string is too short; malloc a new one. */ + char *newString = (char *)malloc(namelen + 1 + vallen); + if (newString==0) + { + return; + } + *ep = newString; + } + memcpy(*ep, name, namelen); + (*ep)[namelen] = '='; + memcpy(&(*ep)[namelen + 1], value, vallen); + } + +#endif +} + +void portable_unsetenv(const char *variable) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + SetEnvironmentVariable(variable,0); +#else + /* Some systems don't have unsetenv(), so we do it ourselves */ + size_t len; + char **ep; + + if (variable == NULL || *variable == '\0' || strchr (variable, '=') != NULL) + { + return; // not properly formatted + } + + len = strlen(variable); + + ep = environ; + while (*ep != NULL) + { + if (!strncmp(*ep, variable, len) && (*ep)[len]=='=') + { + /* Found it. Remove this pointer by moving later ones back. */ + char **dp = ep; + do dp[0] = dp[1]; while (*dp++); + /* Continue the loop in case NAME appears again. */ + } + else + { + ++ep; + } + } +#endif +} + +const char *portable_getenv(const char *variable) +{ + return getenv(variable); +} + +portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return _fseeki64(f,offset,whence); +#else + return fseeko(f,offset,whence); +#endif +} + +portable_off_t portable_ftell(FILE *f) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return _ftelli64(f); +#else + return ftello(f); +#endif +} + +FILE *portable_fopen(const char *fileName,const char *mode) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + QString fn(fileName); + QString m(mode); + return _wfopen((wchar_t*)fn.ucs2(),(wchar_t*)m.ucs2()); +#else + return fopen(fileName,mode); +#endif +} + +char portable_pathSeparator() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return '\\'; +#else + return '/'; +#endif +} + +char portable_pathListSeparator() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return ';'; +#else + return ':'; +#endif +} + +const char *portable_ghostScriptCommand() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return "gswin32c.exe"; +#else + return "gs"; +#endif +} + +const char *portable_commandExtension() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return ".exe"; +#else + return ""; +#endif +} + +bool portable_fileSystemIsCaseSensitive() +{ +#if defined(_WIN32) || defined(macintosh) || defined(__MACOSX__) || defined(__APPLE__) + return FALSE; +#else + return TRUE; +#endif +} + +FILE * portable_popen(const char *name,const char *type) +{ + return popen(name,type); +} + +int portable_pclose(FILE *stream) +{ + return pclose(stream); +} + +void portable_sysTimerStart() +{ + g_time.start(); +} + +void portable_sysTimerStop() +{ + g_sysElapsedTime+=((double)g_time.elapsed())/1000.0; +} + +double portable_getSysElapsedTime() +{ + return g_sysElapsedTime; +} + +void portable_sleep(int ms) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + Sleep(ms); +#else + usleep(1000*ms); +#endif +} Index: branches/xZenu/src/util/doxygen/src/libdoxycfg.pro =================================================================== --- branches/xZenu/src/util/doxygen/src/libdoxycfg.pro (revision 0) +++ branches/xZenu/src/util/doxygen/src/libdoxycfg.pro (revision 1322) @@ -0,0 +1,32 @@ +# +# This file was generated from libdoxycfg.pro.in on Mon Mar 28 15:09:00 CEST 2011 +# + +# +# $Id: libdoxycfg.pro.in,v 1.1 2001/03/19 19:27:41 root Exp $ +# +# Copyright (C) 1997-2011 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. +# +# TMake project file for doxygen + +TEMPLATE = libdoxycfg.t +CONFIG = console warn_on staticlib debug +HEADERS = config.h configoptions.h portable.h +SOURCES = config.cpp configoptions.cpp portable.cpp portable_c.c +win32:TMAKE_CXXFLAGS += -DQT_NODLL +win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti +INCLUDEPATH += ../qtools +win32:INCLUDEPATH += . +DESTDIR = ../lib +TARGET = doxycfg +OBJECTS_DIR = ../objects +TMAKE_MOC = /usr/bin/moc Index: branches/xZenu/src/util/doxygen/src/portable_c.c =================================================================== --- branches/xZenu/src/util/doxygen/src/portable_c.c (revision 0) +++ branches/xZenu/src/util/doxygen/src/portable_c.c (revision 1322) @@ -0,0 +1,24 @@ +#include <iconv.h> + +// These functions are implemented in a C file, because there are different +// versions of the iconv() prototype, some with a const pointer and some +// without. In C this is just a warning, but in C++ breaks the compilation. +// Looking at the LIBICONV_VERSION is not enough, since for MACOSX the +// const and non-const version exist with the same version of the file. + +void * portable_iconv_open(const char* tocode, const char* fromcode) +{ + return iconv_open(tocode,fromcode); +} + +size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft, + char** outbuf, size_t *outbytesleft) +{ + return iconv((iconv_t)cd,inbuf,inbytesleft,outbuf,outbytesleft); +} + +int portable_iconv_close (void *cd) +{ + return iconv_close((iconv_t)cd); +} + Index: branches/xZenu/src/util/doxygen/src/util.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/util.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/util.cpp (revision 1322) @@ -0,0 +1,6985 @@ +/***************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include <stdlib.h> +#include <ctype.h> +#include <errno.h> +#include <math.h> + +#include "md5.h" + +#include "qtbc.h" +#include <qregexp.h> +#include <qfileinfo.h> +#include <qdir.h> +#include <qdatetime.h> +#include <qcache.h> + +#include "util.h" +#include "message.h" +#include "classdef.h" +#include "filedef.h" +#include "doxygen.h" +#include "outputlist.h" +#include "defargs.h" +#include "language.h" +#include "config.h" +#include "htmlhelp.h" +#include "example.h" +#include "version.h" +#include "groupdef.h" +#include "reflist.h" +#include "pagedef.h" +#include "debug.h" +#include "searchindex.h" +#include "doxygen.h" +#include "textdocvisitor.h" +#include "portable.h" +#include "parserintf.h" +#include "bufstr.h" +#include "image.h" + +#define ENABLE_TRACINGSUPPORT 0 + +#if defined(_OS_MAC_) && ENABLE_TRACINGSUPPORT +#define TRACINGSUPPORT +#endif + +#ifdef TRACINGSUPPORT +#include <execinfo.h> +#include <unistd.h> +#endif + + +//------------------------------------------------------------------------ + +// selects one of the name to sub-dir mapping algorithms that is used +// to select a sub directory when CREATE_SUBDIRS is set to YES. + +#define ALGO_COUNT 1 +#define ALGO_CRC16 2 +#define ALGO_MD5 3 + +//#define MAP_ALGO ALGO_COUNT +//#define MAP_ALGO ALGO_CRC16 +#define MAP_ALGO ALGO_MD5 + +#define REL_PATH_TO_ROOT "../../" + +//------------------------------------------------------------------------ +// TextGeneratorOLImpl implementation +//------------------------------------------------------------------------ + +TextGeneratorOLImpl::TextGeneratorOLImpl(OutputDocInterface &od) : m_od(od) +{ +} + +void TextGeneratorOLImpl::writeString(const char *s,bool keepSpaces) const +{ + if (keepSpaces) + { + const char *p=s; + if (p) + { + char cs[2]; + char c; + cs[1]='\0'; + while ((c=*p++)) + { + if (c==' ') m_od.writeNonBreakableSpace(1); + else cs[0]=c,m_od.docify(cs); + } + } + } + else + { + m_od.docify(s); + } +} + +void TextGeneratorOLImpl::writeBreak() const +{ + m_od.pushGeneratorState(); + m_od.disableAllBut(OutputGenerator::Html); + m_od.lineBreak("typebreak"); + m_od.popGeneratorState(); +} + +void TextGeneratorOLImpl::writeLink(const char *extRef,const char *file, + const char *anchor,const char *text + ) const +{ + m_od.writeObjectLink(extRef,file,anchor,text); +} + +//------------------------------------------------------------------------ +//------------------------------------------------------------------------ + +// an inheritance tree of depth of 100000 should be enough for everyone :-) +const int maxInheritanceDepth = 100000; + +/*! + Removes all anonymous scopes from string s + Possible examples: +\verbatim + "bla::@10::blep" => "bla::blep" + "bla::@10::@11::blep" => "bla::blep" + "@10::blep" => "blep" + " @10::blep" => "blep" + "@9::@10::blep" => "blep" + "bla::@1" => "bla" + "bla::@1::@2" => "bla" + "bla @1" => "bla" +\endverbatim + */ +QCString removeAnonymousScopes(const QCString &s) +{ + QCString result; + if (s.isEmpty()) return result; + static QRegExp re("[ :]*@[0-9]+[: ]*"); + int i,l,sl=s.length(); + int p=0; + while ((i=re.match(s,p,&l))!=-1) + { + result+=s.mid(p,i-p); + int c=i; + bool b1=FALSE,b2=FALSE; + while (c<i+l && s.at(c)!='@') if (s.at(c++)==':') b1=TRUE; + c=i+l-1; + while (c>=i && s.at(c)!='@') if (s.at(c--)==':') b2=TRUE; + if (b1 && b2) + { + result+="::"; + } + p=i+l; + } + result+=s.right(sl-p); + //printf("removeAnonymousScopes(`%s')=`%s'\n",s.data(),result.data()); + return result; +} + +// replace anonymous scopes with __anonymous__ or replacement if provided +QCString replaceAnonymousScopes(const QCString &s,const char *replacement) +{ + QCString result; + if (s.isEmpty()) return result; + static QRegExp re("@[0-9]+"); + int i,l,sl=s.length(); + int p=0; + while ((i=re.match(s,p,&l))!=-1) + { + result+=s.mid(p,i-p); + if (replacement) + { + result+=replacement; + } + else + { + result+="__anonymous__"; + } + p=i+l; + } + result+=s.right(sl-p); + //printf("replaceAnonymousScopes(`%s')=`%s'\n",s.data(),result.data()); + return result; +} + + +// strip anonymous left hand side part of the scope +QCString stripAnonymousNamespaceScope(const QCString &s) +{ + int i,p=0,l; + QCString newScope; + while ((i=getScopeFragment(s,p,&l))!=-1) + { + //printf("Scope fragment %s\n",s.mid(i,l).data()); + if (Doxygen::namespaceSDict->find(s.left(i+l))!=0) + { + if (s.at(i)!='@') + { + if (!newScope.isEmpty()) newScope+="::"; + newScope+=s.mid(i,l); + } + } + else + { + if (!newScope.isEmpty()) newScope+="::"; + newScope+=s.right(s.length()-i); + goto done; + } + p=i+l; + } +done: + //printf("stripAnonymousNamespaceScope(`%s')=`%s'\n",s.data(),newScope.data()); + return newScope; +} + +void writePageRef(OutputDocInterface &od,const char *cn,const char *mn) +{ + od.pushGeneratorState(); + + od.disable(OutputGenerator::Html); + od.disable(OutputGenerator::Man); + if (Config_getBool("PDF_HYPERLINKS")) od.disable(OutputGenerator::Latex); + if (Config_getBool("RTF_HYPERLINKS")) od.disable(OutputGenerator::RTF); + od.startPageRef(); + od.docify(theTranslator->trPageAbbreviation()); + od.endPageRef(cn,mn); + + od.popGeneratorState(); +} + +/*! Generate a place holder for a position in a list. Used for + * translators to be able to specify different elements orders + * depending on whether text flows from left to right or visa versa. + */ +QCString generateMarker(int id) +{ + QCString result; + result.sprintf("@%d",id); + return result; +} + +static QCString stripFromPath(const QCString &path,QStrList &l) +{ + // look at all the strings in the list and strip the longest match + const char *s=l.first(); + QCString potential; + unsigned int length = 0; + while (s) + { + QCString prefix = s; + if (prefix.length() > length && + stricmp(path.left(prefix.length()),prefix)==0) // case insensitive compare + { + length = prefix.length(); + potential = path.right(path.length()-prefix.length()); + } + s = l.next(); + } + if (length) return potential; + return path; +} + +/*! strip part of \a path if it matches + * one of the paths in the Config_getList("STRIP_FROM_PATH") list + */ +QCString stripFromPath(const QCString &path) +{ + return stripFromPath(path,Config_getList("STRIP_FROM_PATH")); +} + +/*! strip part of \a path if it matches + * one of the paths in the Config_getList("INCLUDE_PATH") list + */ +QCString stripFromIncludePath(const QCString &path) +{ + return stripFromPath(path,Config_getList("STRIP_FROM_INC_PATH")); +} + +/*! try to determine if \a name is a source or a header file name by looking + * at the extension. A number of variations is allowed in both upper and + * lower case) If anyone knows or uses another extension please let me know :-) + */ +int guessSection(const char *name) +{ + QCString n=((QCString)name).lower(); + if (n.right(2)==".c" || // source + n.right(3)==".cc" || + n.right(4)==".cxx" || + n.right(4)==".cpp" || + n.right(4)==".c++" || + n.right(5)==".java" || + n.right(3)==".ii" || // inline + n.right(4)==".ixx" || + n.right(4)==".ipp" || + n.right(4)==".i++" || + n.right(4)==".inl" || + n.right(4)==".xml" + ) return Entry::SOURCE_SEC; + if (n.right(2)==".h" || // header + n.right(3)==".hh" || + n.right(4)==".hxx" || + n.right(4)==".hpp" || + n.right(4)==".h++" || + n.right(4)==".idl" || + n.right(4)==".ddl" || + n.right(5)==".pidl" + ) return Entry::HEADER_SEC; + return 0; +} + +QCString resolveTypeDef(Definition *context,const QCString &qualifiedName, + Definition **typedefContext) +{ + //printf("<<resolveTypeDef(%s,%s)\n", + // context ? context->name().data() : "<none>",qualifiedName.data()); + QCString result; + if (qualifiedName.isEmpty()) + { + //printf(" qualified name empty!\n"); + return result; + } + + Definition *mContext=context; + if (typedefContext) *typedefContext=context; + + // see if the qualified name has a scope part + int scopeIndex = qualifiedName.findRev("::"); + QCString resName=qualifiedName; + if (scopeIndex!=-1) // strip scope part for the name + { + resName=qualifiedName.right(qualifiedName.length()-scopeIndex-2); + if (resName.isEmpty()) + { + // qualifiedName was of form A:: ! + //printf(" qualified name of form A::!\n"); + return result; + } + } + MemberDef *md=0; + while (mContext && md==0) + { + // step 1: get the right scope + Definition *resScope=mContext; + if (scopeIndex!=-1) + { + // split-off scope part + QCString resScopeName = qualifiedName.left(scopeIndex); + //printf("resScopeName=`%s'\n",resScopeName.data()); + + // look-up scope in context + int is,ps=0; + int l; + while ((is=getScopeFragment(resScopeName,ps,&l))!=-1) + { + QCString qualScopePart = resScopeName.mid(is,l); + QCString tmp = resolveTypeDef(mContext,qualScopePart); + if (!tmp.isEmpty()) qualScopePart=tmp; + resScope = resScope->findInnerCompound(qualScopePart); + //printf("qualScopePart=`%s' resScope=%p\n",qualScopePart.data(),resScope); + if (resScope==0) break; + ps=is+l; + } + } + //printf("resScope=%s\n",resScope?resScope->name().data():"<none>"); + + // step 2: get the member + if (resScope) // no scope or scope found in the current context + { + //printf("scope found: %s, look for typedef %s\n", + // resScope->qualifiedName().data(),resName.data()); + MemberNameSDict *mnd=0; + if (resScope->definitionType()==Definition::TypeClass) + { + mnd=Doxygen::memberNameSDict; + } + else + { + mnd=Doxygen::functionNameSDict; + } + MemberName *mn=mnd->find(resName); + if (mn) + { + MemberNameIterator mni(*mn); + MemberDef *tmd=0; + int minDist=-1; + for (;(tmd=mni.current());++mni) + { + //printf("Found member %s resScope=%s outerScope=%s mContext=%p\n", + // tmd->name().data(), resScope->name().data(), + // tmd->getOuterScope()->name().data(), mContext); + if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/) + { + int dist=isAccessibleFrom(resScope,0,tmd); + if (dist!=-1 && (md==0 || dist<minDist)) + { + md = tmd; + minDist = dist; + } + } + } + } + } + mContext=mContext->getOuterScope(); + } + + // step 3: get the member's type + if (md) + { + //printf(">>resolveTypeDef: Found typedef name `%s' in scope `%s' value=`%s' args='%s'\n", + // qualifiedName.data(),context->name().data(),md->typeString(),md->argsString() + // ); + result=md->typeString(); + QString args = md->argsString(); + if (args.find(")(")!=-1) // typedef of a function/member pointer + { + result+=args; + } + else if (args.find('[')!=-1) // typedef of an array + { + result+=args; + } + if (typedefContext) *typedefContext=md->getOuterScope(); + } + else + { + //printf(">>resolveTypeDef: Typedef `%s' not found in scope `%s'!\n", + // qualifiedName.data(),context ? context->name().data() : "<global>"); + } + return result; + +} + + +/*! Get a class definition given its name. + * Returns 0 if the class is not found. + */ +ClassDef *getClass(const char *name) +{ + if (name==0 || name[0]=='\0') return 0; + return Doxygen::classSDict->find(name); +} + +NamespaceDef *getResolvedNamespace(const char *name) +{ + if (name==0 || name[0]=='\0') return 0; + QCString *subst = Doxygen::namespaceAliasDict[name]; + if (subst) + { + int count=0; // recursion detection guard + QCString *newSubst; + while ((newSubst=Doxygen::namespaceAliasDict[*subst]) && count<10) + { + subst=newSubst; + count++; + } + if (count==10) + { + err("warning: possible recursive namespace alias detected for %s!\n",name); + } + return Doxygen::namespaceSDict->find(subst->data()); + } + else + { + return Doxygen::namespaceSDict->find(name); + } +} + +static QDict<MemberDef> g_resolvedTypedefs; +static QDict<Definition> g_visitedNamespaces; + +// forward declaration +ClassDef *getResolvedClassRec(Definition *scope, + FileDef *fileScope, + const char *n, + MemberDef **pTypeDef, + QCString *pTemplSpec, + QCString *pResolvedType + ); +int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition *item, + const QCString &explicitScopePart); + +/*! Returns the class representing the value of the typedef represented by \a md + * within file \a fileScope. + * + * Example: typedef A T; will return the class representing A if it is a class. + * + * Example: typedef int T; will return 0, since "int" is not a class. + */ +ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md, + MemberDef **pMemType,QCString *pTemplSpec, + QCString *pResolvedType, + ArgumentList *actTemplParams) +{ + //printf("newResolveTypedef(md=%p,cachedVal=%p)\n",md,md->getCachedTypedefVal()); + bool isCached = md->isTypedefValCached(); // value already cached + if (isCached) + { + //printf("Already cached %s->%s [%s]\n", + // md->name().data(), + // md->getCachedTypedefVal()?md->getCachedTypedefVal()->name().data():"<none>", + // md->getCachedResolvedTypedef()?md->getCachedResolvedTypedef().data():"<none>"); + + if (pTemplSpec) *pTemplSpec = md->getCachedTypedefTemplSpec(); + if (pResolvedType) *pResolvedType = md->getCachedResolvedTypedef(); + return md->getCachedTypedefVal(); + } + //printf("new typedef\n"); + QCString qname = md->qualifiedName(); + if (g_resolvedTypedefs.find(qname)) return 0; // typedef already done + + g_resolvedTypedefs.insert(qname,md); // put on the trace list + + ClassDef *typeClass = md->getClassDef(); + QCString type = md->typeString(); // get the "value" of the typedef + if (typeClass && typeClass->isTemplate() && + actTemplParams && actTemplParams->count()>0) + { + type = substituteTemplateArgumentsInString(type, + typeClass->templateArguments(),actTemplParams); + } + QCString typedefValue = type; + int tl=type.length(); + int ip=tl-1; // remove * and & at the end + while (ip>=0 && (type.at(ip)=='*' || type.at(ip)=='&' || type.at(ip)==' ')) + { + ip--; + } + type=type.left(ip+1); + type.stripPrefix("const "); // strip leading "const" + type.stripPrefix("struct "); // strip leading "struct" + type.stripPrefix("union "); // strip leading "union" + int sp=0; + tl=type.length(); // length may have been changed + while (sp<tl && type.at(sp)==' ') sp++; + MemberDef *memTypeDef = 0; + ClassDef *result = getResolvedClassRec(md->getOuterScope(), + fileScope,type,&memTypeDef,0,pResolvedType); + // if type is a typedef then return what it resolves to. + if (memTypeDef && memTypeDef->isTypedef()) + { + result=newResolveTypedef(fileScope,memTypeDef,pMemType,pTemplSpec); + goto done; + } + else if (memTypeDef && memTypeDef->isEnumerate() && pMemType) + { + *pMemType = memTypeDef; + } + + //printf("type=%s result=%p\n",type.data(),result); + if (result==0) + { + // try unspecialized version if type is template + int si=type.findRev("::"); + int i=type.find('<'); + if (si==-1 && i!=-1) // typedef of a template => try the unspecialized version + { + if (pTemplSpec) *pTemplSpec = type.mid(i); + result = getResolvedClassRec(md->getOuterScope(),fileScope, + type.left(i),0,0,pResolvedType); + //printf("result=%p pRresolvedType=%s sp=%d ip=%d tl=%d\n", + // result,pResolvedType?pResolvedType->data():"<none>",sp,ip,tl); + } + else if (si!=-1) // A::B + { + i=type.find('<',si); + if (i==-1) // Something like A<T>::B => lookup A::B + { + i=type.length(); + } + else // Something like A<T>::B<S> => lookup A::B, spec=<S> + { + if (pTemplSpec) *pTemplSpec = type.mid(i); + } + result = getResolvedClassRec(md->getOuterScope(),fileScope, + stripTemplateSpecifiersFromScope(type.left(i),FALSE),0,0, + pResolvedType); + } + + //if (result) ip=si+sp+1; + } + +done: + if (pResolvedType) + { + if (result) + { + *pResolvedType=result->qualifiedName(); + //printf("*pResolvedType=%s\n",pResolvedType->data()); + if (sp>0) pResolvedType->prepend(typedefValue.left(sp)); + if (ip<tl-1) pResolvedType->append(typedefValue.right(tl-ip-1)); + } + else + { + *pResolvedType=typedefValue; + } + } + + // remember computed value for next time + if (result && result->getDefFileName()!="<code>") + // this check is needed to prevent that temporary classes that are + // introduced while parsing code fragments are being cached here. + { + //printf("setting cached typedef %p in result %p\n",md,result); + //printf("==> %s (%s,%d)\n",result->name().data(),result->getDefFileName().data(),result->getDefLine()); + //printf("*pResolvedType=%s\n",pResolvedType?pResolvedType->data():"<none>"); + md->cacheTypedefVal(result, + pTemplSpec ? *pTemplSpec : QCString(), + pResolvedType ? *pResolvedType : QCString() + ); + } + + g_resolvedTypedefs.remove(qname); // remove from the trace list + + return result; +} + +/*! Substitutes a simple unqualified \a name within \a scope. Returns the + * value of the typedef or \a name if no typedef was found. + */ +static QCString substTypedef(Definition *scope,FileDef *fileScope,const QCString &name, + MemberDef **pTypeDef=0) +{ + QCString result=name; + if (name.isEmpty()) return result; + + // lookup scope fragment in the symbol map + DefinitionIntf *di = Doxygen::symbolMap->find(name); + if (di==0) return result; // no matches + + MemberDef *bestMatch=0; + if (di->definitionType()==DefinitionIntf::TypeSymbolList) // multi symbols + { + // search for the best match + DefinitionListIterator dli(*(DefinitionList*)di); + Definition *d; + int minDistance=10000; // init at "infinite" + for (dli.toFirst();(d=dli.current());++dli) // foreach definition + { + // only look at members + if (d->definitionType()==Definition::TypeMember) + { + // that are also typedefs + MemberDef *md = (MemberDef *)d; + if (md->isTypedef()) // d is a typedef + { + // test accessibility of typedef within scope. + int distance = isAccessibleFromWithExpScope(scope,fileScope,d,""); + if (distance!=-1 && distance<minDistance) + // definition is accessible and a better match + { + minDistance=distance; + bestMatch = md; + } + } + } + } + } + else if (di->definitionType()==DefinitionIntf::TypeMember) // single symbol + { + Definition *d = (Definition*)di; + // that are also typedefs + MemberDef *md = (MemberDef *)di; + if (md->isTypedef()) // d is a typedef + { + // test accessibility of typedef within scope. + int distance = isAccessibleFromWithExpScope(scope,fileScope,d,""); + if (distance!=-1) // definition is accessible + { + bestMatch = md; + } + } + } + if (bestMatch) + { + result = bestMatch->typeString(); + if (pTypeDef) *pTypeDef=bestMatch; + } + + //printf("substTypedef(%s,%s)=%s\n",scope?scope->name().data():"<global>", + // name.data(),result.data()); + return result; +} + +static Definition *endOfPathIsUsedClass(SDict<Definition> *cl,const QCString &localName) +{ + if (cl) + { + SDict<Definition>::Iterator cli(*cl); + Definition *cd; + for (cli.toFirst();(cd=cli.current());++cli) + { + if (cd->localName()==localName) + { + return cd; + } + } + } + return 0; +} + +/*! Starting with scope \a start, the string \a path is interpreted as + * a part of a qualified scope name (e.g. A::B::C), and the scope is + * searched. If found the scope definition is returned, otherwise 0 + * is returned. + */ +static Definition *followPath(Definition *start,FileDef *fileScope,const QCString &path) +{ + int is,ps; + int l; + Definition *current=start; + ps=0; + //printf("followPath: start='%s' path='%s'\n",start?start->name().data():"<none>",path.data()); + // for each part of the explicit scope + while ((is=getScopeFragment(path,ps,&l))!=-1) + { + // try to resolve the part if it is a typedef + MemberDef *typeDef=0; + QCString qualScopePart = substTypedef(current,fileScope,path.mid(is,l),&typeDef); + //printf(" qualScopePart=%s\n",qualScopePart.data()); + if (typeDef) + { + ClassDef *type = newResolveTypedef(fileScope,typeDef); + if (type) + { + //printf("Found type %s\n",type->name().data()); + return type; + } + } + Definition *next = current->findInnerCompound(qualScopePart); + //printf("++ Looking for %s inside %s result %s\n", + // qualScopePart.data(), + // current->name().data(), + // next?next->name().data():"<null>"); + if (next==0) // failed to follow the path + { + //printf("==> next==0!\n"); + if (current->definitionType()==Definition::TypeNamespace) + { + next = endOfPathIsUsedClass( + ((NamespaceDef *)current)->getUsedClasses(),qualScopePart); + } + else if (current->definitionType()==Definition::TypeFile) + { + next = endOfPathIsUsedClass( + ((FileDef *)current)->getUsedClasses(),qualScopePart); + } + current = next; + if (current==0) break; + } + else // continue to follow scope + { + current = next; + //printf("==> current = %p\n",current); + } + ps=is+l; + } + //printf("followPath(start=%s,path=%s) result=%s\n", + // start->name().data(),path.data(),current?current->name().data():"<null>"); + return current; // path could be followed +} + +bool accessibleViaUsingClass(const SDict<Definition> *cl, + FileDef *fileScope, + Definition *item, + const QCString &explicitScopePart="" + ) +{ + //printf("accessibleViaUsingClass(%p)\n",cl); + if (cl) // see if the class was imported via a using statement + { + SDict<Definition>::Iterator cli(*cl); + Definition *ucd; + bool explicitScopePartEmpty = explicitScopePart.isEmpty(); + for (cli.toFirst();(ucd=cli.current());++cli) + { + //printf("Trying via used class %s\n",ucd->name().data()); + Definition *sc = explicitScopePartEmpty ? ucd : followPath(ucd,fileScope,explicitScopePart); + if (sc && sc==item) return TRUE; + //printf("Try via used class done\n"); + } + } + return FALSE; +} + +bool accessibleViaUsingNamespace(const NamespaceSDict *nl, + FileDef *fileScope, + Definition *item, + const QCString &explicitScopePart="") +{ + static QDict<void> visitedDict; + if (nl) // check used namespaces for the class + { + NamespaceSDict::Iterator nli(*nl); + NamespaceDef *und; + int count=0; + for (nli.toFirst();(und=nli.current());++nli,count++) + { + //printf("[Trying via used namespace %s: count=%d/%d\n",und->name().data(), + // count,nl->count()); + Definition *sc = explicitScopePart.isEmpty() ? und : followPath(und,fileScope,explicitScopePart); + if (sc && item->getOuterScope()==sc) + { + //printf("] found it\n"); + return TRUE; + } + QCString key=und->name(); + if (und->getUsedNamespaces() && visitedDict.find(key)==0) + { + visitedDict.insert(key,(void *)0x08); + + if (accessibleViaUsingNamespace(und->getUsedNamespaces(),fileScope,item,explicitScopePart)) + { + //printf("] found it via recursion\n"); + return TRUE; + } + + visitedDict.remove(key); + } + //printf("] Try via used namespace done\n"); + } + } + return FALSE; +} + + +/* Returns the "distance" (=number of levels up) from item to scope, or -1 + * if item in not inside scope. + */ +int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) +{ + //printf("<isAccesibleFrom(scope=%s,item=%s itemScope=%s)\n", + // scope->name().data(),item->name().data(),item->getOuterScope()->name().data()); + + QCString key(40); + key.sprintf("%p:%p:%p",scope,fileScope,item); + static QDict<void> visitedDict; + if (visitedDict.find(key)) + { + //printf("> already found\n"); + return -1; // already looked at this + } + visitedDict.insert(key,(void *)0x8); + + int result=0; // assume we found it + int i; + + Definition *itemScope=item->getOuterScope(); + + if ( + itemScope==scope || // same thing + (item->definitionType()==Definition::TypeMember && // a member + itemScope && itemScope->definitionType()==Definition::TypeClass && // of a class + scope->definitionType()==Definition::TypeClass && // accessible + ((ClassDef*)scope)->isAccessibleMember((MemberDef *)item) // from scope + ) || + (item->definitionType()==Definition::TypeClass && // a nested class + itemScope && itemScope->definitionType()==Definition::TypeClass && // inside a base + scope->definitionType()==Definition::TypeClass && // class of scope + ((ClassDef*)scope)->isBaseClass((ClassDef*)itemScope,TRUE) + ) + ) + { + //printf("> found it\n"); + } + else if (scope==Doxygen::globalScope) + { + if (fileScope) + { + SDict<Definition> *cl = fileScope->getUsedClasses(); + if (accessibleViaUsingClass(cl,fileScope,item)) + { + //printf("> found via used class\n"); + goto done; + } + NamespaceSDict *nl = fileScope->getUsedNamespaces(); + if (accessibleViaUsingNamespace(nl,fileScope,item)) + { + //printf("> found via used namespace\n"); + goto done; + } + } + //printf("> reached global scope\n"); + result=-1; // not found in path to globalScope + } + else // keep searching + { + // check if scope is a namespace, which is using other classes and namespaces + if (scope->definitionType()==Definition::TypeNamespace) + { + NamespaceDef *nscope = (NamespaceDef*)scope; + //printf(" %s is namespace with %d used classes\n",nscope->name().data(),nscope->getUsedClasses()); + SDict<Definition> *cl = nscope->getUsedClasses(); + if (accessibleViaUsingClass(cl,fileScope,item)) + { + //printf("> found via used class\n"); + goto done; + } + NamespaceSDict *nl = nscope->getUsedNamespaces(); + if (accessibleViaUsingNamespace(nl,fileScope,item)) + { + //printf("> found via used namespace\n"); + goto done; + } + } + // repeat for the parent scope + i=isAccessibleFrom(scope->getOuterScope(),fileScope,item); + //printf("> result=%d\n",i); + result= (i==-1) ? -1 : i+2; + } +done: + visitedDict.remove(key); + //Doxygen::lookupCache.insert(key,new int(result)); + return result; +} + + +/* Returns the "distance" (=number of levels up) from item to scope, or -1 + * if item in not in this scope. The explicitScopePart limits the search + * to scopes that match \a scope (or its parent scope(s)) plus the explicit part. + * Example: + * + * class A { public: class I {}; }; + * class B { public: class J {}; }; + * + * - Looking for item=='J' inside scope=='B' will return 0. + * - Looking for item=='I' inside scope=='B' will return -1 + * (as it is not found in B nor in the global scope). + * - Looking for item=='A::I' inside scope=='B', first the match B::A::I is tried but + * not found and then A::I is searched in the global scope, which matches and + * thus the result is 1. + */ +int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope, + Definition *item,const QCString &explicitScopePart) +{ + if (explicitScopePart.isEmpty()) + { + // handle degenerate case where there is no explicit scope. + return isAccessibleFrom(scope,fileScope,item); + } + + QCString key(40+explicitScopePart.length()); + key.sprintf("%p:%p:%p:%s",scope,fileScope,item,explicitScopePart.data()); + static QDict<void> visitedDict; + if (visitedDict.find(key)) + { + //printf("Already visited!\n"); + return -1; // already looked at this + } + visitedDict.insert(key,(void *)0x8); + + //printf(" <isAccessibleFromWithExpScope(%s,%s,%s)\n",scope?scope->name().data():"<global>", + // item?item->name().data():"<none>", + // explicitScopePart.data()); + int result=0; // assume we found it + Definition *newScope = followPath(scope,fileScope,explicitScopePart); + if (newScope) // explicitScope is inside scope => newScope is the result + { + Definition *itemScope = item->getOuterScope(); + //printf(" scope traversal successful %s<->%s!\n",itemScope->name().data(),newScope->name().data()); + //if (newScope && newScope->definitionType()==Definition::TypeClass) + //{ + // ClassDef *cd = (ClassDef *)newScope; + // printf("---> Class %s: bases=%p\n",cd->name().data(),cd->baseClasses()); + //} + if (itemScope==newScope) // exact match of scopes => distance==0 + { + //printf("> found it\n"); + } + else if (itemScope && newScope && + itemScope->definitionType()==Definition::TypeClass && + newScope->definitionType()==Definition::TypeClass && + ((ClassDef*)newScope)->isBaseClass((ClassDef*)itemScope,TRUE,0) + ) + { + // inheritance is also ok. Example: looking for B::I, where + // class A { public: class I {} }; + // class B : public A {} + // but looking for B::I, where + // class A { public: class I {} }; + // class B { public: class I {} }; + // will find A::I, so we still prefer a direct match and give this one a distance of 1 + result=1; + + //printf("scope(%s) is base class of newScope(%s)\n", + // scope->name().data(),newScope->name().data()); + } + else + { + int i=-1; + if (newScope->definitionType()==Definition::TypeNamespace) + { + g_visitedNamespaces.insert(newScope->name(),newScope); + // this part deals with the case where item is a class + // A::B::C but is explicit referenced as A::C, where B is imported + // in A via a using directive. + //printf("newScope is a namespace: %s!\n",newScope->name().data()); + NamespaceDef *nscope = (NamespaceDef*)newScope; + SDict<Definition> *cl = nscope->getUsedClasses(); + if (cl) + { + SDict<Definition>::Iterator cli(*cl); + Definition *cd; + for (cli.toFirst();(cd=cli.current());++cli) + { + //printf("Trying for class %s\n",cd->name().data()); + if (cd==item) + { + //printf("> class is used in this scope\n"); + goto done; + } + } + } + NamespaceSDict *nl = nscope->getUsedNamespaces(); + if (nl) + { + NamespaceSDict::Iterator nli(*nl); + NamespaceDef *nd; + for (nli.toFirst();(nd=nli.current());++nli) + { + if (g_visitedNamespaces.find(nd->name())==0) + { + //printf("Trying for namespace %s\n",nd->name().data()); + i = isAccessibleFromWithExpScope(scope,fileScope,item,nd->name()); + if (i!=-1) + { + //printf("> found via explicit scope of used namespace\n"); + goto done; + } + } + } + } + } + // repeat for the parent scope + if (scope!=Doxygen::globalScope) + { + i = isAccessibleFromWithExpScope(scope->getOuterScope(),fileScope, + item,explicitScopePart); + } + //printf(" | result=%d\n",i); + result = (i==-1) ? -1 : i+2; + } + } + else // failed to resolve explicitScope + { + //printf(" failed to resolve: scope=%s\n",scope->name().data()); + if (scope->definitionType()==Definition::TypeNamespace) + { + NamespaceDef *nscope = (NamespaceDef*)scope; + NamespaceSDict *nl = nscope->getUsedNamespaces(); + if (accessibleViaUsingNamespace(nl,fileScope,item,explicitScopePart)) + { + //printf("> found in used namespace\n"); + goto done; + } + } + if (scope==Doxygen::globalScope) + { + if (fileScope) + { + NamespaceSDict *nl = fileScope->getUsedNamespaces(); + if (accessibleViaUsingNamespace(nl,fileScope,item,explicitScopePart)) + { + //printf("> found in used namespace\n"); + goto done; + } + } + //printf("> not found\n"); + result=-1; + } + else // continue by looking into the parent scope + { + int i=isAccessibleFromWithExpScope(scope->getOuterScope(),fileScope, + item,explicitScopePart); + //printf("> result=%d\n",i); + result= (i==-1) ? -1 : i+2; + } + } +done: + //printf(" > result=%d\n",result); + visitedDict.remove(key); + //Doxygen::lookupCache.insert(key,new int(result)); + return result; +} + +int computeQualifiedIndex(const QCString &name) +{ + int i = name.find('<'); + return name.findRev("::",i==-1 ? name.length() : i); +} + +static void getResolvedSymbol(Definition *scope, + FileDef *fileScope, + Definition *d, + const QCString &explicitScopePart, + ArgumentList *actTemplParams, + int &minDistance, + ClassDef *&bestMatch, + MemberDef *&bestTypedef, + QCString &bestTemplSpec, + QCString &bestResolvedType + ) +{ + //printf(" => found type %x name=%s d=%p\n", + // d->definitionType(),d->name().data(),d); + + // only look at classes and members that are enums or typedefs + if (d->definitionType()==Definition::TypeClass || + (d->definitionType()==Definition::TypeMember && + (((MemberDef*)d)->isTypedef() || ((MemberDef*)d)->isEnumerate()) + ) + ) + { + g_visitedNamespaces.clear(); + // test accessibility of definition within scope. + int distance = isAccessibleFromWithExpScope(scope,fileScope,d,explicitScopePart); + //printf(" %s; distance %s (%p) is %d\n",scope->name().data(),d->name().data(),d,distance); + if (distance!=-1) // definition is accessible + { + // see if we are dealing with a class or a typedef + if (d->definitionType()==Definition::TypeClass) // d is a class + { + ClassDef *cd = (ClassDef *)d; + //printf("cd=%s\n",cd->name().data()); + if (!cd->isTemplateArgument()) // skip classes that + // are only there to + // represent a template + // argument + { + //printf("is not a templ arg\n"); + if (distance<minDistance) // found a definition that is "closer" + { + minDistance=distance; + bestMatch = cd; + bestTypedef = 0; + bestTemplSpec.resize(0); + bestResolvedType = cd->qualifiedName(); + } + else if (distance==minDistance && + fileScope && bestMatch && + fileScope->getUsedNamespaces() && + d->getOuterScope()->definitionType()==Definition::TypeNamespace && + bestMatch->getOuterScope()==Doxygen::globalScope + ) + { + // in case the distance is equal it could be that a class X + // is defined in a namespace and in the global scope. When searched + // in the global scope the distance is 0 in both cases. We have + // to choose one of the definitions: we choose the one in the + // namespace if the fileScope imports namespaces and the definition + // found was in a namespace while the best match so far isn't. + // Just a non-perfect heuristic but it could help in some situations + // (kdecore code is an example). + minDistance=distance; + bestMatch = cd; + bestTypedef = 0; + bestTemplSpec.resize(0); + bestResolvedType = cd->qualifiedName(); + } + } + else + { + //printf(" is a template argument!\n"); + } + } + else if (d->definitionType()==Definition::TypeMember) + { + MemberDef *md = (MemberDef *)d; + //printf(" member isTypedef()=%d\n",md->isTypedef()); + if (md->isTypedef()) // d is a typedef + { + QCString args=md->argsString(); + if (args.isEmpty()) // do not expand "typedef t a[4];" + { + //printf(" found typedef!\n"); + + // we found a symbol at this distance, but if it didn't + // resolve to a class, we still have to make sure that + // something at a greater distance does not match, since + // that symbol is hidden by this one. + if (distance<minDistance) + { + QCString spec; + QCString type; + minDistance=distance; + MemberDef *enumType = 0; + ClassDef *cd = newResolveTypedef(fileScope,md,&enumType,&spec,&type,actTemplParams); + if (cd) // type resolves to a class + { + //printf(" bestTypeDef=%p spec=%s type=%s\n",md,spec.data(),type.data()); + bestMatch = cd; + bestTypedef = md; + bestTemplSpec = spec; + bestResolvedType = type; + } + else if (enumType) // type resolves to a enum + { + //printf(" is enum\n"); + bestMatch = 0; + bestTypedef = enumType; + bestTemplSpec = ""; + bestResolvedType = enumType->qualifiedName(); + } + else if (md->isReference()) // external reference + { + bestMatch = 0; + bestTypedef = md; + bestTemplSpec = spec; + bestResolvedType = type; + } + else + { + bestMatch = 0; + bestTypedef = md; + bestTemplSpec.resize(0); + bestResolvedType.resize(0); + //printf(" no match\n"); + } + } + else + { + //printf(" not the best match %d min=%d\n",distance,minDistance); + } + } + else + { + //printf(" not a simple typedef\n") + } + } + else if (md->isEnumerate()) + { + if (distance<minDistance) + { + minDistance=distance; + bestMatch = 0; + bestTypedef = md; + bestTemplSpec = ""; + bestResolvedType = md->qualifiedName(); + } + } + } + } // if definition accessible + else + { + //printf(" Not accessible!\n"); + } + } // if definition is a class or member + //printf(" bestMatch=%p bestResolvedType=%s\n",bestMatch,bestResolvedType.data()); +} + +/* Find the fully qualified class name referred to by the input class + * or typedef name against the input scope. + * Loops through scope and each of its parent scopes looking for a + * match against the input name. Can recursively call itself when + * resolving typedefs. + */ +ClassDef *getResolvedClassRec(Definition *scope, + FileDef *fileScope, + const char *n, + MemberDef **pTypeDef, + QCString *pTemplSpec, + QCString *pResolvedType + ) +{ + //printf("[getResolvedClassRec(%s,%s)\n",scope?scope->name().data():"<global>",n); + QCString name; + QCString explicitScopePart; + QCString strippedTemplateParams; + name=stripTemplateSpecifiersFromScope + (removeRedundantWhiteSpace(n),TRUE, + &strippedTemplateParams); + ArgumentList actTemplParams; + if (!strippedTemplateParams.isEmpty()) // template part that was stripped + { + stringToArgumentList(strippedTemplateParams,&actTemplParams); + } + + int qualifierIndex = computeQualifiedIndex(name); + //printf("name=%s qualifierIndex=%d\n",name.data(),qualifierIndex); + if (qualifierIndex!=-1) // qualified name + { + // split off the explicit scope part + explicitScopePart=name.left(qualifierIndex); + // todo: improve namespace alias substitution + replaceNamespaceAliases(explicitScopePart,explicitScopePart.length()); + name=name.mid(qualifierIndex+2); + } + + if (name.isEmpty()) + { + //printf("] empty name\n"); + return 0; // empty name + } + + //printf("Looking for symbol %s\n",name.data()); + DefinitionIntf *di = Doxygen::symbolMap->find(name); + if (di==0) + { + di = Doxygen::symbolMap->find(name+"-g"); + if (di==0) + { + di = Doxygen::symbolMap->find(name+"-p"); + if (di==0) + { + //printf("no such symbol!\n"); + return 0; + } + } + } + //printf("found symbol!\n"); + + bool hasUsingStatements = + (fileScope && ((fileScope->getUsedNamespaces() && + fileScope->getUsedNamespaces()->count()>0) || + (fileScope->getUsedClasses() && + fileScope->getUsedClasses()->count()>0)) + ); + //printf("hasUsingStatements=%d\n",hasUsingStatements); + // Since it is often the case that the same name is searched in the same + // scope over an over again (especially for the linked source code generation) + // we use a cache to collect previous results. This is possible since the + // result of a lookup is deterministic. As the key we use the concatenated + // scope, the name to search for and the explicit scope prefix. The speedup + // achieved by this simple cache can be enormous. + int scopeNameLen = scope->name().length()+1; + int nameLen = name.length()+1; + int explicitPartLen = explicitScopePart.length(); + int fileScopeLen = hasUsingStatements ? 1+fileScope->absFilePath().length() : 0; + + // below is a more efficient coding of + // QCString key=scope->name()+"+"+name+"+"+explicitScopePart; + QCString key(scopeNameLen+nameLen+explicitPartLen+fileScopeLen+1); + char *p=key.data(); + qstrcpy(p,scope->name()); *(p+scopeNameLen-1)='+'; + p+=scopeNameLen; + qstrcpy(p,name); *(p+nameLen-1)='+'; + p+=nameLen; + qstrcpy(p,explicitScopePart); + p+=explicitPartLen; + + // if a file scope is given and it contains using statements we should + // also use the file part in the key (as a class name can be in + // two different namespaces and a using statement in a file can select + // one of them). + if (hasUsingStatements) + { + // below is a more efficient coding of + // key+="+"+fileScope->name(); + *p++='+'; + qstrcpy(p,fileScope->absFilePath()); + p+=fileScopeLen-1; + } + *p='\0'; + + LookupInfo *pval=Doxygen::lookupCache.find(key); + //printf("Searching for %s result=%p\n",key.data(),pval); + if (pval) + { + //printf("LookupInfo %p %p '%s' %p\n", + // pval->classDef, pval->typeDef, pval->templSpec.data(), + // pval->resolvedType.data()); + if (pTemplSpec) *pTemplSpec=pval->templSpec; + if (pTypeDef) *pTypeDef=pval->typeDef; + if (pResolvedType) *pResolvedType=pval->resolvedType; + //printf("] cachedMatch=%s\n", + // pval->classDef?pval->classDef->name().data():"<none>"); + //if (pTemplSpec) + // printf("templSpec=%s\n",pTemplSpec->data()); + return pval->classDef; + } + else // not found yet; we already add a 0 to avoid the possibility of + // endless recursion. + { + Doxygen::lookupCache.insert(key,new LookupInfo); + } + + ClassDef *bestMatch=0; + MemberDef *bestTypedef=0; + QCString bestTemplSpec; + QCString bestResolvedType; + int minDistance=10000; // init at "infinite" + + if (di->definitionType()==DefinitionIntf::TypeSymbolList) // not a unique name + { + //printf(" name is not unique\n"); + DefinitionListIterator dli(*(DefinitionList*)di); + Definition *d; + int count=0; + for (dli.toFirst();(d=dli.current());++dli,++count) // foreach definition + { + getResolvedSymbol(scope,fileScope,d,explicitScopePart,&actTemplParams, + minDistance,bestMatch,bestTypedef,bestTemplSpec, + bestResolvedType); + } + } + else // unique name + { + //printf(" name is unique\n"); + Definition *d = (Definition *)di; + getResolvedSymbol(scope,fileScope,d,explicitScopePart,&actTemplParams, + minDistance,bestMatch,bestTypedef,bestTemplSpec, + bestResolvedType); + } + + if (pTypeDef) + { + *pTypeDef = bestTypedef; + } + if (pTemplSpec) + { + *pTemplSpec = bestTemplSpec; + } + if (pResolvedType) + { + *pResolvedType = bestResolvedType; + } + //printf("getResolvedClassRec: bestMatch=%p pval->resolvedType=%s\n", + // bestMatch,bestResolvedType.data()); + + pval=Doxygen::lookupCache.find(key); + if (pval) + { + pval->classDef = bestMatch; + pval->typeDef = bestTypedef; + pval->templSpec = bestTemplSpec; + pval->resolvedType = bestResolvedType; + } + else + { + Doxygen::lookupCache.insert(key,new LookupInfo(bestMatch,bestTypedef,bestTemplSpec,bestResolvedType)); + } + //printf("] bestMatch=%s distance=%d\n", + // bestMatch?bestMatch->name().data():"<none>",minDistance); + //if (pTemplSpec) + // printf("templSpec=%s\n",pTemplSpec->data()); + return bestMatch; +} + +/* Find the fully qualified class name referred to by the input class + * or typedef name against the input scope. + * Loops through scope and each of its parent scopes looking for a + * match against the input name. + */ +ClassDef *getResolvedClass(Definition *scope, + FileDef *fileScope, + const char *n, + MemberDef **pTypeDef, + QCString *pTemplSpec, + bool mayBeUnlinkable, + bool mayBeHidden, + QCString *pResolvedType + ) +{ + g_resolvedTypedefs.clear(); + if (scope==0 || + (scope->definitionType()!=Definition::TypeClass && + scope->definitionType()!=Definition::TypeNamespace + ) || + (fileScope && fileScope->isJava() && QCString(n).find("::")!=-1) + ) + { + scope=Doxygen::globalScope; + } + //printf("------------ getResolvedClass(scope=%s,file=%s,name=%s,mayUnlinkable=%d)\n", + // scope?scope->name().data():"<global>", + // fileScope?fileScope->name().data():"<none>", + // n, + // mayBeUnlinkable + // ); + ClassDef *result = getResolvedClassRec(scope,fileScope,n,pTypeDef,pTemplSpec,pResolvedType); + if (!mayBeUnlinkable && result && !result->isLinkable()) + { + if (!mayBeHidden || !result->isHidden()) + { + result=0; // don't link to artificial/hidden classes unless explicitly allowed + } + } + //printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>", + // n,result?result->name().data():"<none>"); + return result; +} + +//------------------------------------------------------------------------- +//------------------------------------------------------------------------- +//------------------------------------------------------------------------- +//------------------------------------------------------------------------- + +static bool findOperator(const QCString &s,int i) +{ + int b = s.findRev("operator",i); + if (b==-1) return FALSE; // not found + b+=8; + while (b<i) // check if there are only spaces in between + // the operator and the > + { + if (!isspace((uchar)s.at(b))) return FALSE; + b++; + } + return TRUE; +} + +static bool findOperator2(const QCString &s,int i) +{ + int b = s.findRev("operator",i); + if (b==-1) return FALSE; // not found + b+=8; + while (b<i) // check if there are only non-ascii + // characters in front of the operator + { + if (isId((uchar)s.at(b))) return FALSE; + b++; + } + return TRUE; +} + +static const char constScope[] = { 'c', 'o', 'n', 's', 't', ':' }; +static const char virtualScope[] = { 'v', 'i', 'r', 't', 'u', 'a', 'l', ':' }; + + +class StrBuf +{ + public: + StrBuf() : str(0), pos(0), len(0) {} + ~StrBuf() { free(str); str=0; pos=0; len=0; } + void clear() { pos=0; } + void addChar(char c) { if (pos>=len) { len+=1024; str = (char*)realloc(str,len); } + str[pos++]=c; + } + void addStr(const char *s) { + int l=strlen(s); + if (pos+l>=len) { len+=l+1024; str = (char*)realloc(str,len); } + strcpy(&str[pos],s); + pos+=l; + } + const char *get() { return str; } + int getPos() const { return pos; } + char at(int i) const { return str[i]; } + private: + char *str; + int pos; + int len; +}; + +// Note: this function is not reentrant due to the use of static buffer! +QCString removeRedundantWhiteSpace(const QCString &s) +{ + static bool cliSupport = Config_getBool("CPP_CLI_SUPPORT"); + if (s.isEmpty()) return s; + static StrBuf strBuf; + //int resultLen = 1024; + //int resultPos = 0; + //QCString result(resultLen); + // we use strBuf.addChar(c) instead of result+=c to + // improve the performance of this function + strBuf.clear(); + uint i; + uint l=s.length(); + uint csp=0; + uint vsp=0; + for (i=0;i<l;i++) + { +nextChar: + char c=s.at(i); + + // search for "const" + if (csp<6 && c==constScope[csp] && // character matches substring "const" + (csp>0 || // if it is the first character + i==0 || // the previous may not be a digit + !isId(s.at(i-1)) + ) + ) + csp++; + else // reset counter + csp=0; + + // search for "virtual" + if (vsp<8 && c==virtualScope[vsp] && // character matches substring "virtual" + (vsp>0 || // if it is the first character + i==0 || // the previous may not be a digit + !isId(s.at(i-1)) + ) + ) + vsp++; + else // reset counter + vsp=0; + + if (c=='"') // quoted string + { + i++; + strBuf.addChar(c); + while (i<l) + { + char cc=s.at(i); + strBuf.addChar(cc); + if (cc=='\\') // escaped character + { + strBuf.addChar(s.at(i+1)); + i+=2; + } + else if (cc=='"') // end of string + { i++; goto nextChar; } + else // any other character + { i++; } + } + } + else if (i<l-2 && c=='<' && // current char is a < + (isId(s.at(i+1)) || isspace((uchar)s.at(i+1))) && // next char is an id char or space + (i<8 || !findOperator(s,i)) // string in front is not "operator" + ) + { + strBuf.addChar('<'); + strBuf.addChar(' '); + } + else if (i>0 && c=='>' && // current char is a > + (isId(s.at(i-1)) || isspace((uchar)s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&') && // prev char is an id char or space + (i<8 || !findOperator(s,i)) // string in front is not "operator" + ) + { + strBuf.addChar(' '); + strBuf.addChar('>'); + } + else if (i>0 && c==',' && !isspace((uchar)s.at(i-1)) + && ((i<l-1 && isId(s.at(i+1))) + || (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2))) // for PHP + || (i<l-3 && s.at(i+1)=='&' && s.at(i+2)=='$' && isId(s.at(i+3))))) // for PHP + { + strBuf.addChar(','); + strBuf.addChar(' '); + } + else if (i>0 && + ((isId(s.at(i)) && s.at(i-1)==')') || + (s.at(i)=='\'' && s.at(i-1)==' ') + ) + ) + { + strBuf.addChar(' '); + strBuf.addChar(s.at(i)); + } + else if (c=='t' && csp==5 /*&& (i<5 || !isId(s.at(i-5)))*/ && + !(isId(s.at(i+1)) /*|| s.at(i+1)==' '*/ || + s.at(i+1)==')' || + s.at(i+1)==',' || + s.at(i+1)=='\0' + ) + ) + // prevent const ::A from being converted to const::A + { + strBuf.addChar('t'); + strBuf.addChar(' '); + if (s.at(i+1)==' ') i++; + csp=0; + } + else if (c==':' && csp==6 /*&& (i<6 || !isId(s.at(i-6)))*/) + // replace const::A by const ::A + { + strBuf.addChar(' '); + strBuf.addChar(':'); + csp=0; + } + else if (c=='l' && vsp==7 /*&& (i<7 || !isId(s.at(i-7)))*/ && + !(isId(s.at(i+1)) /*|| s.at(i+1)==' '*/ || + s.at(i+1)==')' || + s.at(i+1)==',' || + s.at(i+1)=='\0' + ) + ) + // prevent virtual ::A from being converted to virtual::A + { + strBuf.addChar('l'); + strBuf.addChar(' '); + if (s.at(i+1)==' ') i++; + vsp=0; + } + else if (c==':' && vsp==8 /*&& (i<8 || !isId(s.at(i-8)))*/) + // replace virtual::A by virtual ::A + { + strBuf.addChar(' '); + strBuf.addChar(':'); + vsp=0; + } + else if (!isspace((uchar)c) || // not a space + ( i>0 && i<l-1 && // internal character + (isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']') + && (isId(s.at(i+1)) || (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2))) + || (i<l-3 && s.at(i+1)=='&' && s.at(i+2)=='$' && isId(s.at(i+3)))) + ) + ) + { + if (c=='*' || c=='&' || c=='@' || c=='$') + { + //uint rl=result.length(); + uint rl=strBuf.getPos(); + if ((rl>0 && (isId(strBuf.at(rl-1)) || strBuf.at(rl-1)=='>')) && + ((c!='*' && c!='&') || !findOperator2(s,i)) // avoid splitting operator* and operator->* and operator& + ) + { + strBuf.addChar(' '); + } + } + strBuf.addChar(c); + if (cliSupport && + (c=='^' || c=='%') && i>1 && isId(s.at(i-1)) && + !findOperator(s,i) + ) + { + strBuf.addChar(' '); // C++/CLI: Type^ name and Type% name + } + } + } + //printf("removeRedundantWhiteSpace(`%s')=`%s'\n",s.data(),result.data()); + strBuf.addChar(0); + //result.resize(resultPos); + return strBuf.get(); +} + +bool rightScopeMatch(const QCString &scope, const QCString &name) +{ + return (name==scope || // equal + (scope.right(name.length())==name && // substring + scope.at(scope.length()-name.length()-1)==':' // scope + ) + ); +} + +bool leftScopeMatch(const QCString &scope, const QCString &name) +{ + return (name==scope || // equal + (scope.left(name.length())==name && // substring + scope.at(name.length())==':' // scope + ) + ); +} + + +void linkifyText(const TextGeneratorIntf &out,Definition *scope, + FileDef *fileScope,const char *, + const char *text, bool autoBreak,bool external, + bool keepSpaces) +{ + //printf("`%s'\n",text); + static QRegExp regExp("[a-z_A-Z\\x80-\\xFF][~!a-z_A-Z0-9.:\\x80-\\xFF]*"); + static QRegExp regExpSplit("(?!:),"); + QCString txtStr=text; + int strLen = txtStr.length(); + //printf("linkifyText scope=%s fileScope=%s strtxt=%s strlen=%d\n", + // scope?scope->name().data():"<none>", + // fileScope?fileScope->name().data():"<none>", + // txtStr.data(),strLen); + int matchLen; + int index=0; + int newIndex; + int skipIndex=0; + int floatingIndex=0; + if (strLen==0) return; + // read a word from the text string + while ((newIndex=regExp.match(txtStr,index,&matchLen))!=-1 && + (newIndex==0 || !(txtStr.at(newIndex-1)>='0' && txtStr.at(newIndex-1)<='9')) // avoid matching part of hex numbers + ) + { + // add non-word part to the result + floatingIndex+=newIndex-skipIndex+matchLen; + bool insideString=FALSE; + int i; + for (i=index;i<newIndex;i++) + { + if (txtStr.at(i)=='"') insideString=!insideString; + } + + //printf("floatingIndex=%d strlen=%d autoBreak=%d\n",floatingIndex,strLen,autoBreak); + if (strLen>35 && floatingIndex>30 && autoBreak) // try to insert a split point + { + QCString splitText = txtStr.mid(skipIndex,newIndex-skipIndex); + int splitLength = splitText.length(); + int offset=1; + i=splitText.find(regExpSplit,0); + if (i==-1) { i=splitText.find('<'); if (i!=-1) offset=0; } + if (i==-1) i=splitText.find('>'); + if (i==-1) i=splitText.find(' '); + //printf("splitText=[%s] len=%d i=%d offset=%d\n",splitText.data(),splitLength,i,offset); + if (i!=-1) // add a link-break at i in case of Html output + { + out.writeString(splitText.left(i+offset),keepSpaces); + out.writeBreak(); + out.writeString(splitText.right(splitLength-i-offset),keepSpaces); + floatingIndex=splitLength-i-offset+matchLen; + } + else + { + out.writeString(splitText,keepSpaces); + } + } + else + { + //ol.docify(txtStr.mid(skipIndex,newIndex-skipIndex)); + out.writeString(txtStr.mid(skipIndex,newIndex-skipIndex),keepSpaces); + } + // get word from string + QCString word=txtStr.mid(newIndex,matchLen); + QCString matchWord = substitute(word,".","::"); + //printf("linkifyText word=%s matchWord=%s scope=%s\n", + // word.data(),matchWord.data(),scope?scope->name().data():"<none>"); + bool found=FALSE; + if (!insideString) + { + ClassDef *cd=0; + FileDef *fd=0; + MemberDef *md=0; + NamespaceDef *nd=0; + GroupDef *gd=0; + //printf("** Match word '%s'\n",matchWord.data()); + + MemberDef *typeDef=0; + if ((cd=getResolvedClass(scope,fileScope,matchWord,&typeDef))) + { + //printf("Found class %s\n",cd->name().data()); + // add link to the result + if (external ? cd->isLinkable() : cd->isLinkableInProject()) + { + out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word); + found=TRUE; + } + } + else if (typeDef) + { + //printf("Found typedef %s\n",typeDef->name().data()); + if (external ? typeDef->isLinkable() : typeDef->isLinkableInProject()) + { + out.writeLink(typeDef->getReference(), + typeDef->getOutputFileBase(), + typeDef->anchor(), + word); + found=TRUE; + } + } + else if ((cd=getClass(matchWord+"-p"))) // search for Obj-C protocols as well + { + // add link to the result + if (external ? cd->isLinkable() : cd->isLinkableInProject()) + { + out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word); + found=TRUE; + } + } + else if ((cd=getClass(matchWord+"-g"))) // C# generic as well + { + // add link to the result + if (external ? cd->isLinkable() : cd->isLinkableInProject()) + { + out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word); + found=TRUE; + } + } + else + { + //printf(" -> nothing\n"); + } + + QCString scopeName; + if (scope && + (scope->definitionType()==Definition::TypeClass || + scope->definitionType()==Definition::TypeNamespace + ) + ) + { + scopeName=scope->name(); + } + //printf("ScopeName=%s\n",scopeName.data()); + //if (!found) printf("Trying to link %s in %s\n",word.data(),scopeName.data()); + if (!found && + getDefs(scopeName,matchWord,0,md,cd,fd,nd,gd) && + (md->isTypedef() || md->isEnumerate() || + md->isReference() || md->isVariable() + ) && + (external ? md->isLinkable() : md->isLinkableInProject()) + ) + { + //printf("Found ref scope=%s\n",d?d->name().data():"<global>"); + //ol.writeObjectLink(d->getReference(),d->getOutputFileBase(), + // md->anchor(),word); + out.writeLink(md->getReference(),md->getOutputFileBase(), + md->anchor(),word); + found=TRUE; + } + } + + if (!found) // add word to the result + { + out.writeString(word,keepSpaces); + } + // set next start point in the string + //printf("index=%d/%d\n",index,txtStr.length()); + skipIndex=index=newIndex+matchLen; + } + // add last part of the string to the result. + //ol.docify(txtStr.right(txtStr.length()-skipIndex)); + out.writeString(txtStr.right(txtStr.length()-skipIndex),keepSpaces); +} + + +void writeExample(OutputList &ol,ExampleSDict *ed) +{ + QCString exampleLine=theTranslator->trWriteList(ed->count()); + + //bool latexEnabled = ol.isEnabled(OutputGenerator::Latex); + //bool manEnabled = ol.isEnabled(OutputGenerator::Man); + //bool htmlEnabled = ol.isEnabled(OutputGenerator::Html); + QRegExp marker("@[0-9]+"); + int index=0,newIndex,matchLen; + // now replace all markers in inheritLine with links to the classes + while ((newIndex=marker.match(exampleLine,index,&matchLen))!=-1) + { + bool ok; + ol.parseText(exampleLine.mid(index,newIndex-index)); + uint entryIndex = exampleLine.mid(newIndex+1,matchLen-1).toUInt(&ok); + Example *e=ed->at(entryIndex); + if (ok && e) + { + ol.pushGeneratorState(); + //if (latexEnabled) ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + // link for Html / man + //printf("writeObjectLink(file=%s)\n",e->file.data()); + ol.writeObjectLink(0,e->file,e->anchor,e->name); + ol.popGeneratorState(); + + ol.pushGeneratorState(); + //if (latexEnabled) ol.enable(OutputGenerator::Latex); + ol.disable(OutputGenerator::Man); + ol.disable(OutputGenerator::Html); + // link for Latex / pdf with anchor because the sources + // are not hyperlinked (not possible with a verbatim environment). + ol.writeObjectLink(0,e->file,0,e->name); + //if (manEnabled) ol.enable(OutputGenerator::Man); + //if (htmlEnabled) ol.enable(OutputGenerator::Html); + ol.popGeneratorState(); + } + index=newIndex+matchLen; + } + ol.parseText(exampleLine.right(exampleLine.length()-index)); + ol.writeString("."); +} + + +QCString argListToString(ArgumentList *al,bool useCanonicalType,bool showDefVals) +{ + QCString result; + if (al==0) return result; + Argument *a=al->first(); + result+="("; + while (a) + { + QCString type1 = useCanonicalType && !a->canType.isEmpty() ? + a->canType : a->type; + QCString type2; + int i=type1.find(")("); // hack to deal with function pointers + if (i!=-1) + { + type2=type1.mid(i); + type1=type1.left(i); + } + if (!a->attrib.isEmpty()) + { + result+=a->attrib+" "; + } + if (!a->name.isEmpty() || !a->array.isEmpty()) + { + result+= type1+" "+a->name+type2+a->array; + } + else + { + result+= type1+type2; + } + if (!a->defval.isEmpty() && showDefVals) + { + result+="="+a->defval; + } + a = al->next(); + if (a) result+=", "; + } + result+=")"; + if (al->constSpecifier) result+=" const"; + if (al->volatileSpecifier) result+=" volatile"; + return removeRedundantWhiteSpace(result); +} + +QCString tempArgListToString(ArgumentList *al) +{ + QCString result; + if (al==0) return result; + result="<"; + Argument *a=al->first(); + while (a) + { + if (!a->name.isEmpty()) // add template argument name + { + result+=a->name; + } + else // extract name from type + { + int i=a->type.length()-1; + while (i>=0 && isId(a->type.at(i))) i--; + if (i>0) + { + result+=a->type.right(a->type.length()-i-1); + } + else // nothing found -> take whole name + { + result+=a->type; + } + } + a=al->next(); + if (a) result+=", "; + } + result+=">"; + return removeRedundantWhiteSpace(result); +} + + +// compute the HTML anchors for a list of members +void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId) +{ + int count=0; + if (ml==0) return; + MemberListIterator mli(*ml); + MemberDef *md; + for (;(md=mli.current());++mli) + { + if (!md->isReference()) + { + QCString anchor; + if (groupId==-1) + anchor.sprintf("%c%d",id,count++); + else + anchor.sprintf("%c%d_%d",id,groupId,count++); + if (cd) anchor.prepend(escapeCharsInString(cd->name(),FALSE)); + md->setAnchor(anchor); + //printf("setAnchors(): Member %s outputFileBase=%s anchor %s result %s\n", + // md->name().data(),md->getOutputFileBase().data(),anchor.data(),md->anchor().data()); + } + } +} + +//---------------------------------------------------------------------------- + +/*! takes the \a buf of the given length \a len and converts CR LF (DOS) + * or CR (MAC) line ending to LF (Unix). Returns the length of the + * converted content (i.e. the same as \a len (Unix, MAC) or + * smaller (DOS). + */ +int filterCRLF(char *buf,int len) +{ + int src = 0; // source index + int dest = 0; // destination index + char c; // current character + + while (src<len) + { + c = buf[src++]; // Remember the processed character. + if (c == '\r') // CR to be solved (MAC, DOS) + { + c = '\n'; // each CR to LF + if (src<len && buf[src] == '\n') + ++src; // skip LF just after CR (DOS) + } + else if ( c == '\0' && src<len-1) // filter out internal \0 characters, as it will confuse the parser + { + c = ' '; // turn into a space + } + buf[dest++] = c; // copy the (modified) character to dest + } + return dest; // length of the valid part of the buf +} + +static QCString getFilterFromList(const char *name,const QStrList &filterList,bool &found) +{ + found=FALSE; + // compare the file name to the filter pattern list + QStrListIterator sli(filterList); + char* filterStr; + for (sli.toFirst(); (filterStr = sli.current()); ++sli) + { + QCString fs = filterStr; + int i_equals=fs.find('='); + if (i_equals!=-1) + { + QCString filterPattern = fs.left(i_equals); + QRegExp fpat(filterPattern,portable_fileSystemIsCaseSensitive(),TRUE); + if (fpat.match(name)!=-1) + { + // found a match! + QCString filterName = fs.mid(i_equals+1); + if (filterName.find(' ')!=-1) + { // add quotes if the name has spaces + filterName="\""+filterName+"\""; + } + found=TRUE; + return filterName; + } + } + } + + // no match + return ""; +} + +/*! looks for a filter for the file \a name. Returns the name of the filter + * if there is a match for the file name, otherwise an empty string. + * In case \a inSourceCode is TRUE then first the source filter list is + * considered. + */ +QCString getFileFilter(const char* name,bool isSourceCode) +{ + // sanity check + if (name==0) return ""; + + QStrList& filterSrcList = Config_getList("FILTER_SOURCE_PATTERNS"); + QStrList& filterList = Config_getList("FILTER_PATTERNS"); + + QCString filterName; + bool found=FALSE; + if (isSourceCode && !filterSrcList.isEmpty()) + { // first look for source filter pattern list + filterName = getFilterFromList(name,filterSrcList,found); + } + if (!found && filterName.isEmpty()) + { // then look for filter pattern list + filterName = getFilterFromList(name,filterList,found); + } + if (!found) + { // then use the generic input filter + return Config_getString("INPUT_FILTER"); + } + else + { + return filterName; + } +} + + +QCString transcodeCharacterStringToUTF8(const QCString &input) +{ + bool error=FALSE; + static QCString inputEncoding = Config_getString("INPUT_ENCODING"); + const char *outputEncoding = "UTF-8"; + if (inputEncoding.isEmpty() || qstricmp(inputEncoding,outputEncoding)==0) return input; + int inputSize=input.length(); + int outputSize=inputSize*4+1; + QCString output(outputSize); + void *cd = portable_iconv_open(outputEncoding,inputEncoding); + if (cd==(void *)(-1)) + { + err("error: unsupported character conversion: '%s'->'%s'\n", + inputEncoding.data(),outputEncoding); + error=TRUE; + } + if (!error) + { + size_t iLeft=inputSize; + size_t oLeft=outputSize; + const char *inputPtr = input.data(); + char *outputPtr = output.data(); + if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft)) + { + outputSize-=oLeft; + output.resize(outputSize+1); + output.at(outputSize)='\0'; + //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data()); + } + else + { + err("error: failed to translate characters from %s to %s: check INPUT_ENCODING\ninput=[%s]\n", + inputEncoding.data(),outputEncoding,input.data()); + error=TRUE; + } + } + portable_iconv_close(cd); + return error ? input : output; +} + +/*! reads a file with name \a name and returns it as a string. If \a filter + * is TRUE the file will be filtered by any user specified input filter. + * If \a name is "-" the string will be read from standard input. + */ +QCString fileToString(const char *name,bool filter,bool isSourceCode) +{ + if (name==0 || name[0]==0) return 0; + QFile f; + + bool fileOpened=FALSE; + if (name[0]=='-' && name[1]==0) // read from stdin + { + fileOpened=f.open(IO_ReadOnly,stdin); + if (fileOpened) + { + const int bSize=4096; + QCString contents(bSize); + int totalSize=0; + int size; + while ((size=f.readBlock(contents.data()+totalSize,bSize))==bSize) + { + totalSize+=bSize; + contents.resize(totalSize+bSize); + } + totalSize = filterCRLF(contents.data(),totalSize+size)+2; + contents.resize(totalSize); + contents.at(totalSize-2)='\n'; // to help the scanner + contents.at(totalSize-1)='\0'; + return contents; + } + } + else // read from file + { + QFileInfo fi(name); + if (!fi.exists() || !fi.isFile()) + { + err("error: file `%s' not found\n",name); + return ""; + } + QCString filterName = getFileFilter(name,isSourceCode); + if (filterName.isEmpty() || !filter) + { + f.setName(name); + fileOpened=f.open(IO_ReadOnly); + if (fileOpened) + { + int fsize=f.size(); + QCString contents(fsize+2); + f.readBlock(contents.data(),fsize); + if (fsize==0 || contents[fsize-1]=='\n') + contents[fsize]='\0'; + else + contents[fsize]='\n'; // to help the scanner + contents[fsize+1]='\0'; + f.close(); + int newSize = filterCRLF(contents.data(),fsize+2); + if (newSize!=fsize+2) + { + contents.resize(newSize); + } + return transcodeCharacterStringToUTF8(contents); + } + } + else // filter the input + { + QCString cmd=filterName+" \""+name+"\""; + Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data()); + FILE *f=portable_popen(cmd,"r"); + if (!f) + { + err("error: could not execute filter %s\n",filterName.data()); + return ""; + } + const int bSize=4096; + QCString contents(bSize); + int totalSize=0; + int size; + while ((size=fread(contents.data()+totalSize,1,bSize,f))==bSize) + { + totalSize+=bSize; + contents.resize(totalSize+bSize); + } + totalSize = filterCRLF(contents.data(),totalSize+size)+2; + contents.resize(totalSize); + contents.at(totalSize-2)='\n'; // to help the scanner + contents.at(totalSize-1)='\0'; + portable_pclose(f); + return transcodeCharacterStringToUTF8(contents); + } + } + if (!fileOpened) + { + err("error: cannot open file `%s' for reading\n",name); + } + return ""; +} + +QCString dateToString(bool includeTime) +{ + QDateTime current = QDateTime::currentDateTime(); + return theTranslator->trDateTime(current.date().year(), + current.date().month(), + current.date().day(), + current.date().dayOfWeek(), + current.time().hour(), + current.time().minute(), + current.time().second(), + includeTime); +} + +QCString yearToString() +{ + const QDate &d=QDate::currentDate(); + QCString result; + result.sprintf("%d", d.year()); + return result; +} + +//---------------------------------------------------------------------- +// recursive function that returns the number of branches in the +// inheritance tree that the base class `bcd' is below the class `cd' + +int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level) +{ + if (bcd->categoryOf()) // use class that is being extended in case of + // an Objective-C category + { + bcd=bcd->categoryOf(); + } + if (cd==bcd) return level; + if (level==256) + { + err("error: Internal inconsistency: found class %s seem to have a recursive " + "inheritance relation! Please send a bug report to dimitri@stack.nl\n",cd->name().data()); + return -1; + } + int m=maxInheritanceDepth; + if (cd->baseClasses()) + { +#if 0 + BaseClassListIterator bcli(*cd->baseClasses()); + for ( ; bcli.current() ; ++bcli) + { + //printf("class %s base class %s\n",cd->name().data(),bcli.current()->classDef->name().data()); + int mc=minClassDistance(bcli.current()->classDef,bcd,level+1); + if (mc<m) m=mc; + if (m<0) break; + } +#endif + BaseClassDef *bcdi = cd->baseClasses()->first(); + while (bcdi) + { + int mc=minClassDistance(bcdi->classDef,bcd,level+1); + if (mc<m) m=mc; + if (m<0) break; + bcdi = cd->baseClasses()->next(); + } + } + return m; +} + +//static void printArgList(ArgumentList *al) +//{ +// if (al==0) return; +// ArgumentListIterator ali(*al); +// Argument *a; +// printf("("); +// for (;(a=ali.current());++ali) +// { +// printf("t=`%s' n=`%s' v=`%s' ",a->type.data(),!a->name.isEmpty()>0?a->name.data():"",!a->defval.isEmpty()>0?a->defval.data():""); +// } +// printf(")"); +//} + +#ifndef NEWMATCH +// strip any template specifiers that follow className in string s +static QCString trimTemplateSpecifiers( + const QCString &namespaceName, + const QCString &className, + const QCString &s + ) +{ + //printf("trimTemplateSpecifiers(%s,%s,%s)\n",namespaceName.data(),className.data(),s.data()); + QCString scopeName=mergeScopes(namespaceName,className); + ClassDef *cd=getClass(scopeName); + if (cd==0) return s; // should not happen, but guard anyway. + + QCString result=s; + + int i=className.length()-1; + if (i>=0 && className.at(i)=='>') // template specialization + { + // replace unspecialized occurrences in s, with their specialized versions. + int count=1; + int cl=i+1; + while (i>=0) + { + char c=className.at(i); + if (c=='>') count++,i--; + else if (c=='<') { count--; if (count==0) break; } + else i--; + } + QCString unspecClassName=className.left(i); + int l=i; + int p=0; + while ((i=result.find(unspecClassName,p))!=-1) + { + if (result.at(i+l)!='<') // unspecialized version + { + result=result.left(i)+className+result.right(result.length()-i-l); + l=cl; + } + p=i+l; + } + } + + //printf("result after specialization: %s\n",result.data()); + + QCString qualName=cd->qualifiedNameWithTemplateParameters(); + //printf("QualifiedName = %s\n",qualName.data()); + // We strip the template arguments following className (if any) + if (!qualName.isEmpty()) // there is a class name + { + int is,ps=0; + int p=0,l,i; + + while ((is=getScopeFragment(qualName,ps,&l))!=-1) + { + QCString qualNamePart = qualName.right(qualName.length()-is); + //printf("qualNamePart=%s\n",qualNamePart.data()); + while ((i=result.find(qualNamePart,p))!=-1) + { + int ql=qualNamePart.length(); + result=result.left(i)+cd->name()+result.right(result.length()-i-ql); + p=i+cd->name().length(); + } + ps=is+l; + } + } + //printf("result=%s\n",result.data()); + + return result.stripWhiteSpace(); +} + +/*! + * @param pattern pattern to look for + * @param s string to search in + * @param p position to start + * @param len resulting pattern length + * @returns position on which string is found, or -1 if not found + */ +static int findScopePattern(const QCString &pattern,const QCString &s, + int p,int *len) +{ + int sl=s.length(); + int pl=pattern.length(); + int sp=0; + *len=0; + while (p<sl) + { + sp=p; // start of match + int pp=0; // pattern position + while (p<sl && pp<pl) + { + if (s.at(p)=='<') // skip template arguments while matching + { + int bc=1; + //printf("skipping pos=%d c=%c\n",p,s.at(p)); + p++; + while (p<sl) + { + if (s.at(p)=='<') bc++; + else if (s.at(p)=='>') + { + bc--; + if (bc==0) + { + p++; + break; + } + } + //printf("skipping pos=%d c=%c\n",p,s.at(p)); + p++; + } + } + else if (s.at(p)==pattern.at(pp)) + { + //printf("match at position p=%d pp=%d c=%c\n",p,pp,s.at(p)); + p++; + pp++; + } + else // no match + { + //printf("restarting at %d c=%c pat=%s\n",p,s.at(p),pattern.data()); + p=sp+1; + break; + } + } + if (pp==pl) // whole pattern matches + { + *len=p-sp; + return sp; + } + } + return -1; +} + +static QCString trimScope(const QCString &name,const QCString &s) +{ + int scopeOffset=name.length(); + QCString result=s; + do // for each scope + { + QCString tmp; + QCString scope=name.left(scopeOffset)+"::"; + //printf("Trying with scope=`%s'\n",scope.data()); + + int i,p=0,l; + while ((i=findScopePattern(scope,result,p,&l))!=-1) // for each occurrence + { + tmp+=result.mid(p,i-p); // add part before pattern + p=i+l; + } + tmp+=result.right(result.length()-p); // add trailing part + + scopeOffset=name.findRev("::",scopeOffset-1); + result = tmp; + } while (scopeOffset>0); + //printf("trimScope(name=%s,scope=%s)=%s\n",name.data(),s.data(),result.data()); + return result; +} +#endif + +void trimBaseClassScope(BaseClassList *bcl,QCString &s,int level=0) +{ + //printf("trimBaseClassScope level=%d `%s'\n",level,s.data()); + BaseClassListIterator bcli(*bcl); + BaseClassDef *bcd; + for (;(bcd=bcli.current());++bcli) + { + ClassDef *cd=bcd->classDef; + //printf("Trying class %s\n",cd->name().data()); + int spos=s.find(cd->name()+"::"); + if (spos!=-1) + { + s = s.left(spos)+s.right( + s.length()-spos-cd->name().length()-2 + ); + } + //printf("base class `%s'\n",cd->name().data()); + if (cd->baseClasses()) + trimBaseClassScope(cd->baseClasses(),s,level+1); + } +} + +#if 0 +/*! if either t1 or t2 contains a namespace scope, then remove that + * scope. If neither or both have a namespace scope, t1 and t2 remain + * unchanged. + */ +static void trimNamespaceScope(QCString &t1,QCString &t2,const QCString &nsName) +{ + int p1=t1.length(); + int p2=t2.length(); + for (;;) + { + int i1=p1==0 ? -1 : t1.findRev("::",p1); + int i2=p2==0 ? -1 : t2.findRev("::",p2); + if (i1==-1 && i2==-1) + { + return; + } + if (i1!=-1 && i2==-1) // only t1 has a scope + { + QCString scope=t1.left(i1); + replaceNamespaceAliases(scope,i1); + + int so=nsName.length(); + do + { + QCString fullScope=nsName.left(so); + if (!fullScope.isEmpty() && !scope.isEmpty()) fullScope+="::"; + fullScope+=scope; + if (!fullScope.isEmpty() && Doxygen::namespaceSDict[fullScope]!=0) // scope is a namespace + { + t1 = t1.right(t1.length()-i1-2); + return; + } + if (so==0) + { + so=-1; + } + else if ((so=nsName.findRev("::",so-1))==-1) + { + so=0; + } + } + while (so>=0); + } + else if (i1==-1 && i2!=-1) // only t2 has a scope + { + QCString scope=t2.left(i2); + replaceNamespaceAliases(scope,i2); + + int so=nsName.length(); + do + { + QCString fullScope=nsName.left(so); + if (!fullScope.isEmpty() && !scope.isEmpty()) fullScope+="::"; + fullScope+=scope; + if (!fullScope.isEmpty() && Doxygen::namespaceSDict[fullScope]!=0) // scope is a namespace + { + t2 = t2.right(t2.length()-i2-2); + return; + } + if (so==0) + { + so=-1; + } + else if ((so=nsName.findRev("::",so-1))==-1) + { + so=0; + } + } + while (so>=0); + } + p1 = QMAX(i1-2,0); + p2 = QMAX(i2-2,0); + } +} +#endif + +static void stripIrrelevantString(QCString &target,const QCString &str) +{ + if (target==str) { target.resize(0); return; } + int i,p=0; + int l=str.length(); + bool changed=FALSE; + while ((i=target.find(str,p))!=-1) + { + bool isMatch = (i==0 || !isId(target.at(i-1))) && // not a character before str + (i+l==(int)target.length() || !isId(target.at(i+l))); // not a character after str + if (isMatch) + { + int i1=target.find('*',i+l); + int i2=target.find('&',i+l); + if (i1==-1 && i2==-1) + { + // strip str from target at index i + target=target.left(i)+target.right(target.length()-i-l); + changed=TRUE; + i-=l; + } + else if ((i1!=-1 && i<i1) || (i2!=-1 && i<i2)) // str before * or & + { + // move str to front + target=str+" "+target.left(i)+target.right(target.length()-i-l); + changed=TRUE; + i++; + } + } + p = i+l; + } + if (changed) target=target.stripWhiteSpace(); +} + +/*! According to the C++ spec and Ivan Vecerina: + + Parameter declarations that differ only in the presence or absence + of const and/or volatile are equivalent. + + So the following example, show what is stripped by this routine + for const. The same is done for volatile. + + \code + const T param -> T param // not relevant + const T& param -> const T& param // const needed + T* const param -> T* param // not relevant + const T* param -> const T* param // const needed + \endcode + */ +void stripIrrelevantConstVolatile(QCString &s) +{ + //printf("stripIrrelevantConstVolatile(%s)=",s.data()); + stripIrrelevantString(s,"const"); + stripIrrelevantString(s,"volatile"); + //printf("%s\n",s.data()); +} + + +// a bit of debug support for matchArguments +#define MATCH +#define NOMATCH +//#define MATCH printf("Match at line %d\n",__LINE__); +//#define NOMATCH printf("Nomatch at line %d\n",__LINE__); + +#ifndef NEWMATCH +static bool matchArgument(const Argument *srcA,const Argument *dstA, + const QCString &className, + const QCString &namespaceName, + NamespaceSDict *usingNamespaces, + SDict<Definition> *usingClasses) +{ + //printf("match argument start `%s|%s' <-> `%s|%s' using nsp=%p class=%p\n", + // srcA->type.data(),srcA->name.data(), + // dstA->type.data(),dstA->name.data(), + // usingNamespaces, + // usingClasses); + + // TODO: resolve any typedefs names that are part of srcA->type + // before matching. This should use className and namespaceName + // and usingNamespaces and usingClass to determine which typedefs + // are in-scope, so it will not be very efficient :-( + + QCString srcAType=trimTemplateSpecifiers(namespaceName,className,srcA->type); + QCString dstAType=trimTemplateSpecifiers(namespaceName,className,dstA->type); + QCString srcAName=srcA->name.stripWhiteSpace(); + QCString dstAName=dstA->name.stripWhiteSpace(); + srcAType.stripPrefix("class "); + dstAType.stripPrefix("class "); + + // allow distinguishing "const A" from "const B" even though + // from a syntactic point of view they would be two names of the same + // type "const". This is not fool prove of course, but should at least + // catch the most common cases. + if ((srcAType=="const" || srcAType=="volatile") && !srcAName.isEmpty()) + { + srcAType+=" "; + srcAType+=srcAName; + } + if ((dstAType=="const" || dstAType=="volatile") && !dstAName.isEmpty()) + { + dstAType+=" "; + dstAType+=dstAName; + } + if (srcAName=="const" || srcAName=="volatile") + { + srcAType+=srcAName; + srcAName.resize(0); + } + else if (dstA->name=="const" || dstA->name=="volatile") + { + dstAType+=dstA->name; + dstAName.resize(0); + } + + stripIrrelevantConstVolatile(srcAType); + stripIrrelevantConstVolatile(dstAType); + + // strip typename keyword + if (strncmp(srcAType,"typename ",9)==0) + { + srcAType = srcAType.right(srcAType.length()-9); + } + if (strncmp(dstAType,"typename ",9)==0) + { + dstAType = dstAType.right(dstAType.length()-9); + } + + srcAType = removeRedundantWhiteSpace(srcAType); + dstAType = removeRedundantWhiteSpace(dstAType); + + //srcAType=stripTemplateSpecifiersFromScope(srcAType,FALSE); + //dstAType=stripTemplateSpecifiersFromScope(dstAType,FALSE); + + //printf("srcA=`%s|%s' dstA=`%s|%s'\n",srcAType.data(),srcAName.data(), + // dstAType.data(),dstAName.data()); + + if (srcA->array!=dstA->array) // nomatch for char[] against char + { + NOMATCH + return FALSE; + } + if (srcAType!=dstAType) // check if the argument only differs on name + { + + // remove a namespace scope that is only in one type + // (assuming a using statement was used) + //printf("Trimming %s<->%s: %s\n",srcAType.data(),dstAType.data(),namespaceName.data()); + //trimNamespaceScope(srcAType,dstAType,namespaceName); + //printf("After Trimming %s<->%s\n",srcAType.data(),dstAType.data()); + + //QCString srcScope; + //QCString dstScope; + + // strip redundant scope specifiers + if (!className.isEmpty()) + { + srcAType=trimScope(className,srcAType); + dstAType=trimScope(className,dstAType); + //printf("trimScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data()); + ClassDef *cd; + if (!namespaceName.isEmpty()) + cd=getClass(namespaceName+"::"+className); + else + cd=getClass(className); + if (cd && cd->baseClasses()) + { + trimBaseClassScope(cd->baseClasses(),srcAType); + trimBaseClassScope(cd->baseClasses(),dstAType); + } + //printf("trimBaseClassScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data()); + } + if (!namespaceName.isEmpty()) + { + srcAType=trimScope(namespaceName,srcAType); + dstAType=trimScope(namespaceName,dstAType); + } + //printf("#usingNamespace=%d\n",usingNamespaces->count()); + if (usingNamespaces && usingNamespaces->count()>0) + { + NamespaceSDict::Iterator nli(*usingNamespaces); + NamespaceDef *nd; + for (;(nd=nli.current());++nli) + { + srcAType=trimScope(nd->name(),srcAType); + dstAType=trimScope(nd->name(),dstAType); + } + } + //printf("#usingClasses=%d\n",usingClasses->count()); + if (usingClasses && usingClasses->count()>0) + { + SDict<Definition>::Iterator cli(*usingClasses); + Definition *cd; + for (;(cd=cli.current());++cli) + { + srcAType=trimScope(cd->name(),srcAType); + dstAType=trimScope(cd->name(),dstAType); + } + } + + //printf("2. srcA=%s|%s dstA=%s|%s\n",srcAType.data(),srcAName.data(), + // dstAType.data(),dstAName.data()); + + if (!srcAName.isEmpty() && !dstA->type.isEmpty() && + (srcAType+" "+srcAName)==dstAType) + { + MATCH + return TRUE; + } + else if (!dstAName.isEmpty() && !srcA->type.isEmpty() && + (dstAType+" "+dstAName)==srcAType) + { + MATCH + return TRUE; + } + + + uint srcPos=0,dstPos=0; + bool equal=TRUE; + while (srcPos<srcAType.length() && dstPos<dstAType.length() && equal) + { + equal=srcAType.at(srcPos)==dstAType.at(dstPos); + if (equal) srcPos++,dstPos++; + } + uint srcATypeLen=srcAType.length(); + uint dstATypeLen=dstAType.length(); + if (srcPos<srcATypeLen && dstPos<dstATypeLen) + { + // if nothing matches or the match ends in the middle or at the + // end of a string then there is no match + if (srcPos==0 || dstPos==0) + { + NOMATCH + return FALSE; + } + if (isId(srcAType.at(srcPos)) && isId(dstAType.at(dstPos))) + { + //printf("partial match srcPos=%d dstPos=%d!\n",srcPos,dstPos); + // check if a name if already found -> if no then there is no match + if (!srcAName.isEmpty() || !dstAName.isEmpty()) + { + NOMATCH + return FALSE; + } + // types only + while (srcPos<srcATypeLen && isId(srcAType.at(srcPos))) srcPos++; + while (dstPos<dstATypeLen && isId(dstAType.at(dstPos))) dstPos++; + if (srcPos<srcATypeLen || + dstPos<dstATypeLen || + (srcPos==srcATypeLen && dstPos==dstATypeLen) + ) + { + NOMATCH + return FALSE; + } + } + else + { + // otherwise we assume that a name starts at the current position. + while (srcPos<srcATypeLen && isId(srcAType.at(srcPos))) srcPos++; + while (dstPos<dstATypeLen && isId(dstAType.at(dstPos))) dstPos++; + + // if nothing more follows for both types then we assume we have + // found a match. Note that now `signed int' and `signed' match, but + // seeing that int is not a name can only be done by looking at the + // semantics. + + if (srcPos!=srcATypeLen || dstPos!=dstATypeLen) + { + NOMATCH + return FALSE; + } + } + } + else if (dstPos<dstAType.length()) + { + if (!isspace((uchar)dstAType.at(dstPos))) // maybe the names differ + { + if (!dstAName.isEmpty()) // dst has its name separated from its type + { + NOMATCH + return FALSE; + } + while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++; + if (dstPos!=dstAType.length()) + { + NOMATCH + return FALSE; // more than a difference in name -> no match + } + } + else // maybe dst has a name while src has not + { + dstPos++; + while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++; + if (dstPos!=dstAType.length() || !srcAName.isEmpty()) + { + NOMATCH + return FALSE; // nope not a name -> no match + } + } + } + else if (srcPos<srcAType.length()) + { + if (!isspace((uchar)srcAType.at(srcPos))) // maybe the names differ + { + if (!srcAName.isEmpty()) // src has its name separated from its type + { + NOMATCH + return FALSE; + } + while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++; + if (srcPos!=srcAType.length()) + { + NOMATCH + return FALSE; // more than a difference in name -> no match + } + } + else // maybe src has a name while dst has not + { + srcPos++; + while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++; + if (srcPos!=srcAType.length() || !dstAName.isEmpty()) + { + NOMATCH + return FALSE; // nope not a name -> no match + } + } + } + } + MATCH + return TRUE; +} + + +/*! + * Matches the arguments list srcAl with the argument list dstAl + * Returns TRUE if the argument lists are equal. Two argument list are + * considered equal if the number of arguments is equal and the types of all + * arguments are equal. Furthermore the const and volatile specifiers + * stored in the list should be equal. + */ +bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, + const char *cl,const char *ns,bool checkCV, + NamespaceSDict *usingNamespaces, + SDict<Definition> *usingClasses) +{ + QCString className=cl; + QCString namespaceName=ns; + + // strip template specialization from class name if present + //int til=className.find('<'),tir=className.find('>'); + //if (til!=-1 && tir!=-1 && tir>til) + //{ + // className=className.left(til)+className.right(className.length()-tir-1); + //} + + //printf("matchArguments(%s,%s) className=%s namespaceName=%s checkCV=%d usingNamespaces=%d usingClasses=%d\n", + // srcAl ? argListToString(srcAl).data() : "", + // dstAl ? argListToString(dstAl).data() : "", + // cl,ns,checkCV, + // usingNamespaces?usingNamespaces->count():0, + // usingClasses?usingClasses->count():0 + // ); + + if (srcAl==0 || dstAl==0) + { + bool match = srcAl==dstAl; // at least one of the members is not a function + if (match) + { + MATCH + return TRUE; + } + else + { + NOMATCH + return FALSE; + } + } + + // handle special case with void argument + if ( srcAl->count()==0 && dstAl->count()==1 && + dstAl->getFirst()->type=="void" ) + { // special case for finding match between func() and func(void) + Argument *a=new Argument; + a->type = "void"; + srcAl->append(a); + MATCH + return TRUE; + } + if ( dstAl->count()==0 && srcAl->count()==1 && + srcAl->getFirst()->type=="void" ) + { // special case for finding match between func(void) and func() + Argument *a=new Argument; + a->type = "void"; + dstAl->append(a); + MATCH + return TRUE; + } + + if (srcAl->count() != dstAl->count()) + { + NOMATCH + return FALSE; // different number of arguments -> no match + } + + if (checkCV) + { + if (srcAl->constSpecifier != dstAl->constSpecifier) + { + NOMATCH + return FALSE; // one member is const, the other not -> no match + } + if (srcAl->volatileSpecifier != dstAl->volatileSpecifier) + { + NOMATCH + return FALSE; // one member is volatile, the other not -> no match + } + } + + // so far the argument list could match, so we need to compare the types of + // all arguments. + ArgumentListIterator srcAli(*srcAl),dstAli(*dstAl); + Argument *srcA,*dstA; + for (;(srcA=srcAli.current(),dstA=dstAli.current());++srcAli,++dstAli) + { + if (!matchArgument(srcA,dstA,className,namespaceName, + usingNamespaces,usingClasses)) + { + NOMATCH + return FALSE; + } + } + MATCH + return TRUE; // all arguments match +} + +#endif + +#if 0 +static QCString resolveSymbolName(FileDef *fs,Definition *symbol,QCString &templSpec) +{ + ASSERT(symbol!=0); + if (symbol->definitionType()==Definition::TypeMember && + ((MemberDef*)symbol)->isTypedef()) // if symbol is a typedef then try + // to resolve it + { + MemberDef *md = 0; + ClassDef *cd = newResolveTypedef(fs,(MemberDef*)symbol,&md,&templSpec); + if (cd) + { + return cd->qualifiedName()+templSpec; + } + else if (md) + { + return md->qualifiedName(); + } + } + return symbol->qualifiedName(); +} +#endif + +static QCString stripDeclKeywords(const QCString &s) +{ + int i=s.find(" class "); + if (i!=-1) return s.left(i)+s.mid(i+6); + i=s.find(" typename "); + if (i!=-1) return s.left(i)+s.mid(i+9); + i=s.find(" union "); + if (i!=-1) return s.left(i)+s.mid(i+6); + i=s.find(" struct "); + if (i!=-1) return s.left(i)+s.mid(i+7); + return s; +} + +// forward decl for circular dependencies +static QCString extractCanonicalType(Definition *d,FileDef *fs,QCString type); + +QCString getCanonicalTemplateSpec(Definition *d,FileDef *fs,const QCString& spec) +{ + + QCString templSpec = spec.stripWhiteSpace(); + // this part had been commented out before... but it is needed to match for instance + // std::list<std::string> against list<string> so it is now back again! + if (!templSpec.isEmpty() && templSpec.at(0) == '<') + { + templSpec = "< " + extractCanonicalType(d,fs,templSpec.right(templSpec.length()-1).stripWhiteSpace()); + } + QCString resolvedType = resolveTypeDef(d,templSpec); + if (!resolvedType.isEmpty()) // not known as a typedef either + { + templSpec = resolvedType; + } + //printf("getCanonicalTemplateSpec(%s)=%s\n",spec.data(),templSpec.data()); + return templSpec; +} + + +static QCString getCanonicalTypeForIdentifier( + Definition *d,FileDef *fs,const QCString &word, + QCString *tSpec,int count=0) +{ + if (count>10) return word; // oops recursion + + QCString symName,scope,result,templSpec,tmpName; + //DefinitionList *defList=0; + if (tSpec && !tSpec->isEmpty()) + templSpec = stripDeclKeywords(getCanonicalTemplateSpec(d,fs,*tSpec)); + + if (word.findRev("::")!=-1 && !(tmpName=stripScope(word)).isEmpty()) + { + symName=tmpName; // name without scope + } + else + { + symName=word; + } + //printf("getCanonicalTypeForIdentifier(%s,[%s->%s]) start\n", + // word.data(),tSpec?tSpec->data():"<none>",templSpec.data()); + + ClassDef *cd = 0; + MemberDef *mType = 0; + QCString ts; + QCString resolvedType; + + // lookup class / class template instance + cd = getResolvedClass(d,fs,word+templSpec,&mType,&ts,TRUE,TRUE,&resolvedType); + bool isTemplInst = cd && !templSpec.isEmpty(); + if (!cd && !templSpec.isEmpty()) + { + // class template specialization not known, look up class template + cd = getResolvedClass(d,fs,word,&mType,&ts,TRUE,TRUE,&resolvedType); + } + if (cd && cd->isUsedOnly()) cd=0; // ignore types introduced by usage relations + + //printf("cd=%p mtype=%p\n",cd,mType); + //printf(" getCanonicalTypeForIdentifer: symbol=%s word=%s cd=%s d=%s fs=%s cd->isTemplate=%d\n", + // symName.data(), + // word.data(), + // cd?cd->name().data():"<none>", + // d?d->name().data():"<none>", + // fs?fs->name().data():"<none>", + // cd?cd->isTemplate():-1 + // ); + + //printf(" >>>> word '%s' => '%s' templSpec=%s ts=%s tSpec=%s isTemplate=%d resolvedType=%s\n", + // (word+templSpec).data(), + // cd?cd->qualifiedName().data():"<none>", + // templSpec.data(),ts.data(), + // tSpec?tSpec->data():"<null>", + // cd?cd->isTemplate():FALSE, + // resolvedType.data()); + + //printf(" mtype=%s\n",mType?mType->name().data():"<none>"); + + if (cd) // resolves to a known class type + { + if (cd==d && tSpec) *tSpec=""; + + if (mType && mType->isTypedef()) // but via a typedef + { + result = resolvedType; + } + else + { + if (isTemplInst) + { + // spec is already part of class type + templSpec=""; + if (tSpec) *tSpec=""; + } + else if (!ts.isEmpty() && templSpec.isEmpty()) + { + // use formal template args for spec + templSpec = stripDeclKeywords(getCanonicalTemplateSpec(d,fs,ts)); + } + + result = removeRedundantWhiteSpace(cd->qualifiedName() + templSpec); + + if (cd->isTemplate() && tSpec) // + { + if (!templSpec.isEmpty()) // specific instance + { + result=cd->name()+templSpec; + } + else // use template type + { + result=cd->qualifiedNameWithTemplateParameters(); + } + // template class, so remove the template part (it is part of the class name) + *tSpec=""; + } + else if (ts.isEmpty() && !templSpec.isEmpty() && cd && !cd->isTemplate() && tSpec) + { + // obscure case, where a class is used as a template, but doxygen think it is + // not (could happen when loading the class from a tag file). + *tSpec=""; + } + } + } + else if (mType && mType->isEnumerate()) // an enum + { + result = mType->qualifiedName(); + } + else if (mType && mType->isTypedef()) // a typedef + { + //result = mType->qualifiedName(); // changed after 1.7.2 + //result = mType->typeString(); + //printf("word=%s typeString=%s\n",word.data(),mType->typeString()); + if (word!=mType->typeString()) + { + result = getCanonicalTypeForIdentifier(d,fs,mType->typeString(),tSpec,count+1); + } + else + { + result = mType->typeString(); + } + } + else // fallback + { + resolvedType = resolveTypeDef(d,word); + //printf("typedef [%s]->[%s]\n",word.data(),resolvedType.data()); + if (resolvedType.isEmpty()) // not known as a typedef either + { + result = word; + } + else + { + result = resolvedType; + } + } + //printf("getCanonicalTypeForIdentifier [%s]->[%s]\n",word.data(),result.data()); + return result; +} + +static QCString extractCanonicalType(Definition *d,FileDef *fs,QCString type) +{ + type = type.stripWhiteSpace(); + + // strip const and volatile keywords that are not relevant for the type + stripIrrelevantConstVolatile(type); + + // strip leading keywords + type.stripPrefix("class "); + type.stripPrefix("struct "); + type.stripPrefix("union "); + type.stripPrefix("enum "); + type.stripPrefix("typename "); + + type = removeRedundantWhiteSpace(type); + //printf("extractCanonicalType(type=%s) start: def=%s file=%s\n",type.data(), + // d ? d->name().data() : "<null>",fs ? fs->name().data() : "<null>"); + + //static QRegExp id("[a-z_A-Z\\x80-\\xFF][:a-z_A-Z0-9\\x80-\\xFF]*"); + + QCString canType; + QCString templSpec,word; + int i,p=0,pp=0; + while ((i=extractClassNameFromType(type,p,word,templSpec))!=-1) + // foreach identifier in the type + { + //printf(" i=%d p=%d\n",i,p); + if (i>pp) canType += type.mid(pp,i-pp); + + + QCString ct = getCanonicalTypeForIdentifier(d,fs,word,&templSpec); + + // in case the ct is empty it means that "word" represents scope "d" + // and this does not need to be added to the canonical + // type (it is redundant), so/ we skip it. This solves problem 589616. + if (ct.isEmpty() && type.mid(p,2)=="::") + { + p+=2; + } + else + { + canType += ct; + } + //printf(" word=%s templSpec=%s canType=%s ct=%s\n", + // word.data(),templSpec.data(),canType.data(),ct.data()); + if (!templSpec.isEmpty()) // if we didn't use up the templSpec already + // (i.e. type is not a template specialization) + // then resolve any identifiers inside. + { + static QRegExp re("[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9\\x80-\\xFF]*"); + int tp=0,tl,ti; + // for each identifier template specifier + //printf("adding resolved %s to %s\n",templSpec.data(),canType.data()); + while ((ti=re.match(templSpec,tp,&tl))!=-1) + { + canType += templSpec.mid(tp,ti-tp); + canType += getCanonicalTypeForIdentifier(d,fs,templSpec.mid(ti,tl),0); + tp=ti+tl; + } + canType+=templSpec.right(templSpec.length()-tp); + } + + pp=p; + } + canType += type.right(type.length()-pp); + //printf("extractCanonicalType = '%s'->'%s'\n",type.data(),canType.data()); + + return removeRedundantWhiteSpace(canType); +} + +static QCString extractCanonicalArgType(Definition *d,FileDef *fs,const Argument *arg) +{ + QCString type = arg->type.stripWhiteSpace(); + QCString name = arg->name; + //printf("----- extractCanonicalArgType(type=%s,name=%s)\n",type.data(),name.data()); + if ((type=="const" || type=="volatile") && !name.isEmpty()) + { // name is part of type => correct + type+=" "; + type+=name; + } + if (name=="const" || name=="volatile") + { // name is part of type => correct + if (!type.isEmpty()) type+=" "; + type+=name; + } + if (!arg->array.isEmpty()) + { + type+=arg->array; + } + + return extractCanonicalType(d,fs,type); +} + +static bool matchArgument2( + Definition *srcScope,FileDef *srcFileScope,Argument *srcA, + Definition *dstScope,FileDef *dstFileScope,Argument *dstA + ) +{ + //printf(">> match argument: %s::`%s|%s' (%s) <-> %s::`%s|%s' (%s)\n", + // srcScope ? srcScope->name().data() : "", + // srcA->type.data(),srcA->name.data(),srcA->canType.data(), + // dstScope ? dstScope->name().data() : "", + // dstA->type.data(),dstA->name.data(),dstA->canType.data()); + + //if (srcA->array!=dstA->array) // nomatch for char[] against char + //{ + // NOMATCH + // return FALSE; + //} + QCString sSrcName = " "+srcA->name; + QCString sDstName = " "+dstA->name; + QCString srcType = srcA->type; + QCString dstType = dstA->type; + stripIrrelevantConstVolatile(srcType); + stripIrrelevantConstVolatile(dstType); + //printf("'%s'<->'%s'\n",sSrcName.data(),dstType.right(sSrcName.length()).data()); + //printf("'%s'<->'%s'\n",sDstName.data(),srcType.right(sDstName.length()).data()); + if (sSrcName==dstType.right(sSrcName.length())) + { // case "unsigned int" <-> "unsigned int i" + srcA->type+=sSrcName; + srcA->name=""; + srcA->canType=""; // invalidate cached type value + } + else if (sDstName==srcType.right(sDstName.length())) + { // case "unsigned int i" <-> "unsigned int" + dstA->type+=sDstName; + dstA->name=""; + dstA->canType=""; // invalidate cached type value + } + + if (srcA->canType.isEmpty()) + { + srcA->canType = extractCanonicalArgType(srcScope,srcFileScope,srcA); + } + if (dstA->canType.isEmpty()) + { + dstA->canType = extractCanonicalArgType(dstScope,dstFileScope,dstA); + } + + if (srcA->canType==dstA->canType) + { + MATCH + return TRUE; + } + else + { + //printf(" Canonical types do not match [%s]<->[%s]\n", + // srcA->canType.data(),dstA->canType.data()); + NOMATCH + return FALSE; + } +} + + +// new algorithm for argument matching +bool matchArguments2(Definition *srcScope,FileDef *srcFileScope,ArgumentList *srcAl, + Definition *dstScope,FileDef *dstFileScope,ArgumentList *dstAl, + bool checkCV + ) +{ + //printf("*** matchArguments2\n"); + ASSERT(srcScope!=0 && dstScope!=0); + + if (srcAl==0 || dstAl==0) + { + bool match = srcAl==dstAl; // at least one of the members is not a function + if (match) + { + MATCH + return TRUE; + } + else + { + NOMATCH + return FALSE; + } + } + + // handle special case with void argument + if ( srcAl->count()==0 && dstAl->count()==1 && + dstAl->getFirst()->type=="void" ) + { // special case for finding match between func() and func(void) + Argument *a=new Argument; + a->type = "void"; + srcAl->append(a); + MATCH + return TRUE; + } + if ( dstAl->count()==0 && srcAl->count()==1 && + srcAl->getFirst()->type=="void" ) + { // special case for finding match between func(void) and func() + Argument *a=new Argument; + a->type = "void"; + dstAl->append(a); + MATCH + return TRUE; + } + + if (srcAl->count() != dstAl->count()) + { + NOMATCH + return FALSE; // different number of arguments -> no match + } + + if (checkCV) + { + if (srcAl->constSpecifier != dstAl->constSpecifier) + { + NOMATCH + return FALSE; // one member is const, the other not -> no match + } + if (srcAl->volatileSpecifier != dstAl->volatileSpecifier) + { + NOMATCH + return FALSE; // one member is volatile, the other not -> no match + } + } + + // so far the argument list could match, so we need to compare the types of + // all arguments. + ArgumentListIterator srcAli(*srcAl),dstAli(*dstAl); + Argument *srcA,*dstA; + for (;(srcA=srcAli.current(),dstA=dstAli.current());++srcAli,++dstAli) + { + if (!matchArgument2(srcScope,srcFileScope,srcA, + dstScope,dstFileScope,dstA) + ) + { + NOMATCH + return FALSE; + } + } + MATCH + return TRUE; // all arguments match +} + + + +// merges the initializer of two argument lists +// pre: the types of the arguments in the list should match. +void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwrite) +{ + //printf("mergeArguments `%s', `%s'\n", + // argListToString(srcAl).data(),argListToString(dstAl).data()); + + if (srcAl==0 || dstAl==0 || srcAl->count()!=dstAl->count()) + { + return; // invalid argument lists -> do not merge + } + + ArgumentListIterator srcAli(*srcAl),dstAli(*dstAl); + Argument *srcA,*dstA; + for (;(srcA=srcAli.current(),dstA=dstAli.current());++srcAli,++dstAli) + { + if (srcA->defval.isEmpty() && !dstA->defval.isEmpty()) + { + //printf("Defval changing `%s'->`%s'\n",srcA->defval.data(),dstA->defval.data()); + srcA->defval=dstA->defval.copy(); + } + else if (!srcA->defval.isEmpty() && dstA->defval.isEmpty()) + { + //printf("Defval changing `%s'->`%s'\n",dstA->defval.data(),srcA->defval.data()); + dstA->defval=srcA->defval.copy(); + } + + // fix wrongly detected const or volatile specifiers before merging. + // example: "const A *const" is detected as type="const A *" name="const" + if (srcA->name=="const" || srcA->name=="volatile") + { + srcA->type+=" "+srcA->name; + srcA->name.resize(0); + } + if (dstA->name=="const" || dstA->name=="volatile") + { + dstA->type+=" "+dstA->name; + dstA->name.resize(0); + } + + if (srcA->type==dstA->type) + { + //printf("1. merging %s:%s <-> %s:%s\n",srcA->type.data(),srcA->name.data(),dstA->type.data(),dstA->name.data()); + if (srcA->name.isEmpty() && !dstA->name.isEmpty()) + { + //printf("type: `%s':=`%s'\n",srcA->type.data(),dstA->type.data()); + //printf("name: `%s':=`%s'\n",srcA->name.data(),dstA->name.data()); + srcA->type = dstA->type.copy(); + srcA->name = dstA->name.copy(); + } + else if (!srcA->name.isEmpty() && dstA->name.isEmpty()) + { + //printf("type: `%s':=`%s'\n",dstA->type.data(),srcA->type.data()); + //printf("name: `%s':=`%s'\n",dstA->name.data(),srcA->name.data()); + dstA->type = srcA->type.copy(); + dstA->name = dstA->name.copy(); + } + else if (!srcA->name.isEmpty() && !dstA->name.isEmpty()) + { + //printf("srcA->name=%s dstA->name=%s\n",srcA->name.data(),dstA->name.data()); + if (forceNameOverwrite) + { + srcA->name = dstA->name; + } + else + { + if (srcA->docs.isEmpty() && !dstA->docs.isEmpty()) + { + srcA->name = dstA->name; + } + else if (!srcA->docs.isEmpty() && dstA->docs.isEmpty()) + { + dstA->name = srcA->name; + } + } + } + } + else + { + //printf("2. merging '%s':'%s' <-> '%s':'%s'\n",srcA->type.data(),srcA->name.data(),dstA->type.data(),dstA->name.data()); + srcA->type=srcA->type.stripWhiteSpace(); + dstA->type=dstA->type.stripWhiteSpace(); + if (srcA->type+" "+srcA->name==dstA->type) // "unsigned long:int" <-> "unsigned long int:bla" + { + srcA->type+=" "+srcA->name; + srcA->name=dstA->name; + } + else if (dstA->type+" "+dstA->name==srcA->type) // "unsigned long int bla" <-> "unsigned long int" + { + dstA->type+=" "+dstA->name; + dstA->name=srcA->name; + } + else if (srcA->name.isEmpty() && !dstA->name.isEmpty()) + { + srcA->name = dstA->name; + } + else if (dstA->name.isEmpty() && !srcA->name.isEmpty()) + { + dstA->name = srcA->name; + } + } + int i1=srcA->type.find("::"), + i2=dstA->type.find("::"), + j1=srcA->type.length()-i1-2, + j2=dstA->type.length()-i2-2; + if (i1!=-1 && i2==-1 && srcA->type.right(j1)==dstA->type) + { + //printf("type: `%s':=`%s'\n",dstA->type.data(),srcA->type.data()); + //printf("name: `%s':=`%s'\n",dstA->name.data(),srcA->name.data()); + dstA->type = srcA->type.left(i1+2)+dstA->type; + dstA->name = dstA->name.copy(); + } + else if (i1==-1 && i2!=-1 && dstA->type.right(j2)==srcA->type) + { + //printf("type: `%s':=`%s'\n",srcA->type.data(),dstA->type.data()); + //printf("name: `%s':=`%s'\n",dstA->name.data(),srcA->name.data()); + srcA->type = dstA->type.left(i2+2)+srcA->type; + srcA->name = dstA->name.copy(); + } + if (srcA->docs.isEmpty() && !dstA->docs.isEmpty()) + { + srcA->docs = dstA->docs.copy(); + } + else if (dstA->docs.isEmpty() && !srcA->docs.isEmpty()) + { + dstA->docs = srcA->docs.copy(); + } + //printf("Merge argument `%s|%s' `%s|%s'\n", + // srcA->type.data(),srcA->name.data(), + // dstA->type.data(),dstA->name.data()); + } +} + +static void findMembersWithSpecificName(MemberName *mn, + const char *args, + bool checkStatics, + FileDef *currentFile, + bool checkCV, + QList<MemberDef> &members) +{ + //printf(" Function with global scope name `%s' args=`%s'\n", + // mn->memberName(),args); + MemberListIterator mli(*mn); + MemberDef *md; + for (mli.toFirst();(md=mli.current());++mli) + { + FileDef *fd=md->getFileDef(); + GroupDef *gd=md->getGroupDef(); + //printf(" md->name()=`%s' md->args=`%s' fd=%p gd=%p current=%p\n", + // md->name().data(),args,fd,gd,currentFile); + if ( + ((gd && gd->isLinkable()) || (fd && fd->isLinkable()) || md->isReference()) && + md->getNamespaceDef()==0 && md->isLinkable() && + (!checkStatics || (!md->isStatic() && !md->isDefine()) || + currentFile==0 || fd==currentFile) // statics must appear in the same file + ) + { + //printf(" fd=%p gd=%p args=`%s'\n",fd,gd,args); + bool match=TRUE; + ArgumentList *argList=0; + if (args && !md->isDefine() && strcmp(args,"()")!=0) + { + argList=new ArgumentList; + LockingPtr<ArgumentList> mdAl = md->argumentList(); + stringToArgumentList(args,argList); + match=matchArguments2( + md->getOuterScope(),fd,mdAl.pointer(), + Doxygen::globalScope,fd,argList, + checkCV); + delete argList; argList=0; + } + if (match) + { + //printf("Found match!\n"); + members.append(md); + } + } + } +} + +/*! + * Searches for a member definition given its name `memberName' as a string. + * memberName may also include a (partial) scope to indicate the scope + * in which the member is located. + * + * The parameter `scName' is a string representing the name of the scope in + * which the link was found. + * + * In case of a function args contains a string representation of the + * argument list. Passing 0 means the member has no arguments. + * Passing "()" means any argument list will do, but "()" is preferred. + * + * The function returns TRUE if the member is known and documented or + * FALSE if it is not. + * If TRUE is returned parameter `md' contains a pointer to the member + * definition. Furthermore exactly one of the parameter `cd', `nd', or `fd' + * will be non-zero: + * - if `cd' is non zero, the member was found in a class pointed to by cd. + * - if `nd' is non zero, the member was found in a namespace pointed to by nd. + * - if `fd' is non zero, the member was found in the global namespace of + * file fd. + */ +bool getDefs(const QCString &scName,const QCString &memberName, + const char *args, + MemberDef *&md, + ClassDef *&cd, FileDef *&fd, NamespaceDef *&nd, GroupDef *&gd, + bool forceEmptyScope, + FileDef *currentFile, + bool checkCV + ) +{ + fd=0, md=0, cd=0, nd=0, gd=0; + if (memberName.isEmpty()) return FALSE; /* empty name => nothing to link */ + + QCString scopeName=scName; + //printf("Search for name=%s args=%s in scope=%s forceEmpty=%d\n", + // memberName.data(),args,scopeName.data(),forceEmptyScope); + + int is,im=0,pm=0; + // strip common part of the scope from the scopeName + while ((is=scopeName.findRev("::"))!=-1 && + (im=memberName.find("::",pm))!=-1 && + (scopeName.right(scopeName.length()-is-2)==memberName.mid(pm,im-pm)) + ) + { + scopeName=scopeName.left(is); + pm=im+2; + } + //printf("result after scope corrections scope=%s name=%s\n", + // scopeName.data(),memberName.data()); + + QCString mName=memberName; + QCString mScope; + if (memberName.left(9)!="operator " && // treat operator conversion methods + // as a special case + (im=memberName.findRev("::"))!=-1 && + im<(int)memberName.length()-2 // not A:: + ) + { + mScope=memberName.left(im); + mName=memberName.right(memberName.length()-im-2); + } + + // handle special the case where both scope name and member scope are equal + if (mScope==scopeName) scopeName.resize(0); + + //printf("mScope=`%s' mName=`%s'\n",mScope.data(),mName.data()); + + MemberName *mn = Doxygen::memberNameSDict->find(mName); + //printf("mName=%s mn=%p\n",mName.data(),mn); + + if ((!forceEmptyScope || scopeName.isEmpty()) && // this was changed for bug638856, forceEmptyScope => empty scopeName + mn && !(scopeName.isEmpty() && mScope.isEmpty())) + { + //printf(" >member name '%s' found\n",mName.data()); + int scopeOffset=scopeName.length(); + do + { + QCString className = scopeName.left(scopeOffset); + if (!className.isEmpty() && !mScope.isEmpty()) + { + className+="::"+mScope; + } + else if (!mScope.isEmpty()) + { + className=mScope; + } + + ClassDef *fcd=getResolvedClass(Doxygen::globalScope,0,className); + //printf("Trying class scope %s: %p\n",className.data(),fcd); + // todo: fill in correct fileScope! + if (fcd && // is it a documented class + fcd->isLinkable() + ) + { + //printf(" Found fcd=%p\n",fcd); + MemberListIterator mmli(*mn); + MemberDef *mmd; + int mdist=maxInheritanceDepth; + ArgumentList *argList=0; + if (args) + { + argList=new ArgumentList; + stringToArgumentList(args,argList); + } + for (mmli.toFirst();(mmd=mmli.current());++mmli) + { + //if (mmd->isLinkable()) + //{ + LockingPtr<ArgumentList> mmdAl = mmd->argumentList(); + bool match=args==0 || + matchArguments2(mmd->getOuterScope(),mmd->getFileDef(),mmdAl.pointer(), + fcd,fcd->getFileDef(),argList, + checkCV + ); + //printf("match=%d\n",match); + if (match) + { + ClassDef *mcd=mmd->getClassDef(); + if (mcd) + { + int m=minClassDistance(fcd,mcd); + if (m<mdist && mcd->isLinkable()) + { + mdist=m; + cd=mcd; + md=mmd; + } + } + } + //} + } + if (argList) + { + delete argList; argList=0; + } + if (mdist==maxInheritanceDepth && args && strcmp(args,"()")==0) + // no exact match found, but if args="()" an arbitrary member will do + { + //printf(" >Searching for arbitrary member\n"); + for (mmli.toFirst();(mmd=mmli.current());++mmli) + { + //if (mmd->isLinkable()) + //{ + ClassDef *mcd=mmd->getClassDef(); + //printf(" >Class %s found\n",mcd->name().data()); + if (mcd) + { + int m=minClassDistance(fcd,mcd); + if (m<mdist /* && mcd->isLinkable()*/ ) + { + //printf("Class distance %d\n",m); + mdist=m; + cd=mcd; + md=mmd; + } + } + //} + } + } + //printf(" >Succes=%d\n",mdist<maxInheritanceDepth); + if (mdist<maxInheritanceDepth) + { + if (!md->isLinkable()) + { + md=0; // avoid returning things we cannot link to + cd=0; + return FALSE; // match found, but was not linkable + } + else + { + gd=md->getGroupDef(); + if (gd) cd=0; + return TRUE; /* found match */ + } + } + } + /* go to the parent scope */ + if (scopeOffset==0) + { + scopeOffset=-1; + } + else if ((scopeOffset=scopeName.findRev("::",scopeOffset-1))==-1) + { + scopeOffset=0; + } + } while (scopeOffset>=0); + + } + if (mn && scopeName.isEmpty() && mScope.isEmpty()) // Maybe a related function? + { + MemberListIterator mmli(*mn); + MemberDef *mmd, *fuzzy_mmd = 0; + ArgumentList *argList = 0; + bool hasEmptyArgs = args && strcmp(args, "()") == 0; + + if (args) + stringToArgumentList(args, argList = new ArgumentList); + + for (mmli.toFirst(); (mmd = mmli.current()); ++mmli) + { + if (!mmd->isLinkable() || (!mmd->isRelated() && !mmd->isForeign()) || + !mmd->getClassDef()) + continue; + + if (!args) break; + + QCString className = mmd->getClassDef()->name(); + + LockingPtr<ArgumentList> mmdAl = mmd->argumentList(); + if (matchArguments2(mmd->getOuterScope(),mmd->getFileDef(),mmdAl.pointer(), + Doxygen::globalScope,mmd->getFileDef(),argList, + checkCV + ) + ) break; + + if (!fuzzy_mmd && hasEmptyArgs) + fuzzy_mmd = mmd; + } + + if (argList) delete argList, argList = 0; + + mmd = mmd ? mmd : fuzzy_mmd; + + if (mmd) + { + md = mmd; + cd = mmd->getClassDef(); + return TRUE; + } + } + + + // maybe an namespace, file or group member ? + //printf("Testing for global symbol scopeName=`%s' mScope=`%s' :: mName=`%s'\n", + // scopeName.data(),mScope.data(),mName.data()); + if ((mn=Doxygen::functionNameSDict->find(mName))) // name is known + { + //printf(" >symbol name found\n"); + NamespaceDef *fnd=0; + int scopeOffset=scopeName.length(); + do + { + QCString namespaceName = scopeName.left(scopeOffset); + if (!namespaceName.isEmpty() && !mScope.isEmpty()) + { + namespaceName+="::"+mScope; + } + else if (!mScope.isEmpty()) + { + namespaceName=mScope.copy(); + } + //printf("Trying namespace %s\n",namespaceName.data()); + if (!namespaceName.isEmpty() && + (fnd=Doxygen::namespaceSDict->find(namespaceName)) && + fnd->isLinkable() + ) + { + //printf("Function inside existing namespace `%s'\n",namespaceName.data()); + bool found=FALSE; + MemberListIterator mmli(*mn); + MemberDef *mmd; + for (mmli.toFirst();((mmd=mmli.current()) && !found);++mmli) + { + //printf("mmd->getNamespaceDef()=%p fnd=%p\n", + // mmd->getNamespaceDef(),fnd); + if (mmd->getNamespaceDef()==fnd /* && mmd->isLinkable() */ ) + { // namespace is found + bool match=TRUE; + ArgumentList *argList=0; + if (args && strcmp(args,"()")!=0) + { + argList=new ArgumentList; + LockingPtr<ArgumentList> mmdAl = mmd->argumentList(); + stringToArgumentList(args,argList); + match=matchArguments2( + mmd->getOuterScope(),mmd->getFileDef(),mmdAl.pointer(), + fnd,mmd->getFileDef(),argList, + checkCV); + } + if (match) + { + nd=fnd; + md=mmd; + found=TRUE; + } + if (args) + { + delete argList; argList=0; + } + } + } + if (!found && args && !strcmp(args,"()")) + // no exact match found, but if args="()" an arbitrary + // member will do + { + for (mmli.toFirst();((mmd=mmli.current()) && !found);++mmli) + { + if (mmd->getNamespaceDef()==fnd /*&& mmd->isLinkable() */ ) + { + nd=fnd; + md=mmd; + found=TRUE; + } + } + } + if (found) + { + if (!md->isLinkable()) + { + md=0; // avoid returning things we cannot link to + nd=0; + return FALSE; // match found but not linkable + } + else + { + gd=md->getGroupDef(); + if (gd && gd->isLinkable()) nd=0; else gd=0; + return TRUE; + } + } + } + if (scopeOffset==0) + { + scopeOffset=-1; + } + else if ((scopeOffset=scopeName.findRev("::",scopeOffset-1))==-1) + { + scopeOffset=0; + } + } while (scopeOffset>=0); + + //else // no scope => global function + { + QList<MemberDef> members; + // search for matches with strict static checking + findMembersWithSpecificName(mn,args,TRUE,currentFile,checkCV,members); + if (members.count()==0) // nothing found + { + // search again without strict static checking + findMembersWithSpecificName(mn,args,FALSE,currentFile,checkCV,members); + } + if (members.count()!=1 && args && !strcmp(args,"()")) + { + // no exact match found, but if args="()" an arbitrary + // member will do + md=mn->last(); + while (md /* && md->isLinkable()*/) + { + //printf("Found member `%s'\n",md->name().data()); + //printf("member is linkable md->name()=`%s'\n",md->name().data()); + fd=md->getFileDef(); + gd=md->getGroupDef(); + if ( + (gd && gd->isLinkable()) || (fd && fd->isLinkable()) + ) + { + members.append(md); + } + md=mn->prev(); + } + } + //printf("found %d candidate members\n",members.count()); + if (members.count()>0) // at least one match + { + md=members.last(); + } + if (md) // found a matching global member + { + fd=md->getFileDef(); + gd=md->getGroupDef(); + //printf("fd=%p gd=%p gd->isLinkable()=%d\n",fd,gd,gd->isLinkable()); + if (gd && gd->isLinkable()) fd=0; else gd=0; + return TRUE; + } + } + } + + // no nothing found + return FALSE; +} + +/*! + * Searches for a scope definition given its name as a string via parameter + * `scope'. + * + * The parameter `docScope' is a string representing the name of the scope in + * which the `scope' string was found. + * + * The function returns TRUE if the scope is known and documented or + * FALSE if it is not. + * If TRUE is returned exactly one of the parameter `cd', `nd' + * will be non-zero: + * - if `cd' is non zero, the scope was a class pointed to by cd. + * - if `nd' is non zero, the scope was a namespace pointed to by nd. + */ +static bool getScopeDefs(const char *docScope,const char *scope, + ClassDef *&cd, NamespaceDef *&nd) +{ + cd=0;nd=0; + + QCString scopeName=scope; + //printf("getScopeDefs: docScope=`%s' scope=`%s'\n",docScope,scope); + if (scopeName.isEmpty()) return FALSE; + + bool explicitGlobalScope=FALSE; + if (scopeName.at(0)==':' && scopeName.at(1)==':') + { + scopeName=scopeName.right(scopeName.length()-2); + explicitGlobalScope=TRUE; + } + + QCString docScopeName=docScope; + int scopeOffset=explicitGlobalScope ? 0 : docScopeName.length(); + + do // for each possible docScope (from largest to and including empty) + { + QCString fullName=scopeName.copy(); + if (scopeOffset>0) fullName.prepend(docScopeName.left(scopeOffset)+"::"); + + if (((cd=getClass(fullName)) || // normal class + (cd=getClass(fullName+"-p")) || // ObjC protocol + (cd=getClass(fullName+"-g")) // C# generic + ) && cd->isLinkable()) + { + return TRUE; // class link written => quit + } + else if ((nd=Doxygen::namespaceSDict->find(fullName)) && nd->isLinkable()) + { + return TRUE; // namespace link written => quit + } + if (scopeOffset==0) + { + scopeOffset=-1; + } + else if ((scopeOffset=docScopeName.findRev("::",scopeOffset-1))==-1) + { + scopeOffset=0; + } + } while (scopeOffset>=0); + + return FALSE; +} + +static bool isLowerCase(QCString &s) +{ + uchar *p=(uchar*)s.data(); + if (p==0) return TRUE; + int c; + while ((c=*p++)) if (!islower(c)) return FALSE; + return TRUE; +} + +/*! Returns an object to reference to given its name and context + * @post return value TRUE implies *resContext!=0 or *resMember!=0 + */ +bool resolveRef(/* in */ const char *scName, + /* in */ const char *name, + /* in */ bool inSeeBlock, + /* out */ Definition **resContext, + /* out */ MemberDef **resMember, + bool lookForSpecialization, + FileDef *currentFile, + bool checkScope + ) +{ + QCString tsName = name; + //bool memberScopeFirst = tsName.find('#')!=-1; + QCString fullName = substitute(tsName,"#","::"); + fullName = removeRedundantWhiteSpace(substitute(fullName,".","::")); + + int bracePos=fullName.findRev('('); // reverse is needed for operator()(...) + int endNamePos=bracePos!=-1 ? bracePos : fullName.length(); + int scopePos=fullName.findRev("::",endNamePos); + bool explicitScope = fullName.left(2)=="::" && // ::scope or #scope + (scopePos>2 || // ::N::A + tsName.left(2)=="::" || // ::foo in local scope + scName==0 // #foo in global scope + ); + + // default result values + *resContext=0; + *resMember=0; + + if (bracePos==-1) // simple name + { + ClassDef *cd=0; + NamespaceDef *nd=0; + + // the following if() was commented out for releases in the range + // 1.5.2 to 1.6.1, but has been restored as a result of bug report 594787. + if (!inSeeBlock && scopePos==-1 && isLowerCase(tsName)) + { // link to lower case only name => do not try to autolink + return FALSE; + } + + //printf("scName=%s fullName=%s\n",scName,fullName.data()); + + // check if this is a class or namespace reference + if (scName!=fullName && getScopeDefs(scName,fullName,cd,nd)) + { + if (cd) // scope matches that of a class + { + *resContext = cd; + } + else // scope matches that of a namespace + { + ASSERT(nd!=0); + *resContext = nd; + } + return TRUE; + } + else if (scName==fullName || (!inSeeBlock && scopePos==-1)) + // nothing to link => output plain text + { + //printf("found scName=%s fullName=%s scName==fullName=%d " + // "inSeeBlock=%d scopePos=%d!\n", + // scName,fullName.data(),scName==fullName,inSeeBlock,scopePos); + return FALSE; + } + // continue search... + } + + // extract userscope+name + QCString nameStr=fullName.left(endNamePos); + if (explicitScope) nameStr=nameStr.mid(2); + + // extract arguments + QCString argsStr; + if (bracePos!=-1) argsStr=fullName.right(fullName.length()-bracePos); + + // strip template specifier + // TODO: match against the correct partial template instantiation + int templPos=nameStr.find('<'); + bool tryUnspecializedVersion = FALSE; + if (templPos!=-1 && nameStr.find("operator")==-1) + { + int endTemplPos=nameStr.findRev('>'); + if (endTemplPos!=-1) + { + if (!lookForSpecialization) + { + nameStr=nameStr.left(templPos)+nameStr.right(nameStr.length()-endTemplPos-1); + } + else + { + tryUnspecializedVersion = TRUE; + } + } + } + + QCString scopeStr=scName; + + MemberDef *md = 0; + ClassDef *cd = 0; + FileDef *fd = 0; + NamespaceDef *nd = 0; + GroupDef *gd = 0; + + // check if nameStr is a member or global. + //printf("getDefs(scope=%s,name=%s,args=%s checkScope=%d)\n", + // scopeStr.data(),nameStr.data(),argsStr.data(),checkScope); + if (getDefs(scopeStr,nameStr,argsStr, + md,cd,fd,nd,gd, + //scopePos==0 && !memberScopeFirst, // forceEmptyScope + explicitScope, // replaces prev line due to bug 600829 + currentFile, + TRUE // checkCV + ) + ) + { + //printf("after getDefs checkScope=%d nameStr=%s cd=%p nd=%p\n",checkScope,nameStr.data(),cd,nd); + if (checkScope && md && md->getOuterScope()==Doxygen::globalScope && + (!scopeStr.isEmpty() || nameStr.find("::")>0)) + { + // we did find a member, but it is a global one while we were explicitly + // looking for a scoped variable. See bug 616387 for an example why this check is needed. + // note we do need to support autolinking to "::symbol" hence the >0 + //printf("not global member!\n"); + *resContext=0; + *resMember=0; + return FALSE; + } + //printf("after getDefs md=%p cd=%p fd=%p nd=%p gd=%p\n",md,cd,fd,nd,gd); + if (md) { *resMember=md; *resContext=md; } + else if (cd) *resContext=cd; + else if (nd) *resContext=nd; + else if (fd) *resContext=fd; + else if (gd) *resContext=gd; + else { *resContext=0; *resMember=0; return FALSE; } + //printf("member=%s (md=%p) anchor=%s linkable()=%d context=%s\n", + // md->name().data(),md,md->anchor().data(),md->isLinkable(),(*resContext)->name().data()); + return TRUE; + } + else if (inSeeBlock && !nameStr.isEmpty() && (gd=Doxygen::groupSDict->find(nameStr))) + { // group link + *resContext=gd; + return TRUE; + } + else if (tsName.find('.')!=-1) // maybe a link to a file + { + bool ambig; + fd=findFileDef(Doxygen::inputNameDict,tsName,ambig); + if (fd && !ambig) + { + *resContext=fd; + return TRUE; + } + } + + if (tryUnspecializedVersion) + { + return resolveRef(scName,name,inSeeBlock,resContext,resMember,FALSE,0,checkScope); + } + //printf("resolveRef: %s not found!\n",name); + + return FALSE; +} + +QCString linkToText(const char *link,bool isFileName) +{ + static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); + QCString result=link; + if (!result.isEmpty()) + { + // replace # by :: + result=substitute(result,"#","::"); + // replace . by :: + if (!isFileName) result=substitute(result,".","::"); + // strip leading :: prefix if present + if (result.at(0)==':' && result.at(1)==':') + { + result=result.right(result.length()-2); + } + if (optimizeOutputJava) + { + result=substitute(result,"::","."); + } + } + return result; +} + +#if 0 +/* + * generate a reference to a class, namespace or member. + * `scName' is the name of the scope that contains the documentation + * string that is returned. + * `name' is the name that we want to link to. + * `name' may have five formats: + * 1) "ScopeName" + * 2) "memberName()" one of the (overloaded) function or define + * with name memberName. + * 3) "memberName(...)" a specific (overloaded) function or define + * with name memberName + * 4) "::name a global variable or define + * 4) "\#memberName member variable, global variable or define + * 5) ("ScopeName::")+"memberName()" + * 6) ("ScopeName::")+"memberName(...)" + * 7) ("ScopeName::")+"memberName" + * instead of :: the \# symbol may also be used. + */ + +bool generateRef(OutputDocInterface &od,const char *scName, + const char *name,bool inSeeBlock,const char *rt) +{ + //printf("generateRef(scName=%s,name=%s,inSee=%d,rt=%s)\n",scName,name,inSeeBlock,rt); + + Definition *compound; + MemberDef *md; + + // create default link text + QCString linkText = linkToText(rt,FALSE); + + if (resolveRef(scName,name,inSeeBlock,&compound,&md)) + { + if (md && md->isLinkable()) // link to member + { + od.writeObjectLink(md->getReference(), + md->getOutputFileBase(), + md->anchor(),linkText); + // generate the page reference (for LaTeX) + if (!md->isReference()) + { + writePageRef(od,md->getOutputFileBase(),md->anchor()); + } + return TRUE; + } + else if (compound && compound->isLinkable()) // link to compound + { + if (rt==0 && compound->definitionType()==Definition::TypeGroup) + { + linkText=((GroupDef *)compound)->groupTitle(); + } + if (compound && compound->definitionType()==Definition::TypeFile) + { + linkText=linkToText(rt,TRUE); + } + od.writeObjectLink(compound->getReference(), + compound->getOutputFileBase(), + 0,linkText); + if (!compound->isReference()) + { + writePageRef(od,compound->getOutputFileBase(),0); + } + return TRUE; + } + } + od.docify(linkText); + return FALSE; +} +#endif + +bool resolveLink(/* in */ const char *scName, + /* in */ const char *lr, + /* in */ bool /*inSeeBlock*/, + /* out */ Definition **resContext, + /* out */ QCString &resAnchor + ) +{ + *resContext=0; + + QCString linkRef=lr; + //printf("ResolveLink linkRef=%s inSee=%d\n",lr,inSeeBlock); + FileDef *fd; + GroupDef *gd; + PageDef *pd; + ClassDef *cd; + DirDef *dir; + NamespaceDef *nd; + bool ambig; + if (linkRef.isEmpty()) // no reference name! + { + return FALSE; + } + else if ((pd=Doxygen::pageSDict->find(linkRef))) // link to a page + { + GroupDef *gd = pd->getGroupDef(); + if (gd) + { + SectionInfo *si=0; + if (!pd->name().isEmpty()) si=Doxygen::sectionDict[pd->name()]; + *resContext=gd; + if (si) resAnchor = si->label; + } + else + { + *resContext=pd; + } + return TRUE; + } + else if ((pd=Doxygen::exampleSDict->find(linkRef))) // link to an example + { + *resContext=pd; + return TRUE; + } + else if ((gd=Doxygen::groupSDict->find(linkRef))) // link to a group + { + *resContext=gd; + return TRUE; + } + else if ((fd=findFileDef(Doxygen::inputNameDict,linkRef,ambig)) // file link + && fd->isLinkable()) + { + *resContext=fd; + return TRUE; + } + else if ((cd=getClass(linkRef))) // class link + { + *resContext=cd; + resAnchor=cd->anchor(); + return TRUE; + } + else if ((cd=getClass(linkRef+"-p"))) // Obj-C protocol link + { + *resContext=cd; + resAnchor=cd->anchor(); + return TRUE; + } + else if ((cd=getClass(linkRef+"-g"))) // C# generic link + { + *resContext=cd; + resAnchor=cd->anchor(); + return TRUE; + } + else if ((nd=Doxygen::namespaceSDict->find(linkRef))) + { + *resContext=nd; + return TRUE; + } + else if ((dir=Doxygen::directories->find(QFileInfo(linkRef).absFilePath()+"/")) + && dir->isLinkable()) // TODO: make this location independent like filedefs + { + *resContext=dir; + return TRUE; + } + else // probably a member reference + { + MemberDef *md; + bool res = resolveRef(scName,lr,TRUE,resContext,&md); + if (md) resAnchor=md->anchor(); + return res; + } +} + + +//---------------------------------------------------------------------- +// General function that generates the HTML code for a reference to some +// file, class or member from text `lr' within the context of class `clName'. +// This link has the text 'lt' (if not 0), otherwise `lr' is used as a +// basis for the link's text. +// returns TRUE if a link could be generated. + +bool generateLink(OutputDocInterface &od,const char *clName, + const char *lr,bool inSeeBlock,const char *lt) +{ + //printf("generateLink(clName=%s,lr=%s,lr=%s)\n",clName,lr,lt); + Definition *compound; + //PageDef *pageDef=0; + QCString anchor,linkText=linkToText(lt,FALSE); + //printf("generateLink linkText=%s\n",linkText.data()); + if (resolveLink(clName,lr,inSeeBlock,&compound,anchor)) + { + if (compound) // link to compound + { + if (lt==0 && anchor.isEmpty() && /* compound link */ + compound->definitionType()==Definition::TypeGroup /* is group */ + ) + { + linkText=((GroupDef *)compound)->groupTitle(); // use group's title as link + } + else if (compound->definitionType()==Definition::TypeFile) + { + linkText=linkToText(lt,TRUE); + } + od.writeObjectLink(compound->getReference(), + compound->getOutputFileBase(),anchor,linkText); + if (!compound->isReference()) + { + writePageRef(od,compound->getOutputFileBase(),anchor); + } + } + else + { + err("%s:%d: Internal error: resolveLink successful but no compound found!",__FILE__,__LINE__); + } + return TRUE; + } + else // link could not be found + { + od.docify(linkText); + return FALSE; + } +} + +void generateFileRef(OutputDocInterface &od,const char *name,const char *text) +{ + //printf("generateFileRef(%s,%s)\n",name,text); + QCString linkText = text ? text : name; + //FileInfo *fi; + FileDef *fd; + bool ambig; + if ((fd=findFileDef(Doxygen::inputNameDict,name,ambig)) && + fd->isLinkable()) + // link to documented input file + od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,linkText); + else + od.docify(linkText); +} + +//---------------------------------------------------------------------- + +#if 0 +QCString substituteClassNames(const QCString &s) +{ + int i=0,l,p; + QCString result; + if (s.isEmpty()) return result; + QRegExp r("[a-z_A-Z][a-z_A-Z0-9]*"); + while ((p=r.match(s,i,&l))!=-1) + { + QCString *subst; + if (p>i) result+=s.mid(i,p-i); + if ((subst=substituteDict[s.mid(p,l)])) + { + result+=*subst; + } + else + { + result+=s.mid(p,l); + } + i=p+l; + } + result+=s.mid(i,s.length()-i); + return result; +} +#endif + +//---------------------------------------------------------------------- + +struct FindFileCacheElem +{ + FindFileCacheElem(FileDef *fd,bool ambig) : fileDef(fd), isAmbig(ambig) {} + FileDef *fileDef; + bool isAmbig; +}; + +static QCache<FindFileCacheElem> g_findFileDefCache(5000); + +FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) +{ + ambig=FALSE; + if (n==0) return 0; + + QCString key; + key.sprintf("%p:",fnDict); + key+=n; + + g_findFileDefCache.setAutoDelete(TRUE); + FindFileCacheElem *cachedResult = g_findFileDefCache.find(key); + //printf("key=%s cachedResult=%p\n",key.data(),cachedResult); + if (cachedResult) + { + ambig = cachedResult->isAmbig; + //printf("cached: fileDef=%p\n",cachedResult->fileDef); + return cachedResult->fileDef; + } + else + { + cachedResult = new FindFileCacheElem(0,FALSE); + } + + QCString name=convertToQCString(QDir::cleanDirPath(n)); + QCString path; + int slashPos; + FileName *fn; + if (name.isEmpty()) goto exit; + slashPos=QMAX(name.findRev('/'),name.findRev('\\')); + if (slashPos!=-1) + { + path=name.left(slashPos+1); + name=name.right(name.length()-slashPos-1); + //printf("path=%s name=%s\n",path.data(),name.data()); + } + if (name.isEmpty()) goto exit; + if ((fn=(*fnDict)[name])) + { + //printf("fn->count()=%d\n",fn->count()); + if (fn->count()==1) + { + FileDef *fd = fn->getFirst(); + if (path.isEmpty() || fd->getPath().right(path.length())==path) + { + cachedResult->fileDef = fd; + g_findFileDefCache.insert(key,cachedResult); + //printf("=1 ===> add to cache %p\n",fd); + return fd; + } + } + else // file name alone is ambiguous + { + int count=0; + FileNameIterator fni(*fn); + FileDef *fd; + FileDef *lastMatch=0; + QCString pathStripped = stripFromIncludePath(path); + for (fni.toFirst();(fd=fni.current());++fni) + { + QCString fdStripPath = stripFromIncludePath(fd->getPath()); + if (path.isEmpty() || fdStripPath.right(pathStripped.length())==pathStripped) + { + count++; + lastMatch=fd; + } + } + //printf(">1 ===> add to cache %p\n",fd); + + ambig=(count>1); + cachedResult->isAmbig = ambig; + cachedResult->fileDef = lastMatch; + g_findFileDefCache.insert(key,cachedResult); + return lastMatch; + } + } + else + { + //printf("not found!\n"); + } +exit: + //printf("0 ===> add to cache %p: %s\n",cachedResult,n); + g_findFileDefCache.insert(key,cachedResult); + //delete cachedResult; + return 0; +} + +//---------------------------------------------------------------------- + +QCString showFileDefMatches(const FileNameDict *fnDict,const char *n) +{ + QCString result; + QCString name=n; + QCString path; + int slashPos=QMAX(name.findRev('/'),name.findRev('\\')); + if (slashPos!=-1) + { + path=name.left(slashPos+1); + name=name.right(name.length()-slashPos-1); + } + FileName *fn; + if ((fn=(*fnDict)[name])) + { + FileNameIterator fni(*fn); + FileDef *fd; + for (fni.toFirst();(fd=fni.current());++fni) + { + if (path.isEmpty() || fd->getPath().right(path.length())==path) + { + result+=" "+fd->absFilePath()+"\n"; + } + } + } + return result; +} + +//---------------------------------------------------------------------- + +QCString substituteKeywords(const QCString &s,const char *title) +{ + QCString result = s; + if (title) result = substitute(result,"$title",title); + result = substitute(result,"$datetime",dateToString(TRUE)); + result = substitute(result,"$date",dateToString(FALSE)); + result = substitute(result,"$year",yearToString()); + result = substitute(result,"$doxygenversion",versionString); + result = substitute(result,"$projectname",Config_getString("PROJECT_NAME")); + result = substitute(result,"$projectnumber",Config_getString("PROJECT_NUMBER")); + result = substitute(result,"$projectbrief",Config_getString("PROJECT_BRIEF")); + result = substitute(result,"$projectlogo",Config_getString("PROJECT_LOGO")); + return result; +} + +//---------------------------------------------------------------------- + +/*! Returns the character index within \a name of the first prefix + * in Config_getList("IGNORE_PREFIX") that matches \a name at the left hand side, + * or zero if no match was found + */ +int getPrefixIndex(const QCString &name) +{ + if (name.isEmpty()) return 0; + static QStrList &sl = Config_getList("IGNORE_PREFIX"); + char *s = sl.first(); + while (s) + { + const char *ps=s; + const char *pd=name.data(); + int i=0; + while (*ps!=0 && *pd!=0 && *ps==*pd) ps++,pd++,i++; + if (*ps==0 && *pd!=0) + { + return i; + } + s = sl.next(); + } + return 0; +} + +//---------------------------------------------------------------------------- + +static void initBaseClassHierarchy(BaseClassList *bcl) +{ + if (bcl==0) return; + BaseClassListIterator bcli(*bcl); + for ( ; bcli.current(); ++bcli) + { + ClassDef *cd=bcli.current()->classDef; + if (cd->baseClasses()==0) // no base classes => new root + { + initBaseClassHierarchy(cd->baseClasses()); + } + cd->visited=FALSE; + } +} + +//---------------------------------------------------------------------------- + +void initClassHierarchy(ClassSDict *cl) +{ + ClassSDict::Iterator cli(*cl); + ClassDef *cd; + for ( ; (cd=cli.current()); ++cli) + { + cd->visited=FALSE; + initBaseClassHierarchy(cd->baseClasses()); + } +} + +//---------------------------------------------------------------------------- + +bool hasVisibleRoot(BaseClassList *bcl) +{ + if (bcl) + { + BaseClassListIterator bcli(*bcl); + for ( ; bcli.current(); ++bcli) + { + ClassDef *cd=bcli.current()->classDef; + if (cd->isVisibleInHierarchy()) return TRUE; + hasVisibleRoot(cd->baseClasses()); + } + } + return FALSE; +} + +//---------------------------------------------------------------------- + +// note that this function is not reentrant due to the use of static strBuf! +QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore) +{ + static bool caseSenseNames = Config_getBool("CASE_SENSE_NAMES"); + static StrBuf strBuf; + strBuf.clear(); + char c; + const char *p=name; + while ((c=*p++)!=0) + { + switch(c) + { + case '_': if (allowUnderscore) strBuf.addChar('_'); else strBuf.addStr("__"); break; + case '-': strBuf.addChar('-'); break; + case ':': strBuf.addStr("_1"); break; + case '/': strBuf.addStr("_2"); break; + case '<': strBuf.addStr("_3"); break; + case '>': strBuf.addStr("_4"); break; + case '*': strBuf.addStr("_5"); break; + case '&': strBuf.addStr("_6"); break; + case '|': strBuf.addStr("_7"); break; + case '.': if (allowDots) strBuf.addChar('.'); else strBuf.addStr("_8"); break; + case '!': strBuf.addStr("_9"); break; + case ',': strBuf.addStr("_00"); break; + case ' ': strBuf.addStr("_01"); break; + case '{': strBuf.addStr("_02"); break; + case '}': strBuf.addStr("_03"); break; + case '?': strBuf.addStr("_04"); break; + case '^': strBuf.addStr("_05"); break; + case '%': strBuf.addStr("_06"); break; + case '(': strBuf.addStr("_07"); break; + case ')': strBuf.addStr("_08"); break; + case '+': strBuf.addStr("_09"); break; + case '=': strBuf.addStr("_0A"); break; + default: + if (c<0) + { + static char map[] = "0123456789ABCDEF"; + char ids[5]; + unsigned char id = (unsigned char)c; + ids[0]='_'; + ids[1]='x'; + ids[2]=map[id>>4]; + ids[3]=map[id&0xF]; + ids[4]=0; + strBuf.addStr(ids); + } + else if (caseSenseNames || !isupper(c)) + { + strBuf.addChar(c); + } + else + { + strBuf.addChar('_'); + strBuf.addChar(tolower(c)); + } + break; + } + } + strBuf.addChar(0); + return strBuf.get(); +} + +/*! This function determines the file name on disk of an item + * given its name, which could be a class name with template + * arguments, so special characters need to be escaped. + */ +QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore) +{ + static bool shortNames = Config_getBool("SHORT_NAMES"); + static bool createSubdirs = Config_getBool("CREATE_SUBDIRS"); + QCString result; + if (shortNames) // use short names only + { + static QDict<int> usedNames(10007); + usedNames.setAutoDelete(TRUE); + static int count=1; + + int *value=usedNames.find(name); + int num; + if (value==0) + { + usedNames.insert(name,new int(count)); + num = count++; + } + else + { + num = *value; + } + result.sprintf("a%05d",num); + } + else // long names + { + result=escapeCharsInString(name,allowDots,allowUnderscore); + int resultLen = result.length(); + if (resultLen>=128) // prevent names that cannot be created! + { + // third algorithm based on MD5 hash + uchar md5_sig[16]; + QCString sigStr(33); + MD5Buffer((const unsigned char *)result.data(),resultLen,md5_sig); + MD5SigToString(md5_sig,sigStr.data(),33); + result=result.left(128-32)+sigStr; + } + } + if (createSubdirs) + { + int l1Dir=0,l2Dir=0; + +#if MAP_ALGO==ALGO_COUNT + // old algorithm, has the problem that after regeneration the + // output can be located in a different dir. + if (Doxygen::htmlDirMap==0) + { + Doxygen::htmlDirMap=new QDict<int>(100003); + Doxygen::htmlDirMap->setAutoDelete(TRUE); + } + static int curDirNum=0; + int *dirNum = Doxygen::htmlDirMap->find(result); + if (dirNum==0) // new name + { + Doxygen::htmlDirMap->insert(result,new int(curDirNum)); + l1Dir = (curDirNum)&0xf; // bits 0-3 + l2Dir = (curDirNum>>4)&0xff; // bits 4-11 + curDirNum++; + } + else // existing name + { + l1Dir = (*dirNum)&0xf; // bits 0-3 + l2Dir = ((*dirNum)>>4)&0xff; // bits 4-11 + } +#elif MAP_ALGO==ALGO_CRC16 + // second algorithm based on CRC-16 checksum + int dirNum = qChecksum(result,result.length()); + l1Dir = dirNum&0xf; + l2Dir = (dirNum>>4)&0xff; +#elif MAP_ALGO==ALGO_MD5 + // third algorithm based on MD5 hash + uchar md5_sig[16]; + MD5Buffer((const unsigned char *)result.data(),result.length(),md5_sig); + l1Dir = md5_sig[14]&0xf; + l2Dir = md5_sig[15]; +#endif + result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir)); + } + //printf("*** convertNameToFile(%s)->%s\n",name,result.data()); + return result; +} + +QCString relativePathToRoot(const char *name) +{ + QCString result; + if (Config_getBool("CREATE_SUBDIRS")) + { + if (name==0) + { + return REL_PATH_TO_ROOT; + } + else + { + QCString n = name; + int i = n.findRev('/'); + if (i!=-1) + { + result=REL_PATH_TO_ROOT; + } + } + } + return result; +} + +void createSubDirs(QDir &d) +{ + if (Config_getBool("CREATE_SUBDIRS")) + { + // create 4096 subdirectories + int l1,l2; + for (l1=0;l1<16;l1++) + { + d.mkdir(QString().sprintf("d%x",l1)); + for (l2=0;l2<256;l2++) + { + d.mkdir(QString().sprintf("d%x/d%02x",l1,l2)); + } + } + } +} + +/*! Input is a scopeName, output is the scopename split into a + * namespace part (as large as possible) and a classname part. + */ +void extractNamespaceName(const QCString &scopeName, + QCString &className,QCString &namespaceName, + bool allowEmptyClass) +{ + int i,p; + QCString clName=scopeName; + NamespaceDef *nd = 0; + if (!clName.isEmpty() && (nd=getResolvedNamespace(clName)) && getClass(clName)==0) + { // the whole name is a namespace (and not a class) + namespaceName=nd->name().copy(); + className.resize(0); + goto done; + } + p=clName.length()-2; + while (p>=0 && (i=clName.findRev("::",p))!=-1) + // see if the first part is a namespace (and not a class) + { + //printf("Trying %s\n",clName.left(i).data()); + if (i>0 && (nd=getResolvedNamespace(clName.left(i))) && getClass(clName.left(i))==0) + { + //printf("found!\n"); + namespaceName=nd->name().copy(); + className=clName.right(clName.length()-i-2); + goto done; + } + p=i-2; // try a smaller piece of the scope + } + //printf("not found!\n"); + + // not found, so we just have to guess. + className=scopeName.copy(); + namespaceName.resize(0); + +done: + if (className.isEmpty() && !namespaceName.isEmpty() && !allowEmptyClass) + { + // class and namespace with the same name, correct to return the class. + className=namespaceName.copy(); + namespaceName.resize(0); + } + //printf("extractNamespace `%s' => `%s|%s'\n",scopeName.data(), + // className.data(),namespaceName.data()); + return; +} + +QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ) +{ + QCString result=scope.copy(); + if (!templ.isEmpty() && scope.find('<')==-1) + { + int si,pi=0; + ClassDef *cd=0; + while ( + (si=scope.find("::",pi))!=-1 && !getClass(scope.left(si)+templ) && + ((cd=getClass(scope.left(si)))==0 || cd->templateArguments()==0) + ) + { + //printf("Tried `%s'\n",(scope.left(si)+templ).data()); + pi=si+2; + } + if (si==-1) // not nested => append template specifier + { + result+=templ; + } + else // nested => insert template specifier before after first class name + { + result=scope.left(si) + templ + scope.right(scope.length()-si); + } + } + //printf("insertTemplateSpecifierInScope(`%s',`%s')=%s\n", + // scope.data(),templ.data(),result.data()); + return result; +} + +#if 0 // original version +/*! Strips the scope from a name. Examples: A::B will return A + * and A<T>::B<N::C<D> > will return A<T>. + */ +QCString stripScope(const char *name) +{ + QCString result = name; + int l=result.length(); + int p=l-1; + bool done; + int count; + + while (p>=0) + { + char c=result.at(p); + switch (c) + { + case ':': + //printf("stripScope(%s)=%s\n",name,result.right(l-p-1).data()); + return result.right(l-p-1); + case '>': + count=1; + done=FALSE; + //printf("pos < = %d\n",p); + p--; + while (p>=0 && !done) + { + c=result.at(p--); + switch (c) + { + case '>': count++; break; + case '<': count--; if (count<=0) done=TRUE; break; + default: + //printf("c=%c count=%d\n",c,count); + break; + } + } + //printf("pos > = %d\n",p+1); + break; + default: + p--; + } + } + //printf("stripScope(%s)=%s\n",name,name); + return name; +} +#endif + +// new version by Davide Cesari which also works for Fortran +QCString stripScope(const char *name) +{ + QCString result = name; + int l=result.length(); + int p; + bool done = FALSE; + bool skipBracket=FALSE; // if brackets do not match properly, ignore them altogether + int count=0; + + do + { + p=l-1; // start at the end of the string + while (p>=0 && count>=0) + { + char c=result.at(p); + switch (c) + { + case ':': + //printf("stripScope(%s)=%s\n",name,result.right(l-p-1).data()); + return result.right(l-p-1); + case '>': + if (skipBracket) // we don't care about brackets + { + p--; + } + else // count open/close brackets + { + if (p>0 && result.at(p-1)=='>') // skip >> operator + { + p-=2; + break; + } + count=1; + //printf("pos < = %d\n",p); + p--; + bool foundMatch=false; + while (p>=0 && !foundMatch) + { + c=result.at(p--); + switch (c) + { + case '>': + count++; + break; + case '<': + if (p>0) + { + if (result.at(p-1) == '<') // skip << operator + { + p--; + break; + } + } + count--; + foundMatch = count==0; + break; + default: + //printf("c=%c count=%d\n",c,count); + break; + } + } + } + //printf("pos > = %d\n",p+1); + break; + default: + p--; + } + } + done = count==0 || skipBracket; // reparse if brackets do not match + skipBracket=TRUE; + } + while (!done); // if < > unbalanced repeat ignoring them + //printf("stripScope(%s)=%s\n",name,name); + return name; +} + + +/*! Converts a string to an XML-encoded string */ +QCString convertToXML(const char *s) +{ + static StrBuf strBuf; + strBuf.clear(); + if (s==0) return ""; + const char *p=s; + char c; + while ((c=*p++)) + { + switch (c) + { + case '<': strBuf.addStr("<"); break; + case '>': strBuf.addStr(">"); break; + case '&': strBuf.addStr("&"); break; + case '\'': strBuf.addStr("'"); break; + case '"': strBuf.addStr("""); break; + default: strBuf.addChar(c); break; + } + } + strBuf.addChar(0); + return strBuf.get(); +} + +/*! Converts a string to a HTML-encoded string */ +QCString convertToHtml(const char *s,bool keepEntities) +{ + static StrBuf strBuf; + strBuf.clear(); + if (s==0) return ""; + const char *p=s; + char c; + while ((c=*p++)) + { + switch (c) + { + case '<': strBuf.addStr("<"); break; + case '>': strBuf.addStr(">"); break; + case '&': if (keepEntities) + { + const char *e=p; + char ce; + while ((ce=*e++)) + { + if (ce==';' || (!(isId(ce) || ce=='#'))) break; + } + if (ce==';') // found end of an entity + { + // copy entry verbatim + strBuf.addChar(c); + while (p<e) strBuf.addChar(*p++); + } + else + { + strBuf.addStr("&"); + } + } + else + { + strBuf.addStr("&"); + } + break; + case '\'': strBuf.addStr("'"); break; + case '"': strBuf.addStr("""); break; + default: strBuf.addChar(c); break; + } + } + strBuf.addChar(0); + return strBuf.get(); +} + +QCString convertToJSString(const char *s) +{ + static StrBuf strBuf; + strBuf.clear(); + if (s==0) return ""; + const char *p=s; + char c; + while ((c=*p++)) + { + switch (c) + { + case '"': strBuf.addStr("\\\""); break; + default: strBuf.addChar(c); break; + } + } + strBuf.addChar(0); + return strBuf.get(); +} + + +QCString convertCharEntitiesToUTF8(const QCString &s) +{ + static QDict<char> entityMap(67); + static bool init=TRUE; + QCString result; + static QRegExp entityPat("&[a-zA-Z]+;"); + + if (init) + { + entityMap.insert("copy", "\xC2\xA9"); + entityMap.insert("tm", "\xE2\x84\xA2"); + entityMap.insert("trade", "\xE2\x84\xA2"); + entityMap.insert("reg", "\xC2\xAE"); + entityMap.insert("lsquo", "\xE2\x80\x98"); + entityMap.insert("rsquo", "\xE2\x80\x99"); + entityMap.insert("ldquo", "\xE2\x80\x9C"); + entityMap.insert("rdquo", "\xE2\x80\x9D"); + entityMap.insert("ndash", "\xE2\x80\x93"); + entityMap.insert("mdash", "\xE2\x80\x94"); + entityMap.insert("Auml", "\xC3\x84"); + entityMap.insert("Euml", "\xC3\x8B"); + entityMap.insert("Iuml", "\xC3\x8F"); + entityMap.insert("Ouml", "\xC3\x96"); + entityMap.insert("Uuml", "\xC3\x9C"); + entityMap.insert("Yuml", "\xC5\xB8"); + entityMap.insert("auml", "\xC3\xA4"); + entityMap.insert("euml", "\xC3\xAB"); + entityMap.insert("iuml", "\xC3\xAF"); + entityMap.insert("ouml", "\xC3\xB6"); + entityMap.insert("uuml", "\xC3\xBC"); + entityMap.insert("yuml", "\xC3\xBF"); + entityMap.insert("Aacute","\xC3\x81"); + entityMap.insert("Eacute","\xC3\x89"); + entityMap.insert("Iacute","\xC3\x8D"); + entityMap.insert("Oacute","\xC3\x93"); + entityMap.insert("Uacute","\xC3\x9A"); + entityMap.insert("aacute","\xC3\xA1"); + entityMap.insert("eacute","\xC3\xA9"); + entityMap.insert("iacute","\xC3\xAD"); + entityMap.insert("oacute","\xC3\xB3"); + entityMap.insert("uacute","\xC3\xBA"); + entityMap.insert("Agrave","\xC3\x80"); + entityMap.insert("Egrave","\xC3\x88"); + entityMap.insert("Igrave","\xC3\x8C"); + entityMap.insert("Ograve","\xC3\x92"); + entityMap.insert("Ugrave","\xC3\x99"); + entityMap.insert("agrave","\xC3\xA0"); + entityMap.insert("egrave","\xC3\xA8"); + entityMap.insert("igrave","\xC3\xAC"); + entityMap.insert("ograve","\xC3\xB2"); + entityMap.insert("ugrave","\xC3\xB9"); + entityMap.insert("Acirc", "\xC3\x82"); + entityMap.insert("Ecirc", "\xC3\x8A"); + entityMap.insert("Icirc", "\xC3\x8E"); + entityMap.insert("Ocirc", "\xC3\x94"); + entityMap.insert("Ucirc", "\xC3\x9B"); + entityMap.insert("acirc", "\xC3\xA2"); + entityMap.insert("ecirc", "\xC3\xAA"); + entityMap.insert("icirc", "\xC3\xAE"); + entityMap.insert("ocirc", "\xC3\xB4"); + entityMap.insert("ucirc", "\xC3\xBB"); + entityMap.insert("Atilde","\xC3\x83"); + entityMap.insert("Ntilde","\xC3\x91"); + entityMap.insert("Otilde","\xC3\x95"); + entityMap.insert("atilde","\xC3\xA3"); + entityMap.insert("ntilde","\xC3\xB1"); + entityMap.insert("otilde","\xC3\xB5"); + entityMap.insert("szlig", "\xC3\x9F"); + entityMap.insert("Ccedil","\xC3\x87"); + entityMap.insert("ccedil","\xC3\xA7"); + entityMap.insert("Aring", "\xC3\x85"); + entityMap.insert("aring", "\xC3\xA5"); + entityMap.insert("nbsp", "\xC2\xA0"); + init=FALSE; + } + + if (s==0) return result; + int p,i=0,l; + while ((p=entityPat.match(s,i,&l))!=-1) + { + if (p>i) result+=s.mid(i,p-i); + QCString entity = s.mid(p+1,l-2); + char *code = entityMap.find(entity); + if (code) + { + result+=code; + } + else + { + result+=s.mid(p,l); + } + i=p+l; + } + result+=s.mid(i,s.length()-i); + return result; +} + +/*! Returns the standard string that is generated when the \\overload + * command is used. + */ +QCString getOverloadDocs() +{ + return theTranslator->trOverloadText(); + //"This is an overloaded member function, " + // "provided for convenience. It differs from the above " + // "function only in what argument(s) it accepts."; +} + +void addMembersToMemberGroup(MemberList *ml, + MemberGroupSDict **ppMemberGroupSDict, + Definition *context) +{ + ASSERT(context!=0); + //printf("addMemberToMemberGroup()\n"); + if (ml==0) return; + MemberListIterator mli(*ml); + MemberDef *md; + uint index; + for (index=0;(md=mli.current());) + { + if (md->isEnumerate()) // insert enum value of this enum into groups + { + LockingPtr<MemberList> fmdl=md->enumFieldList(); + if (fmdl!=0) + { + MemberDef *fmd=fmdl->first(); + while (fmd) + { + int groupId=fmd->getMemberGroupId(); + if (groupId!=-1) + { + MemberGroupInfo *info = Doxygen::memGrpInfoDict[groupId]; + //QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId]; + //QCString *pDocs = Doxygen::memberDocDict[groupId]; + if (info) + { + if (*ppMemberGroupSDict==0) + { + *ppMemberGroupSDict = new MemberGroupSDict; + (*ppMemberGroupSDict)->setAutoDelete(TRUE); + } + MemberGroup *mg = (*ppMemberGroupSDict)->find(groupId); + if (mg==0) + { + mg = new MemberGroup( + context, + groupId, + info->header, + info->doc, + info->docFile + ); + (*ppMemberGroupSDict)->append(groupId,mg); + } + mg->insertMember(fmd); // insert in member group + fmd->setMemberGroup(mg); + } + } + fmd=fmdl->next(); + } + } + } + int groupId=md->getMemberGroupId(); + if (groupId!=-1) + { + MemberGroupInfo *info = Doxygen::memGrpInfoDict[groupId]; + //QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId]; + //QCString *pDocs = Doxygen::memberDocDict[groupId]; + if (info) + { + if (*ppMemberGroupSDict==0) + { + *ppMemberGroupSDict = new MemberGroupSDict; + (*ppMemberGroupSDict)->setAutoDelete(TRUE); + } + MemberGroup *mg = (*ppMemberGroupSDict)->find(groupId); + if (mg==0) + { + mg = new MemberGroup( + context, + groupId, + info->header, + info->doc, + info->docFile + ); + (*ppMemberGroupSDict)->append(groupId,mg); + } + md = ml->take(index); // remove from member list + mg->insertMember(md); // insert in member group + mg->setRefItems(info->m_sli); + md->setMemberGroup(mg); + continue; + } + } + ++mli;++index; + } +} + +/*! Extracts a (sub-)string from \a type starting at \a pos that + * could form a class. The index of the match is returned and the found + * class \a name and a template argument list \a templSpec. If -1 is returned + * there are no more matches. + */ +int extractClassNameFromType(const QCString &type,int &pos,QCString &name,QCString &templSpec) +{ + static const QRegExp re("[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9:\\x80-\\xFF]*"); + name.resize(0); + templSpec.resize(0); + int i,l; + int typeLen=type.length(); + if (typeLen>0) + { + if ((i=re.match(type,pos,&l))!=-1) // for each class name in the type + { + int ts=i+l; + int te=ts; + int tl=0; + while (type.at(ts)==' ' && ts<typeLen) ts++,tl++; // skip any whitespace + if (type.at(ts)=='<') // assume template instance + { + // locate end of template + te=ts+1; + int brCount=1; + while (te<typeLen && brCount!=0) + { + if (type.at(te)=='<') + { + if (te<typeLen-1 && type.at(te+1)=='<') te++; else brCount++; + } + if (type.at(te)=='>') + { + if (te<typeLen-1 && type.at(te+1)=='>') te++; else brCount--; + } + te++; + } + } + name = type.mid(i,l); + if (te>ts) + { + templSpec = type.mid(ts,te-ts),tl+=te-ts; + pos=i+l+tl; + } + else // no template part + { + pos=i+l; + } + //printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=TRUE\n", + // type.data(),pos,name.data(),templSpec.data()); + return i; + } + } + pos = typeLen; + //printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=FALSE\n", + // type.data(),pos,name.data(),templSpec.data()); + return -1; +} + +/*! Substitutes any occurrence of a formal argument from argument list + * \a formalArgs in \a name by the corresponding actual argument in + * argument list \a actualArgs. The result after substitution + * is returned as a string. The argument \a name is used to + * prevent recursive substitution. + */ +QCString substituteTemplateArgumentsInString( + const QCString &name, + ArgumentList *formalArgs, + ArgumentList *actualArgs) +{ + //printf("substituteTemplateArgumentsInString(name=%s formal=%s actualArg=%s)\n", + // name.data(),argListToString(formalArgs).data(),argListToString(actualArgs).data()); + if (formalArgs==0) return name; + QCString result; + static QRegExp re("[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9\\x80-\\xFF]*"); + int p=0,l,i; + // for each identifier in the base class name (e.g. B<T> -> B and T) + while ((i=re.match(name,p,&l))!=-1) + { + result += name.mid(p,i-p); + QCString n = name.mid(i,l); + ArgumentListIterator formAli(*formalArgs); + Argument *formArg; + Argument *actArg=actualArgs->first(); + + // if n is a template argument, then we substitute it + // for its template instance argument. + bool found=FALSE; + for (formAli.toFirst(); + (formArg=formAli.current()) && !found; + ++formAli,actArg=actualArgs->next() + ) + { + if (formArg->type.left(6)=="class " && formArg->name.isEmpty()) + { + formArg->name = formArg->type.mid(6); + formArg->type = "class"; + } + if (formArg->type.left(9)=="typename " && formArg->name.isEmpty()) + { + formArg->name = formArg->type.mid(9); + formArg->type = "typename"; + } + if (formArg->type=="class" || formArg->type=="typename" || formArg->type.left(8)=="template") + { + //printf("n=%s formArg->type='%s' formArg->name='%s' formArg->defval='%s'\n", + // n.data(),formArg->type.data(),formArg->name.data(),formArg->defval.data()); + //printf(">> formArg->name='%s' actArg->type='%s' actArg->name='%s'\n", + // formArg->name.data(),actArg->type.data(),actArg->name.data() + // ); + if (formArg->name==n && actArg && !actArg->type.isEmpty()) // base class is a template argument + { + // replace formal argument with the actual argument of the instance + if (!leftScopeMatch(actArg->type,n)) + // the scope guard is to prevent recursive lockup for + // template<class A> class C : public<A::T>, + // where A::T would become A::T::T here, + // since n==A and actArg->type==A::T + // see bug595833 for an example + { + if (actArg->name.isEmpty()) + { + result += actArg->type+" "; + found=TRUE; + } + else + // for case where the actual arg is something like "unsigned int" + // the "int" part is in actArg->name. + { + result += actArg->type+" "+actArg->name+" "; + found=TRUE; + } + } + } + else if (formArg->name==n && + actArg==0 && + !formArg->defval.isEmpty() && + formArg->defval!=name /* to prevent recursion */ + ) + { + result += substituteTemplateArgumentsInString(formArg->defval,formalArgs,actualArgs)+" "; + found=TRUE; + } + } + else if (formArg->name==n && + actArg==0 && + !formArg->defval.isEmpty() && + formArg->defval!=name /* to prevent recursion */ + ) + { + result += substituteTemplateArgumentsInString(formArg->defval,formalArgs,actualArgs)+" "; + found=TRUE; + } + } + if (!found) result += n; + p=i+l; + } + result+=name.right(name.length()-p); + //printf(" Inheritance relation %s -> %s\n", + // name.data(),result.data()); + return result.stripWhiteSpace(); +} + + +/*! Makes a deep copy of argument list \a src. Will allocate memory, that + * is owned by the caller. + */ +ArgumentList *copyArgumentList(const ArgumentList *src) +{ + ASSERT(src!=0); + ArgumentList *dst = new ArgumentList; + dst->setAutoDelete(TRUE); + ArgumentListIterator tali(*src); + Argument *a; + for (;(a=tali.current());++tali) + { + dst->append(new Argument(*a)); + } + dst->constSpecifier = src->constSpecifier; + dst->volatileSpecifier = src->volatileSpecifier; + dst->pureSpecifier = src->pureSpecifier; + return dst; +} + +/*! Makes a deep copy of the list of argument lists \a srcLists. + * Will allocate memory, that is owned by the caller. + */ +QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists) +{ + ASSERT(srcLists!=0); + QList<ArgumentList> *dstLists = new QList<ArgumentList>; + dstLists->setAutoDelete(TRUE); + QListIterator<ArgumentList> sli(*srcLists); + ArgumentList *sl; + for (;(sl=sli.current());++sli) + { + dstLists->append(copyArgumentList(sl)); + } + return dstLists; +} + +/*! Strips template specifiers from scope \a fullName, except those + * that make up specialized classes. The switch \a parentOnly + * determines whether or not a template "at the end" of a scope + * should be considered, e.g. with \a parentOnly is \c TRUE, A<T>::B<S> will + * try to strip \<T\> and not \<S\>, while \a parentOnly is \c FALSE will + * strip both unless A<T> or B<S> are specialized template classes. + */ +QCString stripTemplateSpecifiersFromScope(const QCString &fullName, + bool parentOnly, + QCString *pLastScopeStripped) +{ + QCString result; + int p=0; + int l=fullName.length(); + int i=fullName.find('<'); + while (i!=-1) + { + //printf("1:result+=%s\n",fullName.mid(p,i-p).data()); + int e=i+1; + bool done=FALSE; + int count=1; + while (e<l && !done) + { + char c=fullName.at(e++); + if (c=='<') + { + count++; + } + else if (c=='>') + { + count--; + done = count==0; + } + } + int si= fullName.find("::",e); + + if (parentOnly && si==-1) break; + // we only do the parent scope, so we stop here if needed + + result+=fullName.mid(p,i-p); + //printf(" trying %s\n",(result+fullName.mid(i,e-i)).data()); + if (getClass(result+fullName.mid(i,e-i))!=0) + { + result+=fullName.mid(i,e-i); + //printf(" 2:result+=%s cd=%s\n",fullName.mid(i,e-i-1).data(),cd->name().data()); + } + else if (pLastScopeStripped) + { + //printf(" last stripped scope '%s'\n",fullName.mid(i,e-i).data()); + *pLastScopeStripped=fullName.mid(i,e-i); + } + p=e; + i=fullName.find('<',p); + } + result+=fullName.right(l-p); + //printf("3:result+=%s\n",fullName.right(l-p).data()); + return result; +} + +/*! Merges two scope parts together. The parts may (partially) overlap. + * Example1: \c A::B and \c B::C will result in \c A::B::C <br> + * Example2: \c A and \c B will be \c A::B <br> + * Example3: \c A::B and B will be \c A::B + * + * @param leftScope the left hand part of the scope. + * @param rightScope the right hand part of the scope. + * @returns the merged scope. + */ +QCString mergeScopes(const QCString &leftScope,const QCString &rightScope) +{ + // case leftScope=="A" rightScope=="A::B" => result = "A::B" + if (leftScopeMatch(rightScope,leftScope)) return rightScope; + QCString result; + int i=0,p=leftScope.length(); + + // case leftScope=="A::B" rightScope=="B::C" => result = "A::B::C" + // case leftScope=="A::B" rightScope=="B" => result = "A::B" + bool found=FALSE; + while ((i=leftScope.findRev("::",p))!=-1) + { + if (leftScopeMatch(rightScope,leftScope.right(leftScope.length()-i-2))) + { + result = leftScope.left(i+2)+rightScope; + found=TRUE; + } + p=i-1; + } + if (found) return result; + + // case leftScope=="A" rightScope=="B" => result = "A::B" + result=leftScope.copy(); + if (!result.isEmpty() && !rightScope.isEmpty()) result+="::"; + result+=rightScope; + return result; +} + +/*! Returns a fragment from scope \a s, starting at position \a p. + * + * @param s the scope name as a string. + * @param p the start position (0 is the first). + * @param l the resulting length of the fragment. + * @returns the location of the fragment, or -1 if non is found. + */ +int getScopeFragment(const QCString &s,int p,int *l) +{ + int sl=s.length(); + int sp=p; + int count=0; + bool done; + if (sp>=sl) return -1; + while (sp<sl) + { + char c=s.at(sp); + if (c==':') sp++,p++; else break; + } + while (sp<sl) + { + char c=s.at(sp); + switch (c) + { + case ':': // found next part + goto found; + case '<': // skip template specifier + count=1;sp++; + done=FALSE; + while (sp<sl && !done) + { + // TODO: deal with << and >> operators! + char c=s.at(sp++); + switch(c) + { + case '<': count++; break; + case '>': count--; if (count==0) done=TRUE; break; + default: break; + } + } + break; + default: + sp++; + break; + } + } +found: + *l=sp-p; + //printf("getScopeFragment(%s,%d)=%s\n",s.data(),p,s.mid(p,*l).data()); + return p; +} + +//---------------------------------------------------------------------------- + +PageDef *addRelatedPage(const char *name,const QCString &ptitle, + const QCString &doc, + QList<SectionInfo> * /*anchors*/, + const char *fileName,int startLine, + const QList<ListItemInfo> *sli, + GroupDef *gd, + TagInfo *tagInfo + ) +{ + PageDef *pd=0; + //printf("addRelatedPage(name=%s gd=%p)\n",name,gd); + if ((pd=Doxygen::pageSDict->find(name)) && !tagInfo) + { + // append documentation block to the page. + pd->setDocumentation(doc,fileName,startLine); + //printf("Adding page docs `%s' pi=%p name=%s\n",doc.data(),pi,name); + } + else // new page + { + QCString baseName=name; + if (baseName.right(4)==".tex") + baseName=baseName.left(baseName.length()-4); + else if (baseName.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension) + baseName=baseName.left(baseName.length()-Doxygen::htmlFileExtension.length()); + + QCString title=ptitle.stripWhiteSpace(); + pd=new PageDef(fileName,startLine,baseName,doc,title); + + pd->setRefItems(sli); + + if (tagInfo) + { + pd->setReference(tagInfo->tagName); + } + + pd->setFileName(convertNameToFile(pd->name(),FALSE,TRUE)); + + //printf("Appending page `%s'\n",baseName.data()); + Doxygen::pageSDict->append(baseName,pd); + + if (gd) gd->addPage(pd); + + if (!pd->title().isEmpty()) + { + //outputList->writeTitle(pi->name,pi->title); + + // a page name is a label as well! + QCString file; + if (gd) + { + file=gd->getOutputFileBase(); + } + else + { + file=pd->getOutputFileBase(); + } + SectionInfo *si=new SectionInfo( + file,pd->name(),pd->title(),SectionInfo::Page,pd->getReference()); + //printf("si->label=`%s' si->definition=%s si->fileName=`%s'\n", + // si->label.data(),si->definition?si->definition->name().data():"<none>", + // si->fileName.data()); + //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data()); + //printf("Adding section key=%s si->fileName=%s\n",pageName.data(),si->fileName.data()); + Doxygen::sectionDict.insert(pd->name(),si); + } + } + return pd; +} + +//---------------------------------------------------------------------------- + +void addRefItem(const QList<ListItemInfo> *sli, + const char *key, + const char *prefix, const char *name,const char *title,const char *args) +{ + //printf("addRefItem(sli=%p,key=%s,prefix=%s,name=%s,title=%s,args=%s)\n",sli,key,prefix,name,title,args); + if (sli) + { + QListIterator<ListItemInfo> slii(*sli); + ListItemInfo *lii; + for (slii.toFirst();(lii=slii.current());++slii) + { + RefList *refList = Doxygen::xrefLists->find(lii->type); + if (refList + && + ( + // either not a built-in list or the list is enabled + (lii->type!="todo" || Config_getBool("GENERATE_TODOLIST")) && + (lii->type!="test" || Config_getBool("GENERATE_TESTLIST")) && + (lii->type!="bug" || Config_getBool("GENERATE_BUGLIST")) && + (lii->type!="deprecated" || Config_getBool("GENERATE_DEPRECATEDLIST")) + ) + ) + { + RefItem *item = refList->getRefItem(lii->itemId); + ASSERT(item!=0); + + item->prefix = prefix; + item->name = name; + item->title = title; + item->args = args; + + refList->insertIntoList(key,item); + + } + } + } +} + +void addGroupListToTitle(OutputList &ol,Definition *d) +{ + LockingPtr<GroupList> groups = d->partOfGroups(); + if (groups!=0) // write list of group to which this definition belongs + { + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + ol.writeString("<div class=\"ingroups\">"); + GroupListIterator gli(*groups); + GroupDef *gd; + bool first=TRUE; + for (gli.toFirst();(gd=gli.current());++gli) + { + if (!first) { ol.writeString(" | "); } else first=FALSE; + ol.writeObjectLink(gd->getReference(), + gd->getOutputFileBase(),0,gd->groupTitle()); + } + ol.writeString("</div>"); + ol.popGeneratorState(); + } +} + +void filterLatexString(FTextStream &t,const char *str, + bool insideTabbing,bool insidePre,bool insideItem) +{ + if (str==0) return; + const unsigned char *p=(const unsigned char *)str; + unsigned char c; + unsigned char pc='\0'; + while (*p) + { + c=*p++; + + if (insidePre) + { + switch(c) + { + case '\\': t << "\\(\\backslash\\)"; break; + case '{': t << "\\{"; break; + case '}': t << "\\}"; break; + case '_': t << "\\_"; break; + default: + t << (char)c; + } + } + else + { + switch(c) + { + case '#': t << "\\#"; break; + case '$': t << "\\$"; break; + case '%': t << "\\%"; break; + case '^': t << "$^\\wedge$"; break; + case '&': t << "\\&"; break; + case '*': t << "$\\ast$"; break; + case '_': t << "\\_"; + if (!insideTabbing) t << "\\-"; + break; + case '{': t << "\\{"; break; + case '}': t << "\\}"; break; + case '<': t << "$<$"; break; + case '>': t << "$>$"; break; + case '|': t << "$|$"; break; + case '~': t << "$\\sim$"; break; + case '[': if (Config_getBool("PDF_HYPERLINKS") || insideItem) + t << "\\mbox{[}"; + else + t << "["; + break; + case ']': if (pc=='[') t << "$\\,$"; + if (Config_getBool("PDF_HYPERLINKS") || insideItem) + t << "\\mbox{]}"; + else + t << "]"; + break; + case '-': t << "-\\/"; + break; + case '\\': if (*p=='<') + { t << "$<$"; p++; } + else if (*p=='>') + { t << "$>$"; p++; } + else + { t << "$\\backslash$"; } + break; + case '"': { t << "\\char`\\\"{}"; } + break; + + default: + t << (char)c; + } + } + pc = c; + } +} + + +QCString rtfFormatBmkStr(const char *name) +{ + static QCString g_nextTag( "AAAAAAAAAA" ); + static QDict<QCString> g_tagDict( 5003 ); + + g_tagDict.setAutoDelete(TRUE); + + // To overcome the 40-character tag limitation, we + // substitute a short arbitrary string for the name + // supplied, and keep track of the correspondence + // between names and strings. + QCString key( name ); + QCString* tag = g_tagDict.find( key ); + if ( !tag ) + { + // This particular name has not yet been added + // to the list. Add it, associating it with the + // next tag value, and increment the next tag. + tag = new QCString( g_nextTag.copy() ); // Make sure to use a deep copy! + g_tagDict.insert( key, tag ); + + // This is the increment part + char* nxtTag = g_nextTag.data() + g_nextTag.length() - 1; + for ( unsigned int i = 0; i < g_nextTag.length(); ++i, --nxtTag ) + { + if ( ( ++(*nxtTag) ) > 'Z' ) + { + *nxtTag = 'A'; + } + else + { + // Since there was no carry, we can stop now + break; + } + } + } + + return *tag; +} + +QCString stripExtension(const char *fName) +{ + QCString result=fName; + if (result.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension) + { + result=result.left(result.length()-Doxygen::htmlFileExtension.length()); + } + return result; +} + + +void replaceNamespaceAliases(QCString &scope,int i) +{ + while (i>0) + { + QCString ns = scope.left(i); + QCString *s = Doxygen::namespaceAliasDict[ns]; + if (s) + { + scope=*s+scope.right(scope.length()-i); + i=s->length(); + } + if (i>0 && ns==scope.left(i)) break; + } +} + +QCString stripPath(const char *s) +{ + QCString result=s; + int i=result.findRev('/'); + if (i!=-1) + { + result=result.mid(i+1); + } + return result; +} + +/** returns \c TRUE iff string \a s contains word \a w */ +bool containsWord(const QCString &s,const QCString &word) +{ + static QRegExp wordExp("[a-z_A-Z\\x80-\\xFF]+"); + int p=0,i,l; + while ((i=wordExp.match(s,p,&l))!=-1) + { + if (s.mid(i,l)==word) return TRUE; + p=i+l; + } + return FALSE; +} + +bool findAndRemoveWord(QCString &s,const QCString &word) +{ + static QRegExp wordExp("[a-z_A-Z\\x80-\\xFF]+"); + int p=0,i,l; + while ((i=wordExp.match(s,p,&l))!=-1) + { + if (s.mid(i,l)==word) + { + if (i>0 && isspace((uchar)s.at(i-1))) + i--,l++; + else if (i+l<(int)s.length() && isspace(s.at(i+l))) + l++; + s = s.left(i)+s.mid(i+l); // remove word + spacing + return TRUE; + } + p=i+l; + } + return FALSE; +} + +/** Special version of QCString::stripWhiteSpace() that only strips + * empty lines. + */ +QCString stripLeadingAndTrailingEmptyLines(const QCString &s) +{ + const char *p = s.data(); + if (p==0) return 0; + + // search for leading empty lines + int i=0,li=-1,l=s.length(); + char c; + while ((c=*p++)) + { + if (c==' ' || c=='\t' || c=='\r') i++; + else if (c=='\n') i++,li=i; + else break; + } + + // search for trailing empty lines + int b=l-1,bi=-1; + p=s.data()+b; + while (b>=0) + { + c=*p; p--; + if (c==' ' || c=='\t' || c=='\r') b--; + else if (c=='\n') bi=b,b--; + else break; + } + + // return whole string if no leading or trailing lines where found + if (li==-1 && bi==-1) return s; + + // return substring + if (bi==-1) bi=l; + if (li==-1) li=0; + if (bi<=li) return 0; // only empty lines + return s.mid(li,bi-li); +} + +#if 0 +void stringToSearchIndex(const QCString &docBaseUrl,const QCString &title, + const QCString &str,bool priority,const QCString &anchor) +{ + static bool searchEngine = Config_getBool("SEARCHENGINE"); + if (searchEngine) + { + Doxygen::searchIndex->setCurrentDoc(title,docBaseUrl,anchor); + static QRegExp wordPattern("[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9\\x80-\\xFF]*"); + int i,p=0,l; + while ((i=wordPattern.match(str,p,&l))!=-1) + { + Doxygen::searchIndex->addWord(str.mid(i,l),priority); + p=i+l; + } + } +} +#endif + +//-------------------------------------------------------------------------- + +static QDict<int> g_extLookup; + +static struct Lang2ExtMap +{ + const char *langName; + const char *parserName; + SrcLangExt parserId; +} +g_lang2extMap[] = +{ +// language parser parser option + { "idl", "c", SrcLangExt_IDL }, + { "java", "c", SrcLangExt_Java }, + { "javascript", "c", SrcLangExt_JS }, + { "csharp", "c", SrcLangExt_CSharp }, + { "d", "c", SrcLangExt_D }, + { "php", "c", SrcLangExt_PHP }, + { "objective-c", "c", SrcLangExt_ObjC }, + { "c", "c", SrcLangExt_Cpp }, + { "c++", "c", SrcLangExt_Cpp }, + { "python", "python", SrcLangExt_Python }, + { "fortran", "fortran", SrcLangExt_F90 }, + { "vhdl", "vhdl", SrcLangExt_VHDL }, + { "dbusxml", "dbusxml", SrcLangExt_XML }, + { 0, 0, (SrcLangExt)0 } +}; + +bool updateLanguageMapping(const QCString &extension,const QCString &language) +{ + //getLanguageFromFileName("dummy"); // force initialization of the g_extLookup map + const Lang2ExtMap *p = g_lang2extMap; + QCString langName = language.lower(); + while (p->langName) + { + if (langName==p->langName) break; + p++; + } + if (!p->langName) return FALSE; + + // found the language + SrcLangExt parserId = p->parserId; + QCString extName = extension.lower(); + if (extName.isEmpty()) return FALSE; + if (extName.at(0)!='.') extName.prepend("."); + if (g_extLookup.find(extension)!=0) // language was already register for this ext + { + g_extLookup.remove(extension); + } + //printf("registering extension %s\n",extName.data()); + g_extLookup.insert(extName,new int(parserId)); + if (!Doxygen::parserManager->registerExtension(extName,p->parserName)) + { + err("Failed to assign extension %s to parser %s for language %s\n", + extName.data(),p->parserName,language.data()); + } + else + { + //msg("Registered extension %s to language parser %s...\n", + // extName.data(),language.data()); + } + return TRUE; +} + +void initDefaultExtensionMapping() +{ + g_extLookup.setAutoDelete(TRUE); + updateLanguageMapping(".idl", "idl"); + updateLanguageMapping(".ddl", "idl"); + updateLanguageMapping(".odl", "idl"); + updateLanguageMapping(".java", "java"); + updateLanguageMapping(".as", "javascript"); + updateLanguageMapping(".js", "javascript"); + updateLanguageMapping(".cs", "csharp"); + updateLanguageMapping(".d", "d"); + updateLanguageMapping(".php", "php"); + updateLanguageMapping(".php4", "php"); + updateLanguageMapping(".php5", "php"); + updateLanguageMapping(".inc", "php"); + updateLanguageMapping(".phtml", "php"); + updateLanguageMapping(".m", "objective-c"); + updateLanguageMapping(".M", "objective-c"); + updateLanguageMapping(".mm", "objective-c"); + updateLanguageMapping(".py", "python"); + updateLanguageMapping(".f", "fortran"); + updateLanguageMapping(".for", "fortran"); + updateLanguageMapping(".f90", "fortran"); + updateLanguageMapping(".vhd", "vhdl"); + updateLanguageMapping(".vhdl", "vhdl"); + //updateLanguageMapping(".xml", "dbusxml"); +} + +SrcLangExt getLanguageFromFileName(const QCString fileName) +{ + int i = fileName.findRev('.'); + if (i!=-1) // name has an extension + { + QCString extStr=fileName.right(fileName.length()-i).lower(); + if (!extStr.isEmpty()) // non-empty extension + { + int *pVal=g_extLookup.find(extStr); + if (pVal) // listed extension + { + //printf("getLanguageFromFileName(%s)=%x\n",extStr.data(),*pVal); + return (SrcLangExt)*pVal; + } + } + } + //printf("getLanguageFromFileName(%s) not found!\n",fileName.data()); + return SrcLangExt_Cpp; // not listed => assume C-ish language. +} + +//-------------------------------------------------------------------------- + +/*! Returns true iff the given name string appears to be a typedef in scope. */ +bool checkIfTypedef(Definition *scope,FileDef *fileScope,const char *n) +{ + if (scope==0 || + (scope->definitionType()!=Definition::TypeClass && + scope->definitionType()!=Definition::TypeNamespace + ) + ) + { + scope=Doxygen::globalScope; + } + + QCString name = n; + if (name.isEmpty()) + return FALSE; // no name was given + + DefinitionIntf *di = Doxygen::symbolMap->find(name); + if (di==0) + return FALSE; // could not find any matching symbols + + // mostly copied from getResolvedClassRec() + QCString explicitScopePart; + int qualifierIndex = computeQualifiedIndex(name); + if (qualifierIndex!=-1) + { + explicitScopePart = name.left(qualifierIndex); + replaceNamespaceAliases(explicitScopePart,explicitScopePart.length()); + name = name.mid(qualifierIndex+2); + } + + int minDistance = 10000; + MemberDef *bestMatch = 0; + + if (di->definitionType()==DefinitionIntf::TypeSymbolList) + { + // find the closest closest matching definition + DefinitionListIterator dli(*(DefinitionList*)di); + Definition *d; + for (dli.toFirst();(d=dli.current());++dli) + { + if (d->definitionType()==Definition::TypeMember) + { + g_visitedNamespaces.clear(); + int distance = isAccessibleFromWithExpScope(scope,fileScope,d,explicitScopePart); + if (distance!=-1 && distance<minDistance) + { + minDistance = distance; + bestMatch = (MemberDef *)d; + } + } + } + } + else if (di->definitionType()==Definition::TypeMember) + { + Definition *d = (Definition *)di; + g_visitedNamespaces.clear(); + int distance = isAccessibleFromWithExpScope(scope,fileScope,d,explicitScopePart); + if (distance!=-1 && distance<minDistance) + { + minDistance = distance; + bestMatch = (MemberDef *)d; + } + } + + if (bestMatch && bestMatch->isTypedef()) + return TRUE; // closest matching symbol is a typedef + else + return FALSE; +} + +int nextUtf8CharPosition(const QCString &utf8Str,int len,int startPos) +{ + int bytes=1; + if (startPos>=len) return len; + char c = utf8Str[startPos]; + if (c<0) // multibyte utf-8 character + { + bytes++; // 1xxx.xxxx: >=2 byte character + if (((uchar)c&0xE0)==0xE0) + { + bytes++; // 111x.xxxx: >=3 byte character + } + if (((uchar)c&0xF0)==0xF0) + { + bytes++; // 1111.xxxx: 4 byte character + } + } + else if (c=='&') // skip over character entities + { + static QRegExp re1("&#[0-9]+;"); // numerical entity + static QRegExp re2("&[A-Z_a-z]+;"); // named entity + int l1,l2; + int i1 = re1.match(utf8Str,startPos,&l1); + int i2 = re2.match(utf8Str,startPos,&l2); + if (i1!=-1) + { + bytes=l1; + } + else if (i2!=-1) + { + bytes=l2; + } + } + return startPos+bytes; +} + +QCString parseCommentAsText(const Definition *scope,const MemberDef *md, + const QCString &doc,const QCString &fileName,int lineNr) +{ + QGString s; + if (doc.isEmpty()) return s.data(); + FTextStream t(&s); + DocNode *root = validatingParseDoc(fileName,lineNr, + (Definition*)scope,(MemberDef*)md,doc,FALSE,FALSE); + TextDocVisitor *visitor = new TextDocVisitor(t); + root->accept(visitor); + delete visitor; + delete root; + QCString result = s.data(); + int i=0; + int charCnt=0; + int l=result.length(); + bool addEllipsis=FALSE; + while ((i=nextUtf8CharPosition(result,l,i))<l) + { + charCnt++; + if (charCnt>=80) break; + } + if (charCnt>=80) // try to truncate the string + { + while ((i=nextUtf8CharPosition(result,l,i))<l && charCnt<100) + { + charCnt++; + if (result.at(i)>=0 && isspace(result.at(i))) + { + addEllipsis=TRUE; + } + else if (result.at(i)==',' || + result.at(i)=='.' || + result.at(i)=='?') + { + break; + } + } + } + if (addEllipsis || charCnt==100) result=result.left(i)+"..."; + return result.data(); +} + +//-------------------------------------------------------------------------------------- + +static QDict<void> aliasesProcessed; + +QCString expandAliasRec(const QCString s) +{ + QCString result; + static QRegExp cmdPat("[\\\\@][a-z_A-Z][a-z_A-Z0-9]*"); + QCString value=s; + int i,p=0,l; + while ((i=cmdPat.match(value,p,&l))!=-1) + { + result+=value.mid(p,i-p); + QCString args = extractAliasArgs(value,i+l); + bool hasArgs = !args.isEmpty(); // found directly after command + QCString cmd; + if (hasArgs) + { + int numArgs = countAliasArguments(args); + cmd = value.mid(i+1,l-1)+QCString().sprintf("{%d}",numArgs); // alias name + {n} + } + else + { + cmd = value.mid(i+1,l-1); + } + //printf("Found command '%s' args='%s'\n",cmd.data(),args.data()); + QCString *aliasText=Doxygen::aliasDict.find(cmd); + if (aliasesProcessed.find(cmd)==0 && aliasText) // expand the alias + { + //printf("is an alias!\n"); + aliasesProcessed.insert(cmd,(void *)0x8); + QCString val = *aliasText; + if (hasArgs) + { + val = replaceAliasArguments(val,args); + //printf("replace '%s'->'%s' args='%s'\n", + // aliasText->data(),val.data(),args.data()); + } + result+=expandAliasRec(val); + aliasesProcessed.remove(cmd); + p=i+l; + if (hasArgs) p+=args.length()+2; + } + else // command is not an alias + { + //printf("not an alias!\n"); + result+=value.mid(i,l); + p=i+l; + } + } + result+=value.right(value.length()-p); + + //printf("expandAliases '%s'->'%s'\n",s.data(),result.data()); + return result; +} + +static QCString replaceAliasArgument(const QCString &aliasValue,int paramNum, + const QCString ¶mValue) +{ + QCString result; + QCString paramMarker; + paramMarker.sprintf("\\%d",paramNum); + int markerLen = paramMarker.length(); + int p=0,i; + while ((i=aliasValue.find(paramMarker,p))!=-1) // search for marker + { + result+=aliasValue.mid(p,i-p); + //printf("Found marker '%s' at %d len=%d for param '%s' in '%s'\n", + // paramMarker.data(),i,markerLen,paramValue.data(),aliasValue.data()); + if (i==0 || aliasValue.at(i-1)!='\\') // found unescaped marker + { + result += paramValue; + p=i+markerLen; + } + else // ignore escaped markers + { + result += aliasValue.mid(i,markerLen); + p=i+1; + } + } + result+=aliasValue.right(aliasValue.length()-p); + result = substitute(result,"\\{","{"); + result = substitute(result,"\\}","}"); + result = expandAliasRec(substitute(result,"\\,",",")); + //printf("replaceAliasArgument('%s',%d,'%s')->%s\n", + // aliasValue.data(),paramNum,paramValue.data(),result.data()); + return result; +} + +QCString replaceAliasArguments(const QCString &aliasValue,const QCString &argList) +{ + QCString result = aliasValue; + QList<QCString> args; + int p=0,i,c=1; + for (i=0;i<(int)argList.length();i++) + { + if (argList.at(i)==',' && (i==0 || argList.at(i-1)!='\\')) + { + result = replaceAliasArgument(result,c,argList.mid(p,i-p)); + p=i+1; + c++; + } + } + if (p<(int)argList.length()) + { + result = replaceAliasArgument(result,c,argList.right(argList.length()-p)); + } + return result; +} + +int countAliasArguments(const QCString argList) +{ + int count=1; + int l = argList.length(); + int i; + for (i=0;i<l;i++) + { + if (argList.at(i)==',' && (i==0 || argList.at(i-1)!='\\')) count++; + } + return count; +} + +QCString extractAliasArgs(const QCString &args,int pos) +{ + int i; + int bc=0; + char prevChar=0; + if (args.at(pos)=='{') // alias has argument + { + for (i=pos;i<(int)args.length();i++) + { + if (prevChar!='\\') + { + if (args.at(i)=='{') bc++; + if (args.at(i)=='}') bc--; + prevChar=args.at(i); + } + else + { + prevChar=0; + } + + if (bc==0) + { + //printf("extractAliasArgs('%s')->'%s'\n",args.data(),args.mid(pos+1,i-pos-1).data()); + return args.mid(pos+1,i-pos-1); + } + } + } + return ""; +} + +QCString resolveAliasCmd(const QCString aliasCmd) +{ + QCString result; + aliasesProcessed.clear(); + //printf("Expanding: '%s'\n",aliasCmd.data()); + result = expandAliasRec(aliasCmd); + //printf("Expanding result: '%s'->'%s'\n",aliasCmd.data(),result.data()); + return result; +} + +QCString expandAlias(const QCString &aliasName,const QCString &aliasValue) +{ + QCString result; + aliasesProcessed.clear(); + // avoid expanding this command recursively + aliasesProcessed.insert(aliasName,(void *)0x8); + // expand embedded commands + //printf("Expanding: '%s'->'%s'\n",aliasName.data(),aliasValue.data()); + result = expandAliasRec(aliasValue); + //printf("Expanding result: '%s'->'%s'\n",aliasName.data(),result.data()); + return result; +} + +void writeTypeConstraints(OutputList &ol,Definition *d,ArgumentList *al) +{ + if (al==0) return; + ol.startConstraintList(theTranslator->trTypeConstraints()); + ArgumentListIterator ali(*al); + Argument *a; + for (;(a=ali.current());++ali) + { + ol.startConstraintParam(); + ol.parseText(a->name); + ol.endConstraintParam(); + ol.startConstraintType(); + linkifyText(TextGeneratorOLImpl(ol),d,0,0,a->type); + ol.endConstraintType(); + ol.startConstraintDocs(); + ol.parseDoc(d->docFile(),d->docLine(),d,0,a->docs,TRUE,FALSE); + ol.endConstraintDocs(); + } + ol.endConstraintList(); +} + +bool usingTreeIndex() +{ + static bool treeView = Config_getBool("USE_INLINE_TREES"); + return treeView; +} + +void stackTrace() +{ +#ifdef TRACINGSUPPORT + void *backtraceFrames[128]; + int frameCount = backtrace(backtraceFrames, 128); + static char cmd[40960]; + char *p = cmd; + p += sprintf(p,"/usr/bin/atos -p %d ", (int)getpid()); + for (int x = 0; x < frameCount; x++) + { + p += sprintf(p,"%p ", backtraceFrames[x]); + } + fprintf(stderr,"========== STACKTRACE START ==============\n"); + if (FILE *fp = popen(cmd, "r")) + { + char resBuf[512]; + while (size_t len = fread(resBuf, 1, sizeof(resBuf), fp)) + { + fwrite(resBuf, 1, len, stderr); + } + pclose(fp); + } + fprintf(stderr,"============ STACKTRACE END ==============\n"); + //fprintf(stderr,"%s\n", frameStrings[x]); +#endif +} + +static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size, + const char *inputEncoding,const char *outputEncoding) +{ + if (inputEncoding==0 || outputEncoding==0) return size; + if (qstricmp(inputEncoding,outputEncoding)==0) return size; + void *cd = portable_iconv_open(outputEncoding,inputEncoding); + if (cd==(void *)(-1)) + { + err("error: unsupported character conversion: '%s'->'%s': %s\n" + "Check the INPUT_ENCODING setting in the config file!\n", + inputEncoding,outputEncoding,strerror(errno)); + exit(1); + } + int tmpBufSize=size*4+1; + BufStr tmpBuf(tmpBufSize); + size_t iLeft=size; + size_t oLeft=tmpBufSize; + const char *srcPtr = srcBuf.data(); + char *dstPtr = tmpBuf.data(); + uint newSize=0; + if (!portable_iconv(cd, &srcPtr, &iLeft, &dstPtr, &oLeft)) + { + newSize = tmpBufSize-oLeft; + srcBuf.shrink(newSize); + strncpy(srcBuf.data(),tmpBuf.data(),newSize); + //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data()); + } + else + { + err("%s: error: failed to translate characters from %s to %s: check INPUT_ENCODING\n", + fileName,inputEncoding,outputEncoding); + exit(1); + } + portable_iconv_close(cd); + return newSize; +} + +//! read a file name \a fileName and optionally filter and transcode it +bool readInputFile(const char *fileName,BufStr &inBuf) +{ + // try to open file + int size=0; + //uint oldPos = dest.curPos(); + //printf(".......oldPos=%d\n",oldPos); + + QFileInfo fi(fileName); + if (!fi.exists()) return FALSE; + QCString filterName = getFileFilter(fileName,FALSE); + if (filterName.isEmpty()) + { + QFile f(fileName); + if (!f.open(IO_ReadOnly)) + { + err("error: could not open file %s\n",fileName); + return FALSE; + } + size=fi.size(); + // read the file + inBuf.skip(size); + if (f.readBlock(inBuf.data()/*+oldPos*/,size)!=size) + { + err("error: problems while reading file %s\n",fileName); + return FALSE; + } + } + else + { + QCString cmd=filterName+" \""+fileName+"\""; + Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data()); + FILE *f=portable_popen(cmd,"r"); + if (!f) + { + err("error: could not execute filter %s\n",filterName.data()); + return FALSE; + } + const int bufSize=1024; + char buf[bufSize]; + int numRead; + while ((numRead=fread(buf,1,bufSize,f))>0) + { + //printf(">>>>>>>>Reading %d bytes\n",numRead); + inBuf.addArray(buf,numRead),size+=numRead; + } + portable_pclose(f); + } + + int start=0; + if (inBuf.size()>=2 && + ((inBuf.at(0)==-1 && inBuf.at(1)==-2) || // Litte endian BOM + (inBuf.at(0)==-2 && inBuf.at(1)==-1) // big endian BOM + ) + ) // UCS-2 encoded file + { + transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(), + "UCS-2","UTF-8"); + } + else if (inBuf.size()>=3 && + (uchar)inBuf.at(0)==0xEF && + (uchar)inBuf.at(1)==0xBB && + (uchar)inBuf.at(2)==0xBF + ) + { + // UTF-8 encoded file + inBuf.dropFromStart(3); // remove UTF-8 BOM: no translation needed + } + else // transcode according to the INPUT_ENCODING setting + { + // do character transcoding if needed. + transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(), + Config_getString("INPUT_ENCODING"),"UTF-8"); + } + + inBuf.addChar('\n'); /* to prevent problems under Windows ? */ + + // and translate CR's + size=inBuf.curPos()-start; + int newSize=filterCRLF(inBuf.data()+start,size); + //printf("filter char at %p size=%d newSize=%d\n",dest.data()+oldPos,size,newSize); + if (newSize!=size) // we removed chars + { + inBuf.shrink(newSize); // resize the array + //printf(".......resizing from %d to %d result=[%s]\n",oldPos+size,oldPos+newSize,dest.data()); + } + inBuf.at(inBuf.curPos())='\0'; + return TRUE; +} + +// Replace %word by word in title +QCString filterTitle(const QCString &title) +{ + QCString tf; + static QRegExp re("%[A-Z_a-z]"); + int p=0,i,l; + while ((i=re.match(title,p,&l))!=-1) + { + tf+=title.mid(p,i-p); + tf+=title.mid(i+1,l-1); // skip % + p=i+l; + } + tf+=title.right(title.length()-p); + return tf; +} + +//---------------------------------------------------------------------------- +// returns TRUE if the name of the file represented by `fi' matches +// one of the file patterns in the `patList' list. + +bool patternMatch(const QFileInfo &fi,const QStrList *patList) +{ + bool found=FALSE; + if (patList) + { + QStrListIterator it(*patList); + QCString pattern; + for (it.toFirst();(pattern=it.current());++it) + { + if (!pattern.isEmpty() && !found) + { + int i=pattern.find('='); + if (i!=-1) pattern=pattern.left(i); // strip of the extension specific filter name + +#if defined(_WIN32) || defined(__MACOSX__) // Windows or MacOSX + QRegExp re(pattern,FALSE,TRUE); // case insensitive match +#else // unix + QRegExp re(pattern,TRUE,TRUE); // case sensitive match +#endif + found = found || re.match(fi.fileName().data())!=-1 || + re.match(fi.filePath().data())!=-1 || + re.match(fi.absFilePath().data())!=-1; + //printf("Matching `%s' against pattern `%s' found=%d\n", + // fi->fileName().data(),pattern.data(),found); + } + } + } + return found; +} + +void writeSummaryLink(OutputList &ol,const char *label,const char *title, + bool &first) +{ + if (first) + { + ol.writeString(" <div class=\"summary\">\n"); + first=FALSE; + } + else + { + ol.writeString(" |\n"); + } + ol.writeString("<a href=\"#"); + ol.writeString(label); + ol.writeString("\">"); + ol.writeString(title); + ol.writeString("</a>"); +} + +QCString externalLinkTarget() +{ + static bool extLinksInWindow = Config_getBool("EXT_LINKS_IN_WINDOW"); + if (extLinksInWindow) return "target=\"_blank\" "; else return ""; +} + +QCString externalRef(const QCString &relPath,const QCString &ref,bool href) +{ + QCString result; + if (!ref.isEmpty()) + { + QCString *dest = Doxygen::tagDestinationDict[ref]; + if (dest) + { + result = *dest; + int l = result.length(); + if (!relPath.isEmpty() && l>0 && result.at(0)=='.') + { // relative path -> prepend relPath. + result.prepend(relPath); + } + if (!href) result.prepend("doxygen=\""+ref+":"); + if (l>0 && result.at(l-1)!='/') result+='/'; + if (!href) result.append("\" "); + } + } + else + { + result = relPath; + } + return result; +} + +void writeColoredImgData(const char *dir,ColoredImgDataItem data[]) +{ + static int hue = Config_getInt("HTML_COLORSTYLE_HUE"); + static int sat = Config_getInt("HTML_COLORSTYLE_SAT"); + static int gamma = Config_getInt("HTML_COLORSTYLE_GAMMA"); + while (data->name) + { + QCString fileName; + fileName=(QCString)dir+"/"+data->name; + QFile f(fileName); + if (f.open(IO_WriteOnly)) + { + ColoredImage img(data->width,data->height,data->content,data->alpha, + sat,hue,gamma); + img.save(fileName); + } + else + { + fprintf(stderr,"Warning: Cannot open file %s for writing\n",data->name); + } + Doxygen::indexList.addImageFile(data->name); + data++; + } +} + +QCString replaceColorMarkers(const char *str) +{ + QCString result; + QCString s=str; + if (s.isEmpty()) return result; + static QRegExp re("##[0-9A-Fa-f][0-9A-Fa-f]"); + static const char hex[] = "0123456789ABCDEF"; + static int hue = Config_getInt("HTML_COLORSTYLE_HUE"); + static int sat = Config_getInt("HTML_COLORSTYLE_SAT"); + static int gamma = Config_getInt("HTML_COLORSTYLE_GAMMA"); + int i,l,sl=s.length(),p=0; + while ((i=re.match(s,p,&l))!=-1) + { + result+=s.mid(p,i-p); + QCString lumStr = s.mid(i+2,l-2); +#define HEXTONUM(x) (((x)>='0' && (x)<='9') ? ((x)-'0') : \ + ((x)>='a' && (x)<='f') ? ((x)-'a'+10) : \ + ((x)>='A' && (x)<='F') ? ((x)-'A'+10) : 0) + + double r,g,b; + int red,green,blue; + int level = HEXTONUM(lumStr[0])*16+HEXTONUM(lumStr[1]); + ColoredImage::hsl2rgb(hue/360.0,sat/255.0, + pow(level/255.0,gamma/100.0),&r,&g,&b); + red = (int)(r*255.0); + green = (int)(g*255.0); + blue = (int)(b*255.0); + char colStr[8]; + colStr[0]='#'; + colStr[1]=hex[red>>4]; + colStr[2]=hex[red&0xf]; + colStr[3]=hex[green>>4]; + colStr[4]=hex[green&0xf]; + colStr[5]=hex[blue>>4]; + colStr[6]=hex[blue&0xf]; + colStr[7]=0; + //printf("replacing %s->%s (level=%d)\n",lumStr.data(),colStr,level); + result+=colStr; + p=i+l; + } + result+=s.right(sl-p); + return result; +} + Index: branches/xZenu/src/util/doxygen/src/translator_eo.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator_eo.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator_eo.h (revision 1322) @@ -0,0 +1,1880 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + + /* Tradukita kaj Äisdatigata de Ander Martinez. */ + +#ifndef TRANSLATOR_EO_H +#define TRANSLATOR_EO_H + +/*! + When defining a translator class for the new language, follow + the description in the documentation. One of the steps says + that you should copy the translator_en.h (this) file to your + translator_xx.h new file. Your new language should use the + Translator class as the base class. This means that you need to + implement exactly the same (pure virtual) methods as the + TranslatorEnglish does. Because of this, it is a good idea to + start with the copy of TranslatorEnglish and replace the strings + one by one. + + It is not necessary to include "translator.h" or + "translator_adapter.h" here. The files are included in the + language.cpp correctly. Not including any of the mentioned + files frees the maintainer from thinking about whether the + first, the second, or both files should be included or not, and + why. This holds namely for localized translators because their + base class is changed occasionaly to adapter classes when the + Translator class changes the interface, or back to the + Translator class (by the local maintainer) when the localized + translator is made up-to-date again. +*/ +class TranslatorEsperanto : public Translator +{ + public: + + // --- Language control methods ------------------- + + /*! Used for identification of the language. The identification + * should not be translated. It should be replaced by the name + * of the language in English using lower-case characters only + * (e.g. "czech", "japanese", "russian", etc.). It should be equal to + * the identification used in language.cpp. + */ + virtual QCString idLanguage() + { return "esperanto"; } + + /*! Used to get the LaTeX command(s) for the language support. + * This method should return string with commands that switch + * LaTeX to the desired language. For example + * <pre>"\\usepackage[german]{babel}\n" + * </pre> + * or + * <pre>"\\usepackage{polski}\n" + * "\\usepackage[latin2]{inputenc}\n" + * "\\usepackage[T1]{fontenc}\n" + * </pre> + * + * The English LaTeX does not use such commands. Because of this + * the empty string is returned in this implementation. + */ + virtual QCString latexLanguageSupportCommand() + { + return "\\usepackage[esperanto]{babel}\n"; + } + + /*! return the language charset. This will be used for the HTML output */ + virtual QCString idLanguageCharset() + { + return "utf-8"; + } + + // --- Language translation methods ------------------- + + /*! used in the compound documentation before a list of related functions. */ + virtual QCString trRelatedFunctions() + { return "Rilataj Funkcioj"; } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return "(Atentu ke tiuj ĉi ne estas membraj funkcioj.)"; } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return "Detala Priskribo"; } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return "Dokumentado de la Membraj Tipodifinoj"; } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + { return "Dokumentado de la Membraj Enumeracioj"; } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { return "Dokumentado de la Membraj Funkcioj"; } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Kampa Dokumentado"; + } + else + { + return "Dokumentado de la Membraj Datumoj"; + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return "Pli..."; } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return "Listo de ĉiuj membroj."; } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return "Membra Listo"; } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return "Tiu ĉi estas la kompleta membraro de "; } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return ", inkluzive ĉiujn hereditajn membrojn."; } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ + virtual QCString trGeneratedAutomatically(const char *s) + { QCString result="Generita aÅ­tomate de Doxygen"; + if (s) result+=(QCString)" por "+s; + result+=" el la fontkodo."; + return result; + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return "enum nomo"; } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return "enum valoro"; } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return "difinita en"; } + + // quick reference sections + + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \\group command). + */ + virtual QCString trModules() + { return "Moduloj"; } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return "Klasa Hierarkio"; } + + /*! This is put above each page as a link to the list of annotated classes */ + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datumstruktoroj"; + } + else + { + return "Klasaro"; + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return "Dosieraro"; } + + /*! This is put above each page as a link to all members of compounds. */ + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datumkampoj"; + } + else + { + return "Klasaj membroj"; + } + } + + /*! This is put above each page as a link to all members of files. */ + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Mallokalaĵoj"; + } + else + { + return "Dosieraj Membroj"; + } + } + + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return "Rilataj PaÄoj"; } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return "Ekzemploj"; } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return "Serĉi"; } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { return "Tiu ĉi heredada listo estas plimalpli, " + "sed ne tute, ordigita alfabete:"; + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool extractAll) + { + QCString result="Jen listo de ĉiuj "; + if (!extractAll) result+="dokumentitaj "; + result+="dosieroj kun mallongaj priskriboj:"; + return result; + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Jen datumstrukturoj kun mallongaj priskriboj:"; + } + else + { + return "Jen la klasoj, strukturoj, kunigoj kaj interfacoj " + "kun mallongaj priskriboj:"; + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result="Jen listo de ĉiuj "; + if (!extractAll) + { + result+="dokumentitaj "; + } + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="strukturaj kaj kunigaj kampoj"; + } + else + { + result+="klasaj membroj"; + } + result+=" kun ligiloj al "; + if (!extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="la struktura/kuniga dokumentado por ĉiu kampo:"; + } + else + { + result+="la klasa dokumentado por ĉiu membro:"; + } + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="la strukturoj/kunigoj al kiuj ili apartenas:"; + } + else + { + result+="la klasoj al kiuj ili apartenas:"; + } + } + return result; + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool extractAll) + { + QCString result="Jen listo de ĉiuj "; + if (!extractAll) result+="dokumentitaj "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="funkcioj, variabloj, difinoj, enumeracioj kaj tipodifinoj"; + } + else + { + result+="dosieraj membroj"; + } + result+=" kun ligiloj al "; + if (extractAll) + result+="la dosieroj al kiuj ili apartenas:"; + else + result+="la dokumentado:"; + return result; + } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return "Jen listo de ĉiuj la ekzemploj:"; } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return "Jen listo de ĉiuj rilataj dokumentadaj paÄoj:"; } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return "Jen listo de ĉiuj la moduloj:"; } + + // index titles (the project name is prepended for these) + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return "Dokumentado"; } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return "Modula Indekso"; } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return "Hierarkia Indekso"; } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datumstruktura Indekso"; + } + else + { + return "Klasa Indekso"; + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return "Dosiera Indekso"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return "Modula Dokumentado"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datumstruktura Dokumentado"; + } + else + { + return "Klasa Dokumentado"; + } + } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return "Dosiera Dokumentado"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return "Ekzempla Dokumentado"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return "PaÄa Dokumentado"; } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return "Referenca Manlibro"; } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return "Difinoj"; } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return "Funkciaj Prototipoj"; } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return "Tipdifinoj"; } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return "Enumeracioj"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return "Funkcioj"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return "Variabloj"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return "Enumeraciilo"; } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return "Difina Dokumentado"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return "Dokumentado de Funkciaj Prototipoj"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return "Tipdifina Dokumentado"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return "Enumeracitipa Dokumentado"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return "Funkcia Dokumentado"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return "Variabla Dokumentado"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datumstrukturoj"; + } + else + { + return "Klasoj"; + } + } + + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ + virtual QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result=(QCString)"Generita la "+date; + if (projName) result+=(QCString)" por "+projName; + result+=(QCString)" de"; + return result; + } + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return "skribita de"; + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return (QCString)"Heredada diagramo por "+clName+":"; + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return "Nur por ena uzado."; } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return "Averto"; } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return "Versio"; } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return "Dato"; } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return "Liveras"; } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return "Vido ankaÅ­"; } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return "Parametroj"; } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return "Esceptoj"; } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return "Generita de"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return "Nomspacaro"; } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool extractAll) + { + QCString result="Jen listo de ĉiuj "; + if (!extractAll) result+="dokumentitaj "; + result+="nomspacoj kun mallongaj priskriboj:"; + return result; + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return "Amikoj"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return "Dokumentado pri amikoj kaj rilatitaj funkcioj"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result="Referenco de la "; + if (isTemplate) result+=" Åablono de la "; + switch(compType) + { + case ClassDef::Class: result+="klaso "; break; + case ClassDef::Struct: result+="strukturo "; break; + case ClassDef::Union: result+="kunigo "; break; + case ClassDef::Interface: result+="interfaco "; break; + case ClassDef::Protocol: result+="protokolo "; break; + case ClassDef::Category: result+="kategorio "; break; + case ClassDef::Exception: result+="escepto "; break; + } + result+=(QCString)clName; + return result; + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result=fileName; + result+=" Dosiera referenco"; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" Nomspaca referenco"; + return result; + } + + virtual QCString trPublicMembers() + { return "Publikaj Membraj Funkcioj"; } + virtual QCString trPublicSlots() + { return "Pubikaj Ingoj"; } + virtual QCString trSignals() + { return "Signaloj"; } + virtual QCString trStaticPublicMembers() + { return "Statikaj Publikaj Membraj Funkcioj"; } + virtual QCString trProtectedMembers() + { return "Protektitaj Membraj Funkcioj"; } + virtual QCString trProtectedSlots() + { return "Protektitaj Ingoj"; } + virtual QCString trStaticProtectedMembers() + { return "Statikaj Protektitaj Membraj Funkcioj"; } + virtual QCString trPrivateMembers() + { return "Privataj Membraj Funkcioj"; } + virtual QCString trPrivateSlots() + { return "Privataj Ingoj"; } + virtual QCString trStaticPrivateMembers() + { return "Statikaj Privataj Membraj Funkcioj"; } + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + virtual QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i<numEntries;i++) + { + // use generateMarker to generate placeholders for the class links! + result+=generateMarker(i); // generate marker for entry i in the list + // (order is left to right) + + if (i!=numEntries-1) // not the last entry, so we need a separator + { + if (i<numEntries-2) // not the fore last entry + result+=", "; + else // the fore last entry + result+=", kaj "; + } + } + return result; + } + + /*! used in class documentation to produce a list of base classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritsList(int numEntries) + { + return "Heredas de "+trWriteList(numEntries)+"."; + } + + /*! used in class documentation to produce a list of super classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritedByList(int numEntries) + { + return "Heredita de "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * members that are hidden by this one. + */ + virtual QCString trReimplementedFromList(int numEntries) + { + return "Rerealigita el "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all member that overwrite the implementation of this member. + */ + virtual QCString trReimplementedInList(int numEntries) + { + return "Rerealigita en "+trWriteList(numEntries)+"."; + } + + /*! This is put above each page as a link to all members of namespaces. */ + virtual QCString trNamespaceMembers() + { return "Nomspacaj Membroj"; } + + /*! This is an introduction to the page with all namespace members */ + virtual QCString trNamespaceMemberDescription(bool extractAll) + { + QCString result="Jen listo de ĉiuj "; + if (!extractAll) result+="dokumentitaj "; + result+="nomspacaj membroj kun ligiloj al "; + if (extractAll) + result+="la nomspaca dokumentado de ĉiu membro:"; + else + result+="la nomspacoj al kiuj ili apartenas:"; + return result; + } + /*! This is used in LaTeX as the title of the chapter with the + * index of all namespaces. + */ + virtual QCString trNamespaceIndex() + { return "Nomspaca Indekso"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all namespaces. + */ + virtual QCString trNamespaceDocumentation() + { return "Nomspaca Dokumentado"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + virtual QCString trNamespaces() + { return "Nomspacoj"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { // single is true implies a single file + QCString result=(QCString)"La dokumentado por tiu ĉi "; + switch(compType) + { + case ClassDef::Class: result+="klaso"; break; + case ClassDef::Struct: result+="strukturo"; break; + case ClassDef::Union: result+="kunigo"; break; + case ClassDef::Interface: result+="interfaco"; break; + case ClassDef::Protocol: result+="protokolo"; break; + case ClassDef::Category: result+="kategorio"; break; + case ClassDef::Exception: result+="escepto"; break; + } + result+=" generitas el la "; + if (single) result+="sekva dosiero:"; + else result+="sekvaj dosieroj:"; + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + virtual QCString trAlphabeticalList() + { return "Alfabeta Listo"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + virtual QCString trReturnValues() + { return "Liveraĵoj"; } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + virtual QCString trMainPage() + { return "Ĉefa PaÄo"; } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + virtual QCString trPageAbbreviation() + { return "p."; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDefinedAtLineInSourceFile() + { + return "Difinita sur la lineo @0 de la dosiero @1."; + } + virtual QCString trDefinedInSourceFile() + { + return "Difinita en la dosiero @0."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() + { + return "Evitinda"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + virtual QCString trCollaborationDiagram(const char *clName) + { + return (QCString)"Kunlaborada diagramo por "+clName+":"; + } + /*! this text is put before an include dependency graph */ + virtual QCString trInclDepGraph(const char *fName) + { + return (QCString)"Inkluzivaĵa dependeca diagramo por "+fName+":"; + } + /*! header that is put before the list of constructor/destructors. */ + virtual QCString trConstructorDocumentation() + { + return "Konstruila kaj Detruila Dokumentado"; + } + /*! Used in the file documentation to point to the corresponding sources. */ + virtual QCString trGotoSourceCode() + { + return "Iri al la fontkodo de tiu ĉi dosiero."; + } + /*! Used in the file sources to point to the corresponding documentation. */ + virtual QCString trGotoDocumentation() + { + return "Iri al la dokumentado de tiu ĉi dosiero."; + } + /*! Text for the \\pre command */ + virtual QCString trPrecondition() + { + return "AntaÅ­kondiĉo"; + } + /*! Text for the \\post command */ + virtual QCString trPostcondition() + { + return "Postkondiĉo"; + } + /*! Text for the \\invariant command */ + virtual QCString trInvariant() + { + return "Malvariaĵo"; + } + /*! Text shown before a multi-line variable/enum initialization */ + virtual QCString trInitialValue() + { + return "Komenca valoro:"; + } + /*! Text used the source code in the file index */ + virtual QCString trCode() + { + return "kodo"; + } + virtual QCString trGraphicalHierarchy() + { + return "Grafika Klasa Hierarkio"; + } + virtual QCString trGotoGraphicalHierarchy() + { + return "Iri al la grafika klasa hierarkio"; + } + virtual QCString trGotoTextualHierarchy() + { + return "Iri al la teksta klasa hierarkio"; + } + virtual QCString trPageIndex() + { + return "PaÄa Indekso"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() + { + return "Noto"; + } + virtual QCString trPublicTypes() + { + return "Publikaj Tipoj"; + } + virtual QCString trPublicAttribs() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datumkampoj"; + } + else + { + return "Publikaj Atributoj"; + } + } + virtual QCString trStaticPublicAttribs() + { + return "Statikaj Publikaj Atributoj"; + } + virtual QCString trProtectedTypes() + { + return "Protektitaj Tipoj"; + } + virtual QCString trProtectedAttribs() + { + return "Protektitaj Atributoj"; + } + virtual QCString trStaticProtectedAttribs() + { + return "Statikaj Protektitaj Atributoj"; + } + virtual QCString trPrivateTypes() + { + return "Privataj Tipoj"; + } + virtual QCString trPrivateAttribs() + { + return "Privataj Atributoj"; + } + virtual QCString trStaticPrivateAttribs() + { + return "Statikaj Privataj Atributoj"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\todo item */ + virtual QCString trTodo() + { + return "Farendaĵo"; + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return "Farendaĵaro"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { + return "Referencita de"; + } + virtual QCString trRemarks() + { + return "Rimarkoj"; + } + virtual QCString trAttention() + { + return "Atentu"; + } + virtual QCString trInclByDepGraph() + { + return "Tiu ĉi diagramo montras kiuj dosieroj rekte aÅ­ malrekte " + "inkluzivas tiun ĉi dosieron:"; + } + virtual QCString trSince() + { + return "De"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return "Diagrama Klarigeto"; + } + /*! page explaining how the dot graph's should be interpreted + * The %A in the text below are to prevent link to classes called "A". + */ + virtual QCString trLegendDocs() + { + return + "Tiu ĉi paÄo klarigas kiel interpreti la diagramojn generitajn " + "de doxygen.<p>\n" + "Konsideru la sekvan ekzemplon:\n" + "\\code\n" + "/*! Nevidebla klaso pro trunkado */\n" + "class Invisible { };\n\n" + "/*! Trunkita klaso, hereda rilato kaÅiÄas */\n" + "class Truncated : public Invisible { };\n\n" + "/* Klaso ne dokumentita per komentoj de doxygen */\n" + "class Undocumented { };\n\n" + "/*! Klaso de kiu herediÄas per publika heredado */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! Åœablona klaso */\n" + "template<class T> class Templ { };\n\n" + "/*! Klaso de kiu herediÄas per protektita heredado */\n" + "class ProtectedBase { };\n\n" + "/*! Klaso de kiu herediÄas per privata heredado */\n" + "class PrivateBase { };\n\n" + "/*! Klaso uzata de la klaso Inherited */\n" + "class Used { };\n\n" + "/*! Supra klaso kiu heredas de kelkaj aliaj klasoj */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented,\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "Tio ĉi liveros la sekvan diagramon:" + "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "La skatoloj de la supra diagramo havas la sekvajn signifojn:\n" + "<ul>\n" + "<li>%Plene griza skatolo reprezentas la strukturon aÅ­ klason " + "kies diagramo generiÄis.\n" + "<li>%Skatolo kun nigra bordero montras dokumentitan strukturon aÅ­ klason.\n" + "<li>%Skatolo kun griza bordero montras nedokumentitan strukturon aÅ­ klason.\n" + "<li>%Skatolo kun ruÄa bordero montras dokumentitan strukturon aÅ­ klason por " + "kiu ne ĉiuj heredadoj/enhavoj montriÄas. %Diagramo estas trunkota " + "se Äi ne adaptiÄas en la donitajn limojn.\n" + "</ul>\n" + "La sagoj havas la sekvajn signifojn:\n" + "<ul>\n" + "<li>%Malhelblua sago uzatas por montri publika heredado " + "inter du klasoj.\n" + "<li>%Malhelverda sago uzatas por protektita heredado.\n" + "<li>%MalhelruÄa sago uzatas por privata heredado.\n" + "<li>%Purpura streka sago uzatas se klaso enhavatas aÅ­ uzatas " + "de alia klaso. La sago estas etikedatas kun la variablo(j) " + "tra kiu la montrita klaso aÅ­ strukturo estas alirebla.\n" + "<li>%Flava streka sago montras rilato inter Åablona apero kaj " + "la Åablona klaso el kiu Äi realigitas. La sago etikeditas kun " + "la parametroj de la Åablona apero.\n" + "</ul>\n"; + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return "klarigeto"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return "Testo"; + } + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return "Testa Listo"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return "DCOP Membraj Funkcioj"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return "Atributoj"; + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return "Atributa Dokumentado"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datumstrukturoj"; + } + else + { + return "Klasoj"; + } + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)"Pakaĵo "+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return "Pakaĵa Listo"; + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return "Jen listo de pakaĵoj kun mallongaj priskriboj (se ekzistas):"; + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return "Pakaĵoj"; + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return "Valoro:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return "Cimo"; + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return "Cima Listo"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file + * + * The following table shows the correlation of Charset name, Charset Value and + * <pre> + * Codepage number: + * Charset Name Charset Value(hex) Codepage number + * ------------------------------------------------------ + * DEFAULT_CHARSET 1 (x01) + * SYMBOL_CHARSET 2 (x02) + * OEM_CHARSET 255 (xFF) + * ANSI_CHARSET 0 (x00) 1252 + * RUSSIAN_CHARSET 204 (xCC) 1251 + * EE_CHARSET 238 (xEE) 1250 + * GREEK_CHARSET 161 (xA1) 1253 + * TURKISH_CHARSET 162 (xA2) 1254 + * BALTIC_CHARSET 186 (xBA) 1257 + * HEBREW_CHARSET 177 (xB1) 1255 + * ARABIC _CHARSET 178 (xB2) 1256 + * SHIFTJIS_CHARSET 128 (x80) 932 + * HANGEUL_CHARSET 129 (x81) 949 + * GB2313_CHARSET 134 (x86) 936 + * CHINESEBIG5_CHARSET 136 (x88) 950 + * </pre> + * + */ + virtual QCString trRTFansicp() + { + return ""; + } + + + /*! Used as ansicpg for RTF fcharset + * \see trRTFansicp() for a table of possible values. + */ + virtual QCString trRTFCharSet() + { + return "1"; + } + + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return "Indekso"; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + QCString result((first_capital ? "Klaso" : "klaso")); + if (!singular) result+="j"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + QCString result((first_capital ? "Dosiero" : "dosiero")); + if (!singular) result+="j"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + QCString result((first_capital ? "Nomspaco" : "nomspaco")); + if (!singular) result+="j"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + QCString result((first_capital ? "Grupo" : "grupo")); + if (!singular) result+="j"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + QCString result((first_capital ? "PaÄo" : "paÄo")); + if (!singular) result+="j"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + QCString result((first_capital ? "Membro" : "membro")); + if (!singular) result+="j"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + QCString result((first_capital ? "Mallokalaĵo" : "mallokalaĵo")); + if (!singular) result+="j"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + QCString result((first_capital ? "AÅ­toro" : "aÅ­toro")); + if (!singular) result+="j"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return "Referencoj"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Realigas "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this abstract member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Realigita en "+trWriteList(numEntries)+"."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return "Enhava Tabelo"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Evitindaĵa Listo"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Eventoj"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Eventa Dokumentado"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return "Pakaĵaj Tipoj"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return "Pakaĵaj Funkcioj"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return "Statikaj Pakaĵaj Funkcioj"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return "Pakaĵaj Atributoj"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return "Statikaj Pakaĵaj Atributoj"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "Ĉiuj"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Jen la vokdiagramo por tiu ĉi funkcio:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + return "Serĉi"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "Serĉaj Rezultoj"; + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return "Pardonu, nenio dokumento kongruas vian peton."; + } + else if (numDocuments==1) + { + return "Trafita <b>unu</b> dokumenton kongruantan vian peton."; + } + else + { + return "Trafitaj <b>$num</b> dokumentojn kongruantajn vian peton. " + "MontriÄos plej bonaj kongruoj unue."; + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "Kongruoj:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return filename + " Fonta Dosiero"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return "Dosieruja Hierarkio"; } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return "Dosieruja Dokumentado"; } + + /*! This is used as the title of the directory index and also in the + * Quick links of an HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return "Dosierujoj"; } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { return "Tiu ĉi dosieruja hierarkio estas plimalpli, " + "sed ne tute, ordigita alfabete:"; + } + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { QCString result=dirName; result+=" Dosieruja Referenco"; return result; } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool first_capital, bool singular) + { + QCString result((first_capital ? "Dosierujo" : "dosierujo")); + if (!singular) result+="j"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return "Tiu ĉi estas superÅarÄita membra funkcio, " + "donita por faciligo. Äœi nur malsamas de la supra " + "funkcio nur pro la argumento(j) kiujn ili akceptas."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + /*! This is used to introduce a caller (or called-by) graph */ + virtual QCString trCallerGraph() + { + return "Jen la vokdiagramo por tiu ĉi funkcio:"; + } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { return "Enumeraciila Dokumentado"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 (mainly for Fortran) +////////////////////////////////////////////////////////////////////////// + + /*! header that is put before the list of member subprograms (Fortran). */ + virtual QCString trMemberFunctionDocumentationFortran() + { return "Dokumentado de Membraj Funkcioj/Subrutinoj"; } + + /*! This is put above each page as a link to the list of annotated data types (Fortran). */ + virtual QCString trCompoundListFortran() + { return "Datumtipa Listo"; } + + /*! This is put above each page as a link to all members of compounds (Fortran). */ + virtual QCString trCompoundMembersFortran() + { return "Datumkampoj"; } + + /*! This is an introduction to the annotated compound list (Fortran). */ + virtual QCString trCompoundListDescriptionFortran() + { return "Jen la datumtipoj kun mallongaj priskriboj:"; } + + /*! This is an introduction to the page with all data types (Fortran). */ + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) + { + QCString result="Jen listo de ĉiuj "; + if (!extractAll) + { + result+="dokumentitaj "; + } + result+="datumtipaj membroj"; + result+=" kun ligiloj al "; + if (!extractAll) + { + result+="la datumstruktura dokumentado de ĉiu membro"; + } + else + { + result+="la datumtipoj al kiuj ili apartenas:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index (Fortran). + */ + virtual QCString trCompoundIndexFortran() + { return "Datumtipa Indekso"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all data types (Fortran). + */ + virtual QCString trTypeDocumentation() + { return "Datumtipa Dokumentado"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) subprograms (Fortran). + */ + virtual QCString trSubprograms() + { return "Funkcioj/Subrutinoj"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for subprograms (Fortran) + */ + virtual QCString trSubprogramDocumentation() + { return "Funkcia/Subrutina Dokumentado"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds (Fortran) + */ + virtual QCString trDataTypes() + { return "Datumtipoj"; } + + /*! used as the title of page containing all the index of all modules (Fortran). */ + virtual QCString trModulesList() + { return "Modula Listo"; } + + /*! used as an introduction to the modules list (Fortran) */ + virtual QCString trModulesListDescription(bool extractAll) + { + QCString result="Jen listo de ĉiuj "; + if (!extractAll) result+="dokumentitaj "; + result+="moduloj kun mallongaj priskriboj:"; + return result; + } + + /*! used as the title of the HTML page of a module/type (Fortran) */ + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result="Referenco de la "; + if (isTemplate) result+=" Åablono de la "; + switch(compType) + { + case ClassDef::Class: result+="modulo "; break; + case ClassDef::Struct: result+="tipo "; break; + case ClassDef::Union: result+="kunigo "; break; + case ClassDef::Interface: result+="interfaco "; break; + case ClassDef::Protocol: result+="protokolo "; break; + case ClassDef::Category: result+="kategorio "; break; + case ClassDef::Exception: result+="escepto "; break; + } + result+=(QCString)clName; + return result; + } + /*! used as the title of the HTML page of a module (Fortran) */ + virtual QCString trModuleReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" Modula Referenco"; + return result; + } + + /*! This is put above each page as a link to all members of modules. (Fortran) */ + virtual QCString trModulesMembers() + { return "Modulaj Membroj"; } + + /*! This is an introduction to the page with all modules members (Fortran) */ + virtual QCString trModulesMemberDescription(bool extractAll) + { + QCString result="Jen listo de ĉiuj "; + if (!extractAll) result+="dokumentitaj "; + result+="modulaj membroj kun ligiloj al la "; + if (extractAll) + { + result+="modula dokumentado de ĉiu membro:"; + } + else + { + result+="moduloj al kiuj ili apartenas:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all modules (Fortran). + */ + virtual QCString trModulesIndex() + { return "Indekso de Moduloj"; } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trModule(bool first_capital, bool singular) + { + QCString result((first_capital ? "Modulo" : "modulo")); + if (!singular) result+="j"; + return result; + } + /*! This is put at the bottom of a module documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool single) + { + // single is true implies a single file + QCString result=(QCString)"La dokumentado por tiu ĉi "; + switch(compType) + { + case ClassDef::Class: result+="modulo"; break; + case ClassDef::Struct: result+="tipo"; break; + case ClassDef::Union: result+="kunigo"; break; + case ClassDef::Interface: result+="interfaco"; break; + case ClassDef::Protocol: result+="protokolo"; break; + case ClassDef::Category: result+="kategorio"; break; + case ClassDef::Exception: result+="escepto"; break; + } + result+=" kreiÄis el la "; + if (single) result+="sekva dosiero:"; else result+="sekvaj dosieroj:"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trType(bool first_capital, bool singular) + { + QCString result((first_capital ? "Tipo" : "tipo")); + if (!singular) result+="j"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trSubprogram(bool first_capital, bool singular) + { + QCString result((first_capital ? "Subprogramo" : "subprogramo")); + if (!singular) result+="j"; + return result; + } + + /*! C# Type Constraint list */ + virtual QCString trTypeConstraints() + { + return "Tipaj Limigoj"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.0 (mainly for the new search engine) +////////////////////////////////////////////////////////////////////////// + + /*! directory relation for \a name */ + virtual QCString trDirRelation(const char *name) + { + return QCString(name)+" Rilato"; + } + + /*! Loading message shown when loading search results */ + virtual QCString trLoading() + { + return "ÅœarÄante..."; + } + + /*! Label used for search results in the global namespace */ + virtual QCString trGlobalNamespace() + { + return "Malloka Nomspaco"; + } + + /*! Message shown while searching */ + virtual QCString trSearching() + { + return "Serĉante..."; + } + + /*! Text shown when no search results are found */ + virtual QCString trNoMatches() + { + return "Nenia kongruo"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Diagramo de dependecoj dosierujaj por "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"Dosiero en "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Inkluzivas dosieron en "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "lundo","mardo","merkredo", + "ĵaÅ­do","vendredo","sabato", + "dimanĉo" }; + + static const char *months[] = { "Januaro", "Februaro", "Marto", + "Aprilo", "Majo", "Junio", + "Julio", "AÅ­gusto", "Septembro", + "Oktobro", "Novembro", + "Decembro" + }; + QCString sdate; + sdate.sprintf("%s, %d-a de %s %d",days[dayOfWeek-1],day,months[month-1],year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + + +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/navtree_css.h =================================================================== --- branches/xZenu/src/util/doxygen/src/navtree_css.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/navtree_css.h (revision 1322) @@ -0,0 +1,123 @@ +"#nav-tree .children_ul {\n" +" margin:0;\n" +" padding:4px;\n" +"}\n" +"\n" +"#nav-tree ul {\n" +" list-style:none outside none;\n" +" margin:0px;\n" +" padding:0px;\n" +"}\n" +"\n" +"#nav-tree li {\n" +" white-space:nowrap;\n" +" margin:0px;\n" +" padding:0px;\n" +"}\n" +"\n" +"#nav-tree .plus {\n" +" margin:0px;\n" +"}\n" +"\n" +"#nav-tree .selected {\n" +" background-image: url('tab_a.png');\n" +" background-repeat:repeat-x;\n" +" color: #fff;\n" +" text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);\n" +"}\n" +"\n" +"#nav-tree img {\n" +" margin:0px;\n" +" padding:0px;\n" +" border:0px;\n" +" vertical-align: middle;\n" +"}\n" +"\n" +"#nav-tree a {\n" +" text-decoration:none;\n" +" padding:0px;\n" +" margin:0px;\n" +" outline:none;\n" +"}\n" +"\n" +"#nav-tree .label {\n" +" margin:0px;\n" +" padding:0px;\n" +"}\n" +"\n" +"#nav-tree .label a {\n" +" padding:2px;\n" +"}\n" +"\n" +"#nav-tree .selected a {\n" +" text-decoration:none;\n" +" padding:2px;\n" +" margin:0px;\n" +" color:#fff;\n" +"}\n" +"\n" +"#nav-tree .children_ul {\n" +" margin:0px;\n" +" padding:0px;\n" +"}\n" +"\n" +"#nav-tree .item {\n" +" margin:0px;\n" +" padding:0px;\n" +"}\n" +"\n" +"#nav-tree {\n" +" padding: 0px 0px;\n" +" background-color: #FAFAFF; \n" +" font-size:14px;\n" +" overflow:auto;\n" +"}\n" +"\n" +"#doc-content {\n" +" overflow:auto;\n" +" display:block;\n" +" padding:0px;\n" +" margin:0px;\n" +"}\n" +"\n" +"#side-nav {\n" +" padding:0 6px 0 0;\n" +" margin: 0px;\n" +" display:block;\n" +" position: absolute;\n" +" left: 0px;\n" +" width: 300px;\n" +"}\n" +"\n" +".ui-resizable .ui-resizable-handle {\n" +" display:block;\n" +"}\n" +"\n" +".ui-resizable-e {\n" +" background:url(\"ftv2splitbar.png\") repeat scroll right center transparent;\n" +" cursor:e-resize;\n" +" height:100%;\n" +" right:0;\n" +" top:0;\n" +" width:6px;\n" +"}\n" +"\n" +".ui-resizable-handle {\n" +" display:none;\n" +" font-size:0.1px;\n" +" position:absolute;\n" +" z-index:1;\n" +"}\n" +"\n" +"#nav-tree-contents {\n" +" margin: 6px 0px 0px 0px;\n" +"}\n" +"\n" +"#nav-tree {\n" +" background-image:url('nav_h.png');\n" +" background-repeat:repeat-x;\n" +" background-color: ##FA;\n" +"}\n" +"\n" +"\n" +"\n" Index: branches/xZenu/src/util/doxygen/src/layout.h =================================================================== --- branches/xZenu/src/util/doxygen/src/layout.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/layout.h (revision 1322) @@ -0,0 +1,190 @@ +/****************************************************************************** + * + * $Id: layout.h,v 1.2 2001/03/19 19:27:41 root Exp $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef LAYOUT_H +#define LAYOUT_H + +#include "qtbc.h" +#include "memberlist.h" +#include <qlist.h> + +class LayoutParser; + +/** @brief Base class representing a piece of a documentation page */ +struct LayoutDocEntry +{ + virtual ~LayoutDocEntry() {} + enum Kind { + // Generic items for all pages + MemberGroups, + MemberDeclStart, MemberDeclEnd, MemberDecl, + MemberDefStart, MemberDefEnd, MemberDef, + BriefDesc, DetailedDesc, + AuthorSection, + + // Class specific items + ClassIncludes, + ClassInheritanceGraph, ClassNestedClasses, + ClassCollaborationGraph, ClassAllMembersLink, + ClassUsedFiles, + + // Namespace specific items + NamespaceNestedNamespaces, NamespaceClasses, + + // File specific items + FileClasses, FileNamespaces, + FileIncludes, FileIncludeGraph, + FileIncludedByGraph, FileSourceLink, + + // Group specific items + GroupClasses, GroupInlineClasses, GroupNamespaces, + GroupDirs, GroupNestedGroups, GroupFiles, + GroupGraph, GroupPageDocs, + + // Directory specific items + DirSubDirs, DirFiles, DirGraph + + }; + virtual Kind kind() const = 0; +}; + +/** @brief Represents of a piece of a documentation page without configurable parts */ +struct LayoutDocEntrySimple : LayoutDocEntry +{ + public: + LayoutDocEntrySimple(Kind k) : m_kind(k) {} + Kind kind() const { return m_kind; } + private: + Kind m_kind; +}; + +struct LayoutDocEntrySection: public LayoutDocEntrySimple +{ + LayoutDocEntrySection(Kind k,const QCString &tl) : + LayoutDocEntrySimple(k), title(tl) {} + QCString title; +}; + +/** @brief Represents of a member declaration list with configurable title and subtitle. */ +struct LayoutDocEntryMemberDecl: public LayoutDocEntry +{ + LayoutDocEntryMemberDecl(MemberList::ListType tp, + const QCString &tl,const QCString &ss) + : type(tp), title(tl),subscript(ss) {} + + Kind kind() const { return MemberDecl; } + MemberList::ListType type; + QCString title; + QCString subscript; +}; + +/** @brief Represents of a member definition list with configurable title. */ +struct LayoutDocEntryMemberDef: public LayoutDocEntry +{ + LayoutDocEntryMemberDef(MemberList::ListType tp,const QCString &tl) + : type(tp), title(tl) {} + + Kind kind() const { return MemberDef; } + MemberList::ListType type; + QCString title; +}; + +/** @brief Base class for the layout of a navigation item at the top of the HTML pages. */ +struct LayoutNavEntry +{ + public: + enum Kind { + MainPage, + Pages, + Modules, + Namespaces, + NamespaceMembers, + Classes, + ClassAnnotated, + ClassHierarchy, + ClassMembers, + Files, + FileGlobals, + Dirs, + Examples + }; + LayoutNavEntry(LayoutNavEntry *parent,Kind k,bool vs,const QCString &bf, + const QCString &tl,const QCString &intro,bool prepend=FALSE) + : m_parent(parent), m_kind(k), m_visible(vs), m_baseFile(bf), m_title(tl), m_intro(intro) + { m_children.setAutoDelete(TRUE); + if (parent) { if (prepend) parent->prependChild(this); else parent->addChild(this); } + } + LayoutNavEntry *parent() const { return m_parent; } + Kind kind() const { return m_kind; } + QCString baseFile() const { return m_baseFile; } + QCString title() const { return m_title; } + QCString intro() const { return m_intro; } + bool visible() { return m_visible; } + void clear() { m_children.clear(); } + void addChild(LayoutNavEntry *e) { m_children.append(e); } + void prependChild(LayoutNavEntry *e) { m_children.prepend(e); } + const QList<LayoutNavEntry> &children() const { return m_children; } + LayoutNavEntry *find(LayoutNavEntry::Kind k) const; + + private: + LayoutNavEntry() : m_parent(0) {} + LayoutNavEntry *m_parent; + Kind m_kind; + bool m_visible; + QCString m_baseFile; + QCString m_title; + QCString m_intro; + QList<LayoutNavEntry> m_children; + friend class LayoutDocManager; +}; + +/** @brief Singleton providing access to the (user configurable) layout of the documentation */ +class LayoutDocManager +{ + class Private; + public: + enum LayoutPart + { + Class, Namespace, File, Group, Directory, + NrParts + }; + /** Returns a reference to this singleton. */ + static LayoutDocManager &instance(); + + /** Returns the list of LayoutDocEntry's in representation order for a given page identified by @a part. */ + const QList<LayoutDocEntry> &docEntries(LayoutPart part) const; + + /** returns the (invisible) root of the navigation tree. */ + LayoutNavEntry *rootNavEntry() const; + + /** Parses a user provided layout */ + void parse(QTextStream &t); + void init(); + private: + void addEntry(LayoutPart p,LayoutDocEntry*e); + void clear(LayoutPart p); + LayoutDocManager(); + ~LayoutDocManager(); + Private *d; + friend class LayoutParser; +}; + +void writeDefaultLayoutFile(const char *fileName); + +#endif + Index: branches/xZenu/src/util/doxygen/src/libdoxygen.t =================================================================== --- branches/xZenu/src/util/doxygen/src/libdoxygen.t (revision 0) +++ branches/xZenu/src/util/doxygen/src/libdoxygen.t (revision 1322) @@ -0,0 +1,145 @@ +# +# $Id: libdoxygen.t,v 1.1 2001/03/19 19:27:41 root Exp $ +# +# Copyright (C) 1997-2011 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. +#! +#! doxygen.t: This is a custom template for building Doxygen +#! +#$ IncludeTemplate("lib.t"); + +LEX = flex +YACC = bison +INCBUFSIZE = $(PERL) increasebuffer.pl + +#${ +sub GenerateDep { + my($obj,$src,$dep) = @_; + my(@objv,$srcv,$i,$s,$o,$d,$c); + @objv = split(/\s+/,$obj); + @srcv = split(/\s+/,$src); + for $i ( 0..$#objv ) { + $s = $srcv[$i]; + $o = $objv[$i]; + next if $s eq ""; + $text .= $o . ": " . $s; + $text .= " ${linebreak}\n\t\t" . $dep if $dep ne ""; + if ( $moc_output{$s} ne "" ) { + $text .= " ${linebreak}\n\t\t" . $moc_output{$s}; + } + $d = &make_depend($s); + $text .= " ${linebreak}\n\t\t" . $d if $d ne ""; + $text .= "\n"; + } + chop $text; +} +#$} + +#################### + +#$ GenerateDep("scanner.cpp","scanner.l"); + $(LEX) -PscanYY -t scanner.l | $(INCBUFSIZE) >scanner.cpp + +#$ GenerateDep("code.cpp","code.l"); + $(LEX) -PcodeYY -t code.l | $(INCBUFSIZE) >code.cpp + +#$ GenerateDep("pyscanner.cpp","pyscanner.l"); + $(LEX) -PpyscanYY -t pyscanner.l | $(INCBUFSIZE) >pyscanner.cpp + +#$ GenerateDep("pycode.cpp","pycode.l"); + $(LEX) -PpycodeYY -t pycode.l | $(INCBUFSIZE) >pycode.cpp + +#$ GenerateDep("fortranscanner.cpp","fortranscanner.l"); + $(LEX) -i -PfscanYY -t fortranscanner.l | $(INCBUFSIZE) >fortranscanner.cpp + +#$ GenerateDep("fortrancode.cpp","fortrancode.l"); + $(LEX) -i -PfcodeYY -t fortrancode.l | $(INCBUFSIZE) >fortrancode.cpp + +#$ GenerateDep("vhdlscanner.cpp","vhdlscanner.l"); + $(LEX) -i -PvhdlscanYY -t vhdlscanner.l | $(INCBUFSIZE) >vhdlscanner.cpp + +#$ GenerateDep("vhdlcode.cpp","vhdlcode.l"); + $(LEX) -i -PvhdlcodeYY -t vhdlcode.l | $(INCBUFSIZE) >vhdlcode.cpp + +#$ GenerateDep("pre.cpp","pre.l"); + $(LEX) -PpreYY -t pre.l | $(INCBUFSIZE) >pre.cpp + +#$ GenerateDep("declinfo.cpp","declinfo.l"); + $(LEX) -PdeclinfoYY -t declinfo.l | $(INCBUFSIZE) >declinfo.cpp + +#$ GenerateDep("defargs.cpp","defargs.l"); + $(LEX) -PdefargsYY -t defargs.l | $(INCBUFSIZE) >defargs.cpp + +#$ GenerateDep("doctokenizer.cpp","doctokenizer.l"); + $(LEX) -PdoctokenizerYY -t doctokenizer.l | $(INCBUFSIZE) >doctokenizer.cpp + +#$ GenerateDep("commentcnv.cpp","commentcnv.l"); + $(LEX) -PcommentcnvYY -t commentcnv.l | $(INCBUFSIZE) >commentcnv.cpp + +#$ GenerateDep("commentscan.cpp","commentscan.l"); + $(LEX) -PcommentScanYY -t commentscan.l | $(INCBUFSIZE) >commentscan.cpp + +#$ GenerateDep("ce_lex.cpp","constexp.l","ce_parse.h"); + $(LEX) -PcppExpYY -t constexp.l | $(INCBUFSIZE) >ce_lex.cpp + +#$ GenerateDep("ce_parse.cpp","constexp.y"); + $(YACC) -l -p cppExpYY constexp.y -o ce_parse.cpp + +#$ GenerateDep("ce_parse.h","constexp.y"); + $(YACC) -l -d -p cppExpYY constexp.y -o ce_parse.c + -rm ce_parse.c + +#$ GenerateDep("layout.cpp","layout_default.h"); + +TO_C_CMD=sed -e "s/\\\\/\\\\\\\\/g" -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" + +index_xsd.h: index.xsd + cat index.xsd | $(TO_C_CMD) >index_xsd.h + +compound_xsd.h: compound.xsd + cat compound.xsd | $(TO_C_CMD) >compound_xsd.h + +layout_default.h: layout_default.xml + cat layout_default.xml | $(TO_C_CMD) >layout_default.h + +search_php.h: search.php + cat search.php | $(TO_C_CMD) >search_php.h + +search_js.h: search.js + cat search.js | $(TO_C_CMD) >search_js.h + +search_css.h: search.css + cat search.css | $(TO_C_CMD) >search_css.h + +doxygen_css.h: doxygen.css + cat doxygen.css | $(TO_C_CMD) >doxygen_css.h + +navtree_js.h: navtree.js + cat navtree.js | $(TO_C_CMD) >navtree_js.h + +navindex_js.h: navindex.js + cat navindex.js | $(TO_C_CMD) >navindex_js.h + +resize_js.h: resize.js + cat resize.js | $(TO_C_CMD) >resize_js.h + +jquery_js.h: jquery.js + cat jquery.js | $(TO_C_CMD) >jquery_js.h + +jquery_ui_js.h: jquery_ui.js + cat jquery_ui.js | $(TO_C_CMD) >jquery_ui_js.h + +sizzle_js.h: sizzle.js + cat sizzle.js | $(TO_C_CMD) >sizzle_js.h + +navtree_css.h: navtree.css + cat navtree.css | $(TO_C_CMD) >navtree_css.h + Index: branches/xZenu/src/util/doxygen/src/translator_mk.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator_mk.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator_mk.h (revision 1322) @@ -0,0 +1,1767 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ +// Тranslated by Slave Jovanovski <slavejovanovski@yahoo.com> +// +// The cyrilic strings were entered using Macedonian language support in +// Windows. The editor used was Eclipse 3.2. The file was saved in UTF-8. +// +// Updates: +// -------- +// 2007/12/09 +// - Initial translation to Macedonian. +// +// 2008/05/22 +// - Translation for 1.5.4. +// +// + +#ifndef TRANSLATOR_MK_H +#define TRANSLATOR_MK_H + +class TranslatorMacedonian : public TranslatorAdapter_1_6_0 +{ + public: + + // --- Language control methods ------------------- + + /*! Used for identification of the language. The identification + * should not be translated. It should be replaced by the name + * of the language in English using lower-case characters only + * (e.g. "czech", "japanese", "russian", etc.). It should be equal to + * the identification used in language.cpp. + */ + virtual QCString idLanguage() + { return "macedonian"; } + + /*! Used to get the LaTeX command(s) for the language support. + * This method should return string with commands that switch + * LaTeX to the desired language. For example + * <pre>"\\usepackage[german]{babel}\n" + * </pre> + * or + * <pre>"\\usepackage{polski}\n" + * "\\usepackage[latin2]{inputenc}\n" + * "\\usepackage[T1]{fontenc}\n" + * </pre> + * + * The English LaTeX does not use such commands. Because of this + * the empty string is returned in this implementation. + */ + virtual QCString latexLanguageSupportCommand() + { + return "\\usepackage[macedonian]{babel}\n"; + } + + /*! return the language charset. This will be used for the HTML output */ + virtual QCString idLanguageCharset() + { + return "UTF-8"; + } + + // --- Language translation methods ------------------- + + /*! used in the compound documentation before a list of related functions. */ + virtual QCString trRelatedFunctions() + { return "Поврзани Функции"; } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return "(Овие функции не Ñе членови.)"; } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return "Детален опиÑ"; } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return "Документација на членови дефиниции на тип"; } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + { return "Документација на набројани членови"; } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { return "Документација на функции членови"; } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + //if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Документација на членови"; + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return "Повеќе..."; } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return "СпиÑок на Ñите членови."; } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return "СпиÑок на членови"; } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return "Ова е целоÑниот ÑпиÑок на членови на "; } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return ", вклучувајќи ги Ñите наÑледени членови."; } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ + virtual QCString trGeneratedAutomatically(const char *s) + { QCString result="ÐвтоматÑки Ñоздадено од Doxygen"; + if (s) result+=(QCString)" за "+s; + result+=" изворниот код."; + return result; + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return "име на набројан член"; } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return "вредноÑÑ‚ на набројан член"; } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return "дефиниран во"; } + + // quick reference sections + + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \\group command). + */ + virtual QCString trModules() + { return "Модули"; } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return "Стебло на клаÑи"; } + + /*! This is put above each page as a link to the list of annotated classes */ + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "СпиÑок на Структури"; + } + else + { + return "СпиÑок на КлаÑи"; + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return "СпиÑок на Датотеки"; } + + /*! This is put above each page as a link to all members of compounds. */ + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Членови"; + } + else + { + return "Членови на КлаÑата"; + } + } + + /*! This is put above each page as a link to all members of files. */ + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Глобални Членови"; + } + else + { + return "Членови на Датотеката"; + } + } + + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return "Страници Поврзани Ñо Оваа"; } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return "Примери"; } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return "Пребарај"; } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { return "Овој ÑпиÑок на наÑледување е приближно азбучно подреден:"; + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool extractAll) + { + QCString result="СпиÑок на Ñите "; + if (!extractAll) result+="документирани "; + result+="членови Ñо кратки опиÑи:"; + return result; + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "СпиÑок на Ñтруктури Ñо кратки опиÑи:"; + } + else + { + return "СпиÑок на клаÑи, Ñтруктури, унии и интерфејÑи " + "Ñо кратки опиÑи:"; + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result="СпиÑок на Ñите "; + if (!extractAll) + { + result+="документирани "; + } + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="Ñтруктури и унии"; + } + else + { + result+="членови на клаÑата"; + } + result+=" Ñо врÑки до "; + if (!extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="документацијата за Ñекој член на Ñтруктурата/унијата:"; + } + else + { + result+="документацијата на Ñекој член на клаÑата:"; + } + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="Ñтруктурите/униите на кои што припаѓаат:"; + } + else + { + result+="клаÑите на кои што припаѓаат:"; + } + } + return result; + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool extractAll) + { + QCString result="СпиÑок на Ñите "; + if (!extractAll) result+="документирани "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="функции, променливи, дефиниции, набројувања и дефиниции на тип"; + } + else + { + result+="членови на датотеки"; + } + result+=" Ñо врÑки до "; + if (extractAll) + result+="датотеките на кои што припаѓаат:"; + else + result+="документацијата:"; + return result; + } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return "СпиÑок на Ñите примери:"; } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return "СпиÑок на Ñите Ñтраници поврзани Ñо оваа и нивна документација:"; } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return "СпиÑок на Ñите модули:"; } + + // index titles (the project name is prepended for these) + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return "Документација"; } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° Модули"; } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° Стебло"; } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° Структури"; + } + else + { + return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° КлаÑи"; + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° Датотеки"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° Документација"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Документација на Структури"; + } + else + { + return "Документација на КлаÑи"; + } + } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return "Документија на Датотеки"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return "Документаија на Примери"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return "Документација на Страници"; } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return "Прирачник"; } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return "Дефинирања"; } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return "Прототипи на Функции"; } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return "Дефиниции на Тип"; } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return "Ðабројувања"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return "Функции"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return "Променливи"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return "ВредноÑти на Ðабројувањата"; } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return "Документција на Дефиниции"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return "Документација на Прототип на Функции"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return "Документација на Дефиниции на Тип"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return "Документација на Ðабројувања"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return "Документација на Функции"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return "Документација на Променливи"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Структури"; + } + else + { + return "КлаÑи"; + } + } + + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ + virtual QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result=(QCString)"Создадено на "+date; + if (projName) result+=(QCString)" за "+projName; + result+=(QCString)" од"; + return result; + } + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return "напишано од"; + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return (QCString)"Диаграм на наÑледување за "+clName+":"; + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return "Само за интерна употреба."; } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return "Предупредување"; } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return "Верзија"; } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return "Дата"; } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return "Враќа"; } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return "ИÑтотака погледнете"; } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return "Параметри"; } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return "ИÑклучоци"; } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return "Создадено од"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return "СпиÑок на Имиња на ПроÑтор"; } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool extractAll) + { + QCString result="СпиÑок на Ñите "; + if (!extractAll) result+="документирани "; + result+="имиња на проÑтор Ñо кратки опиÑи:"; + return result; + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return "Пријатели"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return "Документација на Пријатели и Поврзани Функции"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=(QCString)clName; + switch(compType) + { + case ClassDef::Class: result+=" КлаÑа"; break; + case ClassDef::Struct: result+=" Структура"; break; + case ClassDef::Union: result+=" Унија"; break; + case ClassDef::Interface: result+=" ИнтерфејÑ"; break; + case ClassDef::Protocol: result+=" Протокол"; break; + case ClassDef::Category: result+=" Категорија"; break; + case ClassDef::Exception: result+=" ИÑклучок"; break; + } + if (isTemplate) result+=" Образец"; + result+=" Повикување"; + return result; + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result = "ÐžÐ¿Ð¸Ñ Ð½Ð° Датотекaта "; + result += fileName; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result = "ÐžÐ¿Ð¸Ñ Ð½Ð° Имeто на ПроÑтор "; + result += namespaceName; + return result; + } + + virtual QCString trPublicMembers() + { return "Јавни Функции Членови"; } + virtual QCString trPublicSlots() + { return "Јавни Слотови"; } + virtual QCString trSignals() + { return "Сигнали"; } + virtual QCString trStaticPublicMembers() + { return "Статични Јавни Функции Членови"; } + virtual QCString trProtectedMembers() + { return "Заштитени Функции Членови"; } + virtual QCString trProtectedSlots() + { return "Заштитени Слотови"; } + virtual QCString trStaticProtectedMembers() + { return "Статични Заштитени Функции Членови"; } + virtual QCString trPrivateMembers() + { return "Приватни Функции Членови"; } + virtual QCString trPrivateSlots() + { return "Приватни Слотови"; } + virtual QCString trStaticPrivateMembers() + { return "Статични Приватни Функции Членови"; } + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + virtual QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i<numEntries;i++) + { + // use generateMarker to generate placeholders for the class links! + result+=generateMarker(i); // generate marker for entry i in the list + // (order is left to right) + + if (i!=numEntries-1) // not the last entry, so we need a separator + { + if (i<numEntries-2) // not the fore last entry + result+=", "; + else // the fore last entry + result+=" и "; + } + } + return result; + } + + /*! used in class documentation to produce a list of base classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritsList(int numEntries) + { + return "ÐаÑледува "+trWriteList(numEntries)+"."; + } + + /*! used in class documentation to produce a list of super classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritedByList(int numEntries) + { + return "ÐаÑледено од "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * members that are hidden by this one. + */ + virtual QCString trReimplementedFromList(int numEntries) + { + return "Преприменето од "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all member that overwrite the implementation of this member. + */ + virtual QCString trReimplementedInList(int numEntries) + { + return "Преприменето во "+trWriteList(numEntries)+"."; + } + + /*! This is put above each page as a link to all members of namespaces. */ + virtual QCString trNamespaceMembers() + { return "Членови на Име на ПроÑтор"; } + + /*! This is an introduction to the page with all namespace members */ + virtual QCString trNamespaceMemberDescription(bool extractAll) + { + QCString result="СпиÑок на Ñите "; + if (!extractAll) result+="документирани "; + result+="членови на името на проÑтор Ñо врÑки до "; + if (extractAll) + result+="документацијата на Ñекој член:"; + else + result+="името на проÑтор на кое што му припаѓаат:"; + return result; + } + /*! This is used in LaTeX as the title of the chapter with the + * index of all namespaces. + */ + virtual QCString trNamespaceIndex() + { return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° Имиња на ПроÑтор"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all namespaces. + */ + virtual QCString trNamespaceDocumentation() + { return "Документација на Имиња на ПроÑтор"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + virtual QCString trNamespaces() + { return "Имиња на ПроÑтор"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Class", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Документацијата за "; + switch(compType) + { + case ClassDef::Class: result+="оваа клаÑа"; break; + case ClassDef::Struct: result+="оваа Ñтруктура"; break; + case ClassDef::Union: result+="оваа унија"; break; + case ClassDef::Interface: result+="овој интерфејÑ"; break; + case ClassDef::Protocol: result+="овој протокол"; break; + case ClassDef::Category: result+="оваа категорија"; break; + case ClassDef::Exception: result+="овој иÑклучок"; break; + } + result+=" беше Ñоздадена од "; + if (single) result+="Ñледнава датотека:"; else result+="Ñледниве датотеки:"; + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + virtual QCString trAlphabeticalList() + { return "Ðзбучен СпиÑок"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + virtual QCString trReturnValues() + { return "Вратена ВредноÑÑ‚"; } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + virtual QCString trMainPage() + { return "Главна Страна"; } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + virtual QCString trPageAbbreviation() + { return "ÑÑ‚Ñ€."; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDefinedAtLineInSourceFile() + { + return "Дефиницијата е на линија @0 во датотека @1."; + } + virtual QCString trDefinedInSourceFile() + { + return "Дефинијата е во датотека @0."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() + { + return "ЗаÑтарено"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + virtual QCString trCollaborationDiagram(const char *clName) + { + return (QCString)"Диаграм на Ñоработка за "+clName+":"; + } + /*! this text is put before an include dependency graph */ + virtual QCString trInclDepGraph(const char *fName) + { + return (QCString)"Вклучен дијаграм на завиÑноÑÑ‚ за "+fName+":"; + } + /*! header that is put before the list of constructor/destructors. */ + virtual QCString trConstructorDocumentation() + { + return "Документација на КонÑтруктор и ДеÑтруктор"; + } + /*! Used in the file documentation to point to the corresponding sources. */ + virtual QCString trGotoSourceCode() + { + return "Оди до изворниот код на оваа датотека."; + } + /*! Used in the file sources to point to the corresponding documentation. */ + virtual QCString trGotoDocumentation() + { + return "Оди до документацијата на оваа датотека."; + } + /*! Text for the \\pre command */ + virtual QCString trPrecondition() + { + return "ПредуÑлов"; + } + /*! Text for the \\post command */ + virtual QCString trPostcondition() + { + return "ПоÑтуÑлов"; + } + /*! Text for the \\invariant command */ + virtual QCString trInvariant() + { + return "Инваријанта"; + } + /*! Text shown before a multi-line variable/enum initialization */ + virtual QCString trInitialValue() + { + return "ОÑновна вредноÑÑ‚:"; + } + /*! Text used the source code in the file index */ + virtual QCString trCode() + { + return "код"; + } + virtual QCString trGraphicalHierarchy() + { + return "Графичко Стебло на КлаÑи"; + } + virtual QCString trGotoGraphicalHierarchy() + { + return "Оди до графичкото Ñтебло на клаÑи"; + } + virtual QCString trGotoTextualHierarchy() + { + return "Оди до текÑтуалното Ñтебло на клаÑи"; + } + virtual QCString trPageIndex() + { + return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° Страници"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() + { + return "Забелешка"; + } + virtual QCString trPublicTypes() + { + return "Јавни Типови"; + } + virtual QCString trPublicAttribs() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Членови"; + } + else + { + return "Јавни Членови"; + } + } + virtual QCString trStaticPublicAttribs() + { + return "Статични Јавни Членови"; + } + virtual QCString trProtectedTypes() + { + return "Заштитени Типови"; + } + virtual QCString trProtectedAttribs() + { + return "Заштитени Членови"; + } + virtual QCString trStaticProtectedAttribs() + { + return "Статични Заштитени Типови"; + } + virtual QCString trPrivateTypes() + { + return "Приватни Типови"; + } + virtual QCString trPrivateAttribs() + { + return "Приватни Членови"; + } + virtual QCString trStaticPrivateAttribs() + { + return "Статични Приватни Членови"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\todo item */ + virtual QCString trTodo() + { + return "Ðезавршено"; + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return "СпиÑок на Ðезавршени"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { + return "Повикано од"; + } + virtual QCString trRemarks() + { + return "Забелешки"; + } + virtual QCString trAttention() + { + return "Внимание"; + } + virtual QCString trInclByDepGraph() + { + return "Овој дијаграм покажува кои датотеки Ñе " + "директно или индеректно вклучени во оваа датотека:"; + } + virtual QCString trSince() + { + return "Од"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return "Легенда на Дијаграмот"; + } + /*! page explaining how the dot graph's should be interpreted + * The %A in the text below are to prevent link to classes called "A". + */ + virtual QCString trLegendDocs() + { + return + "Оваа Ñтрана објаÑнува како да ги толкувате дијаграмите Ñоздадени" + " од doxygen.<p>\n" + "Ðа пример:\n" + "\\code\n" + "/*! Ðевидлива клаÑа заради ограничувања на дијаграмот */\n" + "class Invisible { };\n\n" + "/*! ОдÑечена клаÑа, врÑката на наÑледување е Ñкриена */\n" + "class Truncated : public Invisible { };\n\n" + "/* КлаÑата не е документирана Ñо doxygen коментари */\n" + "class Undocumented { };\n\n" + "/*! КлаÑа која е наÑледена Ñо јавно наÑледување */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! КлаÑа Образец */\n" + "template<class T> class Templ { };\n\n" + "/*! КлаÑа која е наÑледена Ñо заштитено наÑледување */\n" + "class ProtectedBase { };\n\n" + "/*! КлаÑа која е наÑледена Ñо приватно наÑледување */\n" + "class PrivateBase { };\n\n" + "/*! КлаÑа која е кориÑтена од Ñтрана на наÑледената клаÑа */\n" + "class Used { };\n\n" + "/*! КлаÑа која наÑледува од повеќе други клаÑи */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented,\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "Ðко вредноÑта на \\c MAX_DOT_GRAPH_HEIGHT во конфигурациÑката датотека " + "е 240 тогаш примерот ќе го Ñоздаде Ñледниов дијаграм:" + "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "Правоаголниците во дијаграмот погоре го имаат Ñледново значење:\n" + "<ul>\n" + "<li>Полн Ñив правоаголник ја означува Ñтруктурата или клаÑата за " + "којадијаграмот е Ñоздаден.\n" + "<li>Правоаголник Ñо црна граница означува документирана Ñтруктура или клаÑа.\n" + "<li>Правоаголник Ñо Ñива граница означува недокументирана Ñтруктура или клаÑа.\n" + "<li>Правоаголник Ñо црвена граница означува документирана Ñтруктура или клаÑа " + "за која не Ñите врÑки на наÑледување Ñе прикажани. Дијаграмот е одÑечен доколку " + "не го Ñобира во зададените граници..\n" + "</ul>\n" + "Стрелките го имаат Ñледново значење:\n" + "<ul>\n" + "<li>Сина Ñтрелка означува врÑка на јавно наÑледување помеѓу две клаÑи.\n" + "<li>Зелена Ñтрелка означува заштитено наÑледување.\n" + "<li>Црвена Ñтрелка означува приватно наÑледување.\n" + "<li>Виолетова иÑпрекината линија означува клаÑа која е кориÑтена или вклучена " + "во друга клаÑа. Стрелаката е означена Ñо името на променливата преку " + "која клаÑата е доÑтапна.\n" + "<li>Жолта иÑпрекината линија означува врÑка меѓу примерок од образец клаÑа " + "и клаÑата образец од која е Ñоздадена. Стрелката е означена Ñо имињата на " + "параметрите на клаÑата.\n" + "</ul>\n"; + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return "Легенда"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return "ТеÑÑ‚"; + } + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return "ЛиÑта на ТеÑтови"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return "DCOP Функции Членови"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return "ОÑобини"; + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return "Документација на ОÑобини"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Структури"; + } + else + { + return "КлаÑи"; + } + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)"Пакет "+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return "СпиÑок на Пакети"; + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return "Пакети Ñо краток Ð¾Ð¿Ð¸Ñ (доколку доÑтапен):"; + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return "Пакети"; + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return "ВредноÑÑ‚:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return "Дефект"; + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return "ЛиÑта на Дефекти"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file + * + * The following table shows the correlation of Charset name, Charset Value and + * <pre> + * Codepage number: + * Charset Name Charset Value(hex) Codepage number + * ------------------------------------------------------ + * DEFAULT_CHARSET 1 (x01) + * SYMBOL_CHARSET 2 (x02) + * OEM_CHARSET 255 (xFF) + * ANSI_CHARSET 0 (x00) 1252 + * RUSSIAN_CHARSET 204 (xCC) 1251 + * EE_CHARSET 238 (xEE) 1250 + * GREEK_CHARSET 161 (xA1) 1253 + * TURKISH_CHARSET 162 (xA2) 1254 + * BALTIC_CHARSET 186 (xBA) 1257 + * HEBREW_CHARSET 177 (xB1) 1255 + * ARABIC _CHARSET 178 (xB2) 1256 + * SHIFTJIS_CHARSET 128 (x80) 932 + * HANGEUL_CHARSET 129 (x81) 949 + * GB2313_CHARSET 134 (x86) 936 + * CHINESEBIG5_CHARSET 136 (x88) 950 + * </pre> + * + */ + virtual QCString trRTFansicp() + { + return "1252"; + } + + + /*! Used as ansicpg for RTF fcharset + * \see trRTFansicp() for a table of possible values. + */ + virtual QCString trRTFCharSet() + { + return "238"; + } + + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return "ПопиÑ"; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + QCString result((first_capital ? "КлаÑ" : "клаÑ")); + result += (singular ? "а" : "и"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + QCString result((first_capital ? "Датотек" : "датотек")); + result += (singular ? "а" : "и"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + QCString result((first_capital ? "Им" : "им")); + result += (singular ? "е на проÑтор" : "иња на проÑтори"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + QCString result((first_capital ? "Груп" : "груп")); + result += (singular ? "а" : "и"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + QCString result((first_capital ? "Стран" : "Ñтран")); + result += (singular ? "а" : "и"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + QCString result((first_capital ? "Член" : "член")); + if (!singular) result+="ови"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + QCString result((first_capital ? "Глобал" : "глобал")); + result += (singular ? "ен" : "ни"); + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + QCString result((first_capital ? "Ðвтор" : "автор")); + if (!singular) result+="и"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return "Повикувања"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Применува "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this abstract member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Применето во "+trWriteList(numEntries)+"."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return "Содржина"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "СпиÑок на ЗаÑтарени"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "ÐаÑтани"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Документација на ÐаÑтани"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return "Типови во Пакетот"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return "Функции во Пакетот"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return "Статични Функции во Пакетот"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return "Членови во Пакетот"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return "Статични Членови во Пакетот"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "Сите"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Дијаграм на повикувања за оваа функција:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + return "Пребарај"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "Резултати од Пребарувањето"; + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return "Ðема документи кои Ñе поклопуваат Ñо вашето барање."; + } + else if (numDocuments==1) + { + return "Пронајден <b>1</b> документ кој Ñе поклопува Ñо вашето барање."; + } + else + { + return "Пронајдени <b>$num</b> документи кои Ñе поклопуваат Ñо вашето барање." + "Ðајдобро поклопените документи Ñе прикажани први."; + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "Пронајдени:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return "Изворен код на датотеката " + filename; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return "Стебло на Именикот"; } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return "Документација на Именикот"; } + + /*! This is used as the title of the directory index and also in the + * Quick links of an HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return "Именици"; } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { return "Ова Ñтебло на именици е приближно азбучно подреден:";} + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { QCString result= "ÐžÐ¿Ð¸Ñ Ð½Ð° Именикот "; result += dirName; return result; } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool first_capital, bool singular) + { + QCString result((first_capital ? "Имени" : "имени")); + if (singular) result+="к"; else result+="ци"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return "Оваа е преоптоварена фунција. Се разликува по " + "типот и бројот на аргументи што ги прифаќа."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + /*! This is used to introduce a caller (or called-by) graph */ + virtual QCString trCallerGraph() + { + return "Ова е графот на повикување за оваа фунција:"; + } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { return "Документија на Ðабројувања"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 (mainly for Fortran) +////////////////////////////////////////////////////////////////////////// + + /*! header that is put before the list of member subprograms (Fortran). */ + virtual QCString trMemberFunctionDocumentationFortran() + { return "Документација на функции/процедури членови"; } + + /*! This is put above each page as a link to the list of annotated data types (Fortran). */ + virtual QCString trCompoundListFortran() + { return "СпиÑок на Типови"; } + + /*! This is put above each page as a link to all members of compounds (Fortran). */ + virtual QCString trCompoundMembersFortran() + { return "Членови"; } + + /*! This is an introduction to the annotated compound list (Fortran). */ + virtual QCString trCompoundListDescriptionFortran() + { return "СпиÑок на типови Ñо кратки опиÑи:"; } + + /*! This is an introduction to the page with all data types (Fortran). */ + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) + { + QCString result="СпиÑок на Ñите "; + if (!extractAll) + { + result+="документирани "; + } + result+="членови на типови"; + result+=" Ñо врÑки до "; + if (!extractAll) + { + result+="документацијата за Ñекој член:"; + } + else + { + result+="типовите на кои што припаѓаат:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index (Fortran). + */ + virtual QCString trCompoundIndexFortran() + { return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° Типови"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all data types (Fortran). + */ + virtual QCString trTypeDocumentation() + { return "Документација на Типови"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) subprograms (Fortran). + */ + virtual QCString trSubprograms() + { return "Функции/Процедури"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for subprograms (Fortran) + */ + virtual QCString trSubprogramDocumentation() + { return "Документација на Функции/Процедури"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds (Fortran) + */ + virtual QCString trDataTypes() + { return "Типови"; } + + /*! used as the title of page containing all the index of all modules (Fortran). */ + virtual QCString trModulesList() + { return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° Модули"; } + + /*! used as an introduction to the modules list (Fortran) */ + virtual QCString trModulesListDescription(bool extractAll) + { + QCString result="СпиÑок на Ñите "; + if (!extractAll) result+="документирани "; + result+="модули Ñо кратки опиÑи:"; + return result; + } + + /*! used as the title of the HTML page of a module/type (Fortran) */ + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=(QCString)clName + " - Повикување на"; + switch(compType) + { + case ClassDef::Class: result+=" КлаÑа"; break; + case ClassDef::Struct: result+=" Тип"; break; + case ClassDef::Union: result+=" Унија"; break; + case ClassDef::Interface: result+=" ИнтерфејÑ"; break; + case ClassDef::Protocol: result+=" Протокол"; break; + case ClassDef::Category: result+=" Категорија"; break; + case ClassDef::Exception: result+=" ИÑклучок"; break; + } + if (isTemplate) result+=" Образец"; + return result; + } + /*! used as the title of the HTML page of a module (Fortran) */ + virtual QCString trModuleReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" - Содржина на Модул"; + return result; + } + + /*! This is put above each page as a link to all members of modules. (Fortran) */ + virtual QCString trModulesMembers() + { return "Членови на Модул"; } + + /*! This is an introduction to the page with all modules members (Fortran) */ + virtual QCString trModulesMemberDescription(bool extractAll) + { + QCString result="СпиÑок на Ñите "; + if (!extractAll) result+="документирани "; + result+="членови на модулот Ñо врÑки до "; + if (extractAll) + { + result+="документацијата за Ñекој член:"; + } + else + { + result+="модулите на кои што припаѓаат:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all modules (Fortran). + */ + virtual QCString trModulesIndex() + { return "ÐŸÐ¾Ð¿Ð¸Ñ Ð½Ð° Модули"; } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trModule(bool first_capital, bool singular) + { + QCString result((first_capital ? "Модул" : "модул")); + if (!singular) result+="и"; + return result; + } + /*! This is put at the bottom of a module documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Module", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Документацијата за "; + switch(compType) + { + case ClassDef::Class: result+="оваа клаÑа"; break; + case ClassDef::Struct: result+="овој тип"; break; + case ClassDef::Union: result+="оваа унија"; break; + case ClassDef::Interface: result+="овој интерфејÑ"; break; + case ClassDef::Protocol: result+="овој протокол"; break; + case ClassDef::Category: result+="оваа категорија"; break; + case ClassDef::Exception: result+="овој иÑклучок"; break; + } + result+=" беше Ñоздадена од "; + if (single) result+="Ñледнава датотека:"; else result+="Ñледниве датотеки:"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trType(bool first_capital, bool singular) + { + QCString result((first_capital ? "Тип" : "тип")); + if (!singular) result+="ови"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trSubprogram(bool first_capital, bool singular) + { + QCString result((first_capital ? "Потпрограм" : "потпрограм")); + if (singular){ + result+="а"; + }else{ + result+="и"; + } + + return result; + } + + /*! C# Type Constraint list */ + virtual QCString trTypeConstraints() + { + return "Ограничувања на Тип"; + } +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/doxytag.l =================================================================== --- branches/xZenu/src/util/doxygen/src/doxytag.l (revision 0) +++ branches/xZenu/src/util/doxygen/src/doxytag.l (revision 1322) @@ -0,0 +1,930 @@ +/****************************************************************************** + * + * $Id: doxytag.l,v 1.27 2001/03/19 19:27:40 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +%{ +/* + * includes + */ +#include <stdio.h> +#include <assert.h> +#include <ctype.h> + +#include "qtbc.h" +#include <qstrlist.h> +#include <qfileinfo.h> +#include <qfile.h> +#include <qdict.h> +#include <qtextstream.h> +#include <qdir.h> + +#include "version.h" +//#include "suffixtree.h" +//#include "searchindex.h" +#include "logos.h" + +static QCString convertToXML(const char *s) +{ + QCString result; + if (s==0) return result; + const char *p=s; + char c; + while ((c=*p++)) + { + switch (c) + { + case '<': result+="<"; break; + case '>': result+=">"; break; + case '&': result+="&"; break; + case '\'': result+="'"; break; + case '"': result+="""; break; + default: result+=c; break; + } + } + return result; +} + +struct MemberDef +{ + QCString name; + QCString anchor; + QCString args; +}; + +struct ClassDef +{ + QCString name; + QStrList bases; + QCString fileName; + bool isFile; + QList<MemberDef> memberList; +}; + +QList<ClassDef> classList; +QDict<ClassDef> classDict(1009); +QList<ClassDef> fileList; +QDict<ClassDef> fileDict(1009); + +static bool genTag; +static bool genIndex; + +static QStrList bases; +static QCString inputString; +static int inputPosition; +static QCString yyFileName; +static int yyLineNr; +static QCString classFile; +static QCString memberRef; +static QCString memberName; +static QCString memberArgs; +static QCString className; +static QCString baseName; +static QCString docBaseLink; +static QCString docAnchor; +static QCString docRefName; +static bool nameBug; +//static SearchIndex searchIndex; + +#define YY_NEVER_INTERACTIVE 1 + +/* ----------------------------------------------------------------- + */ +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); + +static int yyread(char *buf,int max_size) +{ + int c=0; + while( c < max_size && inputString[inputPosition] ) + { + *buf = inputString[inputPosition++] ; + c++; buf++; + } + return c; +} + +static void addClass(const char *clName) +{ + if (classDict[clName]==0) + { + //printf("addClass(%s)\n",clName); + ClassDef *cd=new ClassDef; + cd->name=clName; + cd->fileName=yyFileName; + cd->isFile=FALSE; + classList.append(cd); + classDict.insert(clName,cd); + } +} + +static void addFile(const char *fName) +{ + if (classDict[fName]==0) + { + ClassDef *fd=new ClassDef; + fd->name=fName; + fd->fileName=yyFileName; + fd->isFile=TRUE; + classList.append(fd); + classDict.insert(fName,fd); + } +} + +static void addBases(const char *clName) +{ + ClassDef *cd=0; + if (clName && (cd=classDict[clName])) cd->bases=bases; +} + +static void addMember(const char *memName,const char *memRef,const char *memArgs) +{ + //printf("addMember(%s,%s,%s)\n",memName,memRef,memArgs); + ClassDef *cd=classList.last(); + if (cd) + { + MemberDef *md; + md=new MemberDef; + md->name=memName; + md->anchor=memRef; + md->args=memArgs; + cd->memberList.append(md); + } + else + { + //printf("Warning: found member %s %s but not class was found to insert it!\n", + // memName,memArgs); + } +} + +static void addReference() +{ + //printf("addReference() key: %s ref:%s\n", + // docRefName.data(),(docBaseLink+"#"+docAnchor).data()); + //if (genIndex && !docRefName.isEmpty() && !docBaseLink.isEmpty()) + //{ + // if (docAnchor.isEmpty()) + // searchIndex.addReference(docRefName,docBaseLink); + // else + // searchIndex.addReference(docRefName,docBaseLink+"#"+docAnchor); + // searchIndex.addWord(docRefName,docRefName,TRUE); + //} +} + +QCString unhtmlify(const char *str) +{ + QCString result; + const char *p=str; + char c; + while ((c=*p)!='\0') + { + if (c!='&') { result+=c; p++; } + else + { + if (strncmp(p,"&",5)==0) { result+='&'; p+=5; } + else if (strncmp(p,"<",4)==0) { result+='<'; p+=4; } + else if (strncmp(p,">",4)==0) { result+='>'; p+=4; } + else if (strncmp(p,""",6)==0) { result+='"'; p+=4; } + else /* should not happen */ { result+='&'; p++; } + } + } + return result; +} + +%} + +%x Start +%x SearchClassFile +%x ReadClassFile +%x CheckClassName +%x ReadClassName +%x SearchMemberRef +%x ReadMemberRef +%x SearchMemberName +%x ReadMemberName +%x ReadOperator +%x SearchBaseClasses +%x ReadBaseClass +%x SearchRefName +%x ReadRefName +%x SearchArgs +%x ReadArgs +%x SearchWords +%x SkipHTMLTag +%x CheckConstructor +%x SkipPreformated + +%x Qt3ReadType +%x Qt3ReadAnchor +%x Qt3ReadName +%x Qt3ReadOperator +%x Qt3ReadArgs + +%x DoxReadAnchor +%x DoxReadName +%x DoxReadArgs +%x DoxClassName +%x DoxClassBase + +%% + +<Start>^"<li>" { + BEGIN( SearchClassFile ); + } +<Start>^"<td"[^\n]*"<h1 align=center>" | // Qt-3.x.x +<Start>"</table><h1 align=\"center\">" | // Qt-4 +<Start>"</table><h1 class=\"title\">" | // >Qt-4.4.0 +<Start>^"<h1 align=center>" { // Qt variant + BEGIN( ReadClassName ); + } +<Start>^("<hr>")?"<h1>" { // Doxygen variant + BEGIN( ReadClassName ); + } +<Start>^"Inherits " { + //printf("Inherits found\n"); + BEGIN( SearchBaseClasses ); + } +<Start>^"<h3 class=\"fn\">"/[a-z_A-Z0-9] { // needed due to inconsistency in the Qt docs + BEGIN( CheckConstructor ); + } + + /* --------------------------------------------------- */ + /* Qt member extraction rules */ + +<Start>^"<h3 class=fn>" { + BEGIN( Qt3ReadType ); + } +<Start>^"<h3 class=fn><a name=\"" { // Qt-3.3+ html file + BEGIN( Qt3ReadAnchor ); + } +<Start>^"<h3 class=\"fn\"><a name=\"" { // Qt-4 html file + BEGIN( Qt3ReadAnchor ); + } +<Qt3ReadType>"<a name=\"" { + BEGIN( Qt3ReadAnchor ); + } +<Qt3ReadType>. +<Qt3ReadAnchor>[~a-z_A-Z0-9\-\[\]*+%\^&|!]+ { + memberRef = yytext; + } +<Qt3ReadAnchor>"\"></a>" { + BEGIN( Qt3ReadName ); + } +<Qt3ReadAnchor>. { + BEGIN( Start ); + } +<Qt3ReadName>[a-z_A-Z0-9]+"::operator" { + memberName="operator"; + BEGIN(Qt3ReadOperator); + } +<Qt3ReadOperator>[+\-*/%\^&|~!=\[\]]+ { memberName+=yytext; } +<Qt3ReadOperator>"<" { memberName+="<"; } +<Qt3ReadOperator>">" { memberName+=">"; } +<Qt3ReadOperator>"new" { memberName+=" new"; } +<Qt3ReadOperator>"delete" { memberName+=" delete"; } +<Qt3ReadOperator>"()" { memberName+="()"; BEGIN( Qt3ReadArgs ); } +<Qt3ReadOperator>. { unput(*yytext); BEGIN( Qt3ReadArgs ); } +<Qt3ReadName>[a-z_A-Z0-9]+"::"[~a-z_A-Z0-9]+ { + memberName=yytext; + memberName=memberName.mid(memberName.find("::")+2); + BEGIN(Qt3ReadArgs); + } +<Qt3ReadName>. +<Qt3ReadArgs>[ \t]*"(" { + memberArgs+='('; + } +<Qt3ReadArgs>"&" { memberArgs+='&'; } +<Qt3ReadArgs>"<" { memberArgs+='<'; } +<Qt3ReadArgs>">" { memberArgs+='>'; } +<Qt3ReadArgs>""" { memberArgs+='"'; } +<Qt3ReadArgs>" " { memberArgs+=' '; } +<Qt3ReadArgs>"</h3>" { + addMember(memberName,memberRef,memberArgs); + memberName.resize(0); + memberRef.resize(0); + memberArgs.resize(0); + BEGIN(Start); + } +<Qt3ReadArgs>"<"[^>]+">" +<Qt3ReadArgs>")" { + memberArgs+=')'; + addMember(memberName,memberRef,memberArgs); + memberName.resize(0); + memberRef.resize(0); + memberArgs.resize(0); + BEGIN(Start); + } +<Qt3ReadArgs>[a-z_A-Z0-9]+ { memberArgs+=yytext; } +<Qt3ReadArgs>. { memberArgs+=*yytext; } + + /* --------------------------------------------------- */ + /* Doxygen class extraction rules */ + +<Start>"<!-- doxytag: class=\"" { + className.resize(0); + BEGIN(DoxClassName); + } +<DoxClassName>[^&"]+ { + className=yytext; + addClass(className); + } +<DoxClassName>"<" { + className+='<'; + } +<DoxClassName>">" { + className+='>'; + } +<DoxClassName>"&" { + className+='&'; + } +<DoxClassName>""" { + className+='"'; + } +<DoxClassName>. { + className+=*yytext; + } +<DoxClassName>"\" -->" { + BEGIN(Start); + } + + /* --------------------------------------------------- */ + /* Doxygen inheritance extraction rules */ + +<Start>"<!-- doxytag: inherits=\"" { + bases.clear(); + baseName.resize(0); + BEGIN(DoxClassBase); + } +<DoxClassBase>[^&,"]+ { + baseName+=yytext; + } +<DoxClassBase>"," { + bases.append(baseName); + baseName.resize(0); + } +<DoxClassBase>"<" { + baseName+='<'; + } +<DoxClassBase>">" { + baseName+='>'; + } +<DoxClassBase>"&" { + baseName+='&'; + } +<DoxClassBase>""" { + baseName+='"'; + } +<DoxClassBase>. { + baseName+=*yytext; + } +<DoxClassBase>"\" -->" { + bases.append(baseName); + baseName.resize(0); + addBases(className); + BEGIN(Start); + } + + /* --------------------------------------------------- */ + /* Doxygen member extraction rules */ + +<Start>"<!-- doxytag: member=\"" { + memberName.resize(0); + BEGIN(DoxReadName); + } +<DoxReadName>[^&"]+ { + memberName+=yytext; + } +<DoxReadName>"<" { + memberName+='<'; + } +<DoxReadName>">" { + memberName+='>'; + } +<DoxReadName>"&" { + memberName+='&'; + } +<DoxReadName>""" { + memberName+='"'; + } +<DoxReadName>. { + memberName+=*yytext; + } +<DoxReadName>"\" ref=\"" { + memberName=memberName.mid(memberName.find("::")+2); + memberRef.resize(0); + BEGIN(DoxReadAnchor); + } +<DoxReadAnchor>[^&"]+ { + memberRef+=yytext; + } +<DoxReadAnchor>"<" { + memberRef+='<'; + } +<DoxReadAnchor>">" { + memberRef+='>'; + } +<DoxReadAnchor>"&" { + memberRef+='&'; + } +<DoxReadAnchor>""" { + memberRef+='"'; + } +<DoxReadAnchor>. { + memberRef+=*yytext; + } +<DoxReadAnchor>"\" args=\"" { + memberArgs.resize(0); + BEGIN(DoxReadArgs); + } +<DoxReadArgs>[^&"]+ { + memberArgs+=yytext; + } +<DoxReadArgs>"<" { + memberArgs+='<'; + } +<DoxReadArgs>">" { + memberArgs+='>'; + } +<DoxReadArgs>"&" { + memberArgs+='&'; + } +<DoxReadArgs>""" { + memberArgs+='"'; + } +<DoxReadArgs>. { + memberArgs+=*yytext; + } +<DoxReadArgs>"\" -->" { + addMember(memberName,memberRef,memberArgs); + memberName.resize(0); + memberRef.resize(0); + memberArgs.resize(0); + BEGIN(Start); + } + + /** --------------------------------------------------- */ + +<Start>"<pre>" { + BEGIN( SkipPreformated ); + } +<Start>"<a name=\"" { + BEGIN( SearchWords ); + } +<Start>"<" { + BEGIN( SkipHTMLTag ); + } +<Start>"&"[a-zA-Z]+";" +<Start,SkipPreformated>[a-z_A-Z][a-z_A-Z0-9]* { + //printf("tag: %s#%s ref: %s word: `%s'\n", + // docBaseLink.data(),docAnchor.data(), + // docRefName.data(),yytext); + //if (genIndex && !docRefName.isEmpty() && yyleng>2) + // searchIndex.addWord(docRefName, + // yytext,FALSE + // ); + } +<SkipPreformated>"</pre>" { + BEGIN( Start ); + } +<SkipPreformated>[^\<\n]+ +<CheckConstructor>[a-z_A-Z0-9~:]+ { + QCString s=yytext; + if (s.find("::")!=-1) + { + docRefName=yytext; + addReference(); + nameBug=TRUE; + } + else + { + nameBug=FALSE; + } + BEGIN( Start ); + } +<SearchWords>[a-z_A-Z0-9]+ { + docAnchor = yytext; + if (docAnchor=="details" || + docAnchor=="_details") + { + docRefName=className.copy(); + addReference(); + BEGIN( Start ); + } + else + { + BEGIN( SearchRefName ); + } + } +<SearchRefName>"\" doxytag=\"" { + BEGIN( ReadRefName ); + } +<SearchRefName>"\"></a><a" { // HACK: avoid finding links in code fragments + BEGIN( Start ); + } +<SearchRefName>"\"></a>" { // HACK: deal with Qt code + if (nameBug) + BEGIN( Start ); + else + BEGIN( ReadRefName ); + } + +<ReadRefName>[a-z_A-Z0-9:\.\+\-]*"operator"[ \t]*("new"|"delete"|("&"("&"|"=")*)|(">"(">"|"=")*)|("<"("<"|"=")*)|("->"[*]*)|[+\-*%/|~!=,\^]|[+\-*%/\^!|~=\[(][=|+\-\])]) { // hmm, looks impressive :-) + docRefName=unhtmlify(yytext); + addReference(); + BEGIN( Start ); + } +<ReadRefName>[a-z_A-Z0-9~:\.\+\-]+ { + //printf("ReadRef=%s\n",yytext); + docRefName=yytext; + addReference(); + BEGIN( Start ); + } +<SearchBaseClasses>"<a "[a-z_A-Z0-9 .:\=\"\-\+\/\@]+">" { + //printf("Search %s\n",yytext); + BEGIN( ReadBaseClass ); + } +<SearchBaseClasses>\n { + addBases(className); + BEGIN( Start ); + } +<ReadBaseClass>[a-z_A-Z0-9]+ { + bases.append(yytext); + BEGIN( SearchBaseClasses ); + } +<SearchClassFile>"<a class=\"el\" href=\"" { + BEGIN( ReadClassFile ); + } +<SearchClassFile>"<a href=\"" { + BEGIN( ReadClassFile ); + } +<ReadClassName>[a-z_A-Z0-9:\.\-\+]+ { + className=yytext; + BEGIN( CheckClassName); + } +<CheckClassName>"Class Reference" { + //printf("className=%s\n",className.data()); + addClass(className); + BEGIN( Start ); + } +<CheckClassName>"File Reference" { + //printf("className=%s\n",className.data()); + addFile(className); + BEGIN( Start ); + } +<CheckClassName>[a-z_A-Z0-9]+ { // not a class file + className.resize(0); + BEGIN( Start ); + } +<ReadClassFile>[a-z_A-Z0-9.\-\+]+ { + classFile=yytext; + BEGIN( SearchMemberRef ); + } +<SearchMemberRef,ReadClassFile>"#" { + if (YY_START==ReadClassFile) + { + classFile=yyFileName; + } + //BEGIN( ReadMemberRef ); + BEGIN( Start ); + } +<ReadMemberRef>[a-z_A-Z0-9]+ { + memberRef=yytext; + BEGIN( SearchMemberName ); + } +<SearchMemberName>"<strong>"|"<b>" { // <strong> is for qt-1.44, <b> is for qt-2.00 + BEGIN( ReadMemberName ); + } +<SearchMemberName>[a-z_A-Z~] { + unput(*yytext); + BEGIN( ReadMemberName ); + } +<ReadMemberName>"operator" { + memberName="operator"; + BEGIN( ReadOperator ); + } +<ReadOperator>[+\-*/%\^&|~!=()\[\]] { memberName+=*yytext; } +<ReadOperator>"<" { memberName+="<"; } +<ReadOperator>">" { memberName+=">"; } +<ReadOperator>"new" { memberName+=" new"; } +<ReadOperator>"delete" { memberName+=" delete"; } +<ReadOperator>"<" { BEGIN( SearchArgs ); } +<ReadMemberName>[a-z_A-Z0-9]+ { + memberName=yytext; + BEGIN( SearchArgs ); + } +<SearchArgs>"</a>" { + //printf("SearchArg className=%s memberName=%s\n",className.data(),memberName.data()); + if (!className.isEmpty() && !memberName.isEmpty()) + BEGIN( ReadArgs ); + else + BEGIN( Start ); + } +<ReadArgs>"&" { memberArgs+='&'; } +<ReadArgs>"<" { memberArgs+='<'; } +<ReadArgs>">" { memberArgs+='>'; } +<ReadArgs>""" { memberArgs+='"'; } +<ReadArgs>" " { memberArgs+=' '; } + /* +<ReadArgs>[{}] { // handle enums + memberArgs.resize(0); + addMember(memberName,memberRef,memberArgs); + if (*yytext=='}') + BEGIN( Start ); + else + BEGIN( SearchClassFile ); + } + */ +<ReadArgs>"<"|"\n" { + //printf("adding member %s\n",memberName.data()); + memberArgs=memberArgs.stripWhiteSpace(); + //if (newClass) + //{ + // newClass=FALSE; + // addClass(className); + //} + addMember(memberName,memberRef,memberArgs); + memberName.resize(0); + memberRef.resize(0); + memberArgs.resize(0); + if (*yytext=='<') + BEGIN( SkipHTMLTag); + else + BEGIN( Start ); + } +<ReadArgs>. { memberArgs+=(*yytext)&0x7f; } +<SkipHTMLTag>">" { BEGIN( Start ); } +<SkipHTMLTag>[a-zA-Z]+ +<*>. +<*>\n { yyLineNr++; + if (YY_START!=SkipHTMLTag) BEGIN( Start ); + } + +%% + +/*@ ---------------------------------------------------------------------------- + */ + + +void parse(QCString &s) +{ + bases.clear(); + nameBug = FALSE; + //newClass = TRUE; + inputString = s; + inputPosition = 0; + yyLineNr = 0; + tagYYrestart( tagYYin ); + BEGIN( Start ); + tagYYlex(); + //printf("Number of lines scanned: %d\n",yyLineNr); +} + +void parseFile(QFileInfo &fi) +{ + printf("Parsing file %s...\n",fi.fileName().data()); + QFile f; + f.setName(fi.absFilePath()); + if (f.open(IO_ReadOnly)) + { + yyFileName = fi.fileName(); + className.resize(0); + memberName.resize(0); + //printf("Parsing file %s...\n",fi.fileName().data()); + QCString input(fi.size()+1); + docBaseLink=fi.fileName(); + docRefName=fi.fileName().copy(); + //searchIndex.addReference(docRefName,docBaseLink); + //searchIndex.addWord(docRefName,docRefName,TRUE); + f.readBlock(input.data(),fi.size()); + input.at(fi.size())='\0'; + parse(input); + } + else + { + fprintf(stderr,"Warning: Cannot open file %s\n",fi.fileName().data()); + } +} + +void parseFileOrDir(const char *fileName) +{ + QFileInfo fi(fileName); + if (fi.exists()) + { + if (fi.isFile()) + { + parseFile(fi); + } + else if (fi.isDir()) + { + QDir dir(fileName); + dir.setFilter( QDir::Files ); + dir.setNameFilter( "*.html" ); + const QFileInfoList *list = dir.entryInfoList(); + QFileInfoListIterator it( *list ); + QFileInfo *cfi; + for ( it.toFirst() ; (cfi=it.current()) ; ++it) + { + if (cfi->isFile()) + { + parseFile(*cfi); + } + } + } + } + else + { + fprintf(stderr,"Warning: File %s does not exist\n",fileName); + } +} + +void usage(const char *name) +{ + fprintf(stderr,"Doxytag version %s\nCopyright Dimitri van Heesch 1997-2011\n\n", + versionString); + fprintf(stderr," Generates a tag file and/or a search index for a set of HTML files\n\n"); + fprintf(stderr,"Usage: %s [-t tag_file] [ html_file [html_file...] ]\n",name); + fprintf(stderr,"Options:\n"); + fprintf(stderr," -t <tag_file> Generate tag file <tag_file>.\n"); + fprintf(stderr,"If no HTML files are given all files in the current dir that\n" + "have a .html extension are parsed.\n\n"); + exit(1); +} + +const char *getArg(int argc,char **argv,int &optind,const char c) +{ + char *s=0; + if (strlen(&argv[optind][2])>0) + s=&argv[optind][2]; + else if (optind+1<argc) + s=argv[++optind]; + else + { + fprintf(stderr,"option -%c requires an argument\n",c); + exit(1); + } + return s; +} + +int main(int argc,char **argv) +{ + QCString tagName; + QCString indexName; + + int optind=1; + const char *arg; + while (optind<argc && argv[optind][0]=='-') + { + switch(argv[optind][1]) + { + case 't': + arg=getArg(argc,argv,optind,'t'); + tagName=arg; + break; + case 's': + arg=getArg(argc,argv,optind,'s'); + indexName=arg; + break; + case 'h': + case '?': + usage(argv[0]); + break; + default: + fprintf(stderr,"Unknown option -%c\n",argv[optind][1]); + usage(argv[0]); + } + optind++; + } + + genTag = !tagName.isEmpty(); + genIndex = !indexName.isEmpty(); + + if (!genTag && !genIndex) + { + fprintf(stderr,"Nothing to do !\n\n"); + usage(argv[0]); + } + + int i; + if (optind>=argc) + { + parseFileOrDir("."); + } + else + { + for (i=optind;i<argc;i++) + { + parseFileOrDir(argv[i]); + } + } + if (genIndex) + { + fprintf(stderr,"Error: doxytag cannot be used to generate a search index anymore.\n" + "This functionality has been integrated into doxygen.\n"); +// printf("Writing search index\n"); +// if (!searchIndex.saveIndex(indexName)) +// { +// fprintf(stderr,"Error: Could not write search index\n"); +// } +// QFileInfo fi(indexName); +// if (fi.exists()) +// { +// QCString dir=convertToQCString(fi.dir().absPath()); +// fi.setFile(dir+"/search.png"); +// if (!fi.exists()) writeSearchButton(dir); +// fi.setFile(dir+"/doxygen.png"); +// if (!fi.exists()) writeLogo(dir); +// fi.setFile(dir+"/search.cgi"); +// if (!fi.exists()) +// { +// QFile f; +// f.setName(dir+"/search.cgi"); +// if (f.open(IO_WriteOnly)) +// { +// QTextStream t(&f); +// t << "#!/bin/sh" << endl +// << "DOXYSEARCH=" << endl +// << "DOXYPATH=" << endl +// << "if [ -f $DOXYSEARCH ]" << endl +// << "then" << endl +// << " $DOXYSEARCH $DOXYPATH" << endl +// << "else" << endl +// << " echo \"Content-Type: text/html\"" << endl +// << " echo \"\"" << endl +// << " echo \"<H1>Error: $DOXYSEARCH not found. Check cgi script!\"" << endl +// << "fi" << endl; +// f.close(); +// } +// else +// { +// fprintf(stderr,"Error: could not open file %s for writing\n",(dir+"/search.cgi").data()); +// } +// } +// } + } + if (genTag) + { + QFile f; + f.setName(tagName); + if (f.open(IO_WriteOnly)) + { + QTextStream t(&f); + t << "<tagfile>" << endl; + ClassDef *cd=classList.first(); + while (cd) + { + t << " <compound kind=\""; + if (cd->isFile) t << "file"; else t << "class"; + t << "\">" << endl; + t << " <name>" << convertToXML(cd->name) << "</name>" << endl; + char *base=cd->bases.first(); + while (base) + { + t << " <base>" << convertToXML(base) << "</base>" << endl; + base=cd->bases.next(); + } + t << " <filename>" << convertToXML(cd->fileName) << "</filename>" << endl; + MemberDef *md=cd->memberList.first(); + while (md) + { + if (md->anchor.right(5)=="-enum") + { + t << " <member kind=\"enum\">" << endl; + } + else + { + t << " <member kind=\"function\">" << endl; + } + t << " <name>" << convertToXML(md->name) << "</name>" << endl; + t << " <anchor>" << convertToXML(md->anchor) << "</anchor>" << endl; + t << " <arglist>" << convertToXML(md->args) << "</arglist>" << endl; + t << " </member>" << endl; + md=cd->memberList.next(); + } + t << " </compound>" << endl; + cd=classList.next(); + } + t << "</tagfile>" << endl; + } + else + { + fprintf(stderr,"Error: Could not write tag file %s\n",tagName.data()); + } + } + return 0; +} + +extern "C" { +int tagYYwrap() { return 1 ; } +}; Index: branches/xZenu/src/util/doxygen/src/translator_cz.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator_cz.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator_cz.h (revision 1322) @@ -0,0 +1,1909 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef TRANSLATOR_CZ_H +#define TRANSLATOR_CZ_H + +// Updates: +// -------- +// 2010/06/01 - typo +// 2010/04/28 - Updates for "new since 1.6.3". +// 2009/09/02 - Updates for "new since 1.6.0 (mainly for the new search engine)". +// 2008/06/09 - Corrections in trLegendDocs(). +// 2007/11/13 - Update for "new since 1.5.4 (mainly for Fortran)". +// 2007/03/20 - removing decode(), conversion of literals to UTF-8. +// 2006/06/13 - translation of the trEnumerationValueDocumentation(). +// and clear in the Czech language. +// modified trCallGraph() to make the meaning unambiguous +// 2006/05/10 - Update for "new since 1.4.6" -- trCallerGraph(), +// 2005/03/08 - Update for "new since 1.4.1" (trOverloadText()) +// 2005/02/11 - The "never used" methods removed. +// 2004/09/14 - The new methods "since 1.3.9" implemented. +// 2004/06/16 - The new method "since 1.3.8" implemented. +// 2004/02/27 - Text inside the trCallGraph() corrected. +// 2004/02/26 - trLegendDocs() updated. +// 2003/08/13 - Four new methods "since 1.3.3" implemented. +// 2003/06/10 - Two new methods "since 1.3.1" implemented. +// 2003/04/28 - Five new methods "since 1.3" implemented. +// 2002/10/15 - The new trEvents() and trEventDocumentation() implemented. +// 2002/07/29 - The new trDeprecatedList() implemented. +// 2002/07/08 - The new trRTFTableOfContents() implemented. (my birthday! ;) +// 2002/03/05 - ... forgot to replace TranslatorAdapter... by Translator. +// 2002/01/23 - Two new methods "since 1.2.13" implemented. +// 2001/11/06 - trReferences() implemented. +// 2001/07/16 - trClassDocumentation() updated as in the English translator. +// 2001/05/25 - Corrections. +// 2001/05/18 - Updates, corrections. +// 2001/05/02 - Decode() inline changed to decode(); cleaning. +// level as other translators. +// class Translator. The English translator is now on the same +// introducing TranslatorAdapter class and the abstract base +// 2001/04/20 - Update for "new since 1.2.6-20010422". Experimental version +// 2001/04/10 - Updates (1.2.6-20010408), cleaning. +// 2001/03/12 - Minor correction of comments (synchronous with translator.h). +// 2001/02/26 - Update for "new since 1.2.5" version (trBug(), trBugList()). +// 2001/02/15 - trMore() now returns only "..." (ellipsis). +// 2001/01/09 - Update for "new since 1.2.4" version. +// 2000/10/17 - Update for "new since 1.2.2" version. +// 2000/09/11 - Update for "new since 1.2.1" version. +// 2000/09/06 - Reimplementation of trInheritsList(). +// 2000/08/31 - ISOToWin() and WinToISO() moved to the base class. +// 2000/08/30 - Macro DECODE replaced by the inline (thanks to Boris Bralo). +// 2000/08/24 - Corrections, updates. +// 2000/08/02 - Updated for 1.2.0 +// 2000/07/19 - Updates for "new since 1.1.5"; encoding conversion separated. +// 2000/07/10 - Update to 1.1.5; conditionally decoding to iso-8859-2 for UNIX. +// 2000/06/20 - Prototype: with diacritics; based on ver. 1.1.4 (from scratch). +// +// The first translation from English to Czech was started by +// Vlastimil Havran (1999--2000). The prototype version of Czech strings +// with diacritics was implemented by Petr Prikryl (prikrylp@skil.cz), +// 2000/06/20. Vlastimil agreed that Petr be the new maintainer. + +// Todo +// ---- +// - The trReimplementedFromList() should pass the kind of the +// reimplemented element. It can be method, typedef or possibly +// something else. It is difficult to find the general translation +// for all kinds in the Czech language. + +class TranslatorCzech : public Translator +{ + public: + // --- Language control methods ------------------- + + virtual QCString idLanguage() + { return "czech"; } + + virtual QCString latexLanguageSupportCommand() + { + return "\\usepackage[T2A]{fontenc}\n" + "\\usepackage[czech]{babel}\n"; + } + + /*! return the language charset. This will be used for the HTML output */ + virtual QCString idLanguageCharset() + { + return "utf-8"; + } + + // --- Language translation methods ------------------- + + /*! used in the compound documentation before a list of related functions. */ + virtual QCString trRelatedFunctions() + { return "Související funkce"; } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return "(Uvedené funkce nejsou Älenskými funkcemi.)"; } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return "Detailní popis"; } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return "Dokumentace k Älenským typům"; } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + { return "Dokumentace k Älenským výÄtům"; } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { return "Dokumentace k metodám"; } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dokumentace k položkám"; + } + else + { + return "Dokumentace k datovým Älenům"; + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return "..."; } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return "Seznam vÅ¡ech Älenů."; } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return "Seznam Älenů třídy"; } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return "Zde naleznete úplný seznam Älenů třídy "; } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return ", vÄetnÄ› vÅ¡ech zdÄ›dÄ›ných Älenů."; } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ + virtual QCString trGeneratedAutomatically(const char *s) + { QCString result("Generováno automaticky programem Doxygen " + "ze zdrojových textů"); + if (s) result += QCString(" projektu ") + s; + result += "."; + return result; + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return "jméno výÄtu"; } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return "hodnota výÄtu"; } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return "definován v"; } + + // quick reference sections + + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \\group command). + */ + virtual QCString trModules() + { return "Moduly"; } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return "Hierarchie tříd"; } + + /*! This is put above each page as a link to the list of annotated classes */ + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datové struktury"; + } + else + { + return "Seznam tříd"; + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return "Seznam souborů"; } + + /*! This is put above each page as a link to all members of compounds. */ + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datové položky"; + } + else + { + return "Seznam Älenů tříd"; + } + } + + /*! This is put above each page as a link to all members of files. */ + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Globální symboly"; + } + else + { + return "Symboly v souborech"; + } + } + + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return "Ostatní stránky"; } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return "Příklady"; } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return "Hledat"; } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { return "Zde naleznete seznam, vyjadÅ™ující vztah dÄ›diÄnosti tříd. " + "Je seÅ™azen pÅ™ibližnÄ› (ale ne úplnÄ›) podle abecedy:"; + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool extractAll) + { + QCString result="Zde naleznete seznam vÅ¡ech "; + if (!extractAll) result+="dokumentovaných "; + result+="souborů se struÄnými popisy:"; + return result; + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Následující seznam obsahuje identifikace datových " + "struktur a jejich struÄné popisy:"; + } + else + { + return "Následující seznam obsahuje pÅ™edevším identifikace " + "tříd, ale nacházejí se zde i další netriviální prvky, " + "jako jsou struktury (struct), unie (union) a rozhraní " + "(interface). V seznamu jsou uvedeny jejich struÄné " + "popisy:"; + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result= "Zde naleznete seznam vÅ¡ech "; + if (!extractAll) + { + result += "dokumentovaných "; + } + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result += "položek struktur (struct) a unií (union) "; + } + else + { + result += "Älenů tříd "; + } + + result += "s odkazy na "; + + if (extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result += "dokumentaci struktur/unií, ke kterým přísluÅ¡ejí:"; + } + else + { + result += "dokumentaci tříd, ke kterým přísluÅ¡ejí:"; + } + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="struktury/unie, ke kterým přísluÅ¡ejí:"; + } + else + { + result+="třídy, ke kterým přísluÅ¡ejí:"; + } + } + + return result; + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool extractAll) + { + QCString result="Zde naleznete seznam vÅ¡ech "; + if (!extractAll) result+="dokumentovaných "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="funkcí, promÄ›nných, maker, výÄtů a definic typů (typedef) " + "s odkazy na "; + } + else + { + result+="symbolů, které jsou definovány na úrovni svých souborů. " + "Pro každý symbol je uveden odkaz na "; + } + + if (extractAll) + result+="soubory, ke kterým přísluÅ¡ejí:"; + else + result+="dokumentaci:"; + + return result; + } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return "Zde naleznete seznam vÅ¡ech příkladů:"; } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return "Následující seznam odkazuje na další stránky projektu:"; } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return "Zde naleznete seznam vÅ¡ech modulů:"; } + + // index titles (the project name is prepended for these) + + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return "Dokumentace"; } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return "Rejstřík modulů"; } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return "Rejstřík hierarchie tříd"; } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Rejstřík datových struktur"; + } + else + { + return "Rejstřík tříd"; + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return "Rejstřík souborů"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return "Dokumentace modulů"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dokumentace datových struktur"; + } + else + { + return "Dokumentace tříd"; + } + } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return "Dokumentace souborů"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return "Dokumentace příkladů"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return "Dokumentace souvisejících stránek"; } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return "ReferenÄní příruÄka"; } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return "Definice maker"; } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return "Prototypy"; } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return "Definice typů"; } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return "VýÄty"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return "Funkce"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return "PromÄ›nné"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return "Hodnoty výÄtu"; } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return "Dokumentace k definicím maker"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return "Dokumentace prototypů"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return "Dokumentace definic typů"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return "Dokumentace výÄtových typů"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return "Dokumentace funkcí"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return "Dokumentace promÄ›nných"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datové struktry"; + } + else + { + return "Třídy"; + } + } + + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ + virtual QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result("Generováno "); + result += date; + if (projName) + result += QCString(" pro projekt ") + projName; + result += " programem"; + return result; + } + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return " -- autor "; + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return QCString("Diagram dÄ›diÄnosti pro třídu ") + clName; + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return "Pouze pro vnitÅ™ní použití."; } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return "Pozor"; } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return "Verze"; } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return "Datum"; } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return "Návratová hodnota"; } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return "Viz také"; } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return "Parametry"; } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return "Výjimky"; } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return "Generováno programem"; } + + // new since 0.49-990307 + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return "Seznam prostorů jmen"; } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool extractAll) + { + QCString result="Zde naleznete seznam vÅ¡ech "; + if (!extractAll) result+="dokumentovaných "; + result+="prostorů jmen se struÄným popisem:"; + return result; + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return "Friends"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return "Dokumentace k friends"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result("Dokumentace "); + if (isTemplate) result += "Å¡ablony "; + switch(compType) + { + case ClassDef::Class: result += "třídy "; break; + case ClassDef::Struct: result += "struktury "; break; + case ClassDef::Union: result += "unie "; break; + case ClassDef::Interface: result += "rozhraní "; break; + case ClassDef::Protocol: result += "protokolu "; break; + case ClassDef::Category: result += "kategorie "; break; + case ClassDef::Exception: result += "výjimky "; break; + } + result += clName; + return result; + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result("Dokumentace souboru "); + result+=fileName; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result("Dokumentace prostoru jmen "); + result+=namespaceName; + return result; + } + + /* + * these are for the member sections of a class, struct or union + */ + virtual QCString trPublicMembers() + { return "VeÅ™ejné metody"; } + virtual QCString trPublicSlots() + { return "VeÅ™ejné sloty"; } + virtual QCString trSignals() + { return "Signály"; } + virtual QCString trStaticPublicMembers() + { return "Statické veÅ™ejné metody"; } + virtual QCString trProtectedMembers() + { return "ChránÄ›né metody"; } + virtual QCString trProtectedSlots() + { return "ChránÄ›né sloty"; } + virtual QCString trStaticProtectedMembers() + { return "Statické chránÄ›né metody"; } + virtual QCString trPrivateMembers() + { return "Privátní metody"; } + virtual QCString trPrivateSlots() + { return "Privátní sloty"; } + virtual QCString trStaticPrivateMembers() + { return "Statické privátní metody"; } + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + virtual QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i<numEntries;i++) + { + // use generateMarker to generate placeholders for the class links! + result+=generateMarker(i); // generate marker for entry i in the list + // (order is left to right) + + if (i!=numEntries-1) // not the last entry, so we need a separator + { + if (i<numEntries-2) // not the fore last entry + result+=", "; + else // the fore last entry + result+=" a "; + } + } + return result; + } + + /*! used in class documentation to produce a list of base classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritsList(int numEntries) + { + QCString result("DÄ›dí z "); + result += (numEntries == 1) ? "bázové třídy " : "bázových tříd "; + result += trWriteList(numEntries) + "."; + return result; + } + + /*! used in class documentation to produce a list of super classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritedByList(int numEntries) + { + QCString result("ZdÄ›dÄ›na "); + result += (numEntries == 1) ? "třídou " : "třídami "; + result += trWriteList(numEntries) + "."; + return result; + } + + /*! used in member documentation blocks to produce a list of + * members that are hidden by this one. + */ + virtual QCString trReimplementedFromList(int numEntries) + { + QCString result("Reimplementuje stejnojmenný prvek z "); + result += trWriteList(numEntries) + "."; + return result; + } + + /*! used in member documentation blocks to produce a list of + * all member that overwrite the implementation of this member. + */ + virtual QCString trReimplementedInList(int numEntries) + { + QCString result("Reimplementováno v "); + result += trWriteList(numEntries) + "."; + return result; + } + + /*! This is put above each page as a link to all members of namespaces. */ + virtual QCString trNamespaceMembers() + { return "Symboly v prostorech jmen"; } + + /*! This is an introduction to the page with all namespace members */ + virtual QCString trNamespaceMemberDescription(bool extractAll) + { + QCString result="Zde naleznete seznam vÅ¡ech "; + if (!extractAll) result+="dokumentovaných "; + result+="symbolů, které jsou definovány ve svých prostorech jmen. " + "U každého je uveden odkaz na "; + if (extractAll) + result+="dokumentaci přísluÅ¡ného prostoru jmen:"; + else + result+="přísluÅ¡ný prostor jmen:"; + return result; + } + /*! This is used in LaTeX as the title of the chapter with the + * index of all namespaces. + */ + virtual QCString trNamespaceIndex() + { return "Rejstřík prostorů jmen"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all namespaces. + */ + virtual QCString trNamespaceDocumentation() + { return "Dokumentace prostorů jmen"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + virtual QCString trNamespaces() + { return "Prostory jmen"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Class", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Dokumentace pro "; + switch(compType) + { + case ClassDef::Class: result+="tuto třídu"; break; + case ClassDef::Struct: result+="tuto strukturu (struct)"; break; + case ClassDef::Union: result+="tuto unii (union)"; break; + case ClassDef::Interface: result+="toto rozhraní"; break; + case ClassDef::Protocol: result+="tento protokol "; break; + case ClassDef::Category: result+="tuto kategorii "; break; + case ClassDef::Exception: result+="tuto výjimku"; break; + } + result+=" byla generována z "; + if (single) result+="následujícího souboru:"; + else result+="následujících souborů:"; + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + virtual QCString trAlphabeticalList() + { return "Rejstřík tříd"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + virtual QCString trReturnValues() + { return "Vracené hodnoty"; } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + virtual QCString trMainPage() + { return "Hlavní stránka"; } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + virtual QCString trPageAbbreviation() + { return "s."; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDefinedAtLineInSourceFile() + { + return "Definice je uvedena na řádku @0 v souboru @1."; + } + virtual QCString trDefinedInSourceFile() + { + return "Definice v souboru @0."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() + { + return "Zastaralé"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + virtual QCString trCollaborationDiagram(const char *clName) + { + return (QCString)"Diagram tříd pro "+clName+":"; + } + /*! this text is put before an include dependency graph */ + virtual QCString trInclDepGraph(const char *fName) + { + return (QCString)"Graf závislostí na vkládaných souborech " + "pro "+fName+":"; + } + /*! header that is put before the list of constructor/destructors. */ + virtual QCString trConstructorDocumentation() + { + return "Dokumentace konstruktoru a destruktoru"; + } + /*! Used in the file documentation to point to the corresponding sources. */ + virtual QCString trGotoSourceCode() + { + return "Zobrazit zdrojový text tohoto souboru."; + } + /*! Used in the file sources to point to the corresponding documentation. */ + virtual QCString trGotoDocumentation() + { + return "Zobrazit dokumentaci tohoto souboru."; + } + /*! Text for the \\pre command */ + virtual QCString trPrecondition() + { + return "Precondition"; + } + /*! Text for the \\post command */ + virtual QCString trPostcondition() + { + return "Postcondition"; + } + /*! Text for the \\invariant command */ + virtual QCString trInvariant() + { + return "Invariant"; + } + /*! Text shown before a multi-line variable/enum initialization */ + virtual QCString trInitialValue() + { + return "Initializer:"; + } + /*! Text used the source code in the file index */ + virtual QCString trCode() + { + return "zdrojový text"; + } + virtual QCString trGraphicalHierarchy() + { + return "Grafické zobrazení hierarchie tříd"; + } + virtual QCString trGotoGraphicalHierarchy() + { + return "Zobrazit grafickou podobu hierarchie tříd"; + } + virtual QCString trGotoTextualHierarchy() + { + return "Zobrazit textovou podobu hierarchie tříd"; + } + virtual QCString trPageIndex() + { + return "Rejstřík stránek"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() + { + return "Poznámka"; + } + virtual QCString trPublicTypes() + { + return "VeÅ™ejné typy"; + } + virtual QCString trPublicAttribs() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Datové položky"; + } + else + { + return "VeÅ™ejné atributy"; + } + } + virtual QCString trStaticPublicAttribs() + { + return "Statické veÅ™ejné atributy"; + } + virtual QCString trProtectedTypes() + { + return "ChránÄ›né typy"; + } + virtual QCString trProtectedAttribs() + { + return "ChránÄ›né atributy"; + } + virtual QCString trStaticProtectedAttribs() + { + return "Statické chránÄ›né atributy"; + } + virtual QCString trPrivateTypes() + { + return "Privátní typy"; + } + virtual QCString trPrivateAttribs() + { + return "Privátní atributy"; + } + virtual QCString trStaticPrivateAttribs() + { + return "Statické privátní atributy"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a todo item */ + virtual QCString trTodo() + { + return "Plánované úpravy"; + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return "Seznam plánovaných úprav"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { + return "Používá se v"; + } + virtual QCString trRemarks() + { + return "Poznámky"; // ??? not checked in a context + } + virtual QCString trAttention() + { + return "UpozornÄ›ní"; // ??? not checked in a context + } + virtual QCString trInclByDepGraph() + { + return "Následující graf ukazuje, které soubory přímo nebo " + "nepřímo vkládají tento soubor:"; + } + virtual QCString trSince() + { + return "Od"; // ??? not checked in a context + } + +//////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return "VysvÄ›tlivky ke grafu"; + } + /*! page explaining how the dot graph's should be interpreted */ + virtual QCString trLegendDocs() + { + return + "Zde naleznete vysvÄ›tlení, jak mají být interpretovány grafy, " + "které byly generovány programem doxygen.<p>\n" + "Uvažujte následující příklad:\n" + "\\code\n" + "/*! Neviditelná třída, která se v grafu nezobrazuje, protože " + "doÅ¡lo k oÅ™ezání grafu. */\n" + "class Invisible { };\n\n" + "/*! Třída, u které doÅ¡lo k oÅ™ezání grafu. Vztah dÄ›diÄnosti " + "je skryt. */\n" + "class Truncated : public Invisible { };\n\n" + "/* Třída, která není dokumentována komentáři programu doxygen. */\n" + "class Undocumented { };\n\n" + "/*! Bázová třída dÄ›dÄ›ná veÅ™ejnÄ› (public inheritance). */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! Å ablona třídy. */\n" + "template<class T> class Templ { };\n\n" + "/*! Bázová třída, použitá pro chránÄ›né dÄ›dÄ›ní " + "(protected inheritance). */\n" + "class ProtectedBase { };\n\n" + "/*! Bázová třída, využitá pro privátní dÄ›dÄ›ní " + "(private inheritance). */\n" + "class PrivateBase { };\n\n" + "/*! Třída, která je využívána třídou Inherited. */\n" + "class Used { };\n\n" + "/*! Odvozená třída, která dÄ›dí z více tříd. */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented,\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "K výše uvedenému bude vygenerován následující graf:" + "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "Bloky (tj. uzly) v uvedeném grafu mají následující význam:\n" + "<ul>\n" + "<li>Å edÄ› vyplnÄ›ný obdélník reprezentuje strukturu nebo třídu, " + "pro kterou byl graf generován.\n" + "<li>Obdélník s Äerným obrysem oznaÄuje dokumentovanou " + "strukturu nebo třídu.\n" + "<li>Obdélník s Å¡edým obrysem oznaÄuje nedokumentovanou " + "strukturu nebo třídu.\n" + "<li>Obdélník s Äerveným obrysem oznaÄuje dokumentovanou " + "strukturu nebo třídu, pro kterou\n" + "nejsou zobrazeny vÅ¡echny vztahy dÄ›diÄnosti nebo obsažení. " + "Graf je oÅ™ezán v případÄ›, kdy jej\n" + "není možné umístit do vymezeného prostoru.\n" + "</ul>\n" + "Å ipky (tj. hrany grafu) mají následující význam:\n" + "<ul>\n" + "<li>TmavÄ› modrá Å¡ipka se používá pro oznaÄení vztahu veÅ™ejné " + "dÄ›diÄnosti (public) mezi dvÄ›ma třídami.\n" + "<li>TmavÄ› zelená Å¡ipka oznaÄuje vztah chránÄ›né dÄ›diÄnosti " + "(protected).\n" + "<li>TmavÄ› Äervená Å¡ipka oznaÄuje vztah privátní dÄ›diÄnosti " + "(private).\n" + "<li>Purpurová Å¡ipka kreslená ÄárkovanÄ› se používá v případÄ›, " + "kdy je třída obsažena v jiné třídÄ›,\n" + "nebo kdy je používána jinou třídou. Je oznaÄena identifikátorem " + "jedné nebo více promÄ›ných, pÅ™es které\n" + "je třída nebo struktura zpřístupnÄ›na.\n" + "<li>Žlutá Å¡ipka kreslená ÄárkovanÄ› vyjadÅ™uje vztah mezi instancí Å¡ablony " + "a Å¡ablonou třídy, na základÄ› které byla\n" + "instance Å¡ablony vytvoÅ™ena. V popisu Å¡ipky jsou uvedeny přísluÅ¡né" + " parametry Å¡ablony.\n" + "</ul>\n"; + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return "vysvÄ›tlivky"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return "Test"; + } + + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return "Seznam testů"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return "Metody DCOP"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return "Vlastnosti"; + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return "Dokumentace k vlastnosti"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + return "Třídy"; + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return QCString("Balík ") + name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return "Seznam balíků"; + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return "Zde naleznete seznam balíků se struÄným popisem " + "(pokud byl uveden):"; + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return "Balíky"; + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return "Hodnota:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return "Chyba"; + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return "Seznam chyb"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6-20010422 +////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file */ + virtual QCString trRTFansicp() + { + return "1250"; + } + + /*! Used as ansicpg for RTF fcharset */ + virtual QCString trRTFCharSet() + { + return "238"; + } + + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return "Rejstřík"; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + QCString result((first_capital ? "Tříd" : "tříd")); + result += singular ? "a" : "y"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + QCString result((first_capital ? "Soubor" : "soubor")); + if (!singular) result+="y"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + QCString result((first_capital ? "Prostor" : "prostor")); + if (!singular) result+="y"; + result+=" jmen"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + QCString result((first_capital ? "Skupin" : "skupin")); + result += singular ? "a" : "y"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + QCString result((first_capital ? "Stránk" : "stránk")); + result += singular ? "a" : "y"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + QCString result((first_capital ? "ÄŒlen" : "Älen")); + if (!singular) + result += "y"; + return result; + } + + /*! ??? Jak to prelozit? Bylo by dobre, kdyby se ozval nekdo, + * kdo to pouziva. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + QCString result((first_capital ? "Global" : "global")); + if (!singular) result+="s"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + QCString result((first_capital ? "Auto" : "auto")); + result += (singular) ? "r" : "Å™i"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return "Odkazuje se na"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Implementuje "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Implementováno v "+trWriteList(numEntries)+"."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return "Obsah"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Seznam zastaralých prvků"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Události"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Dokumentace událostí"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return "Typy v balíku"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return "Funkce v balíku"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return "Statické funkce v balíku"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return "Atributy balíku"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return "Statické atributy balíku"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "VÅ¡e"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Tato funkce volá..."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the index + * of each page before the search field. + */ + virtual QCString trSearchForIndex() + { + return "Vyhledat"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "Výsledky vyhledávání"; + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return "Lituji. VaÅ¡emu dotazu neodpovídá žádný dokument."; + } + else if (numDocuments==1) + { + return "Nalezen jediný dokument, který vyhovuje vaÅ¡emu dotazu."; + } + else + { + return "Nalezeno <b>$num</b> dokumentů, které vyhovují vaÅ¡emu " + "dotazu. Nejlépe odpovídající dokumenty jsou zobrazeny " + "jako první."; + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "Nalezená slova:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return QCString("Zdrojový soubor ") + filename; + } + + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return "Hierarchie adresářů"; } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return "Dokumentace k adresářům"; } + + /*! This is used as the title of the directory index and also in the + * Quick links of a HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return "Adresáře"; } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { + return "Následující hierarchie adresářů je zhruba, " + "ale ne úplnÄ›, Å™azena podle abecedy:"; + } + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { + QCString result = "Reference k adresáři "; + result += dirName; + return result; + } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool first_capital, bool singular) + { + QCString result((first_capital ? "Adresář" : "adresář")); + if ( ! singular) + result += "e"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return "Jde o pÅ™etíženou (overloaded) metodu, " + "která má usnadnit používání. Od výše uvedené metody se liší " + "pouze jinak zadávanými argumenty."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trCallerGraph() + { + return "Tuto funkci volají..."; + } + + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { + return "Dokumentace výÄtových hodnot"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 (mainly for Fortran) +////////////////////////////////////////////////////////////////////////// + + /*! header that is put before the list of member subprograms (Fortran). */ + virtual QCString trMemberFunctionDocumentationFortran() + { return "Dokumentace Älenských funkcí/podprogramů"; } + + /*! This is put above each page as a link to the list of annotated data types (Fortran). */ + virtual QCString trCompoundListFortran() + { return "Seznam datových typů"; } + + /*! This is put above each page as a link to all members of compounds (Fortran). */ + virtual QCString trCompoundMembersFortran() + { return "Datová pole"; } + + /*! This is an introduction to the annotated compound list (Fortran). */ + virtual QCString trCompoundListDescriptionFortran() + { return "Datové typy se struÄnými popisy:"; } + + /*! This is an introduction to the page with all data types (Fortran). */ + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) + { + + QCString result="Následuje seznam vÅ¡ech "; + if (!extractAll) + { + result+="dokumentovaných "; + } + result+="složek datových typů"; + result+=" s odkazy na "; + if (!extractAll) + { + result+="dokumentaci datové struktury pro každou složku:"; + } + else + { + result+="přísluÅ¡né datové typy:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index (Fortran). + */ + virtual QCString trCompoundIndexFortran() + { return "Rejstřík datových typů"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all data types (Fortran). + */ + virtual QCString trTypeDocumentation() + { return "Dokumentace k datovým typům"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) subprograms (Fortran). + */ + virtual QCString trSubprograms() + { return "Funkce/podprogramy"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for subprograms (Fortran) + */ + virtual QCString trSubprogramDocumentation() + { return "Dokumentace funkce/podprogramu"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds (Fortran) + */ + virtual QCString trDataTypes() + { return "Datové typy"; } + + /*! used as the title of page containing all the index of all modules (Fortran). */ + virtual QCString trModulesList() + { return "Seznam modulů"; } + + /*! used as an introduction to the modules list (Fortran) */ + virtual QCString trModulesListDescription(bool extractAll) + { + QCString result="Následuje seznam vÅ¡ech "; + if (!extractAll) result+="dokumentovaných "; + result+="modulů se struÄnými popisy:"; + return result; + } + + /*! used as the title of the HTML page of a module/type (Fortran) */ + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result("Dokumentace "); + if (isTemplate) result += "Å¡ablony "; + switch(compType) + { + case ClassDef::Class: result += "třídy "; break; + case ClassDef::Struct: result += "typu "; break; + case ClassDef::Union: result += "unie "; break; + case ClassDef::Interface: result += "rozhraní "; break; + case ClassDef::Protocol: result += "protokolu "; break; + case ClassDef::Category: result += "kategorie "; break; + case ClassDef::Exception: result += "výjimky "; break; + } + result += clName; + return result; + + } + /*! used as the title of the HTML page of a module (Fortran) */ + virtual QCString trModuleReference(const char *namespaceName) + { + QCString result="Dokumentace modulu "; + result += namespaceName; + return result; + } + + /*! This is put above each page as a link to all members of modules. (Fortran) */ + virtual QCString trModulesMembers() + { return "Části modulu"; } + + /*! This is an introduction to the page with all modules members (Fortran) */ + virtual QCString trModulesMemberDescription(bool extractAll) + { + QCString result="Následuje seznam vÅ¡ech "; + if (!extractAll) result+="dokumentovaných "; + result+="Äástí modulů s odkazy "; + if (extractAll) + { + result+="na dokumentaci modulu pro danou Äást:"; + } + else + { + result+="na moduly, ke kterým Äást patří:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all modules (Fortran). + */ + virtual QCString trModulesIndex() + { return "Rejstřík modulů"; } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trModule(bool first_capital, bool singular) + { + QCString result((first_capital ? "Modul" : "modul")); + if (!singular) result+="y"; + return result; + } + /*! This is put at the bottom of a module documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Module", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Dokumentace "; + switch(compType) + { + case ClassDef::Class: result+="k tomuto modulu"; break; + case ClassDef::Struct: result+="k tomuto typu"; break; + case ClassDef::Union: result+="k této unii"; break; + case ClassDef::Interface: result+="k tomuto rozhraní"; break; + case ClassDef::Protocol: result+="k tomuto protokolu"; break; + case ClassDef::Category: result+="k této kategorii"; break; + case ClassDef::Exception: result+="k této výjimce"; break; + } + result+=" byla vygenerována z "; + if (single) result+="následujícího souboru:"; + else result+="následujících souborů:"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trType(bool first_capital, bool singular) + { + QCString result((first_capital ? "Typ" : "typ")); + if (!singular) result+="y"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trSubprogram(bool first_capital, bool singular) + { + QCString result((first_capital ? "Podprogram" : "podprogram")); + if (!singular) result+="y"; + return result; + } + + /*! C# Type Contraint list */ + virtual QCString trTypeConstraints() + { + return "Omezení typů (Type Constraints)"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.0 (mainly for the new search engine) +////////////////////////////////////////////////////////////////////////// + + /*! directory relation for \a name */ + virtual QCString trDirRelation(const char *name) + { + return "Relace " + QCString(name); + } + + /*! Loading message shown when loading search results */ + virtual QCString trLoading() + { + return "NaÄítám..."; + } + + /*! Label used for search results in the global namespace */ + virtual QCString trGlobalNamespace() + { + return "Globální prostor jmen"; + } + + /*! Message shown while searching */ + virtual QCString trSearching() + { + return "Vyhledávám..."; + } + + /*! Text shown when no search results are found */ + virtual QCString trNoMatches() + { + return "Nic se nenaÅ¡lo"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Graf závislosti adresářů pro "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"Soubor v "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Vkládá (include) soubor z "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "po","út","st","Ät","pá","so","ne" }; + static const char *months[] = { "led","úno","bÅ™e","dub","kvÄ›","Äer","Äec","srp","zář","říj","lis","pro" }; + QCString sdate; + sdate.sprintf("%s %d. %s %d",days[dayOfWeek-1],day,months[month-1],year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d.%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + +}; +#endif // TRANSLATOR_CZ_H Index: branches/xZenu/src/util/doxygen/src/rtfgen.h =================================================================== --- branches/xZenu/src/util/doxygen/src/rtfgen.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/rtfgen.h (revision 1322) @@ -0,0 +1,277 @@ +/****************************************************************************** + * + * $Id: rtfgen.h,v 1.13 2001/03/19 19:27:41 root Exp $ + * + * Copyright (C) 1997-2011 by Parker Waechter & Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef RTFGEN_H +#define RTFGEN_H + +#include "outputgen.h" + +class QFile; + +class RTFGenerator : public OutputGenerator +{ + public: + RTFGenerator(); + ~RTFGenerator(); + static void init(); + static void writeStyleSheetFile(QFile &f); + static void writeExtensionsFile(QFile &file); + + void enable() + { if (genStack->top()) active=*genStack->top(); else active=TRUE; } + void disable() { active=FALSE; } + void enableIf(OutputType o) { if (o==RTF) active=TRUE; } + void disableIf(OutputType o) { if (o==RTF) active=FALSE; } + void disableIfNot(OutputType o) { if (o!=RTF) active=FALSE; } + bool isEnabled(OutputType o) { return (o==RTF && active); } + OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; } + + void printDoc(DocNode *,const char *); + + void startFile(const char *name,const char *manName,const char *title); + void writeFooter() {} + void endFile(); + void clearBuffer(); + //void postProcess(QByteArray &); + + void startIndexSection(IndexSections); + void endIndexSection(IndexSections); + void writePageLink(const char *,bool); + void startProjectNumber(); + void endProjectNumber(); + void writeStyleInfo(int part); + void startTitleHead(const char *); + void startTitle(); + void endTitleHead(const char *,const char *name); + void endTitle() {} + + void newParagraph(); + void startParagraph(); + void endParagraph(); + void writeString(const char *text); + void startIndexListItem(); + void endIndexListItem(); + void startIndexList(); + void endIndexList(); + void startIndexKey(); + void endIndexKey(); + void startIndexValue(bool); + void endIndexValue(const char *,bool); + void startItemList(); + void endItemList(); + void startIndexItem(const char *ref,const char *file); + void endIndexItem(const char *ref,const char *file); + void docify(const char *text); + void codify(const char *text); + void writeObjectLink(const char *ref,const char *file, + const char *anchor,const char *name); + void writeCodeLink(const char *ref, const char *file, + const char *anchor,const char *name, + const char *tooltip); + void startTextLink(const char *f,const char *anchor); + void endTextLink(); + void startHtmlLink(const char *url); + void endHtmlLink(); + void startTypewriter() { t << "{\\f2 "; } + void endTypewriter() { t << "}"; } + void startGroupHeader(int); + void endGroupHeader(int); + //void writeListItem(); + void startItemListItem(); + void endItemListItem(); + + void startMemberSections() {} + void endMemberSections() {} + void startHeaderSection() {} + void endHeaderSection() {} + void startMemberHeader(const char *) { startGroupHeader(FALSE); } + void endMemberHeader() { endGroupHeader(FALSE); } + void startMemberSubtitle(); + void endMemberSubtitle(); + void startMemberDocList() {} + void endMemberDocList() {} + void startMemberList(); + void endMemberList(); + void startInlineDescription(); + void endInlineDescription(); + void startInlineHeader(); + void endInlineHeader(); + void startAnonTypeScope(int) {} + void endAnonTypeScope(int) {} + void startMemberItem(int); + void endMemberItem(); + void startMemberTemplateParams() {} + void endMemberTemplateParams() {} + void insertMemberAlign(bool) {} + + void writeRuler() { rtfwriteRuler_thin(); } + + void writeAnchor(const char *fileName,const char *name); + void startCodeFragment(); + void endCodeFragment(); + void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } + void startCodeLine() { col=0; } + void endCodeLine() { lineBreak(); } + void startEmphasis() { t << "{\\i "; } + void endEmphasis() { t << "}"; } + void startBold() { t << "{\\b "; } + void endBold() { t << "}"; } + void startDescription(); + void endDescription(); + void startDescItem(); + void endDescItem(); + void lineBreak(const char *style=0); + void startMemberDoc(const char *,const char *,const char *,const char *,bool); + void endMemberDoc(bool); + void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *); + void endDoxyAnchor(const char *,const char *); + void startCodeAnchor(const char *) {}; + void endCodeAnchor() {}; + void writeChar(char c); + void writeLatexSpacing() {};//{ t << "\\hspace{0.3cm}"; } + void writeStartAnnoItem(const char *type,const char *file, + const char *path,const char *name); + void writeEndAnnoItem(const char *name); + void startSubsection(); + void endSubsection(); + void startSubsubsection(); + void endSubsubsection(); + void startCenter() { t << "{\\qc" << endl; } + void endCenter() { t << "}"; } + void startSmall() { t << "{\\sub "; } + void endSmall() { t << "}"; } + + void startMemberDescription(); + void endMemberDescription(); + void startDescList(SectionTypes); + void startSimpleSect(SectionTypes,const char *,const char *,const char *); + void endSimpleSect(); + void startParamList(ParamListTypes,const char *); + void endParamList(); + //void writeDescItem(); + void startDescForItem(); + void endDescForItem(); + void startSection(const char *,const char *,SectionInfo::SectionType); + void endSection(const char *,SectionInfo::SectionType); + void addIndexItem(const char *,const char *); + void startIndent(); + void endIndent(); + void writeSynopsis() {} + void startClassDiagram(); + void endClassDiagram(const ClassDiagram &,const char *filename,const char *name); + void startPageRef(); + void endPageRef(const char *,const char *); + void startQuickIndices() {} + void endQuickIndices() {} + void writeSplitBar(const char *) {} + void writeLogo() {} + void writeQuickLinks(bool,HighlightedItem) {} + void startContents() {} + void endContents() {} + void writeNonBreakableSpace(int); + + void startDescTable(); + void endDescTable(); + void startDescTableTitle(); + void endDescTableTitle(); + void startDescTableData(); + void endDescTableData(); + + void startDotGraph(); + void endDotGraph(const DotClassGraph &); + void startInclDepGraph(); + void endInclDepGraph(const DotInclDepGraph &); + void startGroupCollaboration(); + void endGroupCollaboration(const DotGroupCollaboration &g); + void startCallGraph(); + void endCallGraph(const DotCallGraph &); + void startDirDepGraph(); + void endDirDepGraph(const DotDirDeps &g); + void writeGraphicalHierarchy(const DotGfxHierarchyTable &) {} + + void startMemberGroupHeader(bool); + void endMemberGroupHeader(); + void startMemberGroupDocs(); + void endMemberGroupDocs(); + void startMemberGroup(); + void endMemberGroup(bool); + + void startTextBlock(bool dense); + void endTextBlock(bool); + void lastIndexPage(); + + void startMemberDocPrefixItem() {} + void endMemberDocPrefixItem() {} + void startMemberDocName(bool) {} + void endMemberDocName() {} + void startParameterType(bool,const char *); + void endParameterType() {} + void startParameterName(bool) {} + void endParameterName(bool,bool,bool) {} + void startParameterList(bool) {} + void endParameterList() {} + + void startConstraintList(const char *); + void startConstraintParam(); + void endConstraintParam(); + void startConstraintType(); + void endConstraintType(); + void startConstraintDocs(); + void endConstraintDocs(); + void endConstraintList(); + + + void startFontClass(const char *) {} + void endFontClass() {} + + void writeCodeAnchor(const char *) {} + void linkableSymbol(int,const char *,Definition *,Definition *) {} + + static bool preProcessFileInplace(const char *path,const char *name); + + private: + RTFGenerator(const RTFGenerator &); + RTFGenerator &operator=(const RTFGenerator &); + + const char *rtf_BList_DepthStyle(); + const char *rtf_CList_DepthStyle(); + const char *rtf_EList_DepthStyle(); + const char *rtf_LCList_DepthStyle(); + const char *rtf_DList_DepthStyle(); + const char *rtf_Code_DepthStyle(); + void incrementIndentLevel(); + void decrementIndentLevel(); + int col; + + bool m_bstartedBody; // has startbody been called yet? + int m_listLevel; // // RTF does not really have a addative indent...manually set list level. + bool m_omitParagraph; // should a the next paragraph command be ignored? + int m_numCols; // number of columns in a table + QCString relPath; + + void beginRTFDocument(); + void beginRTFChapter(); + void beginRTFSection(); + void rtfwriteRuler_doubleline(); + void rtfwriteRuler_emboss(); + void rtfwriteRuler_thick(); + void rtfwriteRuler_thin(); + void writeRTFReference(const char *label); + //char *getMultiByte(int c); +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/dot.h =================================================================== --- branches/xZenu/src/util/doxygen/src/dot.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/dot.h (revision 1322) @@ -0,0 +1,450 @@ +/****************************************************************************** + * + * $Id: dot.h,v 1.14 2001/03/19 19:27:40 root Exp $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef _DOT_H +#define _DOT_H + +#include "qtbc.h" +#include <qlist.h> +#include <qdict.h> +#include <qwaitcondition.h> +#include <qmutex.h> +#include <qqueue.h> +#include <qthread.h> +#include "sortdict.h" + +class ClassDef; +class FileDef; +class FTextStream; +class DotNodeList; +class ClassSDict; +class MemberDef; +class Definition; +class DirDef; +class GroupDef; +class DotGroupCollaboration; +class DotRunnerQueue; + +enum GraphOutputFormat { BITMAP , EPS }; + +/** @brief Attributes of an edge of a dot graph */ +struct EdgeInfo +{ + enum Colors { Blue=0, Green=1, Red=2, Purple=3, Grey=4, Orange=5 }; + enum Styles { Solid=0, Dashed=1 }; + EdgeInfo() : m_color(0), m_style(0), m_labColor(0) {} + ~EdgeInfo() {} + int m_color; + int m_style; + QCString m_label; + QCString m_url; + int m_labColor; +}; + +/** @brief A node in a dot graph */ +class DotNode +{ + public: + enum GraphType { Dependency, Inheritance, Collaboration, Hierarchy, CallGraph }; + enum TruncState { Unknown, Truncated, Untruncated }; + DotNode(int n,const char *lab,const char *tip,const char *url, + bool rootNode=FALSE,ClassDef *cd=0); + ~DotNode(); + void addChild(DotNode *n, + int edgeColor=EdgeInfo::Purple, + int edgeStyle=EdgeInfo::Solid, + const char *edgeLab=0, + const char *edgeURL=0, + int edgeLabCol=-1 + ); + void addParent(DotNode *n); + void deleteNode(DotNodeList &deletedList,SDict<DotNode> *skipNodes=0); + void removeChild(DotNode *n); + void removeParent(DotNode *n); + int findParent( DotNode *n ); + void write(FTextStream &t,GraphType gt,GraphOutputFormat f, + bool topDown,bool toChildren,bool backArrows,bool reNumber); + int m_subgraphId; + void clearWriteFlag(); + void writeXML(FTextStream &t,bool isClassGraph); + void writeDEF(FTextStream &t); + QCString label() const { return m_label; } + int number() const { return m_number; } + bool isVisible() const { return m_visible; } + TruncState isTruncated() const { return m_truncated; } + int distance() const { return m_distance; } + + private: + void colorConnectedNodes(int curColor); + void writeBox(FTextStream &t,GraphType gt,GraphOutputFormat f, + bool hasNonReachableChildren, bool reNumber=FALSE); + void writeArrow(FTextStream &t,GraphType gt,GraphOutputFormat f,DotNode *cn, + EdgeInfo *ei,bool topDown, bool pointBack=TRUE, bool reNumber=FALSE); + void setDistance(int distance); + const DotNode *findDocNode() const; // only works for acyclic graphs! + void markAsVisible(bool b=TRUE) { m_visible=b; } + void markAsTruncated(bool b=TRUE) { m_truncated=b ? Truncated : Untruncated; } + int m_number; + QCString m_label; //!< label text + QCString m_tooltip; //!< node's tooltip + QCString m_url; //!< url of the node (format: remote$local) + QList<DotNode> *m_parents; //!< list of parent nodes (incoming arrows) + QList<DotNode> *m_children; //!< list of child nodes (outgoing arrows) + QList<EdgeInfo> *m_edgeInfo; //!< edge info for each child + bool m_deleted; //!< used to mark a node as deleted + bool m_written; //!< used to mark a node as written + bool m_hasDoc; //!< used to mark a node as documented + bool m_isRoot; //!< indicates if this is a root node + ClassDef * m_classDef; //!< class representing this node (can be 0) + bool m_visible; //!< is the node visible in the output + TruncState m_truncated; //!< does the node have non-visible children/parents + int m_distance; //!< shortest path to the root node + + friend class DotGfxHierarchyTable; + friend class DotClassGraph; + friend class DotInclDepGraph; + friend class DotNodeList; + friend class DotCallGraph; + friend class DotGroupCollaboration; + + friend QCString computeMd5Signature( + DotNode *root, GraphType gt, + GraphOutputFormat f, + bool lrRank, bool renderParents, + bool backArrows, + QCString &graphStr + ); +}; + +inline int DotNode::findParent( DotNode *n ) +{ + if( !m_parents ) + return -1; + return m_parents->find(n); +} + +/** @brief Represents a graphical class hierarchy */ +class DotGfxHierarchyTable +{ + public: + DotGfxHierarchyTable(); + ~DotGfxHierarchyTable(); + void writeGraph(FTextStream &t,const char *path, const char *fileName) const; + + private: + void addHierarchy(DotNode *n,ClassDef *cd,bool hide); + void addClassList(ClassSDict *cl); + + QList<DotNode> *m_rootNodes; + QDict<DotNode> *m_usedNodes; + static int m_curNodeNumber; + DotNodeList *m_rootSubgraphs; +}; + +/** @brief Representation of a class inheritance or dependency graph */ +class DotClassGraph +{ + public: + DotClassGraph(ClassDef *cd,DotNode::GraphType t); + ~DotClassGraph(); + bool isTrivial() const; + bool isTooBig() const; + QCString writeGraph(FTextStream &t,GraphOutputFormat f,const char *path, + const char *fileName, const char *relPath, + bool TBRank=TRUE,bool imageMap=TRUE) const; + + void writeXML(FTextStream &t); + void writeDEF(FTextStream &t); + QCString diskName() const; + + private: + void buildGraph(ClassDef *cd,DotNode *n,bool base,int distance); + bool determineVisibleNodes(DotNode *rootNode,int maxNodes,bool includeParents); + void determineTruncatedNodes(QList<DotNode> &queue,bool includeParents); + void addClass(ClassDef *cd,DotNode *n,int prot,const char *label, + const char *usedName,const char *templSpec, + bool base,int distance); + + DotNode * m_startNode; + QDict<DotNode> * m_usedNodes; + static int m_curNodeNumber; + DotNode::GraphType m_graphType; + QCString m_diskName; + bool m_lrRank; +}; + +/** @brief Representation of an include dependency graph */ +class DotInclDepGraph +{ + public: + DotInclDepGraph(FileDef *fd,bool inverse); + ~DotInclDepGraph(); + QCString writeGraph(FTextStream &t, GraphOutputFormat f, + const char *path,const char *fileName,const char *relPath, + bool writeImageMap=TRUE) const; + bool isTrivial() const; + bool isTooBig() const; + QCString diskName() const; + void writeXML(FTextStream &t); + + private: + void buildGraph(DotNode *n,FileDef *fd,int distance); + void determineVisibleNodes(QList<DotNode> &queue,int &maxNodes); + void determineTruncatedNodes(QList<DotNode> &queue); + + DotNode *m_startNode; + QDict<DotNode> *m_usedNodes; + static int m_curNodeNumber; + QCString m_diskName; + int m_maxDistance; + bool m_inverse; +}; + +/** @brief Representation of an call graph */ +class DotCallGraph +{ + public: + DotCallGraph(MemberDef *md,bool inverse); + ~DotCallGraph(); + QCString writeGraph(FTextStream &t, GraphOutputFormat f, + const char *path,const char *fileName, + const char *relPath,bool writeImageMap=TRUE) const; + void buildGraph(DotNode *n,MemberDef *md,int distance); + bool isTrivial() const; + bool isTooBig() const; + void determineVisibleNodes(QList<DotNode> &queue, int &maxNodes); + void determineTruncatedNodes(QList<DotNode> &queue); + + private: + DotNode *m_startNode; + static int m_curNodeNumber; + QDict<DotNode> *m_usedNodes; + int m_maxDistance; + int m_recDepth; + bool m_inverse; + QCString m_diskName; + Definition * m_scope; +}; + +/** @brief Representation of an directory dependency graph */ +class DotDirDeps +{ + public: + DotDirDeps(DirDef *dir); + ~DotDirDeps(); + bool isTrivial() const; + QCString writeGraph(FTextStream &out, + GraphOutputFormat format, + const char *path, + const char *fileName, + const char *relPath, + bool writeImageMap=TRUE) const; + private: + DirDef *m_dir; +}; + +/** @brief Representation of a group collaboration graph */ +class DotGroupCollaboration +{ + public : + enum EdgeType + { tmember = 0, + tclass, + tnamespace, + tfile, + tpages, + tdir, + thierarchy + }; + + class Link + { + public: + Link(const QCString lab,const QCString &u) : label(lab), url(u) {} + QCString label; + QCString url; + }; + + class Edge + { + public : + Edge(DotNode *start,DotNode *end,EdgeType type) + : pNStart(start), pNEnd(end), eType(type) + { links.setAutoDelete(TRUE); } + + DotNode* pNStart; + DotNode* pNEnd; + EdgeType eType; + + QList<Link> links; + void write( FTextStream &t ) const; + }; + + DotGroupCollaboration(GroupDef* gd); + ~DotGroupCollaboration(); + QCString writeGraph(FTextStream &t, GraphOutputFormat format, + const char *path,const char *fileName,const char *relPath, + bool writeImageMap=TRUE) const; + void buildGraph(GroupDef* gd); + bool isTrivial() const; + private : + void addCollaborationMember( Definition* def, QCString& url, EdgeType eType ); + void addMemberList( class MemberList* ml ); + void writeGraphHeader(FTextStream &t) const; + Edge* addEdge( DotNode* _pNStart, DotNode* _pNEnd, EdgeType _eType, + const QCString& _label, const QCString& _url ); + + DotNode *m_rootNode; + int m_curNodeId; + QDict<DotNode> *m_usedNodes; + QCString m_diskName; + QList<Edge> m_edges; +}; + +/** @brief Helper class to run dot from doxygen. + */ +class DotRunner +{ + public: + struct CleanupItem + { + QCString path; + QCString file; + }; + + /** Creates a runner for a dot \a file. */ + DotRunner(const QCString &file,const QCString &fontPath,bool checkResult, + const QCString &imageName = QCString()); + + /** Adds an additional job to the run. + * Performing multiple jobs one file can be faster. + */ + void addJob(const char *format,const char *output); + + void addPostProcessing(const char *cmd,const char *args); + + void preventCleanUp() { m_cleanUp = FALSE; } + + /** Runs dot for all jobs added. */ + bool run(); + CleanupItem cleanup() const { return m_cleanupItem; } + + private: + QList<QCString> m_jobs; + QCString m_postArgs; + QCString m_postCmd; + QCString m_file; + QCString m_path; + bool m_checkResult; + QCString m_imageName; + bool m_cleanUp; + CleanupItem m_cleanupItem; +}; + +/** @brief Helper class to insert a set of map file into an output file */ +class DotFilePatcher +{ + public: + struct Map + { + QCString mapFile; + QCString relPath; + bool urlOnly; + QCString context; + QCString label; + }; + DotFilePatcher(const char *patchFile); + int addMap(const QCString &mapFile,const QCString &relPath, + bool urlOnly,const QCString &context,const QCString &label); + int addFigure(const QCString &baseName, + const QCString &figureName,bool heightCheck); + int addSVGConversion(const QCString &relPath,bool urlOnly,const QCString &context); + int addSVGObject(const QCString &baseName, const QCString &figureName, + const QCString &relPath); + bool run(); + + private: + QList<Map> m_maps; + QCString m_patchFile; +}; + +class DotRunnerQueue +{ + public: + void enqueue(DotRunner *runner); + DotRunner *dequeue(); + uint count() const; + private: + QWaitCondition m_bufferNotEmpty; + QQueue<DotRunner> m_queue; + mutable QMutex m_mutex; +}; + +class DotWorkerThread : public QThread +{ + public: + DotWorkerThread(int id,DotRunnerQueue *queue); + void run(); + void cleanup(); + private: + int m_id; + DotRunnerQueue *m_queue; + QList<DotRunner::CleanupItem> m_cleanupItems; +}; + +/** @brief singleton that manages dot relation actions */ +class DotManager +{ + public: + static DotManager *instance(); + void addRun(DotRunner *run); + int addMap(const QCString &file,const QCString &mapFile, + const QCString &relPath,bool urlOnly, + const QCString &context,const QCString &label); + int addFigure(const QCString &file,const QCString &baseName, + const QCString &figureName,bool heightCheck); + int addSVGConversion(const QCString &file,const QCString &relPath, + bool urlOnly,const QCString &context); + int addSVGObject(const QCString &file,const QCString &baseName, + const QCString &figureNAme,const QCString &relPath); + bool run(); + + private: + DotManager(); + virtual ~DotManager(); + QList<DotRunner> m_dotRuns; + SDict<DotFilePatcher> m_dotMaps; + static DotManager *m_theInstance; + DotRunnerQueue *m_queue; + QList<DotWorkerThread> m_workers; +}; + + +/** Generated a graphs legend page */ +void generateGraphLegend(const char *path); + +void writeDotGraphFromFile(const char *inFile,const char *outDir, + const char *outFile,GraphOutputFormat format); +void writeDotImageMapFromFile(FTextStream &t, + const QCString& inFile, const QCString& outDir, + const QCString& relPath,const QCString& baseName, + const QCString& context); + +void writeDotDirDepGraph(FTextStream &t,DirDef *dd); + +#endif Index: branches/xZenu/src/util/doxygen/src/dirdef.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/dirdef.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/dirdef.cpp (revision 1322) @@ -0,0 +1,911 @@ +#include "md5.h" + +#include "dirdef.h" +#include "filename.h" +#include "doxygen.h" +#include "util.h" +#include "outputlist.h" +#include "language.h" +#include "message.h" +#include "dot.h" +#include "layout.h" +#include "ftextstream.h" + +//---------------------------------------------------------------------- +// method implementation + +static int g_dirCount=0; + +DirDef::DirDef(const char *path) : Definition(path,1,path) +{ + // get display name (stipping the paths mentioned in STRIP_FROM_PATH) + m_dispName = stripFromPath(path); + // get short name (last part of path) + m_shortName = path; + if (m_shortName.at(m_shortName.length()-1)=='/') + { // strip trailing / + m_shortName = m_shortName.left(m_shortName.length()-1); + } + int pi=m_shortName.findRev('/'); + if (pi!=-1) + { // remove everything till the last / + m_shortName = m_shortName.mid(pi+1); + } + setLocalName(m_shortName); + + m_fileList = new FileList; + m_usedDirs = new QDict<UsedDir>(257); + m_usedDirs->setAutoDelete(TRUE); + m_dirCount = g_dirCount++; + m_level=-1; + m_parent=0; +} + +DirDef::~DirDef() +{ + delete m_fileList; + delete m_usedDirs; +} + +bool DirDef::isLinkableInProject() const +{ + return !isReference() && Config_getBool("SHOW_DIRECTORIES"); +} + +bool DirDef::isLinkable() const +{ + return isReference() || isLinkableInProject(); +} + +void DirDef::addSubDir(DirDef *subdir) +{ + m_subdirs.inSort(subdir); + subdir->setOuterScope(this); + subdir->m_parent=this; +} + +void DirDef::addFile(FileDef *fd) +{ + m_fileList->inSort(fd); + fd->setDirDef(this); +} + +static QCString encodeDirName(const QCString &anchor) +{ + QCString result; + + // convert to md5 hash + uchar md5_sig[16]; + QCString sigStr(33); + MD5Buffer((const unsigned char *)anchor.data(),anchor.length(),md5_sig); + MD5SigToString(md5_sig,sigStr.data(),33); + return sigStr; + + // old algorithm + +// int l = anchor.length(),i; +// for (i=0;i<l;i++) +// { +// char c = anchor.at(i); +// if ((c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9')) +// { +// result+=c; +// } +// else +// { +// static char hexStr[]="0123456789ABCDEF"; +// char escChar[]={ '_', 0, 0, 0 }; +// escChar[1]=hexStr[c>>4]; +// escChar[2]=hexStr[c&0xf]; +// result+=escChar; +// } +// } +// return result; +} + +QCString DirDef::getOutputFileBase() const +{ + return "dir_"+encodeDirName(name()); + //return QCString().sprintf("dir_%06d",m_dirCount); +} + +void DirDef::writeDetailedDescription(OutputList &ol,const QCString &title) +{ + if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || + !documentation().isEmpty()) + { + ol.writeRuler(); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + ol.writeAnchor(0,"details"); + ol.popGeneratorState(); + ol.startGroupHeader(); + ol.parseText(title); + ol.endGroupHeader(); + + // repeat brief description + if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) + { + ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); + } + // separator between brief and details + if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && + !documentation().isEmpty()) + { + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Man); + ol.disable(OutputGenerator::RTF); + // ol.newParagraph(); // FIXME:PARA + ol.enableAll(); + ol.disableAllBut(OutputGenerator::Man); + ol.writeString("\n\n"); + ol.popGeneratorState(); + } + + // write documentation + if (!documentation().isEmpty()) + { + ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE); + } + } +} + +void DirDef::writeBriefDescription(OutputList &ol) +{ + if (!briefDescription().isEmpty()) + { + ol.startParagraph(); + ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE); + ol.pushGeneratorState(); + ol.disable(OutputGenerator::RTF); + ol.writeString(" \n"); + ol.enable(OutputGenerator::RTF); + + if (Config_getBool("REPEAT_BRIEF") || + !documentation().isEmpty() + ) + { + ol.disableAllBut(OutputGenerator::Html); + ol.startTextLink(0,"details"); + ol.parseText(theTranslator->trMore()); + ol.endTextLink(); + } + ol.popGeneratorState(); + + //ol.pushGeneratorState(); + //ol.disable(OutputGenerator::RTF); + //ol.newParagraph(); + //ol.popGeneratorState(); + ol.endParagraph(); + } + ol.writeSynopsis(); +} + +void DirDef::writeDirectoryGraph(OutputList &ol) +{ + // write graph dependency graph + if (/*Config_getBool("DIRECTORY_GRAPH") &&*/ Config_getBool("HAVE_DOT")) + { + DotDirDeps dirDep(this); + if (!dirDep.isTrivial()) + { + msg("Generating dependency graph for directory %s\n",displayName().data()); + ol.disable(OutputGenerator::Man); + //ol.startParagraph(); + ol.startDirDepGraph(); + //TODO: ol.parseText(theTranslator->trDirDepGraph()); + ol.parseText((QCString)"Directory dependency graph for "+displayName()+":"); + ol.endDirDepGraph(dirDep); + //ol.endParagraph(); + ol.enableAll(); + } + } +} + +void DirDef::writeSubDirList(OutputList &ol) +{ + // write subdir list + if (m_subdirs.count()>0) + { + ol.startMemberHeader("subdirs"); + ol.parseText(theTranslator->trDir(TRUE,FALSE)); + ol.endMemberHeader(); + ol.startMemberList(); + DirDef *dd=m_subdirs.first(); + while (dd) + { + ol.startMemberItem(0); + ol.parseText(theTranslator->trDir(FALSE,TRUE)+" "); + ol.insertMemberAlign(); + ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName()); + ol.endMemberItem(); + if (!Config_getString("GENERATE_TAGFILE").isEmpty()) + { + Doxygen::tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl; + } + if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) + { + ol.startParagraph(); + ol.startMemberDescription(); + ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(), + FALSE, // indexWords + FALSE, // isExample + 0, // exampleName + FALSE, // single line + TRUE // link from index + ); + ol.endMemberDescription(); + ol.endParagraph(); + } + dd=m_subdirs.next(); + } + + ol.endMemberList(); + } +} + +void DirDef::writeFileList(OutputList &ol) +{ + // write file list + if (m_fileList->count()>0) + { + ol.startMemberHeader("files"); + ol.parseText(theTranslator->trFile(TRUE,FALSE)); + ol.endMemberHeader(); + ol.startMemberList(); + FileDef *fd=m_fileList->first(); + while (fd) + { + ol.startMemberItem(0); + ol.docify(theTranslator->trFile(FALSE,TRUE)+" "); + ol.insertMemberAlign(); + if (fd->isLinkable()) + { + ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name()); + } + else + { + ol.startBold(); + ol.docify(fd->name()); + ol.endBold(); + } + if (fd->generateSourceFile()) + { + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + ol.docify(" "); + ol.startTextLink(fd->includeName(),0); + ol.docify("["); + ol.parseText(theTranslator->trCode()); + ol.docify("]"); + ol.endTextLink(); + ol.popGeneratorState(); + } + if (!Config_getString("GENERATE_TAGFILE").isEmpty()) + { + Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl; + } + ol.endMemberItem(); + if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) + { + ol.startParagraph(); + ol.startMemberDescription(); + ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(), + FALSE, // indexWords + FALSE, // isExample + 0, // exampleName + FALSE, // single line + TRUE // link from index + ); + ol.endMemberDescription(); + ol.endParagraph(); + } + fd=m_fileList->next(); + } + ol.endMemberList(); + } +} + +void DirDef::startMemberDeclarations(OutputList &ol) +{ + ol.startMemberSections(); +} + +void DirDef::endMemberDeclarations(OutputList &ol) +{ + ol.endMemberSections(); +} + +void DirDef::writeDocumentation(OutputList &ol) +{ + static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); + ol.pushGeneratorState(); + + QCString shortTitle=theTranslator->trDirReference(m_shortName); + QCString title=theTranslator->trDirReference(m_dispName); + startFile(ol,getOutputFileBase(),name(),title,HLI_None,!generateTreeView); + + if (!generateTreeView) + { + // write navigation path + writeNavigationPath(ol); + ol.endQuickIndices(); + } + + startTitle(ol,getOutputFileBase()); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + ol.parseText(shortTitle); + ol.enableAll(); + ol.disable(OutputGenerator::Html); + ol.parseText(title); + ol.popGeneratorState(); + endTitle(ol,getOutputFileBase(),title); + ol.startContents(); + + if (!Config_getString("GENERATE_TAGFILE").isEmpty()) + { + Doxygen::tagFile << " <compound kind=\"dir\">" << endl; + Doxygen::tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl; + Doxygen::tagFile << " <path>" << convertToXML(name()) << "</path>" << endl; + Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; + } + + //---------------------------------------- start flexible part ------------------------------- + + QListIterator<LayoutDocEntry> eli( + LayoutDocManager::instance().docEntries(LayoutDocManager::Directory)); + LayoutDocEntry *lde; + for (eli.toFirst();(lde=eli.current());++eli) + { + switch (lde->kind()) + { + case LayoutDocEntry::BriefDesc: + writeBriefDescription(ol); + break; + case LayoutDocEntry::DirGraph: + writeDirectoryGraph(ol); + break; + case LayoutDocEntry::MemberDeclStart: + startMemberDeclarations(ol); + break; + case LayoutDocEntry::DirSubDirs: + writeSubDirList(ol); + break; + case LayoutDocEntry::DirFiles: + writeFileList(ol); + break; + case LayoutDocEntry::MemberDeclEnd: + endMemberDeclarations(ol); + break; + case LayoutDocEntry::DetailedDesc: + { + LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; + writeDetailedDescription(ol,ls->title); + } + break; + case LayoutDocEntry::ClassIncludes: + case LayoutDocEntry::ClassInheritanceGraph: + case LayoutDocEntry::ClassNestedClasses: + case LayoutDocEntry::ClassCollaborationGraph: + case LayoutDocEntry::ClassAllMembersLink: + case LayoutDocEntry::ClassUsedFiles: + case LayoutDocEntry::NamespaceNestedNamespaces: + case LayoutDocEntry::NamespaceClasses: + case LayoutDocEntry::FileClasses: + case LayoutDocEntry::FileNamespaces: + case LayoutDocEntry::FileIncludes: + case LayoutDocEntry::FileIncludeGraph: + case LayoutDocEntry::FileIncludedByGraph: + case LayoutDocEntry::FileSourceLink: + case LayoutDocEntry::GroupClasses: + case LayoutDocEntry::GroupInlineClasses: + case LayoutDocEntry::GroupNamespaces: + case LayoutDocEntry::GroupDirs: + case LayoutDocEntry::GroupNestedGroups: + case LayoutDocEntry::GroupFiles: + case LayoutDocEntry::GroupGraph: + case LayoutDocEntry::GroupPageDocs: + case LayoutDocEntry::AuthorSection: + case LayoutDocEntry::MemberGroups: + case LayoutDocEntry::MemberDecl: + case LayoutDocEntry::MemberDef: + case LayoutDocEntry::MemberDefStart: + case LayoutDocEntry::MemberDefEnd: + err("Internal inconsistency: member %d should not be part of " + "LayoutDocManager::Directory entry list\n",lde->kind()); + break; + } + } + + //---------------------------------------- end flexible part ------------------------------- + + if (!Config_getString("GENERATE_TAGFILE").isEmpty()) + { + writeDocAnchorsToTagFile(); + Doxygen::tagFile << " </compound>" << endl; + } + + ol.endContents(); + + if (generateTreeView) + { + writeNavigationPath(ol); + } + + endFile(ol,TRUE); + ol.popGeneratorState(); + + +} + +void DirDef::setLevel() +{ + if (m_level==-1) // level not set before + { + DirDef *p = parent(); + if (p) + { + p->setLevel(); + m_level = p->level()+1; + } + else + { + m_level = 0; + } + } +} + +/** Add as "uses" dependency between \a this dir and \a dir, + * that was caused by a dependency on file \a fd. + */ +void DirDef::addUsesDependency(DirDef *dir,FileDef *srcFd, + FileDef *dstFd,bool inherited) +{ + if (this==dir) return; // do not add self-dependencies + //static int count=0; + //printf(" %d add dependency %s->%s due to %s->%s\n", + // count++,shortName().data(), + // dir->shortName().data(), + // srcFd->name().data(), + // dstFd->name().data()); + + // levels match => add direct dependency + bool added=FALSE; + UsedDir *usedDir = m_usedDirs->find(dir->getOutputFileBase()); + if (usedDir) // dir dependency already present + { + FilePair *usedPair = usedDir->findFilePair( + srcFd->getOutputFileBase()+dstFd->getOutputFileBase()); + if (usedPair==0) // new file dependency + { + //printf(" => new file\n"); + usedDir->addFileDep(srcFd,dstFd); + added=TRUE; + } + else + { + // dir & file dependency already added + } + } + else // new directory dependency + { + //printf(" => new file\n"); + usedDir = new UsedDir(dir,inherited); + usedDir->addFileDep(srcFd,dstFd); + m_usedDirs->insert(dir->getOutputFileBase(),usedDir); + added=TRUE; + } + if (added) + { + if (dir->parent()) + { + // add relation to parent of used dir + addUsesDependency(dir->parent(),srcFd,dstFd,inherited); + } + if (parent()) + { + // add relation for the parent of this dir as well + parent()->addUsesDependency(dir,srcFd,dstFd,TRUE); + } + } +} + +/** Computes the dependencies between directories + */ +void DirDef::computeDependencies() +{ + FileList *fl = m_fileList; + if (fl) + { + QListIterator<FileDef> fli(*fl); + FileDef *fd; + for (fli.toFirst();(fd=fli.current());++fli) // foreach file in dir dd + { + //printf(" File %s\n",fd->name().data()); + //printf("** dir=%s file=%s\n",shortName().data(),fd->name().data()); + QList<IncludeInfo> *ifl = fd->includeFileList(); + if (ifl) + { + QListIterator<IncludeInfo> ifli(*ifl); + IncludeInfo *ii; + for (ifli.toFirst();(ii=ifli.current());++ifli) // foreach include file + { + //printf(" > %s\n",ii->includeName.data()); + //printf(" #include %s\n",ii->includeName.data()); + if (ii->fileDef && ii->fileDef->isLinkable()) // linkable file + { + DirDef *usedDir = ii->fileDef->getDirDef(); + if (usedDir) + { + // add dependency: thisDir->usedDir + //static int count=0; + //printf(" %d: add dependency %s->%s\n",count++,name().data(),usedDir->name().data()); + addUsesDependency(usedDir,fd,ii->fileDef,FALSE); + } + } + } + } + } + } +} + +bool DirDef::isParentOf(DirDef *dir) const +{ + if (dir->parent()==this) // this is a parent of dir + return TRUE; + else if (dir->parent()) // repeat for the parent of dir + return isParentOf(dir->parent()); + else + return FALSE; +} + +bool DirDef::depGraphIsTrivial() const +{ + return FALSE; +} + +//---------------------------------------------------------------------- + +int FilePairDict::compareItems(GCI item1,GCI item2) +{ + FilePair *left = (FilePair*)item1; + FilePair *right = (FilePair*)item2; + int orderHi = stricmp(left->source()->name(),right->source()->name()); + int orderLo = stricmp(left->destination()->name(),right->destination()->name()); + return orderHi==0 ? orderLo : orderHi; +} + +//---------------------------------------------------------------------- + +UsedDir::UsedDir(DirDef *dir,bool inherited) : + m_dir(dir), m_filePairs(7), m_inherited(inherited) +{ + m_filePairs.setAutoDelete(TRUE); +} + +UsedDir::~UsedDir() +{ +} + + +void UsedDir::addFileDep(FileDef *srcFd,FileDef *dstFd) +{ + m_filePairs.inSort(srcFd->getOutputFileBase()+dstFd->getOutputFileBase(), + new FilePair(srcFd,dstFd)); +} + +FilePair *UsedDir::findFilePair(const char *name) +{ + QCString n=name; + return n.isEmpty() ? 0 : m_filePairs.find(n); +} + +DirDef *DirDef::createNewDir(const char *path) +{ + ASSERT(path!=0); + DirDef *dir = Doxygen::directories->find(path); + if (dir==0) // new dir + { + //printf("Adding new dir %s\n",path); + dir = new DirDef(path); + //printf("createNewDir %s short=%s\n",path,dir->shortName().data()); + Doxygen::directories->inSort(path,dir); + } + return dir; +} + +bool DirDef::matchPath(const QCString &path,QStrList &l) +{ + const char *s=l.first(); + while (s) + { + QCString prefix = s; + if (stricmp(prefix.left(path.length()),path)==0) // case insensitive compare + { + return TRUE; + } + s = l.next(); + } + return FALSE; +} + +/*! strip part of \a path if it matches + * one of the paths in the Config_getList("STRIP_FROM_PATH") list + */ +DirDef *DirDef::mergeDirectoryInTree(const QCString &path) +{ + //printf("DirDef::mergeDirectoryInTree(%s)\n",path.data()); + int p=0,i=0; + DirDef *dir=0; + while ((i=path.find('/',p))!=-1) + { + QCString part=path.left(i+1); + if (!matchPath(part,Config_getList("STRIP_FROM_PATH")) && part!="/") + { + dir=createNewDir(part); + } + p=i+1; + } + return dir; +} + +void DirDef::writeDepGraph(FTextStream &t) +{ + writeDotDirDepGraph(t,this); +} + +//---------------------------------------------------------------------- + +static void writePartialDirPath(OutputList &ol,const DirDef *root,const DirDef *target) +{ + if (target->parent()!=root) + { + writePartialDirPath(ol,root,target->parent()); + ol.writeString(" / "); + } + ol.writeObjectLink(target->getReference(),target->getOutputFileBase(),0,target->shortName()); +} + +static void writePartialFilePath(OutputList &ol,const DirDef *root,const FileDef *fd) +{ + if (fd->getDirDef() && fd->getDirDef()!=root) + { + writePartialDirPath(ol,root,fd->getDirDef()); + ol.writeString(" / "); + } + if (fd->isLinkable()) + { + ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name()); + } + else + { + ol.startBold(); + ol.docify(fd->name()); + ol.endBold(); + } +} + +void DirRelation::writeDocumentation(OutputList &ol) +{ + static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + + QCString shortTitle=theTranslator->trDirRelation( + m_src->shortName()+" → "+ + m_dst->dir()->shortName()); + QCString title=theTranslator->trDirRelation( + m_src->displayName()+" -> "+ + m_dst->dir()->shortName()); + startFile(ol,getOutputFileBase(),getOutputFileBase(), + title,HLI_None,!generateTreeView,m_src->getOutputFileBase()); + + if (!generateTreeView) + { + // write navigation path + m_src->writeNavigationPath(ol); + ol.endQuickIndices(); + } + ol.startContents(); + + ol.writeString("<h3>"+shortTitle+"</h3>"); + ol.writeString("<table class=\"dirtab\">"); + ol.writeString("<tr class=\"dirtab\">"); + ol.writeString("<th class=\"dirtab\">"); + ol.parseText(theTranslator->trFileIn(m_src->pathFragment())); + ol.writeString("</th>"); + ol.writeString("<th class=\"dirtab\">"); + ol.parseText(theTranslator->trIncludesFileIn(m_dst->dir()->pathFragment())); + ol.writeString("</th>"); + ol.writeString("</tr>"); + + SDict<FilePair>::Iterator fpi(m_dst->filePairs()); + FilePair *fp; + for (fpi.toFirst();(fp=fpi.current());++fpi) + { + ol.writeString("<tr class=\"dirtab\">"); + ol.writeString("<td class=\"dirtab\">"); + writePartialFilePath(ol,m_src,fp->source()); + ol.writeString("</td>"); + ol.writeString("<td class=\"dirtab\">"); + writePartialFilePath(ol,m_dst->dir(),fp->destination()); + ol.writeString("</td>"); + ol.writeString("</tr>"); + } + ol.writeString("</table>"); + + ol.endContents(); + + if (generateTreeView) + { + m_src->writeNavigationPath(ol); + } + + endFile(ol,TRUE); + ol.popGeneratorState(); +} + +//---------------------------------------------------------------------- +// external functions + +void buildDirectories() +{ + // for each input file + FileNameListIterator fnli(*Doxygen::inputNameList); + FileName *fn; + for (fnli.toFirst();(fn=fnli.current());++fnli) + { + FileNameIterator fni(*fn); + FileDef *fd; + for (;(fd=fni.current());++fni) + { + //printf("buildDirectories %s\n",fd->name().data()); + if (fd->getReference().isEmpty() && !fd->isDocumentationFile()) + { + DirDef *dir; + if ((dir=Doxygen::directories->find(fd->getPath()))==0) // new directory + { + dir = DirDef::mergeDirectoryInTree(fd->getPath()); + } + if (dir) dir->addFile(fd); + } + else + { + // do something for file imported via tag files. + } + } + } + + //DirDef *root = new DirDef("root:"); + // compute relations between directories => introduce container dirs. + DirDef *dir; + DirSDict::Iterator sdi(*Doxygen::directories); + for (sdi.toFirst();(dir=sdi.current());++sdi) + { + //printf("New dir %s\n",dir->displayName().data()); + QCString name = dir->name(); + int i=name.findRev('/',name.length()-2); + if (i>0) + { + DirDef *parent = Doxygen::directories->find(name.left(i+1)); + //if (parent==0) parent=root; + if (parent) + { + parent->addSubDir(dir); + //printf("DirDef::addSubdir(): Adding subdir\n%s to\n%s\n", + // dir->displayName().data(), parent->displayName().data()); + } + } + } +} + +void computeDirDependencies() +{ + DirDef *dir; + DirSDict::Iterator sdi(*Doxygen::directories); + // compute nesting level for each directory + for (sdi.toFirst();(dir=sdi.current());++sdi) + { + dir->setLevel(); + } + // compute uses dependencies between directories + for (sdi.toFirst();(dir=sdi.current());++sdi) + { + //printf("computeDependencies for %s: #dirs=%d\n",dir->name().data(),Doxygen::directories.count()); + dir->computeDependencies(); + } + +#if 0 + printf("-------------------------------------------------------------\n"); + // print dependencies (for debugging) + for (sdi.toFirst();(dir=sdi.current());++sdi) + { + if (dir->usedDirs()) + { + QDictIterator<UsedDir> udi(*dir->usedDirs()); + UsedDir *usedDir; + for (udi.toFirst();(usedDir=udi.current());++udi) + { + printf("%s depends on %s due to ", + dir->shortName().data(),usedDir->dir()->shortName().data()); + QDictIterator<FileDef> fdi(usedDir->files()); + FileDef *fd; + for (fdi.toFirst();(fd=fdi.current());++fdi) + { + printf("%s ",fd->name().data()); + } + printf("\n"); + } + } + } + printf("^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^\n"); +#endif +} + +#if 0 +void writeDirDependencyGraph(const char *dirName) +{ + QString path; + DirDef *dir; + DirSDict::Iterator sdi(*Doxygen::directories); + QFile htmlPage(QCString(dirName)+"/dirdeps.html"); + if (htmlPage.open(IO_WriteOnly)) + { + QTextStream out(&htmlPage); + out << "<html><body>"; + for (sdi.toFirst();(dir=sdi.current());++sdi) + { + path=dirName; + path+="/"; + path+=dir->getOutputFileBase(); + path+="_dep.dot"; + out << "<h4>" << dir->displayName() << "</h4>" << endl; + out << "<img src=\"" << dir->getOutputFileBase() << "_dep.gif\">" << endl; + QFile f(path); + if (f.open(IO_WriteOnly)) + { + QTextStream t(&f); + dir->writeDepGraph(t); + } + f.close(); + + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString outFile = QCString(dirName)+"/"+ + dir->getOutputFileBase()+"_dep."+imgExt; + DotRunner dotRun(path); + dotRun.addJob(imgExt,outFile); + dotRun.run(); + + //QCString dotArgs(4096); + //dotArgs.sprintf("%s -Tgif -o %s",path.data(),outFile.data()); + //if (portable_system(Config_getString("DOT_PATH")+"dot",dotArgs,FALSE)!=0) + //{ + // err("Problems running dot. Check your installation!\n"); + //} + } + out << "</body></html>"; + } + htmlPage.close(); +} +#endif + +void generateDirDocs(OutputList &ol) +{ + DirDef *dir; + DirSDict::Iterator sdi(*Doxygen::directories); + for (sdi.toFirst();(dir=sdi.current());++sdi) + { + dir->writeDocumentation(ol); + } + if (Config_getBool("DIRECTORY_GRAPH")) + { + SDict<DirRelation>::Iterator rdi(Doxygen::dirRelations); + DirRelation *dr; + for (rdi.toFirst();(dr=rdi.current());++rdi) + { + dr->writeDocumentation(ol); + } + } +} + Index: branches/xZenu/src/util/doxygen/src/doxytag.t =================================================================== --- branches/xZenu/src/util/doxygen/src/doxytag.t (revision 0) +++ branches/xZenu/src/util/doxygen/src/doxytag.t (revision 1322) @@ -0,0 +1,50 @@ +# +# $Id: doxytag.t,v 1.7 2000/04/23 14:56:23 root Exp $ +# +# Copyright (C) 1997-2011 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. +# +#! +#! doxytag.t: This is a custom template for building Doxytag +#! +#$ IncludeTemplate("app.t"); + +LEX = flex + +#${ +sub GenerateDep { + my($obj,$src,$dep) = @_; + my(@objv,$srcv,$i,$s,$o,$d,$c); + @objv = split(/\s+/,$obj); + @srcv = split(/\s+/,$src); + for $i ( 0..$#objv ) { + $s = $srcv[$i]; + $o = $objv[$i]; + next if $s eq ""; + $text .= $o . ": " . $s; + $text .= " ${linebreak}\n\t\t" . $dep if $dep ne ""; + if ( $moc_output{$s} ne "" ) { + $text .= " ${linebreak}\n\t\t" . $moc_output{$s}; + } + $d = &make_depend($s); + $text .= " ${linebreak}\n\t\t" . $d if $d ne ""; + $text .= "\n"; + } + chop $text; +} +#$} + +##################### + +#$ GenerateDep("doxytag.cpp","doxytag.l"); + $(LEX) -PtagYY -t doxytag.l >doxytag.cpp + + Index: branches/xZenu/src/util/doxygen/src/translator_sr.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator_sr.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator_sr.h (revision 1322) @@ -0,0 +1,1838 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef TRANSLATOR_SR_H +#define TRANSLATOR_SR_H + +// translation by Dejan D. M. Milosavljevic <dmilos@email.com>;<dmilosx@ptt.yu>;<office@ddmrm.com> +// // 10x 2 Ivana Miletic for grammatical consultation. + +// UTF-8 patch by Nenad Bulatovic <buletina@gmail.com> +// translation update by Andrija M. Bosnjakovic <andrija@etf.bg.ac.yu> + +class TranslatorSerbian : public TranslatorAdapter_1_6_0 +{ +private: + QCString decode(const QCString& sInput) + { +//#ifdef _WIN32 +// return ISO88592ToWin1250(sInput); +//#else + return sInput; +//#endif + } + + + public: + + // --- Language control methods ------------------- + + /*! Used for identification of the language. The identification + * should not be translated. It should be replaced by the name + * of the language in English using lower-case characters only + * (e.g. "czech", "japanese", "russian", etc.). It should be equal to + * the identification used in language.cpp. + */ + virtual QCString idLanguage() + { return "serbian"; } + + /*! Used to get the LaTeX command(s) for the language support. + * This method should return string with commands that switch + * LaTeX to the desired language. For example + * <pre>"\\usepackage[german]{babel}\n" + * </pre> + * or + * <pre>"\\usepackage{polski}\n" + * "\\usepackage[latin2]{inputenc}\n" + * "\\usepackage[T1]{fontenc}\n" + * </pre> + * + * The English LaTeX does not use such commands. Because of this + * the empty string is returned in this implementation. + */ + virtual QCString latexLanguageSupportCommand() + { + QCString result="\\usepackage[serbian]{babel}\n"; + return result; + } + + /*! return the language charset. This will be used for the HTML output */ + virtual QCString idLanguageCharset() + { +//#ifdef _WIN32 +// { return "windows-1250"; } +//#else + { return "UTF-8"; } +//#endif + } + + // --- Language translation methods ------------------- + + /*! used in the compound documentation before a list of related functions. */ + virtual QCString trRelatedFunctions() + //! ÄŒini se da je ovako manje loÅ¡e nego "Povezane funkcije", + //! Å¡to uopÅ¡te ne izgleda dobro jer ta kartica sadrži prijatelje i globalne funkcije + { return decode( "Relevantne funkcije" ); } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return decode( "(To nisu funkcije Älanice.)" ); } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return decode( "OpÅ¡irniji opis" ); } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return decode( "Dokumentacija unutraÅ¡njih definicija tipa" ); } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + //! Ovo je u skladu sa "unutraÅ¡nja klasa" Å¡to se može videti u knjizi. + { return decode( "Dokumentacija unutraÅ¡njih nabrajanja" ); } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { return decode( "Dokumentacija funkcija Älanica" ); } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode( "Dokumentacija polja" ); + } + else + { + return decode( "Dokumentacija atributa" ); + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return decode( "JoÅ¡..." ); } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return decode( "Spisak svih Älanova." ); } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return decode( "Spisak Älanova" ); } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return decode( "Ovo je spisak svih Älanova " ); } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return decode( ", ukljuÄujući nasleÄ‘ene Älanove." ); } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ + virtual QCString trGeneratedAutomatically(const char *s) + { QCString result="Napravljeno automatski korišćenjem alata Doxygen"; + if( s ) result+=(QCString)" za projekat " + s; + result+=" od izvornog koda."; + return decode( result ); + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return decode( "ime nabrajanja " ); } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return decode( "vrednost nabrojane konstante" ); } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return decode( "definicija u" ); } + + // quick reference sections + + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \\group command). + */ + virtual QCString trModules() + { return decode( "Moduli" ); } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return decode( "Hijerarhija klasa" ); } + + /*! This is put above each page as a link to the list of annotated classes */ + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode( "Spisak struktura" ); + } + else + { + return decode( "Spisak klasa" ); + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return decode( "Spisak datoteka" ); } + + /*! This is put above each page as a link to all members of compounds. */ + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode( "Sva polja struktura" ); + } + else + { + return decode( "Svi Älanovi klasa" ); + } + } + + /*! This is put above each page as a link to all members of files. */ + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode( "ÄŒlanovi datoteke" ); + } + else + { + return decode( "ÄŒlanovi datoteke" ); + } + } + + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return decode( "Stranice koje imaju veze sa ovom stranicom" ); } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return decode( "Primeri" ); } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return decode( "Traži" ); } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { return decode( "Hijerahija klasa ureÄ‘ena približno " + "po abecedi:" ); + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool extractAll) + { + QCString result="Spisak svih "; + if (!extractAll) result+="dokumentovanih "; + result+="datoteka, sa kratkim opisima:"; + return decode( result ); + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode( "Spisak struktura sa kratkim opisima:" ); + } + else + { + return decode( "Spisak klasa, struktura, " + "unija i interfejsa sa kratkim opisima:" ); + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result="Spisak svih "; + if (!extractAll) + { + result+="dokumentovanih "; + } + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="Älanova struktura/unija"; + } + else + { + result+="Älanova klasa"; + } + result+=" sa vezama ka "; + if (extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="dokumentaciji svakog polja strukture/unije:"; + } + else + { + result+="dokumentaciji svakog Älana klase:"; + } + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="strukturama/unijama kojima pripadaju:"; + } + else + { + result+="klasama kojima pripadaju:"; + } + } + return decode( result ); + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool extractAll) + { + QCString result="Spisak svih "; + if (!extractAll) result+="dokumentovanih "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="funkcija, promenljivih, makro zamena, nabrajanja i definicija tipa"; + } + else + { + result+="Älanova"; + } + result+=" sa vezama ka "; + if (extractAll) + result+="datotekama u kojima se nalaze:"; + else + result+="dokumentaciji:"; + return decode( result ); + } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return decode( "Spisak svih primera:" ); } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return decode( "Spisak stranica koje imaju veze sa ovom stranicom:" ); } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return decode( "Spisak svih modula:" ); } + + // index titles (the project name is prepended for these) + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return decode("Dokumentacija" ); } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return decode( "Indeks modula" ); } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return decode( "Hijerarhijski sadržaj" ); } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode( "Spisak struktura/unija" ); + } + else + { + return decode( "Spisak klasa" ); + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return decode( "Indeks datoteka" ); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return decode( "Dokumentacija modula" ); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode( "Dokumentacija stuktura/unija" ); + } + else + { + return decode( "Dokumentacija klasa" ); + } + } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return decode( "Dokumentacija datoteke" ); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return decode( "Dokumentacija primera" ); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return decode( "Dokumentacija stranice" ); } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return decode( "PriruÄnik" ); } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return decode( "Makro zamene" ); } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return decode( "Deklaracije funkcija" ); } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return decode( "Definicije tipa" ); } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return decode( "Nabrajanja" ); } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return decode( "Funkcije" ); } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return decode( "Promenljive" ); } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return decode( "Vrednosti nabrojanih konstanti" ); } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return decode( "Dokumentacija makro zamene" ); } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return decode( "Dokumentacija deklaracije funkcije" ); } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return decode( "Dokumentacija definicije tipa" ); } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return decode( "Dokumentacija nabrajanja" ); } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return decode( "Dokumentacija funkcije" ); } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return decode( "Dokumentacija promenljive" ); } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode( "Strukture i unije" ); + } + else + { + return decode( "Klase, strukture i unije" ); + } + } + + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ + virtual QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result=(QCString)"[" + date + "] Napravljeno automatski "; + if ( projName ) result+=(QCString)" za projekat " + projName; + result+=(QCString)" upotrebom "; + return decode( result ); + } + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return decode( "napisao" ); + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return decode( QCString("Dijagram nasleÄ‘ivanja za klasu ") + clName + ":" ); + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return decode( "Samo za unutraÅ¡nju upotrebu." ); } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return decode( "Upozorenje" ); } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return decode( "Verzija" ); } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return decode( "Datum" ); } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return decode( "Vrednost funkcije" ); } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return decode( "TakoÄ‘e pogledati" ); } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return decode( "Parametri" ); } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return decode( "Izuzeci" ); } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return decode( "Napravio" ); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return decode( "Spisak prostora imena" ); } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool extractAll) + { + QCString result="Spisak svih "; + if (!extractAll) result+="dokumentovanih "; + result+="prostora imena sa kratkim opisom:"; + return decode( result ); + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return decode( "Prijatelji" ); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return decode( "Dokumentacija prijatelja i relevantnih funkcija" ); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result( "Dokumentacija " ); + switch(compType) + { + case ClassDef::Class: result+="klase "; break; + case ClassDef::Struct: result+="strukture "; break; + case ClassDef::Union: result+="unije "; break; + case ClassDef::Interface: result+="interfejsa "; break; + case ClassDef::Protocol: result+="protokola "; break; + case ClassDef::Category: result+="kategorije "; break; + case ClassDef::Exception: result+="izuzetka "; break; + } + if (isTemplate) result += "Å¡ablona "; + result += clName; + return decode( result ); + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result = "Opis datoteke "; + result += fileName; + return decode( result ); + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result="Opis prostora imena "; + result += namespaceName; + return decode( result ); + } + + virtual QCString trPublicMembers() + { return decode("Javni Älanovi"); } + virtual QCString trPublicSlots() + { return decode( "Javni slotovi" ); } + virtual QCString trSignals() + { return decode( "Signali" ); } + virtual QCString trStaticPublicMembers() + { return decode("ZajedniÄki javni Älanovi"); } + virtual QCString trProtectedMembers() + { return decode("ZaÅ¡tićeni Älanovi"); } + virtual QCString trProtectedSlots() + { return decode("ZaÅ¡tićeni slotovi"); } + virtual QCString trStaticProtectedMembers() + { return decode("ZajedniÄki zaÅ¡tićeni Älanovi"); } + virtual QCString trPrivateMembers() + { return decode("Privatni Älanovi"); } + virtual QCString trPrivateSlots() + { return decode("Privatni slotovi"); } + virtual QCString trStaticPrivateMembers() + { return decode("ZajedniÄki privatni Älanovi"); } + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + virtual QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i<numEntries;i++) + { + // use generateMarker to generate placeholders for the class links! + result+=generateMarker(i); // generate marker for entry i in the list + // (order is left to right) + + if (i!=numEntries-1) // not the last entry, so we need a separator + { + if (i<numEntries-2) // not the fore last entry + result+=", "; + else // the fore last entry + result+=" i "; + } + } + return result; + } + + /*! used in class documentation to produce a list of base classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritsList(int numEntries) + { + return decode("Spisak osnovnih klasa: "+trWriteList(numEntries)+"."); + } + + /*! used in class documentation to produce a list of derived classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritedByList(int numEntries) + { + return decode( "Spisak izvedenih klasa: "+trWriteList(numEntries)+"." ); + } + + /*! used in member documentation blocks to produce a list of + * members that are hidden by this one. + */ + virtual QCString trReimplementedFromList(int numEntries) + { + return decode("Menja definiciju iz "+trWriteList(numEntries)+"." ); + } + + /*! used in member documentation blocks to produce a list of + * all member that overwrite the implementation of this member. + */ + virtual QCString trReimplementedInList(int numEntries) + { //! Ako već ne možemo jednu reÄ (redefinicija), da uskladimo sa prethodnim i izbacimo upotrebu roda + return decode("Definicija je izmenjena u "+trWriteList(numEntries)+"." ); + } + + /*! This is put above each page as a link to all members of namespaces. */ + virtual QCString trNamespaceMembers() + { return decode("ÄŒlanovi prostora imena"); } + + /*! This is an introduction to the page with all namespace members */ + virtual QCString trNamespaceMemberDescription(bool extractAll) + { + QCString result="Spisak svih "; + if (!extractAll) result+="dokumentovanih "; + result+="Älanova prostora imena sa vezama prema "; + if (extractAll) + result+="dokumentaciji svakog Älana prostora imena: "; + else + result+="prostorima imena kojima pripadaju: "; + return decode( result ); + } + /*! This is used in LaTeX as the title of the chapter with the + * index of all namespaces. + */ + virtual QCString trNamespaceIndex() + { return decode( "Indeks prostora imena" ); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all namespaces. + */ + virtual QCString trNamespaceDocumentation() + { return decode( "Dokumentacija prostora imena" ); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + virtual QCString trNamespaces() + { return decode( "Prostori imena" ); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Class", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Dokumentacija "; + switch(compType) + { + case ClassDef::Class: result+="ove klase"; break; + case ClassDef::Struct: result+="ove strukture"; break; + case ClassDef::Union: result+="ove unije"; break; + case ClassDef::Interface: result+="ovog interfejsa"; break; + case ClassDef::Protocol: result+="ovog protokola"; break; + case ClassDef::Category: result+="ove kategorije"; break; + case ClassDef::Exception: result+="ovog izuzetka"; break; + } + result+=" je napravljena na osnovu "; + if (single) result+="datoteke "; else result+="sledećih datoteka:"; + return decode( result ); + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + virtual QCString trAlphabeticalList() + { return decode( "Abecedni spisak" ); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + virtual QCString trReturnValues() + { return decode( "KarakteristiÄne vrednosti funkcije" ); } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + virtual QCString trMainPage() + { return decode( "Glavna strana" ); } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + virtual QCString trPageAbbreviation() + { return decode( "str." ); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDefinedAtLineInSourceFile() + { //! Izbacujemo rod + return decode( "Definicija je u redu @0 datoteke @1." ); + } + virtual QCString trDefinedInSourceFile() + { //! Izbacujemo rod + return decode( "Definicija je u datoteci @0." ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() + { + return decode( "Zastarelo" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + virtual QCString trCollaborationDiagram(const char *clName) + { + return decode( (QCString)"Klasni dijagram za "+clName+":" ); + } + /*! this text is put before an include dependency graph */ + virtual QCString trInclDepGraph(const char *fName) + { + return decode( (QCString)"Graf zavisnosti datoteka za "+fName+":" ); + } + /*! header that is put before the list of constructor/destructors. */ + virtual QCString trConstructorDocumentation() + { + return decode( "Dokumentacija konstruktora i destruktora" ); + } + /*! Used in the file documentation to point to the corresponding sources. */ + virtual QCString trGotoSourceCode() + { + return decode( "Izvorni kod." ); + } + /*! Used in the file sources to point to the corresponding documentation. */ + virtual QCString trGotoDocumentation() + { + return decode( "Dokumentacija." ); + } + /*! Text for the \\pre command */ + virtual QCString trPrecondition() + { + return decode( "Preduslovi" ); + } + /*! Text for the \\post command */ + virtual QCString trPostcondition() + { + return decode( "Stanje po izvrÅ¡enju" ); + } + /*! Text for the \\invariant command */ + virtual QCString trInvariant() + { + return decode( "Invarijanta" ); + } + /*! Text shown before a multi-line variable/enum initialization */ + virtual QCString trInitialValue() + { + return decode( "PoÄetna vrednost:" ); + } + /*! Text used the source code in the file index */ + virtual QCString trCode() + { + return decode( "programski kod" ); + } + virtual QCString trGraphicalHierarchy() + { + return decode( "Hijerarhija klasa u obliku grafa" ); + } + virtual QCString trGotoGraphicalHierarchy() + { + return decode( "Prikaz hijerarhije klasa u obliku grafa" ); + } + virtual QCString trGotoTextualHierarchy() + { + return decode( "Prikaz hijerarhije klasa u obliku nazubljenog teksta" ); + } + virtual QCString trPageIndex() + { + return decode( "Indeks stranice" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() + { + return decode( "BeleÅ¡ka" ); + } + virtual QCString trPublicTypes() + { + return decode( "Javni tipovi" ); + } + virtual QCString trPublicAttribs() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode( "Polja" ); + } + else + { + return decode( "Javni Älanovi" ); + } + } + virtual QCString trStaticPublicAttribs() + { + return decode( "ZajedniÄki javni Älanovi"); + } + virtual QCString trProtectedTypes() + { + return decode( "ZaÅ¡tićeni tipovi" ); + } + virtual QCString trProtectedAttribs() + { + return decode( "ZaÅ¡tićeni Älanovi" ); + } + virtual QCString trStaticProtectedAttribs() + { + return decode( "ZajedniÄki zaÅ¡tićeni Älanovi" ); + } + virtual QCString trPrivateTypes() + { + return decode( "Privatni tipovi" ); + } + virtual QCString trPrivateAttribs() + { + return decode( "Privatni Älanovi" ); + } + virtual QCString trStaticPrivateAttribs() + { + return decode( "ZajedniÄki privatni Älanovi" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\todo item */ + virtual QCString trTodo() + { + return decode( "Uraditi" ); + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return decode("Spisak stvari koje treba uraditi"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { //! Izbegavanje roda. Uskladjivanje sa trReferences + return decode( "Korisnici: " ); + } + virtual QCString trRemarks() + { + return decode( "Napomene" ); + } + virtual QCString trAttention() + { + return decode( "Pažnja" ); + } + virtual QCString trInclByDepGraph() + { + return decode("Ovaj graf pokazuje koje datoteke direktno " + "ili indirektno ukljuÄuju ovu datoteku: "); + } + virtual QCString trSince() + { + return decode( "Od" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return decode( "ObjaÅ¡njenje korišćenih simbola" ); + } + /*! page explaining how the dot graph's should be interpreted + * The %A in the text below are to prevent link to classes called "A". + */ + virtual QCString trLegendDocs() + { + return decode( + "Ova stranica objaÅ¡njava kako tumaÄiti grafikone koje je napravio " + "doxygen.<p>\n" + "Na primer:\n" + "\\code\n" + "/*! Klasa nevidljiva zbog trenutnih ograniÄenja */\n" + "class Invisible { };\n\n" + "/*! Klasa kojoj se ne vidi naÄin izvoÄ‘enja */\n" + "class Truncated : public Invisible { };\n\n" + "/* Klasa bez doxygen komentara */\n" + "class Undocumented { };\n\n" + "/*! Klasa izvedena iz osnovne klase javnim izvoÄ‘enjem */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! Å ablonska klasa */\n" + "template<class T> class Templ { };\n\n" + "/*! Klasa izvedena iz osnovne klase zaÅ¡tićenim izvoÄ‘enjem */\n" + "class ProtectedBase { };\n\n" + "/*! Klasa izvedena iz osnovne klase privatnim izvoÄ‘enjem */\n" + "class PrivateBase { };\n\n" + "/*! Klasa korišćena u nekoj/nekim od drugih klasa */\n" + "class Used { };\n\n" + "/*! Klasa izvedena iz viÅ¡e osnovnih klasa */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented,\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "Ako je \\c MAX_DOT_GRAPH_HEIGHT tag u konfiguracionoj datoteci " + "postavljen na \\c 200 graf izvoÄ‘enja će izgledati ovako:" + "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "Graf će biti odseÄen ako ne stane unutar zadatih granica.\n" + "<p>\n" + "Pravougaonici imaju sledeća znaÄenja:\n" + "<ul>\n" + "<li>Puni sivi predstavlja strukturu ili klasu za koju je graf napravljen.\n" + "<li>Sa crnom ivicom predstavlja dokumentovanu strukturu ili klasu.\n" + "<li>Sa sivom ivicom predstavlja strukturu ili klasu bez doxygen komentara.\n" + "<li>Sa crvenom ivicom predstavlja dokumentovanu strukturu ili klasu\n" + "za koju nisu prikazani svi relevantni grafovi.\n" + "</ul>" + "Strelice imaju sledeća znaÄenja:\n" + "<ul>\n" + "<li>Tamnoplava strelica oznaÄava javno izvoÄ‘enje.\n" + "<li>Tamnozelena strelica oznaÄava zaÅ¡tićeno izvoÄ‘enje.\n" + "<li>Tamnocrvena strelica oznaÄava privatno izvoÄ‘enje.\n" + "<li>LjubiÄasta isprekidana strelica oznaÄava da je klasa sadržana " + "ili korišćena u drugoj klasi. Strelica je oznaÄena imenom atributa " + "preko koga se pristupa klasi/strukturi na koju pokazuje.\n" + "<li>Žuta isprekidana strelica oznaÄava vezu izmeÄ‘u primerka Å¡ablona i" + " Å¡ablona klase od kojeg je primerak napravljen. " + "Strelica je oznaÄena stvarnim argumentima Å¡ablona.\n" + "</ul>\n" + ); + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return decode( "ObjaÅ¡njenje korišćenih simbola" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return decode( "Test" ); + } + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return decode( "Spisak testova" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return decode( "DCOP metode" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return decode( "Osobine" ); + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return decode( "Dokumentacija osobina" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode( "Strukture i unije" ); + } + else + { + return decode( "Klase" ); + } + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)"Paket "+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return decode( "Spisak paketa" ); + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return decode( "Paketi s kratkim opisom (ukoliko postoji):" ); + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return decode( "Paketi" ); + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return decode( "Vrednost:" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return decode( "GreÅ¡ka" ); + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return decode( "Spisak greÅ¡aka" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file + * + * The following table shows the correlation of Charset name, Charset Value and + * <pre> + * Codepage number: + * Charset Name Charset Value(hex) Codepage number + * ------------------------------------------------------ + * DEFAULT_CHARSET 1 (x01) + * SYMBOL_CHARSET 2 (x02) + * OEM_CHARSET 255 (xFF) + * ANSI_CHARSET 0 (x00) 1252 + * RUSSIAN_CHARSET 204 (xCC) 1251 + * EE_CHARSET 238 (xEE) 1250 + * GREEK_CHARSET 161 (xA1) 1253 + * TURKISH_CHARSET 162 (xA2) 1254 + * BALTIC_CHARSET 186 (xBA) 1257 + * HEBREW_CHARSET 177 (xB1) 1255 + * ARABIC _CHARSET 178 (xB2) 1256 + * SHIFTJIS_CHARSET 128 (x80) 932 + * HANGEUL_CHARSET 129 (x81) 949 + * GB2313_CHARSET 134 (x86) 936 + * CHINESEBIG5_CHARSET 136 (x88) 950 + * </pre> + * + */ + virtual QCString trRTFansicp() + { + return "1252"; + } + + + /*! Used as ansicpg for RTF fcharset + * \see trRTFansicp() for a table of possible values. + */ + virtual QCString trRTFCharSet() + { + return "238"; + } + + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return decode( "Sadržaj" ); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + QCString result( (first_capital ? "Klas" : "klas") ); + result+= (singular ? "a" : "e"); + return decode( result ); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + QCString result((first_capital ? "Datotek" : "datotek")); + result+= (singular ? "a" : "e"); + return decode( result ); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + QCString result((first_capital ? "Prostor" : "prostor")); + result += (singular ? "" : "i"); + result += " imena"; + return decode( result ); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + QCString result((first_capital ? "Grup" : "grup")); + result+= (singular ? "a" : "e"); + return decode( result ); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + QCString result((first_capital ? "Stran" : "stran")); + result+= (singular ? "a" : "e"); + return decode( result ); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + QCString result((first_capital ? "ÄŒlan" : "Älan")); + result+= (singular ? "" : "ovi"); + return decode( result ); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + QCString result((first_capital ? "Globalni " : "globalni ")); + result+= (singular ? "podatak" : "podaci"); + return decode( result ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + QCString result((first_capital ? "Autor" : "autor")); + result+= (singular ? "" : "i"); + return decode( result ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return decode( "Koristi" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { //! "DefiniÅ¡e" je previÅ¡e kratko, ispada sa de definiÅ¡u same apstraktne klase + return decode( "DefiniÅ¡e apstraktnu funkciju deklarisanu u "+trWriteList(numEntries)+"." ); + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this abstract member. + */ + virtual QCString trImplementedInList(int numEntries) + { //! Izbegavanje roda + return decode( "Definicija u " + trWriteList(numEntries) + "." ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return decode( "Sadržaj" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return decode( "Spisak zastarelih stvari" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return decode( "DogaÄ‘aji" ); + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return decode( "Dokumentacija dogaÄ‘aja" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return decode( "Tipovi u paketu" ); + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return decode( "Funkcije u paketu" ); + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return decode( "StatiÄke funkcije u paketu" ); // Zajednicke funkcije u paketu + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return decode( "Atributi u paketu" ); // Clanovi u paketu + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return decode( "StatiÄki atributi u paketu" ); // Zajednicki clanovi u paketu + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return decode( "Sve" ); + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return decode( "Graf poziva iz ove funkcije:" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + return decode("Traži"); + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return decode( "Rezultati pretraživanja" ); + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return decode("Nema dokumenata koji odgovaraju VaÅ¡em upitu."); + } + else if (numDocuments==1) + { return decode("NaÄ‘en je <b>1</b> dokument koji odgovara vaÅ¡em upitu."); } + else if (numDocuments<5) + { return decode("NaÄ‘ena su <b>$num</b> dokumenta koji odgovaraju vaÅ¡em upitu." + "Najbolji su prikazani prvi."); } + else + { return decode("NaÄ‘eno je <b>$num</b> dokumenata koji odgovaraju vaÅ¡em upitu." + "Najbolji su prikazani prvi."); + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return decode( "PronaÄ‘eno:" ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return decode( "Izvorni kod datoteke " + filename ) ; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return decode( "Hijerarhija direktorijuma" ); } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return decode( "Dokumentacija direktorijuma" ); } + + /*! This is used as the title of the directory index and also in the + * Quick links of a HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return decode( "Direktorijumi" ); } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { return decode( "Hijerarhija direktorijuma ureÄ‘ena približno " + "po abecedi:" ); + } + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { QCString result=dirName; result+="Opis direktorijuma"; return decode( result ); } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool first_capital, bool singular) + { + QCString result((first_capital ? "Direktorijum" : "direktorijum")); + if (!singular) result+="i"; + return decode( result ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return decode ( "Ovo je funkcija prekopljenog imena, razlikuje se " + "od gore navedene samo po argumentima koje prihvata." ); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + /*! This is used to introduce a caller (or called-by) graph */ + virtual QCString trCallerGraph() + { //! Možda je bolje "Graf pozivalaca ove funkcije" + return decode( "Graf funkcija koje pozivaju ovu funkciju:" ); + } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { return decode( "Dokumentacija enum vrednosti" ); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 (mainly for Fortran) +////////////////////////////////////////////////////////////////////////// + + /*! header that is put before the list of member subprograms (Fortran). */ + virtual QCString trMemberFunctionDocumentationFortran() + { return "Dokumentacija funkcija i procedura"; } + + /*! This is put above each page as a link to the list of annotated data types (Fortran). */ + /*! @todo Koji je prevod za Compound u Fortran kontekstu */ + virtual QCString trCompoundListFortran() + { return "Složeni tipovi podataka"; } + + /*! This is put above each page as a link to all members of compounds (Fortran). */ + virtual QCString trCompoundMembersFortran() + { return "Polja u složenim tipovima podataka"; } + + /*! This is an introduction to the annotated compound list (Fortran). */ + virtual QCString trCompoundListDescriptionFortran() + { return "Spisak složenih tipova podataka sa kratkim opisima:"; } + + /*! This is an introduction to the page with all data types (Fortran). */ + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) + { + QCString result=" Spisak svih "; + if (!extractAll) + { + result+="dokumentovanih "; + } + result+="polja složenih tipova podataka"; + result+=" sa vezama ka "; + if (!extractAll) + { + result+="dokumentaciji strukture podataka za svakog Älana"; + } + else + { + result+="složenim tipovima podataka kojima pripadaju:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index (Fortran). + */ + virtual QCString trCompoundIndexFortran() + { return "Sadržaj složenog tipa podataka"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all data types (Fortran). + */ + virtual QCString trTypeDocumentation() + { return "Dokumentacija tipova podataka"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) subprograms (Fortran). + */ + virtual QCString trSubprograms() + { return "Funkcije i procedure"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for subprograms (Fortran) + */ + virtual QCString trSubprogramDocumentation() + { return "Dokumentacija funkcija i procedura"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds (Fortran) + */ + virtual QCString trDataTypes() + { return "Složeni tipovi podataka"; } + + /*! used as the title of page containing all the index of all modules (Fortran). */ + virtual QCString trModulesList() + { return "Spisak modula"; } + + /*! used as an introduction to the modules list (Fortran) */ + virtual QCString trModulesListDescription(bool extractAll) + { + QCString result="Spisak svih "; + if (!extractAll) result+="dokumentovanih "; + result+="modula sa kratkim opisima:"; + return result; + } + + /*! used as the title of the HTML page of a module/type (Fortran) */ + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=(QCString)clName; + switch(compType) + { + case ClassDef::Class: result+=" Modul"; break; + case ClassDef::Struct: result+=" Tip"; break; + case ClassDef::Union: result+=" Unija"; break; + case ClassDef::Interface: result+=" Interfejs"; break; + case ClassDef::Protocol: result+=" Protokol"; break; + case ClassDef::Category: result+=" Kategorija"; break; + case ClassDef::Exception: result+=" Izuzetak"; break; + } + result+=" - sažet pregled"; + if (isTemplate) result+=" Å¡ablona"; + return result; + } + /*! used as the title of the HTML page of a module (Fortran) */ + virtual QCString trModuleReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" - sažet pregled modula"; + return result; + } + + /*! This is put above each page as a link to all members of modules. (Fortran) */ + virtual QCString trModulesMembers() + { return "ÄŒlanovi modula"; } + + /*! This is an introduction to the page with all modules members (Fortran) */ + virtual QCString trModulesMemberDescription(bool extractAll) + { + QCString result="Spisak svih "; + if (!extractAll) result+="dokumentovanih "; + result+="Älanova modula sa vezama ka "; + if (extractAll) + { + result+="dokumentaciji za svakog Älana modula:"; + } + else + { + result+="modulima kojima pripadaju:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all modules (Fortran). + */ + virtual QCString trModulesIndex() + { return "Spisak modula"; } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trModule(bool first_capital, bool singular) + { + QCString result((first_capital ? "Modul" : "modul")); + if (!singular) result+="i"; + return result; + } + /*! This is put at the bottom of a module documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Module", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Dokumentacija za ovaj "; + switch(compType) + { + case ClassDef::Class: result+="modul"; break; + case ClassDef::Struct: result+="tip"; break; + case ClassDef::Union: result+="uniju"; break; + case ClassDef::Interface: result+="interfejs"; break; + case ClassDef::Protocol: result+="protokol"; break; + case ClassDef::Category: result+="kategoriju"; break; + case ClassDef::Exception: result+="izuzetak"; break; + } + result+=" napravljena je automatski od sledeć"; + if (single) result+="e datoteke:"; else result+="ih datoteka:"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trType(bool first_capital, bool singular) + { + QCString result((first_capital ? "Tip" : "tip")); + if (!singular) result+="ovi"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trSubprogram(bool first_capital, bool singular) + { + QCString result((first_capital ? "Procedura" : "procedura")); + if (!singular) result = (first_capital ? "Procedure" : "procedure"); + return result; + } + + /*! C# Type Constraint list */ + virtual QCString trTypeConstraints() + { + return "OgraniÄenja tipova"; + } + +////////////////////////////////////////////////////////////////////////// +// following methods have no corresponding entry in translator_en.h +////////////////////////////////////////////////////////////////////////// + +// /*! This is put above each page as a link to the list of all verbatim headers */ +// virtual QCString trHeaderFiles() +// { return decode( "Zaglavlja" ); } +// +// /*! This is an introduction to the page with the list of all header files. */ +// virtual QCString trHeaderFilesDescription() +// { return decode( "Zaglavlja koje izgraduju API:" ); } +// +// /*! This sentences is used in the annotated class/file lists if no brief +// * description is given. +// */ +// virtual QCString trNoDescriptionAvailable() +// { return decode( "Opis nije dostupan" ); } +// +// /*! this text is generated when the \\reimp command is used. */ +// virtual QCString trReimplementedForInternalReasons() +// { return decode("Preuradeno zbog unutrasnjih razloga; Nema uticaja na API." ); } +// +// /*! this text is generated when the \\bug command is used. */ +// virtual QCString trBugsAndLimitations() +// { return decode( "Greske i ogranicenja" ); } +// +// virtual QCString trSources() +// { +// return decode("Izvorne datoteke" ); +// } +// +// /*! Used for Java interfaces in the summary section of Java packages */ +// virtual QCString trInterfaces() +// { +// return decode( "Interfejsi" ); //!< Radna okruzenja. Ali to je dve reci. +// } +// +// /*! Used as a chapter title for Latex & RTF output */ +// virtual QCString trPackageDocumentation() +// { +// return decode( "Dokumentacija paketa" ); +// } +// +// /*! This is used for translation of the word that will possibly +// * be followed by a single name or by a list of names +// * of the category. +// */ +// virtual QCString trField(bool first_capital, bool singular) +// { +// QCString result((first_capital ? "Polj" : "polj")); +// result+= (singular ? "e" : "a"); +// return decode( result ); +// } + +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/qhpxmlwriter.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/qhpxmlwriter.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/qhpxmlwriter.cpp (revision 1322) @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2008 by Sebastian Pipping. + * Copyright (C) 2008 Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + * Sebastian Pipping <sebastian@pipping.org> + */ + +#include "qhpxmlwriter.h" +#include "util.h" + +#include <qfile.h> + +QhpXmlWriter::QhpXmlWriter() + : m_out(&m_backend), m_indentLevel(0), + m_curLineIndented(false), m_compress(false) +{ +} + +QhpXmlWriter::~QhpXmlWriter() +{ +} + +void QhpXmlWriter::setIndentLevel(int level) +{ + m_indentLevel = level; +} + +void QhpXmlWriter::setCompressionEnabled(bool enabled) +{ + m_compress = enabled; +} + +void QhpXmlWriter::insert(QhpXmlWriter const & source) +{ + m_out << source.m_backend.data(); +} + +void QhpXmlWriter::dumpTo(QFile & file) +{ + file.writeBlock(m_backend.data(), m_backend.length()); +} + +void QhpXmlWriter::open(char const * elementName, + char const * const * attributes) +{ + indent(); + openPure(elementName, attributes); + newLine(); + m_indentLevel++; +} + +void QhpXmlWriter::openClose(char const * elementName, + char const * const * attributes) +{ + indent(); + openClosePure(elementName, attributes); + newLine(); +} + +void QhpXmlWriter::openCloseContent(char const * elementName, + char const * content) +{ + indent(); + openPure(elementName); + m_out << convertToXML(content); + closePure(elementName); + newLine(); +} + +void QhpXmlWriter::close(char const * elementName) +{ + m_indentLevel--; + indent(); + closePure(elementName); + newLine(); +} + +void QhpXmlWriter::indent() +{ + if (m_curLineIndented) + { + return; + } + for (int i = 0; i < m_indentLevel; i++) + { + m_out << " "; + } + m_curLineIndented = true; +} + +void QhpXmlWriter::newLine() +{ + if (!m_compress) + { + m_out << "\n"; + m_curLineIndented = false; + } +} + +void QhpXmlWriter::openPureHelper(char const * elementName, + char const * const * attributes, bool close) +{ + m_out << "<" << elementName; + if (attributes) + { + for (char const * const * walker = attributes; + walker[0]; walker += 2) + { + char const * const key = walker[0]; + char const * const value = walker[1]; + if (!value) + { + continue; + } + m_out << " " << key << "=\"" << convertToXML(value) << "\""; + } + } + + if (close) + { + m_out << " /"; + } + m_out << ">"; +} + +void QhpXmlWriter::openPure(char const * elementName, + char const * const * attributes) +{ + openPureHelper(elementName, attributes, false); +} + +void QhpXmlWriter::openClosePure(char const * elementName, + char const * const * attributes) +{ + openPureHelper(elementName, attributes, true); +} + +void QhpXmlWriter::closePure(char const * elementName) +{ + m_out << "</" << elementName << ">"; +} + Index: branches/xZenu/src/util/doxygen/src/cmdmapper.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/cmdmapper.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/cmdmapper.cpp (revision 1322) @@ -0,0 +1,199 @@ +/****************************************************************************** + * + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include "cmdmapper.h" + +CommandMap cmdMap[] = +{ + { "a", CMD_EMPHASIS }, + { "addindex", CMD_ADDINDEX }, + { "anchor", CMD_ANCHOR }, + { "arg", CMD_LI }, + { "attention", CMD_ATTENTION }, + { "author", CMD_AUTHOR }, + { "authors", CMD_AUTHORS }, + { "b", CMD_BOLD }, + { "c", CMD_CODE }, + { "code", CMD_STARTCODE }, + { "copydoc", CMD_COPYDOC }, + { "copybrief", CMD_COPYBRIEF }, + { "copydetails", CMD_COPYDETAILS }, + { "date", CMD_DATE }, + { "dontinclude", CMD_DONTINCLUDE }, + { "dotfile", CMD_DOTFILE }, + { "e", CMD_EMPHASIS }, + { "em", CMD_EMPHASIS }, + { "endcode", CMD_ENDCODE }, + { "endhtmlonly", CMD_ENDHTMLONLY }, + { "endlatexonly", CMD_ENDLATEXONLY }, + { "endlink", CMD_ENDLINK }, + { "endsecreflist", CMD_ENDSECREFLIST }, + { "endverbatim", CMD_ENDVERBATIM }, + { "endxmlonly", CMD_ENDXMLONLY }, + { "exception", CMD_EXCEPTION }, + { "form", CMD_FORMULA }, + { "htmlinclude", CMD_HTMLINCLUDE }, + { "htmlonly", CMD_HTMLONLY }, + { "image", CMD_IMAGE }, + { "include", CMD_INCLUDE }, + { "internal", CMD_INTERNAL }, + { "invariant", CMD_INVARIANT }, + { "javalink", CMD_JAVALINK }, + { "latexonly", CMD_LATEXONLY }, + { "li", CMD_LI }, + { "line", CMD_LINE }, + { "link", CMD_LINK }, + { "n", CMD_LINEBREAK }, + { "note", CMD_NOTE }, + { "p", CMD_CODE }, + { "par", CMD_PAR }, + { "param", CMD_PARAM }, + { "post", CMD_POST }, + { "pre", CMD_PRE }, + { "ref", CMD_REF }, + { "refitem", CMD_SECREFITEM }, + { "remark", CMD_REMARK }, + { "remarks", CMD_REMARK }, + { "result", CMD_RETURN }, + { "return", CMD_RETURN }, + { "returns", CMD_RETURN }, + { "retval", CMD_RETVAL }, + { "sa", CMD_SA }, + { "secreflist", CMD_SECREFLIST }, + { "section", CMD_SECTION }, + { "subpage", CMD_SUBPAGE }, + { "subsection", CMD_SUBSECTION }, + { "subsubsection", CMD_SUBSUBSECTION }, + { "paragraph", CMD_PARAGRAPH }, + { "see", CMD_SA }, + { "since", CMD_SINCE }, + { "skip", CMD_SKIP }, + { "skipline", CMD_SKIPLINE }, + { "xmlonly", CMD_XMLONLY }, + { "xrefitem", CMD_XREFITEM }, + { "throw", CMD_EXCEPTION }, + { "until", CMD_UNTIL }, + { "verbatim", CMD_VERBATIM }, + { "verbinclude", CMD_VERBINCLUDE }, + { "version", CMD_VERSION }, + { "warning", CMD_WARNING }, + { "throws", CMD_EXCEPTION }, + { "tparam", CMD_TPARAM }, + { "\\", CMD_BSLASH }, + { "@", CMD_AT }, + { "<", CMD_LESS }, + { ">", CMD_GREATER }, + { "&", CMD_AMP }, + { "$", CMD_DOLLAR }, + { "#", CMD_HASH }, + { "%", CMD_PERCENT }, + { "::", CMD_DCOLON }, + { "\"", CMD_QUOTE }, + { "_internalref", CMD_INTERNALREF }, + { "dot", CMD_DOT }, + { "msc", CMD_MSC }, + { "enddot", CMD_ENDDOT }, + { "endmsc", CMD_ENDMSC }, + { "manonly", CMD_MANONLY }, + { "endmanonly", CMD_ENDMANONLY }, + { "includelineno", CMD_INCWITHLINES }, + { "inheritdoc", CMD_INHERITDOC }, + { "mscfile", CMD_MSCFILE }, + { 0, 0 }, +}; + +//---------------------------------------------------------------------------- + +CommandMap htmlTagMap[] = +{ + { "strong", HTML_BOLD }, + { "center", HTML_CENTER }, + { "table", HTML_TABLE }, + { "caption", HTML_CAPTION }, + { "small", HTML_SMALL }, + { "code", HTML_CODE }, + { "dfn", HTML_CODE }, + { "var", HTML_EMPHASIS }, + { "img", HTML_IMG }, + { "pre", HTML_PRE }, + { "sub", HTML_SUB }, + { "sup", HTML_SUP }, + { "tr", HTML_TR }, + { "td", HTML_TD }, + { "th", HTML_TH }, + { "ol", HTML_OL }, + { "ul", HTML_UL }, + { "li", HTML_LI }, + { "tt", XML_C /*HTML_CODE*/ }, + { "kbd", XML_C /*HTML_CODE*/ }, + { "em", HTML_EMPHASIS }, + { "hr", HTML_HR }, + { "dl", HTML_DL }, + { "dt", HTML_DT }, + { "dd", HTML_DD }, + { "br", HTML_BR }, + { "i", HTML_EMPHASIS }, + { "a", HTML_A }, + { "b", HTML_BOLD }, + { "p", HTML_P }, + { "h1", HTML_H1 }, + { "h2", HTML_H2 }, + { "h3", HTML_H3 }, + { "h4", HTML_H4 }, + { "h5", HTML_H5 }, + { "h6", HTML_H6 }, + { "span", HTML_SPAN }, + { "div", HTML_DIV }, + + { "c", XML_C }, + // { "code", XML_CODE }, <= ambiguous <code> is also a HTML tag + { "description", XML_DESCRIPTION }, + { "example", XML_EXAMPLE }, + { "exception", XML_EXCEPTION }, + { "include", XML_INCLUDE }, + { "item", XML_ITEM }, + { "list", XML_LIST }, // type="table|bullet|number" + { "listheader", XML_LISTHEADER }, + { "para", XML_PARA }, + { "param", XML_PARAM }, + { "paramref", XML_PARAMREF }, + { "typeparam", XML_TYPEPARAM }, + { "typeparamref", XML_TYPEPARAMREF }, + { "permission", XML_PERMISSION }, + { "remarks", XML_REMARKS }, + { "returns", XML_RETURNS }, + { "see", XML_SEE }, + { "seealso", XML_SEEALSO }, + { "summary", XML_SUMMARY }, + { "term", XML_TERM }, + { "value", XML_VALUE }, + { 0, 0 } +}; + +//---------------------------------------------------------------------------- + +Mapper *Mappers::cmdMapper = new Mapper(cmdMap,TRUE); +Mapper *Mappers::htmlTagMapper = new Mapper(htmlTagMap,FALSE); + +void Mappers::freeMappers() +{ + delete cmdMapper; cmdMapper = 0; + delete htmlTagMapper; htmlTagMapper = 0; +} + + Index: branches/xZenu/src/util/doxygen/src/commentcnv.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/commentcnv.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/commentcnv.cpp (revision 1322) @@ -0,0 +1,3396 @@ + +#line 3 "<stdout>" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer commentcnvYY_create_buffer +#define yy_delete_buffer commentcnvYY_delete_buffer +#define yy_flex_debug commentcnvYY_flex_debug +#define yy_init_buffer commentcnvYY_init_buffer +#define yy_flush_buffer commentcnvYY_flush_buffer +#define yy_load_buffer_state commentcnvYY_load_buffer_state +#define yy_switch_to_buffer commentcnvYY_switch_to_buffer +#define yyin commentcnvYYin +#define yyleng commentcnvYYleng +#define yylex commentcnvYYlex +#define yylineno commentcnvYYlineno +#define yyout commentcnvYYout +#define yyrestart commentcnvYYrestart +#define yytext commentcnvYYtext +#define yywrap commentcnvYYwrap +#define yyalloc commentcnvYYalloc +#define yyrealloc commentcnvYYrealloc +#define yyfree commentcnvYYfree + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <stdlib.h> + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include <inttypes.h> +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE commentcnvYYrestart(commentcnvYYin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 262144 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t commentcnvYYleng; + +extern FILE *commentcnvYYin, *commentcnvYYout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up commentcnvYYtext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via commentcnvYYrestart()), so that the user can continue scanning by + * just pointing commentcnvYYin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when commentcnvYYtext is formed. */ +static char yy_hold_char; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t commentcnvYYleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow commentcnvYYwrap()'s to do buffer switches + * instead of setting up a fresh commentcnvYYin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void commentcnvYYrestart (FILE *input_file ); +void commentcnvYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE commentcnvYY_create_buffer (FILE *file,int size ); +void commentcnvYY_delete_buffer (YY_BUFFER_STATE b ); +void commentcnvYY_flush_buffer (YY_BUFFER_STATE b ); +void commentcnvYYpush_buffer_state (YY_BUFFER_STATE new_buffer ); +void commentcnvYYpop_buffer_state (void ); + +static void commentcnvYYensure_buffer_stack (void ); +static void commentcnvYY_load_buffer_state (void ); +static void commentcnvYY_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER commentcnvYY_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE commentcnvYY_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE commentcnvYY_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE commentcnvYY_scan_bytes (yyconst char *bytes,yy_size_t len ); + +void *commentcnvYYalloc (yy_size_t ); +void *commentcnvYYrealloc (void *,yy_size_t ); +void commentcnvYYfree (void * ); + +#define yy_new_buffer commentcnvYY_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + commentcnvYYensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + commentcnvYYensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define commentcnvYYwrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *commentcnvYYin = (FILE *) 0, *commentcnvYYout = (FILE *) 0; + +typedef int yy_state_type; + +extern int commentcnvYYlineno; + +int commentcnvYYlineno = 1; + +extern char *commentcnvYYtext; +#define yytext_ptr commentcnvYYtext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up commentcnvYYtext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + commentcnvYYleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 76 +#define YY_END_OF_BUFFER 77 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_acclist[295] = + { 0, + 1, 1, 36, 36, 24, 24, 24, 24, 63, 63, + 77, 76, 1, 18, 76, 6, 76, 18, 76, 4, + 18, 76, 11, 18, 76, 5, 18, 76, 18, 76, + 18, 76, 18, 76, 30, 76, 31, 76, 29, 30, + 76, 30, 76, 34, 76, 35, 76, 33, 34, 76, + 34, 76, 57, 76, 76, 76, 36, 44, 76, 39, + 76, 44, 76, 36, 44, 76, 37, 44, 76, 44, + 76, 44, 76, 24, 27, 76, 25, 76, 27, 76, + 27, 76, 24, 27, 76, 27, 76, 27, 76, 20, + 27, 76, 21, 27, 76, 24, 27, 76, 27, 76, + + 75, 76, 58, 76, 75, 76, 65, 76, 63, 65, + 76, 62, 65, 76, 69, 74, 76, 71, 76, 74, + 76, 70, 74, 76, 72, 74, 76, 73, 74, 76, + 69, 74, 76, 69, 74, 76, 1, 3, 13, 11, + 10, 28, 32, 36, 41, 42, 43, 41, 42, 43, + 41, 42, 42, 43, 41, 43, 36, 37, 37, 40, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 24, 24, 24, 23, 58, 63, 62, 69, 69, + 69, 69, 12, 10, 9,16391, 49, 36, 38, 59, + 66, 67, 66, 66, 66, 16, 16, 67, 66, 66, + + 66, 66, 66, 66, 66, 19, 26, 23, 23, 26, + 69,16452, 2,16391, 9, 52,16435,16434,16439,16431, + 45, 59, 59, 66, 66, 66, 66, 16, 66, 66, + 66, 66, 66, 66, 8260, 69, 8260,16438,16437,16440, + 16432, 46, 8243, 8242, 8247, 8239, 66, 15, 15, 67, + 66, 66, 66, 66, 66, 66, 66, 8246, 8245, 8248, + 8240, 60, 64, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 14, 22, 8199, + 66, 66, 66, 66, 66, 61, 61, 67, 66, 17, + 17, 67, 8, 9 + + } ; + +static yyconst flex_int16_t yy_accept[330] = + { 0, + 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, + 3, 4, 5, 6, 7, 8, 9, 9, 9, 10, + 11, 11, 11, 12, 13, 16, 18, 20, 23, 26, + 29, 31, 33, 35, 37, 39, 42, 44, 46, 48, + 51, 53, 55, 56, 57, 60, 62, 64, 67, 70, + 72, 74, 77, 79, 81, 83, 86, 88, 90, 93, + 96, 99, 101, 103, 105, 107, 109, 112, 115, 118, + 120, 122, 125, 128, 131, 134, 137, 138, 140, 140, + 141, 141, 142, 142, 143, 144, 144, 144, 144, 144, + 144, 145, 148, 151, 153, 155, 157, 158, 159, 160, + + 161, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 172, 173, 173, 173, 174, 174, 174, + 174, 175, 175, 176, 176, 177, 178, 179, 180, 181, + 182, 183, 183, 184, 185, 185, 186, 187, 187, 187, + 188, 188, 188, 190, 191, 192, 193, 194, 195, 196, + 197, 199, 200, 201, 202, 203, 204, 205, 206, 206, + 206, 207, 208, 208, 209, 211, 213, 214, 215, 216, + 216, 217, 217, 217, 218, 219, 220, 221, 222, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 235, 235, 235, 237, 238, 238, 238, + + 238, 239, 240, 241, 242, 243, 243, 243, 244, 244, + 245, 245, 246, 246, 247, 248, 249, 251, 252, 253, + 254, 255, 256, 257, 258, 258, 258, 258, 258, 258, + 258, 258, 258, 258, 258, 258, 258, 258, 259, 259, + 260, 260, 261, 261, 262, 263, 264, 264, 265, 266, + 267, 268, 269, 270, 271, 271, 271, 271, 271, 271, + 271, 271, 271, 271, 271, 271, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 279, 279, 279, 279, 279, + 279, 279, 280, 281, 281, 282, 283, 284, 285, 286, + 286, 286, 286, 286, 286, 286, 286, 287, 289, 290, + + 291, 293, 293, 293, 293, 293, 293, 293, 293, 293, + 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, + 293, 293, 293, 293, 293, 293, 293, 295, 295 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 5, 6, 7, 8, 1, 1, 9, 1, + 1, 10, 1, 1, 11, 12, 13, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 1, 1, 15, + 1, 16, 1, 17, 18, 18, 18, 19, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 20, 21, 22, 1, 18, 1, 23, 24, 25, 26, + + 27, 28, 29, 30, 31, 29, 29, 32, 33, 34, + 35, 29, 29, 36, 37, 38, 39, 40, 29, 41, + 42, 29, 43, 1, 44, 45, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[46] = + { 0, + 1, 2, 3, 1, 4, 5, 5, 1, 5, 6, + 7, 8, 9, 10, 1, 1, 11, 12, 12, 1, + 13, 1, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 15, 16, 17 + } ; + +static yyconst flex_int16_t yy_base[369] = + { 0, + 0, 0, 0, 19, 12, 13, 14, 28, 1153, 39, + 50, 91, 26, 133, 33, 176, 41, 42, 220, 0, + 62, 264, 1155, 1157, 0, 1157, 1138, 1147, 1145, 1157, + 1140, 38, 1157, 1157, 1157, 1157, 0, 1157, 1157, 1157, + 0, 25, 55, 1137, 0, 73, 1157, 1143, 51, 292, + 1131, 0, 1157, 1157, 46, 77, 1134, 1119, 1157, 1157, + 79, 1132, 1141, 1157, 0, 1157, 1141, 0, 0, 1157, + 1157, 1157, 1157, 1157, 85, 1129, 0, 1157, 1135, 1157, + 1135, 81, 7, 1157, 1157, 86, 1126, 87, 1125, 97, + 0, 1157, 109, 1157, 1157, 1157, 1131, 72, 105, 1157, + + 0, 1093, 60, 74, 79, 99, 83, 100, 101, 87, + 102, 94, 1110, 0, 1100, 125, 126, 1120, 1119, 1097, + 138, 1117, 136, 1126, 1157, 1126, 0, 0, 146, 1114, + 147, 1121, 1157, 1157, 1122, 1157, 1121, 1, 148, 1108, + 1090, 153, 0, 1004, 861, 1157, 131, 120, 138, 1157, + 0, 129, 130, 137, 142, 147, 148, 151, 852, 857, + 1157, 1157, 855, 1157, 1157, 258, 1157, 876, 185, 167, + 863, 870, 179, 873, 872, 871, 870, 1157, 192, 816, + 814, 161, 170, 334, 174, 0, 168, 175, 166, 171, + 245, 172, 787, 240, 257, 338, 0, 273, 799, 268, + + 807, 787, 786, 784, 1157, 281, 777, 1157, 774, 1157, + 770, 1157, 768, 1157, 358, 1157, 1157, 173, 252, 169, + 255, 257, 269, 262, 742, 724, 737, 725, 709, 718, + 710, 706, 700, 691, 301, 349, 723, 1157, 715, 1157, + 693, 1157, 691, 1157, 361, 1157, 364, 337, 341, 348, + 261, 326, 347, 344, 129, 659, 649, 651, 656, 631, + 618, 617, 601, 612, 0, 350, 360, 356, 359, 330, + 352, 361, 354, 1157, 603, 607, 598, 456, 466, 454, + 460, 1157, 1157, 367, 404, 380, 386, 449, 394, 451, + 444, 450, 449, 459, 447, 436, 1157, 1157, 388, 1157, + + 1157, 446, 444, 446, 445, 437, 414, 433, 411, 407, + 398, 393, 403, 390, 395, 386, 325, 266, 465, 255, + 435, 441, 439, 442, 275, 200, 1157, 1157, 494, 511, + 528, 545, 562, 579, 596, 613, 630, 647, 664, 681, + 698, 715, 732, 749, 760, 774, 791, 797, 805, 820, + 837, 854, 870, 52, 884, 901, 918, 935, 952, 969, + 986, 1003, 1020, 1037, 1054, 1071, 1088, 1105 + } ; + +static yyconst flex_int16_t yy_def[369] = + { 0, + 329, 329, 330, 330, 331, 331, 332, 332, 329, 329, + 333, 333, 334, 334, 334, 334, 335, 335, 328, 19, + 336, 336, 328, 328, 337, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 338, 328, 328, 328, + 339, 328, 328, 328, 340, 341, 328, 340, 342, 328, + 328, 343, 328, 328, 328, 343, 328, 328, 328, 328, + 343, 328, 344, 328, 50, 328, 328, 345, 346, 328, + 328, 328, 328, 328, 346, 346, 337, 328, 328, 328, + 328, 328, 347, 328, 328, 328, 328, 328, 328, 328, + 340, 328, 341, 328, 328, 328, 340, 342, 342, 328, + + 348, 349, 349, 349, 349, 349, 349, 349, 349, 349, + 349, 349, 328, 343, 328, 328, 343, 328, 328, 328, + 343, 328, 328, 344, 328, 328, 345, 346, 346, 346, + 346, 328, 328, 328, 347, 328, 350, 347, 328, 351, + 328, 352, 340, 353, 349, 328, 349, 349, 349, 328, + 354, 349, 349, 349, 349, 349, 349, 349, 328, 328, + 328, 328, 328, 328, 328, 355, 328, 350, 328, 347, + 356, 328, 357, 358, 359, 360, 361, 328, 328, 328, + 353, 349, 349, 349, 349, 354, 349, 349, 349, 349, + 349, 349, 328, 328, 328, 355, 362, 328, 328, 347, + + 363, 364, 365, 366, 328, 328, 358, 328, 359, 328, + 360, 328, 361, 328, 349, 328, 328, 349, 349, 349, + 349, 349, 349, 349, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 347, 363, 328, 364, 328, + 365, 328, 366, 328, 328, 328, 328, 349, 349, 349, + 349, 349, 349, 349, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 367, 347, 349, 349, 349, 349, + 349, 349, 349, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 347, 349, 349, 349, 349, 349, 328, + 328, 328, 328, 328, 328, 347, 328, 328, 349, 328, + + 328, 328, 328, 328, 328, 328, 328, 347, 328, 328, + 328, 328, 328, 328, 347, 328, 328, 328, 347, 328, + 347, 347, 347, 347, 368, 368, 328, 0, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328 + } ; + +static yyconst flex_int16_t yy_nxt[1203] = + { 0, + 328, 328, 26, 136, 27, 28, 29, 170, 30, 136, + 31, 137, 32, 138, 35, 35, 39, 36, 36, 137, + 33, 26, 40, 27, 28, 29, 86, 30, 53, 31, + 39, 32, 37, 37, 41, 53, 40, 87, 54, 33, + 43, 42, 55, 64, 64, 54, 55, 82, 41, 58, + 83, 44, 46, 58, 47, 48, 88, 65, 65, 49, + 99, 65, 65, 100, 70, 186, 50, 89, 54, 54, + 50, 71, 115, 116, 93, 59, 60, 94, 117, 95, + 121, 328, 72, 96, 328, 134, 129, 86, 88, 118, + 134, 122, 51, 46, 147, 47, 48, 130, 87, 89, + + 49, 140, 146, 141, 73, 74, 150, 50, 148, 142, + 93, 50, 149, 94, 99, 95, 146, 100, 150, 96, + 152, 146, 153, 154, 156, 146, 158, 117, 157, 146, + 274, 274, 161, 51, 56, 53, 146, 155, 118, 121, + 164, 151, 146, 146, 146, 57, 161, 129, 165, 55, + 122, 166, 171, 55, 172, 178, 182, 184, 130, 166, + 173, 187, 146, 185, 183, 179, 184, 188, 161, 136, + 189, 146, 146, 146, 190, 54, 54, 61, 53, 146, + 146, 205, 192, 191, 146, 200, 198, 184, 62, 146, + 146, 206, 58, 146, 178, 215, 58, 199, 218, 219, + + 221, 220, 327, 146, 179, 222, 224, 248, 146, 250, + 146, 146, 146, 146, 146, 146, 146, 146, 59, 60, + 66, 67, 24, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 68, 68, 66, + 66, 66, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 66, 66, 66, 75, 70, 197, 223, 226, + 136, 227, 228, 71, 198, 229, 76, 327, 197, 230, + 231, 232, 233, 205, 72, 199, 249, 146, 251, 234, + 252, 253, 270, 206, 146, 254, 161, 146, 161, 146, + + 197, 197, 236, 146, 146, 265, 73, 74, 101, 102, + 102, 146, 101, 265, 102, 102, 103, 104, 105, 106, + 102, 107, 102, 108, 109, 102, 102, 110, 102, 102, + 102, 111, 112, 102, 216, 216, 216, 216, 216, 216, + 216, 216, 216, 216, 216, 216, 216, 197, 216, 216, + 216, 136, 136, 216, 216, 216, 320, 271, 197, 245, + 246, 247, 245, 246, 247, 247, 246, 247, 146, 136, + 267, 288, 146, 266, 268, 273, 217, 216, 216, 146, + 197, 197, 269, 146, 272, 285, 146, 286, 284, 146, + 146, 289, 287, 288, 146, 288, 146, 136, 146, 296, + + 146, 146, 146, 146, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 299, 297, 297, + 297, 288, 146, 297, 297, 297, 288, 161, 146, 288, + 146, 161, 319, 318, 161, 136, 146, 136, 136, 161, + 317, 136, 316, 136, 136, 314, 298, 297, 297, 300, + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 308, 300, 300, 300, 315, 136, 300, 300, + 300, 323, 322, 324, 313, 325, 312, 311, 310, 309, + 307, 306, 305, 304, 303, 302, 282, 321, 295, 294, + 293, 301, 300, 300, 24, 24, 24, 24, 24, 24, + + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 63, 63, 63, 63, + + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 77, 77, 292, 291, 290, 77, 282, 77, 282, 77, + 77, 77, 281, 77, 77, 77, 77, 84, 84, 280, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 85, 85, 279, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 91, 91, 278, 277, 91, 276, 91, 91, 91, + 91, 275, 91, 244, 91, 242, 91, 91, 92, 92, + + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 98, 98, 240, 98, 98, + 98, 98, 98, 98, 98, 238, 98, 264, 98, 98, + 98, 98, 114, 114, 263, 114, 114, 114, 114, 114, + 262, 114, 261, 114, 260, 114, 259, 258, 114, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 257, + 124, 256, 124, 124, 124, 124, 127, 127, 255, 127, + 214, 127, 212, 127, 128, 128, 210, 128, 128, 208, + 128, 128, 128, 128, 128, 128, 244, 128, 242, 240, + 128, 135, 135, 135, 135, 135, 135, 135, 135, 135, + + 135, 135, 135, 135, 135, 135, 135, 135, 144, 238, + 144, 235, 225, 144, 145, 180, 145, 180, 145, 145, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 181, 214, 212, 210, 208, 203, 202, 169, 181, + 195, 181, 194, 181, 196, 196, 193, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + + 196, 201, 201, 146, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 201, 201, 204, 204, + 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, + 204, 204, 204, 204, 204, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 211, + 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 213, 213, 213, 213, + 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, + + 213, 213, 213, 197, 197, 180, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 241, 241, 241, 241, 241, 241, + 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, + 241, 243, 243, 243, 243, 243, 243, 243, 243, 243, + 243, 243, 243, 243, 243, 243, 243, 243, 283, 283, + 283, 283, 283, 283, 283, 283, 176, 283, 283, 283, + + 283, 283, 283, 283, 283, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 175, 169, 136, 167, 131, 126, 125, 123, + 163, 162, 119, 160, 159, 146, 143, 90, 139, 133, + 132, 131, 126, 125, 123, 120, 119, 113, 97, 90, + 81, 80, 79, 78, 328, 42, 23, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + + 328, 328 + } ; + +static yyconst flex_int16_t yy_chk[1203] = + { 0, + 0, 0, 3, 138, 3, 3, 3, 138, 3, 83, + 3, 83, 3, 83, 5, 6, 7, 5, 6, 83, + 3, 4, 7, 4, 4, 4, 42, 4, 13, 4, + 8, 4, 5, 6, 7, 15, 8, 42, 13, 4, + 10, 10, 13, 17, 18, 15, 13, 32, 8, 15, + 32, 10, 11, 15, 11, 11, 43, 17, 18, 11, + 49, 17, 18, 49, 21, 354, 11, 43, 13, 13, + 11, 21, 55, 55, 46, 15, 15, 46, 56, 46, + 61, 98, 21, 46, 98, 82, 75, 86, 88, 56, + 82, 61, 11, 12, 103, 12, 12, 75, 86, 88, + + 12, 90, 103, 90, 21, 21, 106, 12, 104, 90, + 93, 12, 105, 93, 99, 93, 104, 99, 106, 93, + 107, 105, 108, 109, 110, 107, 112, 117, 111, 110, + 255, 255, 116, 12, 14, 14, 112, 109, 117, 121, + 123, 106, 108, 109, 111, 14, 116, 129, 123, 14, + 121, 131, 139, 14, 139, 142, 147, 148, 129, 131, + 139, 152, 148, 149, 147, 142, 155, 153, 116, 170, + 154, 152, 153, 147, 156, 14, 14, 16, 16, 154, + 149, 173, 158, 157, 155, 170, 169, 182, 16, 156, + 157, 173, 16, 158, 179, 183, 16, 169, 185, 187, + + 189, 188, 326, 182, 179, 190, 192, 218, 189, 220, + 187, 220, 183, 190, 192, 218, 185, 188, 16, 16, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 22, 22, 166, 191, 194, + 200, 194, 194, 22, 198, 194, 22, 325, 166, 194, + 194, 195, 195, 206, 22, 198, 219, 191, 221, 195, + 222, 223, 251, 206, 219, 224, 320, 221, 318, 222, + + 166, 166, 200, 251, 224, 235, 22, 22, 50, 50, + 50, 223, 50, 235, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 184, 184, 184, 184, 184, 184, + 184, 184, 184, 184, 184, 184, 184, 196, 184, 184, + 184, 236, 266, 184, 184, 184, 317, 252, 196, 215, + 215, 215, 245, 245, 245, 247, 247, 247, 252, 284, + 248, 270, 270, 236, 249, 254, 184, 184, 184, 248, + 196, 196, 250, 249, 253, 267, 254, 268, 266, 253, + 250, 272, 269, 271, 271, 273, 273, 315, 268, 284, + + 215, 269, 267, 272, 285, 285, 285, 285, 285, 285, + 285, 285, 285, 285, 285, 285, 285, 287, 285, 285, + 285, 286, 286, 285, 285, 285, 289, 316, 287, 299, + 299, 314, 315, 313, 312, 308, 289, 321, 296, 311, + 310, 323, 309, 322, 324, 307, 285, 285, 285, 288, + 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, + 288, 288, 296, 288, 288, 288, 308, 319, 288, 288, + 288, 322, 321, 323, 306, 324, 305, 304, 303, 302, + 295, 294, 293, 292, 291, 290, 281, 319, 280, 279, + 278, 288, 288, 288, 329, 329, 329, 329, 329, 329, + + 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, + 329, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 333, 333, 333, 333, 333, 333, 333, 333, + 333, 333, 333, 333, 333, 333, 333, 333, 333, 334, + 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, + 334, 334, 334, 334, 334, 334, 335, 335, 335, 335, + + 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + 335, 335, 335, 336, 336, 336, 336, 336, 336, 336, + 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, + 337, 337, 277, 276, 275, 337, 264, 337, 263, 337, + 337, 337, 262, 337, 337, 337, 337, 338, 338, 261, + 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, + 338, 338, 338, 338, 339, 339, 260, 339, 339, 339, + 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, + 339, 340, 340, 259, 258, 340, 257, 340, 340, 340, + 340, 256, 340, 243, 340, 241, 340, 340, 341, 341, + + 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 341, 341, 342, 342, 239, 342, 342, + 342, 342, 342, 342, 342, 237, 342, 234, 342, 342, + 342, 342, 343, 343, 233, 343, 343, 343, 343, 343, + 232, 343, 231, 343, 230, 343, 229, 228, 343, 344, + 344, 344, 344, 344, 344, 344, 344, 344, 344, 227, + 344, 226, 344, 344, 344, 344, 345, 345, 225, 345, + 213, 345, 211, 345, 346, 346, 209, 346, 346, 207, + 346, 346, 346, 346, 346, 346, 204, 346, 203, 202, + 346, 347, 347, 347, 347, 347, 347, 347, 347, 347, + + 347, 347, 347, 347, 347, 347, 347, 347, 348, 201, + 348, 199, 193, 348, 349, 181, 349, 180, 349, 349, + 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, + 350, 350, 350, 350, 350, 350, 350, 351, 351, 351, + 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, + 351, 351, 351, 351, 352, 352, 352, 352, 352, 352, + 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, + 352, 353, 177, 176, 175, 174, 172, 171, 168, 353, + 163, 353, 160, 353, 355, 355, 159, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + + 355, 356, 356, 145, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 357, 357, + 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, + 357, 357, 357, 357, 357, 358, 358, 358, 358, 358, + 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, + 358, 358, 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, 359, 360, + 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, + 360, 360, 360, 360, 360, 360, 361, 361, 361, 361, + 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + + 361, 361, 361, 362, 362, 144, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 364, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, + 364, 364, 364, 364, 365, 365, 365, 365, 365, 365, + 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, + 365, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 367, 367, + 367, 367, 367, 367, 367, 367, 141, 367, 367, 367, + + 367, 367, 367, 367, 367, 368, 368, 368, 368, 368, + 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, + 368, 368, 140, 137, 135, 132, 130, 126, 124, 122, + 120, 119, 118, 115, 113, 102, 97, 89, 87, 81, + 79, 76, 67, 63, 62, 58, 57, 51, 48, 44, + 31, 29, 28, 27, 23, 9, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, + + 328, 328 + } ; + +extern int commentcnvYY_flex_debug; +int commentcnvYY_flex_debug = 0; + +static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; +static char *yy_full_match; +static int yy_lp; +static int yy_looking_for_trail_begin = 0; +static int yy_full_lp; +static int *yy_full_state; +#define YY_TRAILING_MASK 0x2000 +#define YY_TRAILING_HEAD_MASK 0x4000 +#define REJECT \ +{ \ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ \ +yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ +(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \ +(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \ +yy_current_state = *(yy_state_ptr); /* restore curr. state */ \ +++(yy_lp); \ +goto find_rule; \ +} + +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *commentcnvYYtext; +#line 1 "commentcnv.l" +/***************************************************************************** + * + * $Id: commentcnv.l,v 1.80 2001/03/19 19:27:41 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ +#line 19 "commentcnv.l" + +#define YY_NEVER_INTERACTIVE 1 + +#include <stdio.h> +#include <stdlib.h> + +#include <qstack.h> +#include <qregexp.h> +#include <qtextstream.h> +#include <qglobal.h> + +#include "bufstr.h" +#include "debug.h" +#include "message.h" +#include "config.h" +#include "doxygen.h" +#include "util.h" + +#include <assert.h> + +#define ADDCHAR(c) g_outBuf->addChar(c) +#define ADDARRAY(a,s) g_outBuf->addArray(a,s) + +struct CondCtx +{ + CondCtx(int line,QCString id,bool b) + : lineNr(line),sectionId(id), skip(b) {} + int lineNr; + QCString sectionId; + bool skip; +}; + +static BufStr * g_inBuf; +static BufStr * g_outBuf; +static int g_inBufPos; +static int g_col; +static int g_blockHeadCol; +static bool g_mlBrief; +static int g_readLineCtx; +static bool g_skip; +static QCString g_fileName; +static int g_lineNr; +static int g_condCtx; +static QStack<CondCtx> g_condStack; +static QCString g_blockName; +static int g_lastCommentContext; +static bool g_inSpecialComment; +static bool g_inRoseComment; +static int g_javaBlock; +static bool g_specialComment; + +static QCString g_aliasString; +static int g_blockCount; +static bool g_lastEscaped; +static int g_lastBlockContext; +static bool g_pythonDocString; + + +static SrcLangExt g_lang; + +static void replaceCommentMarker(const char *s,int len) +{ + const char *p=s; + char c; + // copy blanks + while ((c=*p) && (c==' ' || c=='\t' || c=='\n')) + { + ADDCHAR(c); + g_lineNr += c=='\n'; + p++; + } + // replace start of comment marker by spaces + while ((c=*p) && (c=='/' || c=='!' || c=='#')) + { + ADDCHAR(' '); + p++; + if (*p=='<') // comment-after-item marker + { + ADDCHAR(' '); + p++; + } + if (c=='!') // end after first ! + { + break; + } + } + // copy comment line to output + ADDARRAY(p,len-(p-s)); +} + +static inline int computeIndent(const char *s) +{ + int col=0; + static int tabSize=Config_getInt("TAB_SIZE"); + const char *p=s; + char c; + while ((c=*p++)) + { + if (c==' ') col++; + else if (c=='\t') col+=tabSize-(col%tabSize); + else break; + } + return col; +} + +static inline void copyToOutput(const char *s,int len) +{ + int i; + if (g_skip) // only add newlines. + { + for (i=0;i<len;i++) + { + if (s[i]=='\n') + { + ADDCHAR('\n'); + //fprintf(stderr,"---> skip %d\n",g_lineNr); + g_lineNr++; + } + } + } + else if (len>0) + { + ADDARRAY(s,len); + static int tabSize=Config_getInt("TAB_SIZE"); + for (i=0;i<len;i++) + { + switch (s[i]) + { + case '\n': g_col=0; + //fprintf(stderr,"---> copy %d\n",g_lineNr); + g_lineNr++; break; + case '\t': g_col+=tabSize-(g_col%tabSize); break; + default: g_col++; break; + } + } + } +} + +static void startCondSection(const char *sectId) +{ + g_condStack.push(new CondCtx(g_lineNr,sectId,g_skip)); + if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1) + { + //printf("*** Section is enabled!\n"); + } + else + { + //printf("*** Section is disabled!\n"); + g_skip=TRUE; + } +} + +static void endCondSection() +{ + if (g_condStack.isEmpty()) + { + warn(g_fileName,g_lineNr,"Found \\endcond command without matching \\cond"); + g_skip=FALSE; + } + else + { + CondCtx *ctx = g_condStack.pop(); + g_skip=ctx->skip; + } +} + +#if 0 +/** remove and executes cond and endcond commands in \a s */ +static QCString handleCondCmdInAliases(const QCString &s) +{ + QCString result; + //printf("handleCondCmdInAliases(%s)\n",s.data()); + static QRegExp cmdPat("[\\\\@][a-z_A-Z][a-z_A-Z0-9]*"); + int p=0,i,l; + while ((i=cmdPat.match(s,p,&l))!=-1) + { + result+=s.mid(p,i-p); + QCString cmd = s.mid(i+1,l-1); + //printf("Found command %s\n",cmd.data()); + if (cmd=="cond") + { + int sp=i+l,ep; + const char *arg=s.data()+sp; + char c; + // skip spaces + while ((c=*arg) && (c==' ' || c=='\t')) arg++,sp++; + // read argument + if (*arg=='\n') // no arg + { + startCondSection(" "); + ep=sp; + } + else // get argument + { + ep=sp; + while ((c=*arg) && isId(c)) arg++,ep++; + if (ep>sp) + { + QCString id = s.mid(sp,ep-sp); + //printf("Found conditional section id %s\n",id.data()); + startCondSection(id); + } + else // invalid identifier + { + } + } + p=ep; + } + else if (cmd=="endcond") + { + endCondSection(); + p=i+l; + } + else + { + result+=s.mid(i,l); + p=i+l; + } + } + result+=s.right(s.length()-p); + return result; +} +#endif + +/** copies string \a s with length \a len to the output, while + * replacing any alias commands found in the string. + */ +static void replaceAliases(const char *s) +{ + QCString result = resolveAliasCmd(s); + //printf("replaceAliases(%s)->'%s'\n",s,result.data()); + copyToOutput(result,result.length()); +} + + +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); + +static int yyread(char *buf,int max_size) +{ + int bytesInBuf = g_inBuf->curPos()-g_inBufPos; + int bytesToCopy = QMIN(max_size,bytesInBuf); + memcpy(buf,g_inBuf->data()+g_inBufPos,bytesToCopy); + g_inBufPos+=bytesToCopy; + return bytesToCopy; +} + +void replaceComment(int offset); + + + + + + + + + + + +#line 1177 "<stdout>" + +#define INITIAL 0 +#define Scan 1 +#define SkipString 2 +#define SkipChar 3 +#define SComment 4 +#define CComment 5 +#define Verbatim 6 +#define VerbatimCode 7 +#define ReadLine 8 +#define CondLine 9 +#define ReadAliasArgs 10 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include <unistd.h> +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int commentcnvYYlex_destroy (void ); + +int commentcnvYYget_debug (void ); + +void commentcnvYYset_debug (int debug_flag ); + +YY_EXTRA_TYPE commentcnvYYget_extra (void ); + +void commentcnvYYset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *commentcnvYYget_in (void ); + +void commentcnvYYset_in (FILE * in_str ); + +FILE *commentcnvYYget_out (void ); + +void commentcnvYYset_out (FILE * out_str ); + +yy_size_t commentcnvYYget_leng (void ); + +char *commentcnvYYget_text (void ); + +int commentcnvYYget_lineno (void ); + +void commentcnvYYset_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int commentcnvYYwrap (void ); +#else +extern int commentcnvYYwrap (void ); +#endif +#endif + + static void yyunput (int c,char *buf_ptr ); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 262144 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO fwrite( commentcnvYYtext, commentcnvYYleng, 1, commentcnvYYout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( commentcnvYYin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( commentcnvYYin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, commentcnvYYin))==0 && ferror(commentcnvYYin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(commentcnvYYin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int commentcnvYYlex (void); + +#define YY_DECL int commentcnvYYlex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after commentcnvYYtext and commentcnvYYleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( commentcnvYYleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (commentcnvYYtext[commentcnvYYleng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 283 "commentcnv.l" + + +#line 1375 "<stdout>" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + /* Create the reject buffer large enough to save one state per allowed character. */ + if ( ! (yy_state_buf) ) + (yy_state_buf) = (yy_state_type *)commentcnvYYalloc(YY_STATE_BUF_SIZE ); + if ( ! (yy_state_buf) ) + YY_FATAL_ERROR( "out of dynamic memory in commentcnvYYlex()" ); + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! commentcnvYYin ) + commentcnvYYin = stdin; + + if ( ! commentcnvYYout ) + commentcnvYYout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + commentcnvYYensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); + } + + commentcnvYY_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of commentcnvYYtext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 329 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *(yy_state_ptr)++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 1157 ); + +yy_find_action: + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; +goto find_rule; /* Shut up GCC warning -Wall */ +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[(yy_lp)]; + if ( yy_act & YY_TRAILING_HEAD_MASK || + (yy_looking_for_trail_begin) ) + { + if ( yy_act == (yy_looking_for_trail_begin) ) + { + (yy_looking_for_trail_begin) = 0; + yy_act &= ~YY_TRAILING_HEAD_MASK; + break; + } + } + else if ( yy_act & YY_TRAILING_MASK ) + { + (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK; + (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK; + (yy_full_match) = yy_cp; + (yy_full_state) = (yy_state_ptr); + (yy_full_lp) = (yy_lp); + } + else + { + (yy_full_match) = yy_cp; + (yy_full_state) = (yy_state_ptr); + (yy_full_lp) = (yy_lp); + break; + } + ++(yy_lp); + goto find_rule; + } + --yy_cp; + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +#line 285 "commentcnv.l" +{ /* eat anything that is not " / or \n */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 288 "commentcnv.l" +{ /* start of python long comment */ + if (g_lang!=SrcLangExt_Python) + { + REJECT; + } + else + { + g_pythonDocString = TRUE; + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(CComment); + } + } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 300 "commentcnv.l" +{ + if (g_lang!=SrcLangExt_F90) + { + REJECT; + } + else + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(CComment); + } + } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 311 "commentcnv.l" +{ /* start of a string */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(SkipString); + } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 315 "commentcnv.l" +{ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(SkipChar); + } + YY_BREAK +case 6: +/* rule 6 can match eol */ +YY_RULE_SETUP +#line 319 "commentcnv.l" +{ /* new line */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 7: +/* rule 7 can match eol */ +YY_RULE_SETUP +#line 322 "commentcnv.l" +{ /* start C++ style special comment block */ + if (g_mlBrief) + { + REJECT; // bail out if we do not need to convert + } + else + { + int i=3; + if (commentcnvYYtext[2]=='/') + { + while (i<(int)commentcnvYYleng && commentcnvYYtext[i]=='/') i++; + } + g_blockHeadCol=g_col; + copyToOutput("/**",3); + replaceAliases(commentcnvYYtext+i); + g_inSpecialComment=TRUE; + BEGIN(SComment); + } + } + YY_BREAK +case 8: +/* rule 8 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 341 "commentcnv.l" +{ /* Start of Rational Rose ANSI C++ comment block */ + if (g_mlBrief) REJECT; + int i=17; //=strlen("//##Documentation"); + g_blockHeadCol=g_col; + copyToOutput("/**",3); + replaceAliases(commentcnvYYtext+i); + g_inRoseComment=TRUE; + BEGIN(SComment); + } + YY_BREAK +case 9: +/* rule 9 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 2; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 350 "commentcnv.l" +{ /* one line C++ comment */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + g_readLineCtx=YY_START; + BEGIN(ReadLine); + } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 355 "commentcnv.l" +{ /* start of a C comment */ + g_specialComment=commentcnvYYleng==3; + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(CComment); + } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 360 "commentcnv.l" +{ + if (g_lang!=SrcLangExt_Python) + { + REJECT; + } + else + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(CComment); + } + } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 371 "commentcnv.l" +{ + if (g_lang!=SrcLangExt_VHDL) + { + REJECT; + } + else + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(CComment); + } + } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 382 "commentcnv.l" +{ + if (g_lang!=SrcLangExt_F90) + { + REJECT; + } + else + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(CComment); + } + } + YY_BREAK +case 14: +/* rule 14 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 6; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 393 "commentcnv.l" +{ + copyToOutput("@code",5); + g_lastCommentContext = YY_START; + g_javaBlock=1; + g_blockName=&commentcnvYYtext[1]; + BEGIN(VerbatimCode); + } + YY_BREAK +case 15: +/* rule 15 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 400 "commentcnv.l" +{ /* start of a verbatim block */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + g_lastCommentContext = YY_START; + g_javaBlock=0; + g_blockName=&commentcnvYYtext[1]; + BEGIN(VerbatimCode); + } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 407 "commentcnv.l" +{ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + g_blockName=&commentcnvYYtext[1]; + if (g_blockName.at(1)=='[') + { + g_blockName.at(1)=']'; + } + else if (g_blockName.at(1)=='{') + { + g_blockName.at(1)='}'; + } + g_lastCommentContext = YY_START; + BEGIN(Verbatim); + } + YY_BREAK +case 17: +/* rule 17 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 421 "commentcnv.l" +{ /* start of a verbatim block */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + g_blockName=&commentcnvYYtext[1]; + g_lastCommentContext = YY_START; + BEGIN(Verbatim); + } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 427 "commentcnv.l" +{ /* any other character */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 430 "commentcnv.l" +{ /* end of verbatim block */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + if (commentcnvYYtext[1]=='f') // end of formula + { + BEGIN(g_lastCommentContext); + } + else if (&commentcnvYYtext[4]==g_blockName) + { + BEGIN(g_lastCommentContext); + } + } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 441 "commentcnv.l" +{ + if (g_javaBlock==0) + { + REJECT; + } + else + { + g_javaBlock++; + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 452 "commentcnv.l" +{ + if (g_javaBlock==0) + { + REJECT; + } + else + { + g_javaBlock--; + if (g_javaBlock==0) + { + copyToOutput(" @endcode ",10); + BEGIN(g_lastCommentContext); + } + else + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + } + } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 471 "commentcnv.l" +{ /* end of verbatim block */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + if (&commentcnvYYtext[4]==g_blockName) + { + BEGIN(g_lastCommentContext); + } + } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 478 "commentcnv.l" +{ /* skip leading comments */ + if (!g_inSpecialComment) + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 484 "commentcnv.l" +{ /* any character not a backslash or new line or } */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 25: +/* rule 25 can match eol */ +YY_RULE_SETUP +#line 487 "commentcnv.l" +{ /* new line in verbatim block */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 490 "commentcnv.l" +{ + if (g_blockName=="dot" || g_blockName=="msc" || g_blockName.at(0)=='f') + { + // see bug 487871, strip /// from dot images and formulas. + copyToOutput(" ",3); + } + else // even slashes are verbatim (e.g. \verbatim, \code) + { + REJECT; + } + } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 501 "commentcnv.l" +{ /* any other character */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 504 "commentcnv.l" +{ /* escaped character in string */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 507 "commentcnv.l" +{ /* end of string */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(Scan); + } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 511 "commentcnv.l" +{ /* any other string character */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 31: +/* rule 31 can match eol */ +YY_RULE_SETUP +#line 514 "commentcnv.l" +{ /* new line inside string (illegal for some compilers) */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 517 "commentcnv.l" +{ /* escaped character */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 520 "commentcnv.l" +{ /* end of character literal */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(Scan); + } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 524 "commentcnv.l" +{ /* any other string character */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 35: +/* rule 35 can match eol */ +YY_RULE_SETUP +#line 527 "commentcnv.l" +{ /* new line character */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 531 "commentcnv.l" +{ /* anything that is not a '*' or command */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 534 "commentcnv.l" +{ /* stars without slashes */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 537 "commentcnv.l" +{ /* end of Python docstring */ + if (g_lang!=SrcLangExt_Python) + { + REJECT; + } + else + { + g_pythonDocString = FALSE; + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(Scan); + } + } + YY_BREAK +case 39: +/* rule 39 can match eol */ +YY_RULE_SETUP +#line 549 "commentcnv.l" +{ /* new line in comment */ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 552 "commentcnv.l" +{ /* end of C comment */ + if (g_lang==SrcLangExt_Python) + { + REJECT; + } + else + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(Scan); + } + } + YY_BREAK +case 41: +/* rule 41 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 1; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 563 "commentcnv.l" +{ /* end of Python comment */ + if (g_lang!=SrcLangExt_Python || g_pythonDocString) + { + REJECT; + } + else + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(Scan); + } + } + YY_BREAK +case 42: +/* rule 42 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 1; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 574 "commentcnv.l" +{ /* end of VHDL comment */ + if (g_lang!=SrcLangExt_VHDL) + { + REJECT; + } + else + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(Scan); + } + } + YY_BREAK +case 43: +/* rule 43 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 1; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 585 "commentcnv.l" +{ /* end of Fortran comment */ + if (g_lang!=SrcLangExt_F90) + { + REJECT; + } + else + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(Scan); + } + } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 596 "commentcnv.l" +{ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 45: +/* rule 45 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 599 "commentcnv.l" +{ + replaceComment(0); + } + YY_BREAK +case 46: +/* rule 46 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 602 "commentcnv.l" +{ + replaceComment(1); + } + YY_BREAK +case 47: +/* rule 47 can match eol */ +YY_RULE_SETUP +#line 605 "commentcnv.l" +{ + replaceComment(0); + g_readLineCtx=YY_START; + BEGIN(ReadLine); + } + YY_BREAK +case 48: +/* rule 48 can match eol */ +YY_RULE_SETUP +#line 610 "commentcnv.l" +{ + replaceComment(1); + g_readLineCtx=YY_START; + BEGIN(ReadLine); + } + YY_BREAK +case 49: +#line 616 "commentcnv.l" +case 50: +/* rule 50 can match eol */ +#line 617 "commentcnv.l" +case 51: +/* rule 51 can match eol */ +YY_RULE_SETUP +#line 617 "commentcnv.l" +{ // or //!something + replaceComment(0); + g_readLineCtx=YY_START; + BEGIN(ReadLine); + } + YY_BREAK +case 52: +/* rule 52 can match eol */ +#line 623 "commentcnv.l" +case 53: +/* rule 53 can match eol */ +#line 624 "commentcnv.l" +case 54: +/* rule 54 can match eol */ +YY_RULE_SETUP +#line 624 "commentcnv.l" +{ + replaceComment(1); + g_readLineCtx=YY_START; + BEGIN(ReadLine); + } + YY_BREAK +case 55: +/* rule 55 can match eol */ +YY_RULE_SETUP +#line 629 "commentcnv.l" +{ + if (!g_inRoseComment) + { + REJECT; + } + else + { + replaceComment(0); + g_readLineCtx=YY_START; + BEGIN(ReadLine); + } + } + YY_BREAK +case 56: +/* rule 56 can match eol */ +YY_RULE_SETUP +#line 641 "commentcnv.l" +{ + if (!g_inRoseComment) + { + REJECT; + } + else + { + replaceComment(1); + g_readLineCtx=YY_START; + BEGIN(ReadLine); + } + } + YY_BREAK +case 57: +/* rule 57 can match eol */ +YY_RULE_SETUP +#line 653 "commentcnv.l" +{ /* end of special comment */ + copyToOutput(" */",3); + copyToOutput(commentcnvYYtext,commentcnvYYleng); + g_inSpecialComment=FALSE; + g_inRoseComment=FALSE; + BEGIN(Scan); + } + YY_BREAK +case 58: +/* rule 58 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 660 "commentcnv.l" +{ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + BEGIN(g_readLineCtx); + } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 664 "commentcnv.l" +{ // escaped command + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 60: +YY_RULE_SETUP +#line 667 "commentcnv.l" +{ // conditional section + g_condCtx = YY_START; + BEGIN(CondLine); + } + YY_BREAK +case 61: +/* rule 61 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 8; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +YY_RULE_SETUP +#line 671 "commentcnv.l" +{ // end of conditional section + bool oldSkip=g_skip; + endCondSection(); + if (YY_START==CComment && oldSkip && !g_skip) + { + //printf("** Adding start of comment!\n"); + if (g_lang!=SrcLangExt_Python && + g_lang!=SrcLangExt_VHDL && + g_lang!=SrcLangExt_F90) + { + ADDCHAR('/'); + ADDCHAR('*'); + if (g_specialComment) + { + ADDCHAR('*'); + } + } + } + } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 690 "commentcnv.l" +{ + bool oldSkip=g_skip; + startCondSection(commentcnvYYtext); + if (g_condCtx==CComment && !oldSkip && g_skip) + { + //printf("** Adding terminator for comment!\n"); + if (g_lang!=SrcLangExt_Python && + g_lang!=SrcLangExt_VHDL && + g_lang!=SrcLangExt_F90) + { + ADDCHAR('*'); + ADDCHAR('/'); + } + } + BEGIN(g_condCtx); + } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 706 "commentcnv.l" + + YY_BREAK +case 64: +/* rule 64 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up commentcnvYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up commentcnvYYtext again */ +#line 708 "commentcnv.l" +case 65: +/* rule 65 can match eol */ +YY_RULE_SETUP +#line 708 "commentcnv.l" +{ // forgot section id? + if (YY_START!=CondLine) g_condCtx=YY_START; + bool oldSkip=g_skip; + startCondSection(" "); // fake section id causing the section to be hidden unconditionally + if (g_condCtx==CComment && !oldSkip && g_skip) + { + //printf("** Adding terminator for comment!\n"); + if (g_lang!=SrcLangExt_Python && + g_lang!=SrcLangExt_VHDL) + { + ADDCHAR('*'); + ADDCHAR('/'); + } + } + if (*commentcnvYYtext=='\n') g_lineNr++; + BEGIN(g_condCtx); + } + YY_BREAK +case 66: +YY_RULE_SETUP +#line 725 "commentcnv.l" +{ // expand alias without arguments + replaceAliases(commentcnvYYtext); + } + YY_BREAK +case 67: +YY_RULE_SETUP +#line 728 "commentcnv.l" +{ // expand alias with arguments + g_lastBlockContext=YY_START; + g_blockCount=1; + g_aliasString=commentcnvYYtext; + g_lastEscaped=0; + BEGIN( ReadAliasArgs ); + } + YY_BREAK +case 68: +YY_RULE_SETUP +#line 735 "commentcnv.l" +{ // skip leading special comments (see bug 618079) + } + YY_BREAK +case 69: +YY_RULE_SETUP +#line 737 "commentcnv.l" +{ + g_aliasString+=commentcnvYYtext; + g_lastEscaped=FALSE; + } + YY_BREAK +case 70: +YY_RULE_SETUP +#line 741 "commentcnv.l" +{ + if (g_lastEscaped) g_lastEscaped=FALSE; + else g_lastEscaped=TRUE; + g_aliasString+=commentcnvYYtext; + } + YY_BREAK +case 71: +/* rule 71 can match eol */ +YY_RULE_SETUP +#line 746 "commentcnv.l" +{ + g_aliasString+=commentcnvYYtext; + g_lineNr++; + g_lastEscaped=FALSE; + } + YY_BREAK +case 72: +YY_RULE_SETUP +#line 751 "commentcnv.l" +{ + g_aliasString+=commentcnvYYtext; + if (!g_lastEscaped) g_blockCount++; + g_lastEscaped=FALSE; + } + YY_BREAK +case 73: +YY_RULE_SETUP +#line 756 "commentcnv.l" +{ + g_aliasString+=commentcnvYYtext; + if (!g_lastEscaped) g_blockCount--; + if (g_blockCount==0) + { + replaceAliases(g_aliasString); + BEGIN( g_lastBlockContext ); + } + g_lastEscaped=FALSE; + } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 766 "commentcnv.l" +{ + g_aliasString+=commentcnvYYtext; + g_lastEscaped=FALSE; + } + YY_BREAK +case 75: +YY_RULE_SETUP +#line 770 "commentcnv.l" +{ + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + YY_BREAK +case 76: +YY_RULE_SETUP +#line 774 "commentcnv.l" +ECHO; + YY_BREAK +#line 2339 "<stdout>" + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(Scan): + case YY_STATE_EOF(SkipString): + case YY_STATE_EOF(SkipChar): + case YY_STATE_EOF(SComment): + case YY_STATE_EOF(CComment): + case YY_STATE_EOF(Verbatim): + case YY_STATE_EOF(VerbatimCode): + case YY_STATE_EOF(ReadLine): + case YY_STATE_EOF(CondLine): + case YY_STATE_EOF(ReadAliasArgs): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed commentcnvYYin at a new source and called + * commentcnvYYlex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = commentcnvYYin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( commentcnvYYwrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * commentcnvYYtext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of commentcnvYYlex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + commentcnvYYrestart(commentcnvYYin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) commentcnvYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 329 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *(yy_state_ptr)++ = yy_current_state; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 329 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 328); + if ( ! yy_is_jam ) + *(yy_state_ptr)++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; +} + + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up commentcnvYYtext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register yy_size_t number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + commentcnvYYrestart(commentcnvYYin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( commentcnvYYwrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve commentcnvYYtext */ + (yy_hold_char) = *++(yy_c_buf_p); + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void commentcnvYYrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + commentcnvYYensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + commentcnvYY_create_buffer(commentcnvYYin,YY_BUF_SIZE ); + } + + commentcnvYY_init_buffer(YY_CURRENT_BUFFER,input_file ); + commentcnvYY_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void commentcnvYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * commentcnvYYpop_buffer_state(); + * commentcnvYYpush_buffer_state(new_buffer); + */ + commentcnvYYensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + commentcnvYY_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (commentcnvYYwrap()) processing, but the only time this flag + * is looked at is after commentcnvYYwrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void commentcnvYY_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + commentcnvYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE commentcnvYY_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) commentcnvYYalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) commentcnvYYalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + commentcnvYY_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with commentcnvYY_create_buffer() + * + */ + void commentcnvYY_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + commentcnvYYfree((void *) b->yy_ch_buf ); + + commentcnvYYfree((void *) b ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a commentcnvYYrestart() or at EOF. + */ + static void commentcnvYY_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + commentcnvYY_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then commentcnvYY_init_buffer was _probably_ + * called from commentcnvYYrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void commentcnvYY_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + commentcnvYY_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void commentcnvYYpush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + commentcnvYYensure_buffer_stack(); + + /* This block is copied from commentcnvYY_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from commentcnvYY_switch_to_buffer. */ + commentcnvYY_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void commentcnvYYpop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + commentcnvYY_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + commentcnvYY_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void commentcnvYYensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)commentcnvYYalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in commentcnvYYensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)commentcnvYYrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in commentcnvYYensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE commentcnvYY_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) commentcnvYYalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + commentcnvYY_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to commentcnvYYlex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * commentcnvYY_scan_bytes() instead. + */ +YY_BUFFER_STATE commentcnvYY_scan_string (yyconst char * yystr ) +{ + + return commentcnvYY_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to commentcnvYYlex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE commentcnvYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n, i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) commentcnvYYalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in commentcnvYY_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = commentcnvYY_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in commentcnvYY_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up commentcnvYYtext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + commentcnvYYtext[commentcnvYYleng] = (yy_hold_char); \ + (yy_c_buf_p) = commentcnvYYtext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + commentcnvYYleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int commentcnvYYget_lineno (void) +{ + + return commentcnvYYlineno; +} + +/** Get the input stream. + * + */ +FILE *commentcnvYYget_in (void) +{ + return commentcnvYYin; +} + +/** Get the output stream. + * + */ +FILE *commentcnvYYget_out (void) +{ + return commentcnvYYout; +} + +/** Get the length of the current token. + * + */ +yy_size_t commentcnvYYget_leng (void) +{ + return commentcnvYYleng; +} + +/** Get the current token. + * + */ + +char *commentcnvYYget_text (void) +{ + return commentcnvYYtext; +} + +/** Set the current line number. + * @param line_number + * + */ +void commentcnvYYset_lineno (int line_number ) +{ + + commentcnvYYlineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see commentcnvYY_switch_to_buffer + */ +void commentcnvYYset_in (FILE * in_str ) +{ + commentcnvYYin = in_str ; +} + +void commentcnvYYset_out (FILE * out_str ) +{ + commentcnvYYout = out_str ; +} + +int commentcnvYYget_debug (void) +{ + return commentcnvYY_flex_debug; +} + +void commentcnvYYset_debug (int bdebug ) +{ + commentcnvYY_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from commentcnvYYlex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + + (yy_state_buf) = 0; + (yy_state_ptr) = 0; + (yy_full_match) = 0; + (yy_lp) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + commentcnvYYin = stdin; + commentcnvYYout = stdout; +#else + commentcnvYYin = (FILE *) 0; + commentcnvYYout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * commentcnvYYlex_init() + */ + return 0; +} + +/* commentcnvYYlex_destroy is for both reentrant and non-reentrant scanners. */ +int commentcnvYYlex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + commentcnvYY_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + commentcnvYYpop_buffer_state(); + } + + /* Destroy the stack itself. */ + commentcnvYYfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + commentcnvYYfree ( (yy_state_buf) ); + (yy_state_buf) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * commentcnvYYlex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *commentcnvYYalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *commentcnvYYrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void commentcnvYYfree (void * ptr ) +{ + free( (char *) ptr ); /* see commentcnvYYrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 774 "commentcnv.l" + + + +void replaceComment(int offset) +{ + if (g_mlBrief) + { + copyToOutput(commentcnvYYtext,commentcnvYYleng); + } + else + { + //printf("replaceComment(%s)\n",commentcnvYYtext); + int i=computeIndent(&commentcnvYYtext[offset]); + if (i==g_blockHeadCol) + { + replaceCommentMarker(commentcnvYYtext,commentcnvYYleng); + } + else + { + copyToOutput(" */",3); + int i;for (i=commentcnvYYleng-1;i>=0;i--) unput(commentcnvYYtext[i]); + g_inSpecialComment=FALSE; + BEGIN(Scan); + } + } +} + +/*! This function does three things: + * -# It converts multi-line C++ style comment blocks (that are aligned) + * to C style comment blocks (if MULTILINE_CPP_IS_BRIEF is set to NO). + * -# It replaces aliases with their definition (see ALIASES) + * -# It handles conditional sections (cond...endcond blocks) + */ +void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName) +{ + //printf("convertCppComments(%s)\n",fileName); + g_inBuf = inBuf; + g_outBuf = outBuf; + g_inBufPos = 0; + g_col = 0; + g_mlBrief = Config_getBool("MULTILINE_CPP_IS_BRIEF"); + g_skip = FALSE; + g_fileName = fileName; + g_lang = getLanguageFromFileName(fileName); + g_pythonDocString = FALSE; + g_lineNr = 1; + g_condStack.clear(); + g_condStack.setAutoDelete(TRUE); + BEGIN(Scan); + commentcnvYYlex(); + while (!g_condStack.isEmpty()) + { + CondCtx *ctx = g_condStack.pop(); + QCString sectionInfo = " "; + if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label %s ",ctx->sectionId.data()); + warn(g_fileName,ctx->lineNr,"Conditional section%sdoes not have " + "a corresponding \\endcond command within this file.",sectionInfo.data()); + } + if (Debug::isFlagSet(Debug::CommentCnv)) + { + g_outBuf->at(g_outBuf->curPos())='\0'; + msg("-------------\n%s\n-------------\n",g_outBuf->data()); + } +} + + +//---------------------------------------------------------------------------- +#if !defined(YY_FLEX_SUBMINOR_VERSION) +extern "C" { // some bogus code to keep the compiler happy + void commentcnvYYdummy() { yy_flex_realloc(0,0); } +} +#endif + + Index: branches/xZenu/src/util/doxygen/src/reflist.h =================================================================== --- branches/xZenu/src/util/doxygen/src/reflist.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/reflist.h (revision 1322) @@ -0,0 +1,94 @@ +/****************************************************************************** + * + * $Id: reflist.h,v 1.2 2001/03/19 19:27:41 root Exp $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef _REFLIST_H +#define _REFLIST_H + +#include "qtbc.h" +#include <qintdict.h> +#include <qlist.h> +#include "sortdict.h" + +/*! This struct represents an item in the list of references. */ +struct RefItem +{ + RefItem() /*: written(FALSE)*/ {} + QCString text; //!< text of the item. + QCString listAnchor; //!< anchor in the list + + QCString prefix; //!< type prefix for the name + QCString name; //!< name of the entity containing the reference + QCString title; //!< display name of the entity + QCString args; //!< optional arguments for the entity (if function) + //bool written; + QList<RefItem> extraItems; //!< more items belonging to the same entity +}; + +/*! List of items sorted by title */ +class SortedRefItems : public SDict<RefItem> +{ + public: + SortedRefItems(int size=17) : SDict<RefItem>(size) {} + virtual ~SortedRefItems() {} + int compareItems(GCI item1,GCI item2) + { + RefItem *r1 = (RefItem*)item1; + RefItem *r2 = (RefItem*)item2; + return stricmp(r1->title,r2->title); + } +}; + +/*! @brief List of cross-referenced items + * + * This class represents a list of items that are put + * at a certain point in the documentation by some special command + * and are collected in a list. The items cross-reference the + * documentation and the list. + * + * Examples are the todo list, the test list and the bug list, + * introduced by the \\todo, \\test, and \\bug commands respectively. + */ +class RefList +{ + public: + int addRefItem(); + RefItem *getRefItem(int todoItemId); + RefItem *getFirstRefItem(); + RefItem *getNextRefItem(); + QCString listName() const; + QCString pageTitle() const; + QCString sectionTitle() const; + + RefList(const char *listName, + const char *pageTitle,const char *secTitle + ); + ~RefList(); + void insertIntoList(const char *key,RefItem *item); + void generatePage(); + + private: + int m_id; + QCString m_listName; + QCString m_pageTitle; + QCString m_secTitle; + SortedRefItems *m_itemList; + QIntDict<RefItem> *m_dict; + QIntDictIterator<RefItem> *m_dictIterator; +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/jquery_js.h =================================================================== --- branches/xZenu/src/util/doxygen/src/jquery_js.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/jquery_js.h (revision 1322) @@ -0,0 +1,13 @@ +"/*\n" +" * jQuery JavaScript Library v1.3.2\n" +" * http://jquery.com/\n" +" *\n" +" * Copyright (c) 2009 John Resig\n" +" * Dual licensed under the MIT and GPL licenses.\n" +" * http://docs.jquery.com/License\n" +" *\n" +" * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)\n" +" * Revision: 6246\n" +" */\n" +"(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\\s)+>)[^>]*$|^#([\\w-]+)$/,f=/^.[^:#\\[\\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E===\"string\"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:\"\",jquery:\"1.3.2\",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H===\"find\"){G.selector=this.selector+(this.selector?\" \":\"\")+E}else{if(H){G.selector=this.selector+\".\"+H+\"(\"+E+\")\"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F===\"string\"){if(H===g){return this[0]&&o[G||\"attr\"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E==\"width\"||E==\"height\")&&parseFloat(F)<0){F=g}return this.attr(E,F,\"curCSS\")},text:function(F){if(typeof F!==\"object\"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E=\"\";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],\"find\",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),\"find\",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement(\"div\");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\\d+=\"(?:\\d+|null)\"/g,\"\").replace(/^\\s*/,\"\")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find(\"*\").andSelf(),F=0;E.find(\"*\").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],\"events\");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),\"filter\",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,\"closest\",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E===\"string\"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),\"not\",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E===\"string\"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is(\".\"+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,\"option\")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,\"select\")){var I=E.selectedIndex,L=[],M=E.options,H=E.type==\"select-one\";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||\"\").replace(/\\r/g,\"\")}return g}if(typeof K===\"number\"){K+=\"\"}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,\"select\")){var N=o.makeArray(K);o(\"option\",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\\d+=\"(?:\\d+|null)\"/g,\"\"):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),\"slice\",Array.prototype.slice.call(arguments).join(\",\"))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,\"table\")&&o.nodeName(O,\"tr\")?(N.getElementsByTagName(\"tbody\")[0]||N.appendChild(N.ownerDocument.createElement(\"tbody\"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:\"script\"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||\"\")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J===\"boolean\"){E=J;J=arguments[1]||{};H=2}if(typeof J!==\"object\"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L===\"object\"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)===\"[object Function]\"},isArray:function(E){return s.call(E)===\"[object Array]\"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!==\"HTML\"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\\S/.test(G)){var F=document.getElementsByTagName(\"head\")[0]||document.documentElement,E=document.createElement(\"script\");E.type=\"text/javascript\";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I===\"number\"&&G==\"curCSS\"&&!b.test(E)?I+\"px\":I},className:{add:function(E,F){o.each((F||\"\").split(/\\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?\" \":\"\")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\\s+/),function(G){return !o.className.has(F,G)}).join(\" \"):\"\"}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F==\"width\"||F==\"height\"){var L,G={position:\"absolute\",visibility:\"hidden\",display:\"block\"},K=F==\"width\"?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"];function I(){L=F==\"width\"?H.offsetWidth:H.offsetHeight;if(E===\"border\"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,\"padding\"+this,true))||0}if(E===\"margin\"){L+=parseFloat(o.curCSS(H,\"margin\"+this,true))||0}else{L-=parseFloat(o.curCSS(H,\"border\"+this+\"Width\",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F==\"opacity\"&&!o.support.opacity){L=o.attr(E,\"opacity\");return L==\"\"?\"1\":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F=\"float\"}F=F.replace(/([A-Z])/g,\"-$1\").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F==\"opacity\"&&L==\"\"){L=\"1\"}}else{if(I.currentStyle){var J=F.replace(/\\-(\\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\\d+(px)?$/i.test(L)&&/^\\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+\"px\";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement===\"undefined\"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]===\"string\"){var H=/^<(\\w+)\\s*\\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement(\"div\");o.each(F,function(P,S){if(typeof S===\"number\"){S+=\"\"}if(!S){return}if(typeof S===\"string\"){S=S.replace(/(<(\\w+)[^>]*?)\\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+\"></\"+T+\">\"});var O=S.replace(/^\\s+/,\"\").substring(0,10).toLowerCase();var Q=!O.indexOf(\"<opt\")&&[1,\"<select multiple='multiple'>\",\"</select>\"]||!O.indexOf(\"<leg\")&&[1,\"<fieldset>\",\"</fieldset>\"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,\"<table>\",\"</table>\"]||!O.indexOf(\"<tr\")&&[2,\"<table><tbody>\",\"</tbody></table>\"]||(!O.indexOf(\"<td\")||!O.indexOf(\"<th\"))&&[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"]||!O.indexOf(\"<col\")&&[2,\"<table><tbody></tbody><colgroup>\",\"</colgroup></table>\"]||!o.support.htmlSerialize&&[1,\"div<div>\",\"</div>\"]||[0,\"\",\"\"];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf(\"<table\")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]==\"<table>\"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],\"tbody\")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],\"script\")&&(!G[J].type||G[J].type.toLowerCase()===\"text/javascript\")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName(\"script\"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G==\"selected\"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G==\"type\"&&o.nodeName(J,\"input\")&&J.parentNode){throw\"type property can't be changed\"}J[G]=K}if(o.nodeName(J,\"form\")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G==\"tabIndex\"){var I=J.getAttributeNode(\"tabIndex\");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G==\"style\"){return o.attr(J.style,\"cssText\",K)}if(L){J.setAttribute(G,\"\"+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G==\"opacity\"){if(L){J.zoom=1;J.filter=(J.filter||\"\").replace(/alpha\\([^)]*\\)/,\"\")+(parseInt(K)+\"\"==\"NaN\"?\"\":\"alpha(opacity=\"+K*100+\")\")}return J.filter&&J.filter.indexOf(\"opacity=\")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+\"\":\"\"}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||\"\").replace(/^\\s+|\\s+$/g,\"\")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G===\"string\"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\\/: ]([\\d.]+)/)||[0,\"0\"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,\"parentNode\")},next:function(E){return o.nth(E,2,\"nextSibling\")},prev:function(E){return o.nth(E,2,\"previousSibling\")},nextAll:function(E){return o.dir(E,\"nextSibling\")},prevAll:function(E){return o.dir(E,\"previousSibling\")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,\"iframe\")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G==\"string\"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){\n" +"var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,\"\");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!==\"boolean\"){E=!o.className.has(this,F)}o.className[E?\"add\":\"remove\"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o(\"*\",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h=\"jQuery\"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E=\"\";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||\"fx\")+\"queue\";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G===\"fx\"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(\".\");H[1]=H[1]?\".\"+H[1]:\"\";if(G===g){var F=this.triggerHandler(\"getData\"+H[1]+\"!\",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger(\"setData\"+H[1]+\"!\",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!==\"string\"){F=E;E=\"fx\"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E==\"fx\"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});\n" Index: branches/xZenu/src/util/doxygen/src/filename.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/filename.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/filename.cpp (revision 1322) @@ -0,0 +1,144 @@ +/****************************************************************************** + * + * $Id: filename.cpp,v 1.18 2001/03/19 19:27:40 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include "filename.h" +#include "util.h" + +FileName::FileName(const char *fn,const char *n) : FileList() +{ + setAutoDelete(TRUE); + fName=fn; + name=n; +} + +FileName::~FileName() +{ +} + + +void FileName::generateDiskNames() +{ + //QCString commonPrefix; + FileDef *fd=first(); + int count=0; + while (fd) + { + if (!fd->isReference()) count++; + fd=next(); + } + if (count==1) + { + fd=first(); + // skip references + while (fd && fd->isReference()) fd=next(); + // name if unique, so diskname is simply the name + //printf("!!!!!!!! Unique disk name=%s for fd=%s\n",name.data(),fd->diskname.data()); + fd->diskname=name.copy(); + } + else if (count>1) // multiple occurrences of the same file name + { + //printf("Multiple occurrences of %s\n",name.data()); + int i=0,j=0; + bool found=FALSE; + while (!found) // search for the common prefix of all paths + { + fd=first(); + while (fd && fd->isReference()) fd=next(); + char c=fd->path.at(i); + if (c=='/') j=i; // remember last position of dirname + fd=next(); + while (fd && !found) + { + if (!fd->isReference()) + { + //printf("i=%d j=%d fd->path=`%s' fd->name=`%s'\n",i,j,fd->path.left(i).data(),fd->name().data()); + if (i==(int)fd->path.length()) + { + //warning("Warning: Input file %s found multiple times!\n" + // " The generated documentation for this file may not be correct!\n",fd->absFilePath().data()); + found=TRUE; + } + else if (fd->path[i]!=c) + { + found=TRUE; + } + } + fd=next(); + } + i++; + } + fd=first(); + while (fd) + { + //printf("fd->setName(%s)\n",(fd->path.right(fd->path.length()-j-1)+name).data()); + if (!fd->isReference()) + { + QCString prefix = fd->path.right(fd->path.length()-j-1); + fd->setName(prefix+name); + //printf("!!!!!!!! non unique disk name=%s for fd=%s\n",(prefix+name).data(),fd->diskname.data()); + fd->diskname=prefix+name; + } + fd=next(); + } + } +} + +int FileName::compareItems(GCI item1, GCI item2) +{ + FileName *f1=(FileName *)item1; + FileName *f2=(FileName *)item2; + return stricmp(f1->fileName(),f2->fileName()); +} + +FileNameIterator::FileNameIterator(const FileName &fname) : + QListIterator<FileDef>(fname) +{ +} + +FileNameList::FileNameList() : QList<FileName>() +{ +} + +FileNameList::~FileNameList() +{ +} + +void FileNameList::generateDiskNames() +{ + FileName *fn=first(); + while (fn) + { + fn->generateDiskNames(); + fn=next(); + } +} + +int FileNameList::compareItems(GCI item1, GCI item2) +{ + FileName *f1=(FileName *)item1; + FileName *f2=(FileName *)item2; + //printf("FileNameList::compareItems `%s'<->`%s'\n", + // f1->fileName(),f2->fileName()); + return Config_getBool("FULL_PATH_NAMES") ? + stricmp(f1->fullName(),f2->fullName()) : + stricmp(f1->fileName(),f2->fileName()); +} + +FileNameListIterator::FileNameListIterator(const FileNameList &fnlist) : + QListIterator<FileName>(fnlist) +{ +} Index: branches/xZenu/src/util/doxygen/src/mandocvisitor.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/mandocvisitor.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/mandocvisitor.cpp (revision 1322) @@ -0,0 +1,959 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include "mandocvisitor.h" +#include "docparser.h" +#include "language.h" +#include "doxygen.h" +#include "outputgen.h" +#include "code.h" +#include "dot.h" +#include "util.h" +#include "message.h" +#include <qfileinfo.h> +#include "parserintf.h" + +ManDocVisitor::ManDocVisitor(FTextStream &t,CodeOutputInterface &ci, + const char *langExt) + : DocVisitor(DocVisitor_Man), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_firstCol(TRUE), + m_indent(0), m_langExt(langExt) +{ +} + + //-------------------------------------- + // visitor functions for leaf nodes + //-------------------------------------- + +void ManDocVisitor::visit(DocWord *w) +{ + if (m_hide) return; + filter(w->word()); + m_firstCol=FALSE; +} + +void ManDocVisitor::visit(DocLinkedWord *w) +{ + if (m_hide) return; + m_t << "\\fB"; + filter(w->word()); + m_t << "\\fP"; + m_firstCol=FALSE; +} + +void ManDocVisitor::visit(DocWhiteSpace *w) +{ + if (m_hide) return; + if (m_insidePre) + { + m_t << w->chars(); + m_firstCol=w->chars().at(w->chars().length()-1)=='\n'; + } + else + { + m_t << " "; + m_firstCol=FALSE; + } +} + +void ManDocVisitor::visit(DocSymbol *s) +{ + if (m_hide) return; + switch(s->symbol()) + { + case DocSymbol::BSlash: m_t << "\\\\"; break; + case DocSymbol::At: m_t << "@"; break; + case DocSymbol::Less: m_t << "<"; break; + case DocSymbol::Greater: m_t << ">"; break; + case DocSymbol::Amp: m_t << "&"; break; + case DocSymbol::Dollar: m_t << "$"; break; + case DocSymbol::Hash: m_t << "#"; break; + case DocSymbol::DoubleColon: m_t << "::"; break; + case DocSymbol::Percent: m_t << "%"; break; + case DocSymbol::Copy: m_t << "(C)"; break; + case DocSymbol::Tm: m_t << "(TM)"; break; + case DocSymbol::Reg: m_t << "(R)"; break; + case DocSymbol::Apos: m_t << "'"; break; + case DocSymbol::Quot: m_t << "\""; break; + case DocSymbol::Lsquo: m_t << "`"; break; + case DocSymbol::Rsquo: m_t << "'"; break; + case DocSymbol::Ldquo: m_t << "``"; break; + case DocSymbol::Rdquo: m_t << "''"; break; + case DocSymbol::Ndash: m_t << "--"; break; + case DocSymbol::Mdash: m_t << "---"; break; + case DocSymbol::Uml: m_t << s->letter() << "\\*(4"; break; + case DocSymbol::Acute: m_t << s->letter() << "\\*(`"; break; + case DocSymbol::Grave: m_t << s->letter() << "\\*:"; break; + case DocSymbol::Circ: m_t << s->letter() << "\\*^"; break; + case DocSymbol::Slash: m_t << s->letter(); break; /* todo: implement this */ + case DocSymbol::Tilde: m_t << s->letter() << "\\*~"; break; + case DocSymbol::Szlig: m_t << "s\\*:"; break; + case DocSymbol::Cedil: m_t << s->letter() << "\\*,"; break; + case DocSymbol::Ring: m_t << s->letter() << "\\*o"; break; + case DocSymbol::Nbsp: m_t << " "; break; + default: + err("error: unknown symbol found\n"); + } + m_firstCol=FALSE; +} + +void ManDocVisitor::visit(DocURL *u) +{ + if (m_hide) return; + m_t << u->url(); + m_firstCol=FALSE; +} + +void ManDocVisitor::visit(DocLineBreak *) +{ + if (m_hide) return; + m_t << endl << ".br" << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visit(DocHorRuler *) +{ + if (m_hide) return; + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visit(DocStyleChange *s) +{ + if (m_hide) return; + switch (s->style()) + { + case DocStyleChange::Bold: + if (s->enable()) m_t << "\\fB"; else m_t << "\\fP"; + m_firstCol=FALSE; + break; + case DocStyleChange::Italic: + if (s->enable()) m_t << "\\fI"; else m_t << "\\fP"; + m_firstCol=FALSE; + break; + case DocStyleChange::Code: + if (s->enable()) m_t << "\\fC"; else m_t << "\\fP"; + m_firstCol=FALSE; + break; + case DocStyleChange::Subscript: + if (s->enable()) m_t << "\\*<"; else m_t << "\\*> "; + m_firstCol=FALSE; + break; + case DocStyleChange::Superscript: + if (s->enable()) m_t << "\\*{"; else m_t << "\\*} "; + m_firstCol=FALSE; + break; + case DocStyleChange::Center: + /* not supported */ + break; + case DocStyleChange::Small: + /* not supported */ + break; + case DocStyleChange::Preformatted: + if (s->enable()) + { + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; + m_t << ".nf" << endl; + m_insidePre=TRUE; + } + else + { + m_insidePre=FALSE; + if (!m_firstCol) m_t << endl; + m_t << ".fi" << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; + } + break; + case DocStyleChange::Div: /* HTML only */ break; + case DocStyleChange::Span: /* HTML only */ break; + } +} + +void ManDocVisitor::visit(DocVerbatim *s) +{ + if (m_hide) return; + switch(s->type()) + { + case DocVerbatim::Code: // fall though + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; + m_t << ".nf" << endl; + Doxygen::parserManager->getParser(0/*TODO*/) + ->parseCode(m_ci,s->context(),s->text(), + s->isExample(),s->exampleFile()); + if (!m_firstCol) m_t << endl; + m_t << ".fi" << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; + break; + case DocVerbatim::Verbatim: + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; + m_t << ".nf" << endl; + m_t << s->text(); + if (!m_firstCol) m_t << endl; + m_t << ".fi" << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; + break; + case DocVerbatim::ManOnly: + m_t << s->text(); + break; + case DocVerbatim::HtmlOnly: + case DocVerbatim::XmlOnly: + case DocVerbatim::LatexOnly: + case DocVerbatim::Dot: + case DocVerbatim::Msc: + /* nothing */ + break; + } +} + +void ManDocVisitor::visit(DocAnchor *) +{ + /* no support for anchors in man pages */ +} + +void ManDocVisitor::visit(DocInclude *inc) +{ + if (m_hide) return; + switch(inc->type()) + { + case DocInclude::IncWithLines: + { + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; + m_t << ".nf" << endl; + QFileInfo cfi( inc->file() ); + FileDef fd( cfi.dirPath(), cfi.fileName() ); + Doxygen::parserManager->getParser(inc->extension()) + ->parseCode(m_ci,inc->context(), + inc->text(), + inc->isExample(), + inc->exampleFile(), &fd); + if (!m_firstCol) m_t << endl; + m_t << ".fi" << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; + } + break; + case DocInclude::Include: + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; + m_t << ".nf" << endl; + Doxygen::parserManager->getParser(inc->extension()) + ->parseCode(m_ci,inc->context(), + inc->text(),inc->isExample(), + inc->exampleFile()); + if (!m_firstCol) m_t << endl; + m_t << ".fi" << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; + break; + case DocInclude::DontInclude: + break; + case DocInclude::HtmlInclude: + break; + case DocInclude::VerbInclude: + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; + m_t << ".nf" << endl; + m_t << inc->text(); + if (!m_firstCol) m_t << endl; + m_t << ".fi" << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; + break; + } +} + +void ManDocVisitor::visit(DocIncOperator *op) +{ + //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n", + // op->type(),op->isFirst(),op->isLast(),op->text().data()); + if (op->isFirst()) + { + if (!m_hide) + { + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; + m_t << ".nf" << endl; + } + pushEnabled(); + m_hide = TRUE; + } + if (op->type()!=DocIncOperator::Skip) + { + popEnabled(); + if (!m_hide) + { + Doxygen::parserManager->getParser(0/*TODO*/) + ->parseCode(m_ci,op->context(),op->text(), + op->isExample(),op->exampleFile()); + } + pushEnabled(); + m_hide=TRUE; + } + if (op->isLast()) + { + popEnabled(); + if (!m_hide) + { + if (!m_firstCol) m_t << endl; + m_t << ".fi" << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; + } + } + else + { + if (!m_hide) m_t << endl; + } +} + +void ManDocVisitor::visit(DocFormula *f) +{ + if (m_hide) return; + m_t << f->text(); +} + +void ManDocVisitor::visit(DocIndexEntry *) +{ +} + +void ManDocVisitor::visit(DocSimpleSectSep *) +{ +} + +//-------------------------------------- +// visitor functions for compound nodes +//-------------------------------------- + +void ManDocVisitor::visitPre(DocAutoList *) +{ + if (m_hide) return; + m_indent+=2; +} + +void ManDocVisitor::visitPost(DocAutoList *) +{ + if (m_hide) return; + m_indent-=2; + m_t << ".PP" << endl; +} + +void ManDocVisitor::visitPre(DocAutoListItem *li) +{ + if (m_hide) return; + QCString ws; + ws.fill(' ',m_indent-2); + if (!m_firstCol) m_t << endl; + m_t << ".IP \"" << ws; + if (((DocAutoList *)li->parent())->isEnumList()) + { + m_t << li->itemNumber() << ".\" " << m_indent+2; + } + else // bullet list + { + m_t << "\\(bu\" " << m_indent; + } + m_t << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPost(DocAutoListItem *) +{ + if (m_hide) return; + m_t << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPre(DocPara *) +{ +} + +void ManDocVisitor::visitPost(DocPara *p) +{ + if (m_hide) return; + if (!p->isLast() && // omit <p> for last paragraph + !(p->parent() && // and for parameter sections + p->parent()->kind()==DocNode::Kind_ParamSect + ) + ) + { + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; + } +} + +void ManDocVisitor::visitPre(DocRoot *) +{ +} + +void ManDocVisitor::visitPost(DocRoot *) +{ +} + +void ManDocVisitor::visitPre(DocSimpleSect *s) +{ + if (m_hide) return; + if (!m_firstCol) + { + m_t << endl; + m_t << ".PP" << endl; + } + m_t << "\\fB"; + switch(s->type()) + { + case DocSimpleSect::See: + m_t << theTranslator->trSeeAlso(); break; + case DocSimpleSect::Return: + m_t << theTranslator->trReturns(); break; + case DocSimpleSect::Author: + m_t << theTranslator->trAuthor(TRUE,TRUE); break; + case DocSimpleSect::Authors: + m_t << theTranslator->trAuthor(TRUE,FALSE); break; + case DocSimpleSect::Version: + m_t << theTranslator->trVersion(); break; + case DocSimpleSect::Since: + m_t << theTranslator->trSince(); break; + case DocSimpleSect::Date: + m_t << theTranslator->trDate(); break; + case DocSimpleSect::Note: + m_t << theTranslator->trNote(); break; + case DocSimpleSect::Warning: + m_t << theTranslator->trWarning(); break; + case DocSimpleSect::Pre: + m_t << theTranslator->trPrecondition(); break; + case DocSimpleSect::Post: + m_t << theTranslator->trPostcondition(); break; + case DocSimpleSect::Invar: + m_t << theTranslator->trInvariant(); break; + case DocSimpleSect::Remark: + m_t << theTranslator->trRemarks(); break; + case DocSimpleSect::Attention: + m_t << theTranslator->trAttention(); break; + case DocSimpleSect::User: break; + case DocSimpleSect::Rcs: break; + case DocSimpleSect::Unknown: break; + } + + // special case 1: user defined title + if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs) + { + m_t << ":\\fP" << endl; + m_t << ".RS 4" << endl; + } +} + +void ManDocVisitor::visitPost(DocSimpleSect *) +{ + if (m_hide) return; + if (!m_firstCol) m_t << endl; + m_t << ".RE" << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPre(DocTitle *) +{ +} + +void ManDocVisitor::visitPost(DocTitle *) +{ + if (m_hide) return; + m_t << "\\fP" << endl; + m_t << ".RS 4" << endl; +} + +void ManDocVisitor::visitPre(DocSimpleList *) +{ + if (m_hide) return; + m_indent+=2; + if (!m_firstCol) m_t << endl; + m_t << ".PD 0" << endl; +} + +void ManDocVisitor::visitPost(DocSimpleList *) +{ + if (m_hide) return; + m_indent-=2; + m_t << ".PP" << endl; +} + +void ManDocVisitor::visitPre(DocSimpleListItem *) +{ + if (m_hide) return; + QCString ws; + ws.fill(' ',m_indent-2); + if (!m_firstCol) m_t << endl; + m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPost(DocSimpleListItem *) +{ + if (m_hide) return; + m_t << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPre(DocSection *s) +{ + if (m_hide) return; + if (!m_firstCol) m_t << endl; + if (s->level()==1) m_t << ".SH"; else m_t << ".SS"; + m_t << " \""; + filter(s->title()); + m_t << "\"" << endl; + if (s->level()==1) m_t << ".PP" << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPost(DocSection *) +{ +} + +void ManDocVisitor::visitPre(DocHtmlList *) +{ + if (m_hide) return; + m_indent+=2; + if (!m_firstCol) m_t << endl; + m_t << ".PD 0" << endl; +} + +void ManDocVisitor::visitPost(DocHtmlList *) +{ + if (m_hide) return; + m_indent-=2; + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; +} + +void ManDocVisitor::visitPre(DocHtmlListItem *li) +{ + if (m_hide) return; + QCString ws; + ws.fill(' ',m_indent-2); + if (!m_firstCol) m_t << endl; + m_t << ".IP \"" << ws; + if (((DocHtmlList *)li->parent())->type()==DocHtmlList::Ordered) + { + m_t << li->itemNumber() << ".\" " << m_indent+2; + } + else // bullet list + { + m_t << "\\(bu\" " << m_indent; + } + m_t << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPost(DocHtmlListItem *) +{ + if (m_hide) return; + m_t << endl; + m_firstCol=TRUE; +} + +//void ManDocVisitor::visitPre(DocHtmlPre *) +//{ +// if (!m_firstCol) m_t << endl; +// m_t << ".PP" << endl; +// m_t << ".nf" << endl; +// m_insidePre=TRUE; +//} +// +//void ManDocVisitor::visitPost(DocHtmlPre *) +//{ +// m_insidePre=FALSE; +// if (!m_firstCol) m_t << endl; +// m_t << ".fi" << endl; +// m_t << ".PP" << endl; +// m_firstCol=TRUE; +//} + +void ManDocVisitor::visitPre(DocHtmlDescList *) +{ +} + +void ManDocVisitor::visitPost(DocHtmlDescList *) +{ + if (m_hide) return; + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPre(DocHtmlDescTitle *) +{ + if (m_hide) return; + if (!m_firstCol) m_t << endl; + m_t << ".IP \"\\fB"; + m_firstCol=FALSE; +} + +void ManDocVisitor::visitPost(DocHtmlDescTitle *) +{ + if (m_hide) return; + m_t << "\\fP\" 1c" << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPre(DocHtmlDescData *) +{ +} + +void ManDocVisitor::visitPost(DocHtmlDescData *) +{ +} + +void ManDocVisitor::visitPre(DocHtmlTable *) +{ +} + +void ManDocVisitor::visitPost(DocHtmlTable *) +{ +} + +void ManDocVisitor::visitPre(DocHtmlCaption *) +{ +} + +void ManDocVisitor::visitPost(DocHtmlCaption *) +{ +} + +void ManDocVisitor::visitPre(DocHtmlRow *) +{ +} + +void ManDocVisitor::visitPost(DocHtmlRow *) +{ +} + +void ManDocVisitor::visitPre(DocHtmlCell *) +{ +} + +void ManDocVisitor::visitPost(DocHtmlCell *) +{ +} + +void ManDocVisitor::visitPre(DocInternal *) +{ + if (m_hide) return; + //if (!m_firstCol) m_t << endl; + //m_t << ".PP" << endl; + //m_t << "\\fB" << theTranslator->trForInternalUseOnly() << "\\fP" << endl; + //m_t << ".RS 4" << endl; +} + +void ManDocVisitor::visitPost(DocInternal *) +{ + if (m_hide) return; + //if (!m_firstCol) m_t << endl; + //m_t << ".RE" << endl; + //m_t << ".PP" << endl; + //m_firstCol=TRUE; +} + +void ManDocVisitor::visitPre(DocHRef *) +{ + if (m_hide) return; + m_t << "\\fC"; +} + +void ManDocVisitor::visitPost(DocHRef *) +{ + if (m_hide) return; + m_t << "\\fP"; +} + +void ManDocVisitor::visitPre(DocHtmlHeader *header) +{ + if (m_hide) return; + if (!m_firstCol) m_t << endl; + if (header->level()==1) m_t << ".SH"; else m_t << ".SS"; + m_t << " \""; +} + +void ManDocVisitor::visitPost(DocHtmlHeader *header) +{ + if (m_hide) return; + m_t << "\"" << endl; + if (header->level()==1) m_t << ".PP" << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPre(DocImage *) +{ +} + +void ManDocVisitor::visitPost(DocImage *) +{ +} + +void ManDocVisitor::visitPre(DocDotFile *) +{ +} + +void ManDocVisitor::visitPost(DocDotFile *) +{ +} +void ManDocVisitor::visitPre(DocMscFile *) +{ +} + +void ManDocVisitor::visitPost(DocMscFile *) +{ +} + + +void ManDocVisitor::visitPre(DocLink *) +{ + if (m_hide) return; + m_t << "\\fB"; +} + +void ManDocVisitor::visitPost(DocLink *) +{ + if (m_hide) return; + m_t << "\\fP"; +} + +void ManDocVisitor::visitPre(DocRef *ref) +{ + if (m_hide) return; + m_t << "\\fB"; + if (!ref->hasLinkText()) filter(ref->targetTitle()); +} + +void ManDocVisitor::visitPost(DocRef *) +{ + if (m_hide) return; + m_t << "\\fP"; +} + +void ManDocVisitor::visitPre(DocSecRefItem *) +{ + if (m_hide) return; + QCString ws; + ws.fill(' ',m_indent-2); + if (!m_firstCol) m_t << endl; + m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPost(DocSecRefItem *) +{ + if (m_hide) return; + m_t << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPre(DocSecRefList *) +{ + if (m_hide) return; + m_indent+=2; +} + +void ManDocVisitor::visitPost(DocSecRefList *) +{ + if (m_hide) return; + m_indent-=2; + if (!m_firstCol) m_t << endl; + m_t << ".PP" << endl; +} + +//void ManDocVisitor::visitPre(DocLanguage *l) +//{ +// QString langId = Config_getEnum("OUTPUT_LANGUAGE"); +// if (l->id().lower()!=langId.lower()) +// { +// pushEnabled(); +// m_hide = TRUE; +// } +//} +// +//void ManDocVisitor::visitPost(DocLanguage *l) +//{ +// QString langId = Config_getEnum("OUTPUT_LANGUAGE"); +// if (l->id().lower()!=langId.lower()) +// { +// popEnabled(); +// } +//} + +void ManDocVisitor::visitPre(DocParamSect *s) +{ + if (m_hide) return; + if (!m_firstCol) + { + m_t << endl; + m_t << ".PP" << endl; + } + m_t << "\\fB"; + switch(s->type()) + { + case DocParamSect::Param: + m_t << theTranslator->trParameters(); break; + case DocParamSect::RetVal: + m_t << theTranslator->trReturnValues(); break; + case DocParamSect::Exception: + m_t << theTranslator->trExceptions(); break; + case DocParamSect::TemplateParam: + /* TODO: add this + m_t << theTranslator->trTemplateParam(); break; + */ + m_t << "Template Parameters"; break; + default: + ASSERT(0); + } + m_t << ":\\fP" << endl; + m_t << ".RS 4" << endl; +} + +void ManDocVisitor::visitPost(DocParamSect *) +{ + if (m_hide) return; + if (!m_firstCol) m_t << endl; + m_t << ".RE" << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPre(DocParamList *pl) +{ + if (m_hide) return; + m_t << "\\fI"; + //QStrListIterator li(pl->parameters()); + //const char *s; + QListIterator<DocNode> li(pl->parameters()); + DocNode *param; + bool first=TRUE; + for (li.toFirst();(param=li.current());++li) + { + if (!first) m_t << ","; else first=FALSE; + if (param->kind()==DocNode::Kind_Word) + { + visit((DocWord*)param); + } + else if (param->kind()==DocNode::Kind_LinkedWord) + { + visit((DocLinkedWord*)param); + } + } + m_t << "\\fP "; +} + +void ManDocVisitor::visitPost(DocParamList *pl) +{ + if (m_hide) return; + if (!pl->isLast()) + { + if (!m_firstCol) m_t << endl; + m_t << ".br" << endl; + } +} + +void ManDocVisitor::visitPre(DocXRefItem *x) +{ + if (m_hide) return; + if (!m_firstCol) + { + m_t << endl; + m_t << ".PP" << endl; + } + m_t << "\\fB"; + filter(x->title()); + m_t << "\\fP" << endl; + m_t << ".RS 4" << endl; +} + +void ManDocVisitor::visitPost(DocXRefItem *) +{ + if (m_hide) return; + if (!m_firstCol) m_t << endl; + m_t << ".RE" << endl; + m_t << ".PP" << endl; + m_firstCol=TRUE; +} + +void ManDocVisitor::visitPre(DocInternalRef *) +{ + if (m_hide) return; + m_t << "\\fB"; +} + +void ManDocVisitor::visitPost(DocInternalRef *) +{ + if (m_hide) return; + m_t << "\\fP"; +} + +void ManDocVisitor::visitPre(DocCopy *) +{ +} + +void ManDocVisitor::visitPost(DocCopy *) +{ +} + +void ManDocVisitor::visitPre(DocText *) +{ +} + +void ManDocVisitor::visitPost(DocText *) +{ +} + +void ManDocVisitor::filter(const char *str) +{ + if (str) + { + const char *p=str; + char c=0; + while ((c=*p++)) + { + switch(c) + { + case '\\': m_t << "\\\\"; break; + case '"': c = '\''; // fall through + default: m_t << c; break; + } + } + } +} + +void ManDocVisitor::pushEnabled() +{ + m_enabled.push(new bool(m_hide)); +} + +void ManDocVisitor::popEnabled() +{ + bool *v=m_enabled.pop(); + ASSERT(v!=0); + m_hide = *v; + delete v; +} + Index: branches/xZenu/src/util/doxygen/src/rtfstyle.h =================================================================== --- branches/xZenu/src/util/doxygen/src/rtfstyle.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/rtfstyle.h (revision 1322) @@ -0,0 +1,83 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef RTFSTYLE_H +#define RTFSTYLE_H + +#include "qtbc.h" +#include <qregexp.h> +#include <qdict.h> + +// used for table column width calculation +const int rtf_pageWidth = 8748; + +extern QCString rtf_title; +extern QCString rtf_subject; +extern QCString rtf_comments; +extern QCString rtf_company; +extern QCString rtf_logoFilename; +extern QCString rtf_author; +extern QCString rtf_manager; +extern QCString rtf_documentType; +extern QCString rtf_documentId; +extern QCString rtf_keywords; + +struct RTFListItemInfo +{ + bool isEnum; + int number; +}; + +const int rtf_maxIndentLevels = 10; + +extern RTFListItemInfo rtf_listItemInfo[rtf_maxIndentLevels]; + +struct Rtf_Style_Default +{ + const char *name; + const char *reference; + const char *definition; +}; + +extern char rtf_Style_Reset[]; +extern Rtf_Style_Default rtf_Style_Default[]; + +struct StyleData +{ + // elements of this type are stored in dictionary Rtf_Style + // + // to define a tag in the header reference + definition is required + // to use a tag in the body of the document only reference is required + + unsigned index; // index in style-sheet, i.e. number in s-clause + char* reference; // everything required to apply the style + char* definition; // aditional tags like \snext and style name + + StyleData(const char* reference, const char* definition); + ~StyleData(); + bool setStyle(const char* s, const char* styleName); + + static const QRegExp s_clause; +}; + +extern QDict<StyleData> rtf_Style; + +void loadExtensions(const char *name); +void loadStylesheet(const char *name, QDict<StyleData>& dict); + +#endif Index: branches/xZenu/src/util/doxygen/src/translator_jp.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator_jp.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator_jp.h (revision 1322) @@ -0,0 +1,1772 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +/* + * translator_jp.h + * Updates: + * 1.2.5) + * First Translation + * by Kenji Nagamatsu + * 1.2.12) + * Update and Shift-Jis(_WIN32) + * by Ryunosuke Sato (30-Dec-2001) + * 1.5.8) + * Translation for 1.5.8. + * by Hiroki Iseri (18-Feb-2009) + */ + +#ifndef TRANSLATOR_JP_H +#define TRANSLATOR_JP_H + +class TranslatorJapanese : public TranslatorAdapter_1_6_0 +{ + private: + /*! The decode() can change euc into sjis */ + inline QCString decode(const QCString & sInput) + { + //if (Config_getBool("USE_WINDOWS_ENCODING")) + //{ + // return JapaneseEucToSjis(sInput); + //} + //else + //{ + return sInput; + //} + } + public: + virtual QCString idLanguage() + { return "japanese"; } + virtual QCString latexLanguageSupportCommand() + { + return ""; + } + /*! returns the name of the package that is included by LaTeX */ + virtual QCString idLanguageCharset() + { + //if (Config_getBool("USE_WINDOWS_ENCODING")) + //{ + // return "Shift_JIS"; + //} + //else + //{ + return "euc-jp"; + //} + } + + /*! used in the compound documentation before a list of related functions. */ + virtual QCString trRelatedFunctions() + { return decode("´ØÏ¢¤¹¤ë´Ø¿ô"); } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return decode("¡Ê¤³¤ì¤é¤Ï¥á¥½¥Ã¥É¤Ç¤Ê¤¤¤³¤È¤ËÃí°Õ¡Ë"); } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return decode("ÀâÌÀ"); } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return decode("·¿ÄêµÁ"); } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + { return decode("Îóµó·¿"); } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { + if( Config_getBool("OPTIMIZE_OUTPUT_JAVA")) + { + return decode("¥á¥½¥Ã¥É"); + } + else + { + return decode("´Ø¿ô"); + } + } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + if( Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("¹½Â¤ÂÎ"); + } + else + { + return decode("ÊÑ¿ô"); + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return decode("[¾ÜºÙ]"); } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return decode("¤¹¤Ù¤Æ¤Î¥á¥ó¥Ð°ìÍ÷"); } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return decode("¥á¥ó¥Ð°ìÍ÷"); } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return decode("¤³¤ì¤ÏÁ´¥á¥ó¥Ð¤Î°ìÍ÷¤Ç¤¹¡£"); } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return decode("·Ñ¾µ¥á¥ó¥Ð¤â´Þ¤ó¤Ç¤¤¤Þ¤¹¡£"); } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ + virtual QCString trGeneratedAutomatically(const char *s) + { QCString result; + if (s) result=(QCString)s+decode("¤Î"); + result+=decode("¥½¡¼¥¹¤«¤é Doxygen ¤Ë¤è¤êÀ¸À®¤·¤Þ¤·¤¿¡£"); + return result; + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return decode("Enum"); } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return decode("Enum ÃÍ"); } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return decode("¼¡¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"); } + + // quick reference sections + + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \\group command). + */ + virtual QCString trModules() + { return decode("¥â¥¸¥å¡¼¥ë"); } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return decode("¥¯¥é¥¹³¬ÁØ"); } + + /*! This is put above each page as a link to the list of annotated classes */ + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("¥Ç¡¼¥¿¹½Â¤"); + } + else + { + return decode("¹½À®"); + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return decode("¥Õ¥¡¥¤¥ë°ìÍ÷"); } + + /*! This is put above each page as a link to the list of all verbatim headers */ + virtual QCString trHeaderFiles() + { return decode("¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë"); } + + /*! This is put above each page as a link to all members of compounds. */ + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("¥Ç¡¼¥¿¥Õ¥£¡¼¥ë¥É"); + } + else + { + return decode("¹½À®¥á¥ó¥Ð"); + } + } + + /*! This is put above each page as a link to all members of files. */ + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("¥°¥í¡¼¥Ð¥ë"); + } + else + { + return decode("¥Õ¥¡¥¤¥ë¥á¥ó¥Ð"); + } + } + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return decode("´ØÏ¢¥Ú¡¼¥¸"); } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return decode("Îã"); } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return decode("¸¡º÷"); } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { return decode("¤³¤Î·Ñ¾µ°ìÍ÷¤Ï¤ª¤ª¤Þ¤«¤Ë¤Ï¥½¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢" + "´°Á´¤Ë¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È½ç¤Ç¥½¡¼¥È¤µ¤ì¤Æ¤Ï¤¤¤Þ¤»¤ó¡£"); + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool /*extractAll*/) + { + QCString result=decode("¤³¤ì¤Ï"); + result+=decode("¥Õ¥¡¥¤¥ë°ìÍ÷¤Ç¤¹¡£"); + return result; + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("¥Ç¡¼¥¿¹½Â¤¤ÎÀâÌÀ¤Ç¤¹¡£"); + } + else + { + return decode("¥¯¥é¥¹¡¢¹½Â¤ÂΡ¢¶¦ÍÑÂΡ¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ÎÀâÌÀ¤Ç¤¹¡£"); + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result=decode("¤³¤ì¤Ï"); + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+=decode("¥Õ¥£¡¼¥ë¥É¤Î°ìÍ÷¤Ç¤½¤ì¤¾¤ì"); + if (extractAll) result+=decode("¤¬Â°¤·¤Æ¤¤¤ë¹½Â¤ÂÎ/¶¦ÍÑÂÎ"); + } + else + { + result+=decode("¥¯¥é¥¹¥á¥ó¥Ð¤Î°ìÍ÷¤Ç¡¢¤½¤ì¤¾¤ì"); + if (extractAll) result+=decode("¤¬Â°¤·¤Æ¤¤¤ë¥¯¥é¥¹"); + } + result+=decode("¤ÎÀâÌÀ¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£"); + return result; + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool /*extractAll*/) + { + QCString result=decode("¤³¤ì¤Ï"); + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+=decode("´Ø¿ô¡¢ÊÑ¿ô¡¢¥Þ¥¯¥í¡¢Enum¡¢Typedef ¤Î"); + } + else + { + result+=decode("¥Õ¥¡¥¤¥ë¥á¥ó¥Ð¤Î"); + } + result+=decode("°ìÍ÷¤Ç¤¹¡£¤½¤ì¤¾¤ì¤¬Â°¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤ÎÀâÌÀ¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£"); + return result; + } + + /*! This is an introduction to the page with the list of all header files. */ + virtual QCString trHeaderFilesDescription() + { return decode("API¤ò¹½À®¤¹¤ë¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤Ç¤¹¡£"); } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return decode("¤¹¤Ù¤Æ¤ÎÎã¤Î°ìÍ÷¤Ç¤¹¡£"); } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return decode("´ØÏ¢¥Ú¡¼¥¸¤Î°ìÍ÷¤Ç¤¹¡£"); } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return decode("¤¹¤Ù¤Æ¤Î¥â¥¸¥å¡¼¥ë¤Î°ìÍ÷¤Ç¤¹¡£"); } + + /*! This sentences is used in the annotated class/file lists if no brief + * description is given. + */ + virtual QCString trNoDescriptionAvailable() + { return decode("¥É¥­¥å¥á¥ó¥È¤¬µ­½Ò¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"); } + + // index titles (the project name is prepended for these) + + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return decode("¥É¥­¥å¥á¥ó¥È"); } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return decode("¥â¥¸¥å¡¼¥ëº÷°ú"); } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return decode("³¬Áغ÷°ú"); } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("¥Ç¡¼¥¿¹½Â¤º÷°ú"); + } + else + { + return decode("¹½À®º÷°ú"); + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return decode("¥Õ¥¡¥¤¥ëº÷°ú"); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return decode("¥â¥¸¥å¡¼¥ë"); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("¥Ç¡¼¥¿¹½Â¤"); + } + else + { + return decode("¥¯¥é¥¹"); + } + } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return decode("¥Õ¥¡¥¤¥ë"); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return decode("Îã"); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return decode("¥Ú¡¼¥¸"); } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return decode("¥ê¥Õ¥¡¥ì¥ó¥¹¥Þ¥Ë¥å¥¢¥ë"); } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return decode("¥Þ¥¯¥íÄêµÁ"); } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return decode("´Ø¿ô¥×¥í¥È¥¿¥¤¥×"); } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return decode("·¿ÄêµÁ"); } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return decode("Îóµó·¿"); } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return decode("´Ø¿ô"); } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return decode("ÊÑ¿ô"); } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return decode("Îóµó·¿¤ÎÃÍ"); } + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return decode("¥Þ¥¯¥íÄêµÁ"); } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return decode("´Ø¿ô¥×¥í¥È¥¿¥¤¥×"); } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return decode("·¿ÄêµÁ"); } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return decode("Îóµó·¿"); } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return decode("´Ø¿ô"); } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return decode("ÊÑ¿ô"); } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("¥Ç¡¼¥¿¹½Â¤"); + } + else + { + return decode("¹½À®"); + } + } + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ + virtual QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result; + if (projName) result+=(QCString)projName+decode("¤ËÂФ·¤Æ"); + result+=(QCString)date+decode("¤ËÀ¸À®¤µ¤ì¤Þ¤·¤¿¡£"); + return result; + } + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return decode("ºî¼Ô"); + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return (QCString)clName+decode("¤ËÂФ¹¤ë·Ñ¾µ¥°¥é¥Õ"); + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return decode("ÆâÉô»ÈÍѤΤߡ£"); } + + /*! this text is generated when the \\reimp command is used. */ + virtual QCString trReimplementedForInternalReasons() + { return decode("ÆâÉôŪ¤ÊÍýͳ¤Ë¤è¤êºÆ¼ÂÁõ¤µ¤ì¤Þ¤·¤¿¤¬¡¢API¤Ë¤Ï±Æ¶Á¤·¤Þ¤»¤ó¡£"); + } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return decode("·Ù¹ð"); } + + /*! this text is generated when the \\bug command is used. */ + virtual QCString trBugsAndLimitations() + { return decode("¥Ð¥°¤ÈÀ©¸Â"); } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return decode("¥Ð¡¼¥¸¥ç¥ó"); } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return decode("ÆüÉÕ"); } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return decode("Ìá¤êÃÍ"); } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return decode("»²¾È"); } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return decode("°ú¿ô"); } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return decode("Îã³°"); } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return decode("ºîÀ®¡§"); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹°ìÍ÷"); } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool /*extractAll*/) + { + QCString result=decode(""); + result+=decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Î°ìÍ÷¤Ç¤¹¡£"); + return result; + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return decode("¥Õ¥ì¥ó¥É"); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return decode("¥Õ¥ì¥ó¥É¤È´ØÏ¢¤¹¤ë´Ø¿ô"); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=""; + switch(compType) + { + case ClassDef::Class: result+=decode("¥¯¥é¥¹ "); break; + case ClassDef::Struct: result+=decode("¹½Â¤ÂÎ "); break; + case ClassDef::Union: result+=decode("¶¦ÍÑÂÎ "); break; + case ClassDef::Interface: result+=decode("¥¤¥ó¥¿¥Õ¥§¡¼¥¹ "); break; + case ClassDef::Protocol: result+=decode("¥×¥í¥È¥³¥ë "); break; + case ClassDef::Category: result+=decode("¥«¥Æ¥´¥ê "); break; + case ClassDef::Exception: result+=decode("Îã³° "); break; + } + if (isTemplate) result+=decode("¥Æ¥ó¥×¥ì¡¼¥È "); + result+=(QCString)clName; + return result; + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result=decode("")+(QCString)fileName; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result=decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹ ")+(QCString)namespaceName; + return result; + } + + /* these are for the member sections of a class, struct or union */ + virtual QCString trPublicMembers() + { return decode("Public ¥á¥½¥Ã¥É"); } + virtual QCString trPublicSlots() + { return decode("Public ¥¹¥í¥Ã¥È"); } + virtual QCString trSignals() + { return decode("¥·¥°¥Ê¥ë"); } + virtual QCString trStaticPublicMembers() + { return decode("Static Public ¥á¥½¥Ã¥É"); } + virtual QCString trProtectedMembers() + { return decode("Protected ¥á¥½¥Ã¥É"); } + virtual QCString trProtectedSlots() + { return decode("Protected ¥¹¥í¥Ã¥È"); } + virtual QCString trStaticProtectedMembers() + { return decode("Static Protected ¥á¥½¥Ã¥É"); } + virtual QCString trPrivateMembers() + { return decode("Private ¥á¥½¥Ã¥É"); } + virtual QCString trPrivateSlots() + { return decode("Private ¥¹¥í¥Ã¥È"); } + virtual QCString trStaticPrivateMembers() + { return decode("Static Private ¥á¥½¥Ã¥É"); } + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + virtual QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i<numEntries;i++) + { + // use generateMarker to generate placeholders for the class links! + result+=generateMarker(i); // generate marker for entry i in the list + // (order is left to right) + + if (i!=numEntries-1) // not the last entry, so we need a separator + { + if (i<numEntries-2) // not the fore last entry + result+=decode(", "); + else // the fore last entry + result+=decode(", ¤È "); + } + } + return result; + } + + /*! used in class documentation to produce a list of base classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritsList(int numEntries) + { + return trWriteList(numEntries)+decode("¤ò·Ñ¾µ¤·¤Æ¤¤¤Þ¤¹¡£"); + } + + /*! used in class documentation to produce a list of super classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritedByList(int numEntries) + { + return trWriteList(numEntries)+decode("¤Ë·Ñ¾µ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"); + } + + /*! used in member documentation blocks to produce a list of + * members that are hidden by this one. + */ + virtual QCString trReimplementedFromList(int numEntries) + { + return trWriteList(numEntries)+decode("¤òºÆÄêµÁ¤·¤Æ¤¤¤Þ¤¹¡£"); + } + + /*! used in member documentation blocks to produce a list of + * all member that overwrite the implementation of this member. + */ + virtual QCString trReimplementedInList(int numEntries) + { + return trWriteList(numEntries)+decode("¤ÇºÆÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"); + } + + /*! This is put above each page as a link to all members of namespaces. */ + virtual QCString trNamespaceMembers() + { return decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹¥á¥ó¥Ð"); } + + /*! This is an introduction to the page with all namespace members */ + virtual QCString trNamespaceMemberDescription(bool extractAll) + { + QCString result=decode("¤³¤ì¤Ï"); + result+=decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Î°ìÍ÷¤Ç¤¹¡£¤½¤ì¤¾¤ì"); + if (extractAll) + result+=decode("¤Î¥Í¡¼¥à¥¹¥Ú¡¼¥¹"); + else + result+=decode("¤¬Â°¤·¤Æ¤¤¤ë¥Í¡¼¥à¥¹¥Ú¡¼¥¹"); + result+=decode("¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£"); + return result; + } + /*! This is used in LaTeX as the title of the chapter with the + * index of all namespaces. + */ + virtual QCString trNamespaceIndex() + { return decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹º÷°ú"); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all namespaces. + */ + virtual QCString trNamespaceDocumentation() + { return decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹"); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + virtual QCString trNamespaces() + { return decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹"); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool) + { // here s is one of " Class", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)decode("¤³¤Î"); + switch(compType) + { + case ClassDef::Class: result+=decode("¥¯¥é¥¹"); break; + case ClassDef::Struct: result+=decode("¹½Â¤ÂÎ"); break; + case ClassDef::Union: result+=decode("¶¦ÍÑÂÎ"); break; + case ClassDef::Interface: result+=decode("¥¤¥ó¥¿¥Õ¥§¡¼¥¹"); break; + case ClassDef::Protocol: result+=decode("¥×¥í¥È¥³¥ë"); break; + case ClassDef::Category: result+=decode("¥«¥Æ¥´¥ê"); break; + case ClassDef::Exception: result+=decode("Îã³°"); break; + } + result+=decode("¤ÎÀâÌÀ¤Ï¼¡¤Î¥Õ¥¡¥¤¥ë¤«¤éÀ¸À®¤µ¤ì¤Þ¤·¤¿:"); + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + virtual QCString trAlphabeticalList() + { return decode("¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È½ç°ìÍ÷"); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + virtual QCString trReturnValues() + { return decode("Ìá¤êÃÍ"); } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + virtual QCString trMainPage() + { return decode("¥á¥¤¥ó¥Ú¡¼¥¸"); } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + virtual QCString trPageAbbreviation() + { return decode("p."); } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trSources() + { + return decode("¥½¡¼¥¹"); + } + virtual QCString trDefinedAtLineInSourceFile() + { + return decode(" @1 ¤Î @0 ¹Ô¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"); + } + virtual QCString trDefinedInSourceFile() + { + return decode(" @0 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() + { + return decode("Èó¿ä¾©"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + virtual QCString trCollaborationDiagram(const char *clName) + { + return (QCString)clName+decode("¤Î¥³¥é¥Ü¥ì¡¼¥·¥ç¥ó¿Þ"); + } + /*! this text is put before an include dependency graph */ + virtual QCString trInclDepGraph(const char *fName) + { + return (QCString)fName+decode("¤Î¥¤¥ó¥¯¥ë¡¼¥É°Í¸´Ø·¸¿Þ"); + } + /*! header that is put before the list of constructor/destructors. */ + virtual QCString trConstructorDocumentation() + { + return decode("¥³¥ó¥¹¥È¥é¥¯¥¿¤È¥Ç¥¹¥È¥é¥¯¥¿"); + } + /*! Used in the file documentation to point to the corresponding sources. */ + virtual QCString trGotoSourceCode() + { + return decode("¥½¡¼¥¹¥³¡¼¥É¤ò¸«¤ë¡£"); + } + /*! Used in the file sources to point to the corresponding documentation. */ + virtual QCString trGotoDocumentation() + { + return decode("ÀâÌÀ¤ò¸«¤ë¡£"); + } + /*! Text for the \\pre command */ + virtual QCString trPrecondition() + { + return decode("»öÁ°¾ò·ï"); + } + /*! Text for the \\post command */ + virtual QCString trPostcondition() + { + return decode("»ö¸å¾ò·ï"); + } + /*! Text for the \\invariant command */ + virtual QCString trInvariant() + { + return decode("ÉÔÊÑ"); + } + /*! Text shown before a multi-line variable/enum initialization */ + virtual QCString trInitialValue() + { + return decode("½é´üÃÍ:"); + } + /*! Text used the source code in the file index */ + virtual QCString trCode() + { + return decode("¥³¡¼¥É"); + } + virtual QCString trGraphicalHierarchy() + { + return decode("¥¯¥é¥¹³¬ÁØ¿Þ"); + } + virtual QCString trGotoGraphicalHierarchy() + { + return decode("¥¯¥é¥¹³¬ÁØ¿Þ¤ò¸«¤ë¡£"); + } + virtual QCString trGotoTextualHierarchy() + { + return decode("¥¯¥é¥¹³¬ÁØ¿Þ¤ò¸«¤ë¡£"); + } + virtual QCString trPageIndex() + { + return decode("¥Ú¡¼¥¸º÷°ú"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() + { + return decode("³Ð¤¨½ñ¤­"); + } + virtual QCString trPublicTypes() + { + return decode("Public ·¿"); + } + virtual QCString trPublicAttribs() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("ÊÑ¿ô"); + } + else + { + return decode("Public ÊÑ¿ô"); + } + } + virtual QCString trStaticPublicAttribs() + { + return decode("Static Public ÊÑ¿ô"); + } + virtual QCString trProtectedTypes() + { + return decode("Protected ·¿"); + } + virtual QCString trProtectedAttribs() + { + return decode("Protected ÊÑ¿ô"); + } + virtual QCString trStaticProtectedAttribs() + { + return decode("Static Protected ÊÑ¿ô"); + } + virtual QCString trPrivateTypes() + { + return decode("Private ·¿"); + } + virtual QCString trPrivateAttribs() + { + return decode("Private ÊÑ¿ô"); + } + virtual QCString trStaticPrivateAttribs() + { + return decode("Static Private ÊÑ¿ô"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a todo item */ + virtual QCString trTodo() + { + return decode("TODO"); + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return decode("TODO°ìÍ÷"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { + return decode("»²¾È¸µ"); + } + virtual QCString trRemarks() + { + return decode("°Õ¸«"); + } + virtual QCString trAttention() + { + return decode("Ãí°Õ"); + } + virtual QCString trInclByDepGraph() + { + return decode("¤³¤Î¥°¥é¥Õ¤Ï¡¢¤É¤Î¥Õ¥¡¥¤¥ë¤«¤éľÀÜ¡¢´ÖÀÜŪ¤Ë" + "¥¤¥ó¥¯¥ë¡¼¥É¤µ¤ì¤Æ¤¤¤ë¤«¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£"); + } + virtual QCString trSince() + { + return decode("¤«¤é"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return decode("¥°¥é¥Õ¤ÎËÞÎã"); + } + /*! page explaining how the dot graph's should be interpreted */ + virtual QCString trLegendDocs() + { + return + decode("¤³¤Î¥Ú¡¼¥¸¤Ç¤Ï¡¢doxygen ¤ÇÀ¸À®¤µ¤ì¤¿¥°¥é¥Õ¤ò¤É¤Î¤è¤¦¤Ë¤ß¤¿¤é¤è¤¤¤«¤ò" + "ÀâÌÀ¤·¤Þ¤¹¡£<p>\n" + "¼¡¤ÎÎã¤ò¹Í¤¨¤Æ¤ß¤Þ¤¹¡£\n" + "\\code\n" + "/*! ¾Êά¤µ¤ì¤Æ¸«¤¨¤Ê¤¤¥¯¥é¥¹ */\n" + "class Invisible { };\n\n" + "/*! ¾Êά¤µ¤ì¤¿¥¯¥é¥¹(·Ñ¾µ´Ø·¸¤Ï±£¤µ¤ì¤Æ¤¤¤ë) */\n" + "class Truncated : public Invisible { };\n\n" + "/* doxygen ¥³¥á¥ó¥È¤Ë¤è¤ë¥É¥­¥å¥á¥ó¥È¤¬¤Ê¤¤¥¯¥é¥¹ */\n" + "class Undocumented { };\n\n" + "/*! public ¤Ç·Ñ¾µ¤µ¤ì¤¿¥¯¥é¥¹ */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! A template class */\n" + "template<class T> class Templ { };\n\n" + "/*! protected ¤Ç·Ñ¾µ¤µ¤ì¤¿¥¯¥é¥¹ */\n" + "class ProtectedBase { };\n\n" + "/*! private ¤Ç·Ñ¾µ¤µ¤ì¤¿¥¯¥é¥¹ */\n" + "class PrivateBase { };\n\n" + "/*! ·Ñ¾µ¤µ¤ì¤¿¥¯¥é¥¹¤Ç»È¤ï¤ì¤Æ¤¤¤ë¥¯¥é¥¹ */\n" + "class Used { };\n\n" + "/*! Ê£¿ô¤Î¥¯¥é¥¹¤ò·Ñ¾µ¤·¤Æ¤¤¤ë¾å°Ì¥¯¥é¥¹ */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented,\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "ÀßÄê¥Õ¥¡¥¤¥ëÃæ¤Ç¡¢¥¿¥° \\c MAX_DOT_GRAPH_HEIGHT ¤¬ 200 ¤Ë¥»¥Ã¥È¤µ¤ì¤¿" + "¾ì¹ç¡¢¼¡¤Î¤è¤¦¤Ê¥°¥é¥Õ¤È¤Ê¤ê¤Þ¤¹¡£" + "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "¾å¤Î¥°¥é¥ÕÆâ¤Î¥Ü¥Ã¥¯¥¹¤Ë¤Ï¼¡¤Î¤è¤¦¤Ê°ÕÌ£¤¬¤¢¤ê¤Þ¤¹¡£\n" + "<ul>\n" + "<li>¹õ¤¯Åɤê¤Ä¤Ö¤µ¤ì¤¿¥Ü¥Ã¥¯¥¹¤Ï¡¢¤³¤Î¥°¥é¥Õ¤ËÂбþ¤¹¤ë¹½Â¤ÂΤ䥯¥é¥¹¤ò" + "ɽ¤·¤Þ¤¹¡£\n" + "<li>¹õÏȤΥܥ寥¹¤Ï¥É¥­¥å¥á¥ó¥È¤¬¤¢¤ë¹½Â¤ÂΤ䥯¥é¥¹¤òɽ¤·¤Þ¤¹¡£\n" + "<li>³¥¿§¤ÎÏȤΥܥ寥¹¤Ï¥É¥­¥å¥á¥ó¥È¤¬¤Ê¤¤¹½Â¤ÂΤ䥯¥é¥¹¤òɽ¤·¤Þ¤¹¡£\n" + "<li>ÀÖÏȤΥܥ寥¹¤Ï¥É¥­¥å¥á¥ó¥È¤¬¤¢¤ë¹½Â¤ÂΤ䥯¥é¥¹¤òɽ¤·¤Þ¤¹¤¬¡¢" + "»ØÄꤵ¤ì¤¿¥µ¥¤¥º¤Ë¼ý¤Þ¤é¤Ê¤¤¤¿¤á¤Ë·Ñ¾µ¡¦Êñ´Þ´Ø·¸¤ò¤¹¤Ù¤Æ¿Þ¼¨¤¹¤ë" + "¤³¤È¤¬¤Ç¤­¤Ê¤«¤Ã¤¿¤³¤È¤ò¼¨¤·¤Þ¤¹¡£" + "</ul>\n" + "Ìð°õ¤Ë¤Ï¼¡¤Î¤è¤¦¤Ê°ÕÌ£¤¬¤¢¤ê¤Þ¤¹¡£\n" + "<ul>\n" + "<li>ÀĤ¤Ìð°õ¤ÏÆó¤Ä¤Î¥¯¥é¥¹´Ö¤Î public ·Ñ¾µ´Ø·¸¤ò¼¨¤·¤Þ¤¹¡£\n" + "<li>ÎФÎÌð°õ¤Ï protected ·Ñ¾µ´Ø·¸¤ò¼¨¤·¤Þ¤¹¡£\n" + "<li>ÀÖ¤ÎÌð°õ¤Ï private ·Ñ¾µ´Ø·¸¤ò¼¨¤·¤Þ¤¹¡£\n" + "<li>»ç¤ÎÇËÀþÌð°õ¤Ï¡¢¤½¤Î¥¯¥é¥¹¤¬Â¾¤Î¥¯¥é¥¹¤Ë´Þ¤Þ¤ì¤Æ¤¤¤¿¤ê¡¢" + "ÍøÍѤµ¤ì¤Æ¤¤¤ë¤³¤È¤ò¼¨¤·¤Þ¤¹¡£¤Þ¤¿¡¢Ìð°õ¤¬»Ø¤·¤Æ¤¤¤ë¥¯¥é¥¹¤ä¹½Â¤ÂΤò" + "¤É¤ÎÊÑ¿ô¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤ë¤«¤òÌð°õ¤Î¥é¥Ù¥ë¤È¤·¤Æ¼¨¤·¤Æ¤¤¤Þ¤¹¡£\n" + "</ul>\n"); + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return decode("ËÞÎã"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return decode("¥Æ¥¹¥È"); + } + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return decode("¥Æ¥¹¥È°ìÍ÷"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return decode("DCOP¥á¥½¥Ã¥É"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return decode("¥×¥í¥Ñ¥Æ¥£"); + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return decode("¥×¥í¥Ñ¥Æ¥£"); + } + + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java interfaces in the summary section of Java packages */ + virtual QCString trInterfaces() + { + return decode("¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹"); + } + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("¥Ç¡¼¥¿¹½Â¤"); + } + else + { + return decode("¥¯¥é¥¹"); + } + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)decode("¥Ñ¥Ã¥±¡¼¥¸ ")+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return decode("¥Ñ¥Ã¥±¡¼¥¸°ìÍ÷"); + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return decode("¤³¤ì¤Ï¥Ñ¥Ã¥±¡¼¥¸°ìÍ÷¤Ç¤¹¡£"); + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return decode("¥Ñ¥Ã¥±¡¼¥¸"); + } + /*! Used as a chapter title for Latex & RTF output */ + virtual QCString trPackageDocumentation() + { + return decode("¥Ñ¥Ã¥±¡¼¥¸"); + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return decode("ÃÍ:"); + } + + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return decode("¥Ð¥°"); + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return decode("¥Ð¥°°ìÍ÷"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file + * + * The following table shows the correlation of Charset name, Charset Value and + * <pre> + * Codepage number: + * Charset Name Charset Value(hex) Codepage number + * ------------------------------------------------------ + * DEFAULT_CHARSET 1 (x01) + * SYMBOL_CHARSET 2 (x02) + * OEM_CHARSET 255 (xFF) + * ANSI_CHARSET 0 (x00) 1252 + * RUSSIAN_CHARSET 204 (xCC) 1251 + * EE_CHARSET 238 (xEE) 1250 + * GREEK_CHARSET 161 (xA1) 1253 + * TURKISH_CHARSET 162 (xA2) 1254 + * BALTIC_CHARSET 186 (xBA) 1257 + * HEBREW_CHARSET 177 (xB1) 1255 + * ARABIC _CHARSET 178 (xB2) 1256 + * SHIFTJIS_CHARSET 128 (x80) 932 + * HANGEUL_CHARSET 129 (x81) 949 + * GB2313_CHARSET 134 (x86) 936 + * CHINESEBIG5_CHARSET 136 (x88) 950 + * </pre> + * + */ + virtual QCString trRTFansicp() + { + return "932"; + } + + + /*! Used as ansicpg for RTF fcharset + * \see trRTFansicp() for a table of possible values. + */ + virtual QCString trRTFCharSet() + { + return "128"; + } + + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return decode("º÷°ú"); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result(decode("¥¯¥é¥¹")); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result(decode("¥Õ¥¡¥¤¥ë")); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result(decode("¥Í¡¼¥à¥¹¥Ú¡¼¥¹")); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result(decode("¥°¥ë¡¼¥×")); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result(decode("¥Ú¡¼¥¸")); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result(decode("¥á¥ó¥Ð")); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trField(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result(decode("¥Õ¥£¡¼¥ë¥É")); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result(decode("¥°¥í¡¼¥Ð¥ë")); + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result(decode("ºî¼Ô")); + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return decode("»²¾ÈÀè"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return trWriteList(numEntries)+decode("¤ò¼ÂÁõ¤·¤Æ¤¤¤Þ¤¹¡£"); + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this abstract member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return trWriteList(numEntries)+decode("¤Ç¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"); + } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return decode("Ìܼ¡"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return decode("Èó¿ä¾©°ìÍ÷"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return decode("¥¤¥Ù¥ó¥È"); + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return decode("¥¤¥Ù¥ó¥È"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return decode("¥Ñ¥Ã¥±¡¼¥¸Æâ¤Î·¿ÄêµÁ"); + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return decode("´Ø¿ô"); + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return decode("¥¹¥¿¥Æ¥£¥Ã¥¯´Ø¿ô"); + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return decode("ÊÑ¿ô"); + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return decode("¥¹¥¿¥Æ¥£¥Ã¥¯ÊÑ¿ô"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return decode("Á´¤Æ"); + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return decode("´Ø¿ô¤Î¸Æ¤Ó½Ð¤·¥°¥é¥Õ:"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + return decode("¸¡º÷"); + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return decode("¸¡º÷·ë²Ì"); + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return decode("ÆþÎϤµ¤ì¤¿¾ò·ï¤Ë¥Þ¥Ã¥Á¤¹¤ë¥É¥­¥å¥á¥ó¥È¤¬¤¢¤ê¤Þ¤»¤ó¤Ç¤·¤¿."); + } + else if (numDocuments==1) + { + return decode("ÆþÎϤµ¤ì¤¿¾ò·ï¤Ë¥Þ¥Ã¥Á¤¹¤ë¥É¥­¥å¥á¥ó¥È¤¬ <b>1</b> ·ï¤ß¤Ä¤«¤ê¤Þ¤·¤¿."); + } + else + { + return decode("ÆþÎϤµ¤ì¤¿¾ò·ï¤Ë¥Þ¥Ã¥Á¤¹¤ë¥É¥­¥å¥á¥ó¥È¤¬ <b>$num</b> ·ï¤ß¤Ä¤«¤ê¤Þ¤·¤¿. " + "ºÇ¤â°ìÃפ·¤Æ¤¤¤ë¤â¤Î¤«¤éɽ¼¨¤µ¤ì¤Þ¤¹."); + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return decode("¥Þ¥Ã¥Á¤·¤¿Ã±¸ì:"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return filename + decode(" ¥½¡¼¥¹¥Õ¥¡¥¤¥ë"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return decode("¥Ç¥£¥ì¥¯¥È¥êº÷°ú"); } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return decode("¥Ç¥£¥ì¥¯¥È¥ê¹½À®"); } + + /*! This is used as the title of the directory index and also in the + * Quick links of an HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return decode("¥Ç¥£¥ì¥¯¥È¥ê"); } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { return decode("¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê°ìÍ÷¤Ï¤ª¤ª¤Þ¤«¤Ë¤Ï¥½¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢" + "´°Á´¤Ë¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È½ç¤Ç¥½¡¼¥È¤µ¤ì¤Æ¤Ï¤¤¤Þ¤»¤ó¡£"); + } + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { QCString result=dirName; result+=decode(" ¥Ç¥£¥ì¥¯¥È¥ê¥ê¥Õ¥¡¥ì¥ó¥¹"); return result; } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool, bool) + { + return decode("¥Ç¥£¥ì¥¯¥È¥ê"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return decode("¤³¤ì¤Ï¥ª¡¼¥Ð¡¼¥í¡¼¥É¤µ¤ì¤¿¥á¥ó¥Ð´Ø¿ô¤Ç¤¹¡£" + "ÍøÊØÀ­¤Î¤¿¤á¤ËÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£" + "¸µ¤Î´Ø¿ô¤È¤Î°ã¤¤¤Ï°ú¤­¿ô¤Î¤ß¤Ç¤¹¡£"); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + /*! This is used to introduce a caller (or called-by) graph */ + virtual QCString trCallerGraph() + { + // return "Here is the caller graph for this function:"; + return decode("¸Æ½Ð¤·¥°¥é¥Õ:"); + } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { return decode("Îóµó·¿"); } + + +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 (mainly for Fortran) +////////////////////////////////////////////////////////////////////////// + + /*! header that is put before the list of member subprograms (Fortran). */ + virtual QCString trMemberFunctionDocumentationFortran() + { return decode("´Ø¿ô/¥µ¥Ö¥ë¡¼¥Á¥ó"); } + + /*! This is put above each page as a link to the list of annotated data types (Fortran). */ + virtual QCString trCompoundListFortran() + { return decode("¥Ç¡¼¥¿·¿"); } + + /*! This is put above each page as a link to all members of compounds (Fortran). */ + virtual QCString trCompoundMembersFortran() + { return decode("¥Ç¡¼¥¿¥Õ¥£¡¼¥ë¥É"); } + + /*! This is an introduction to the annotated compound list (Fortran). */ + virtual QCString trCompoundListDescriptionFortran() + { return decode("¤³¤ì¤Ï¥Ç¡¼¥¿·¿¤Î°ìÍ÷¤Ç¤¹"); } + + /*! This is an introduction to the page with all data types (Fortran). */ + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) + { + QCString result=decode("¤³¤ì¤Ï"); + result+=decode("¥Õ¥£¡¼¥ë¥É¤Î°ìÍ÷¤Ç¤¹¡£¤½¤ì¤¾¤ì"); + if (extractAll) + { + result+=decode("¤¬Â°¤·¤Æ¤¤¤ë¥Ç¡¼¥¿·¿"); + } + result+=decode("¤ÎÀâÌÀ¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£"); + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index (Fortran). + */ + virtual QCString trCompoundIndexFortran() + { return decode("¥Ç¡¼¥¿·¿º÷°ú"); } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all data types (Fortran). + */ + virtual QCString trTypeDocumentation() + { return decode("¥Ç¡¼¥¿·¿"); } + + /*! This is used in the documentation of a file as a header before the + * list of (global) subprograms (Fortran). + */ + virtual QCString trSubprograms() + { return decode("´Ø¿ô/¥µ¥Ö¥ë¡¼¥Á¥ó"); } + + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for subprograms (Fortran) + */ + virtual QCString trSubprogramDocumentation() + { return decode("´Ø¿ô/¥µ¥Ö¥ë¡¼¥Á¥ó"); } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds (Fortran) + */ + virtual QCString trDataTypes() + { return decode("¥Ç¡¼¥¿·¿"); } + + /*! used as the title of page containing all the index of all modules (Fortran). */ + virtual QCString trModulesList() + { return decode("¥â¥¸¥å¡¼¥ë°ìÍ÷"); } + + /*! used as an introduction to the modules list (Fortran) */ + virtual QCString trModulesListDescription(bool extractAll) + { + QCString result=decode("¤³¤ì¤Ï"); + if (!extractAll) result+=decode("À¸À®¤µ¤ì¤¿"); + result+=decode("¥â¥¸¥å¡¼¥ë°ìÍ÷¤Ç¤¹"); + return result; + } + + /*! used as the title of the HTML page of a module/type (Fortran) */ + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=""; + switch(compType) + { + case ClassDef::Class: result+=decode("¥â¥¸¥å¡¼¥ë "); break; + case ClassDef::Struct: result+=decode("TYPE "); break; + case ClassDef::Union: result+=decode("¶¦ÍÑÂÎ "); break; + case ClassDef::Interface: result+=decode("¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹ "); break; + case ClassDef::Protocol: result+=decode("¥×¥í¥È¥³¥ë "); break; + case ClassDef::Category: result+=decode("¥«¥Æ¥´¥ê "); break; + case ClassDef::Exception: result+=decode("Îã³° "); break; + } + if (isTemplate) result += decode("¥Æ¥ó¥×¥ì¡¼¥È "); + result+=(QCString)clName; + return result; + } + /*! used as the title of the HTML page of a module (Fortran) */ + virtual QCString trModuleReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=decode("¥â¥¸¥å¡¼¥ë"); + return result; + } + + /*! This is put above each page as a link to all members of modules. (Fortran) */ + virtual QCString trModulesMembers() + { return decode("¥â¥¸¥å¡¼¥ë¥á¥ó¥Ð"); } + + /*! This is an introduction to the page with all modules members (Fortran) */ + virtual QCString trModulesMemberDescription(bool extractAll) + { + QCString result=decode("¤³¤ì¤Ï¥â¥¸¥å¡¼¥ë¥á¥ó¥Ð°ìÍ÷¤Ç¤¹¡£¤½¤ì¤¾¤ì "); + if (extractAll) + { + result+=decode("°¤·¤Æ¤¤¤ë¥â¥¸¥å¡¼¥ë"); + } + result+=decode("¤ÎÀâÌÀ¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£"); + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all modules (Fortran). + */ + virtual QCString trModulesIndex() + { return decode("¥â¥¸¥å¡¼¥ëº÷°ú"); } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trModule(bool /*first_capital*/, bool /*singular*/) + { + return decode("¥â¥¸¥å¡¼¥ë"); + } + /*! This is put at the bottom of a module documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool /*single*/) + { // here s is one of " Module", " Struct" or " Union" + // single is true implies a single file + QCString result=""; + switch(compType) + { + case ClassDef::Class: result+=decode("¥â¥¸¥å¡¼¥ë"); break; + case ClassDef::Struct: result+=decode("TYPE"); break; + case ClassDef::Union: result+=decode("¶¦ÍÑÂÎ"); break; + case ClassDef::Interface: result+=decode("¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹"); break; + case ClassDef::Protocol: result+=decode("¥×¥í¥È¥³¥ë"); break; + case ClassDef::Category: result+=decode("¥«¥Æ¥´¥ê"); break; + case ClassDef::Exception: result+=decode("Îã³°"); break; + } + result+=decode(decode("¤ÎÀâÌÀ¤Ï¼¡¤Î¥Õ¥¡¥¤¥ë¤«¤éÀ¸À®¤µ¤ì¤Þ¤·¤¿:")); + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trType(bool /*first_capital*/, bool /*singular*/) + { + QCString result = decode("TYPE"); + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trSubprogram(bool /*first_capital*/, bool /*singular*/) + { + QCString result = decode("¥µ¥Ö¥×¥í¥°¥é¥à"); + return result; + } + + /*! C# Type Constraint list */ + virtual QCString trTypeConstraints() + { + return decode("·¿À©Ìó"); + } + +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/vhdlcode.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/vhdlcode.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/vhdlcode.cpp (revision 1322) @@ -0,0 +1,11274 @@ + +#line 3 "<stdout>" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer vhdlcodeYY_create_buffer +#define yy_delete_buffer vhdlcodeYY_delete_buffer +#define yy_flex_debug vhdlcodeYY_flex_debug +#define yy_init_buffer vhdlcodeYY_init_buffer +#define yy_flush_buffer vhdlcodeYY_flush_buffer +#define yy_load_buffer_state vhdlcodeYY_load_buffer_state +#define yy_switch_to_buffer vhdlcodeYY_switch_to_buffer +#define yyin vhdlcodeYYin +#define yyleng vhdlcodeYYleng +#define yylex vhdlcodeYYlex +#define yylineno vhdlcodeYYlineno +#define yyout vhdlcodeYYout +#define yyrestart vhdlcodeYYrestart +#define yytext vhdlcodeYYtext +#define yywrap vhdlcodeYYwrap +#define yyalloc vhdlcodeYYalloc +#define yyrealloc vhdlcodeYYrealloc +#define yyfree vhdlcodeYYfree + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <stdlib.h> + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include <inttypes.h> +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE vhdlcodeYYrestart(vhdlcodeYYin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 262144 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t vhdlcodeYYleng; + +extern FILE *vhdlcodeYYin, *vhdlcodeYYout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up vhdlcodeYYtext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up vhdlcodeYYtext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via vhdlcodeYYrestart()), so that the user can continue scanning by + * just pointing vhdlcodeYYin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when vhdlcodeYYtext is formed. */ +static char yy_hold_char; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t vhdlcodeYYleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow vhdlcodeYYwrap()'s to do buffer switches + * instead of setting up a fresh vhdlcodeYYin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void vhdlcodeYYrestart (FILE *input_file ); +void vhdlcodeYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE vhdlcodeYY_create_buffer (FILE *file,int size ); +void vhdlcodeYY_delete_buffer (YY_BUFFER_STATE b ); +void vhdlcodeYY_flush_buffer (YY_BUFFER_STATE b ); +void vhdlcodeYYpush_buffer_state (YY_BUFFER_STATE new_buffer ); +void vhdlcodeYYpop_buffer_state (void ); + +static void vhdlcodeYYensure_buffer_stack (void ); +static void vhdlcodeYY_load_buffer_state (void ); +static void vhdlcodeYY_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER vhdlcodeYY_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE vhdlcodeYY_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE vhdlcodeYY_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE vhdlcodeYY_scan_bytes (yyconst char *bytes,yy_size_t len ); + +void *vhdlcodeYYalloc (yy_size_t ); +void *vhdlcodeYYrealloc (void *,yy_size_t ); +void vhdlcodeYYfree (void * ); + +#define yy_new_buffer vhdlcodeYY_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + vhdlcodeYYensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + vhdlcodeYY_create_buffer(vhdlcodeYYin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + vhdlcodeYYensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + vhdlcodeYY_create_buffer(vhdlcodeYYin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define vhdlcodeYYwrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *vhdlcodeYYin = (FILE *) 0, *vhdlcodeYYout = (FILE *) 0; + +typedef int yy_state_type; + +extern int vhdlcodeYYlineno; + +int vhdlcodeYYlineno = 1; + +extern char *vhdlcodeYYtext; +#define yytext_ptr vhdlcodeYYtext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up vhdlcodeYYtext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + vhdlcodeYYleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 55 +#define YY_END_OF_BUFFER 56 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[2913] = + { 0, + 0, 0, 0, 0, 13, 13, 0, 0, 21, 21, + 31, 31, 28, 28, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 0, 0, 56, 1, 1, 51, + 1, 52, 52, 51, 52, 52, 48, 52, 52, 48, + 48, 49, 48, 48, 48, 49, 48, 45, 49, 48, + 48, 48, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 48, 44, 48, 48, 52, 52, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 52, 13, 8, 52, 14, 13, 15, 16, 52, + 14, 14, 14, 14, 13, 14, 52, 52, 52, 6, + + 21, 22, 21, 52, 21, 18, 19, 20, 23, 26, + 26, 26, 31, 31, 31, 31, 28, 28, 28, 29, + 30, 28, 17, 3, 3, 4, 2, 5, 4, 0, + 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 48, 0, 0, 0, 50, 0, 0, 0, 44, 44, + 48, 0, 0, 0, 0, 45, 45, 45, 48, 48, + 48, 0, 0, 0, 44, 0, 44, 44, 44, 44, + 44, 44, 44, 44, 43, 43, 43, 44, 44, 44, + 44, 44, 44, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 0, 0, 13, 0, 13, 0, 0, 0, + 0, 0, 7, 14, 14, 13, 9, 14, 14, 14, + 14, 13, 0, 14, 6, 21, 21, 20, 0, 0, + 0, 27, 0, 23, 23, 26, 26, 26, 31, 31, + 31, 31, 31, 31, 28, 28, 28, 28, 28, 28, + 17, 3, 3, 53, 54, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 50, 0, 0, 0, 0, 44, 44, + + 0, 45, 45, 0, 0, 0, 0, 44, 44, 44, + 43, 44, 43, 44, 44, 44, 43, 44, 44, 44, + 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 0, 0, 0, 0, 7, 14, 9, 14, 14, + 14, 0, 14, 0, 0, 23, 23, 26, 26, 31, + 31, 28, 28, 53, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 44, 0, 0, 0, 0, 0, 0, 0, 44, 43, + 43, 0, 0, 44, 44, 43, 43, 44, 44, 44, + 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 39, 39, 44, 0, 0, 0, 0, 14, 14, 0, + 0, 14, 0, 14, 0, 0, 26, 26, 31, 28, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 43, 0, 0, 43, 44, 0, 0, + 44, 43, 44, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 47, 0, 44, 44, + 38, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 0, 0, 0, 0, 44, 0, 10, 0, 0, 0, + 0, 0, 10, 0, 0, 0, 0, 12, 0, 0, + 26, 0, 24, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, + 0, 0, 0, 0, 0, 44, 44, 0, 0, 43, + 44, 0, 0, 0, 38, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 44, 44, 38, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 0, 0, 0, + 0, 44, 0, 0, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0, 12, 12, 0, 26, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + + 0, 0, 0, 0, 0, 44, 44, 0, 0, 44, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 47, 0, 0, 44, 44, 44, 44, 42, 42, 44, + 44, 44, 44, 44, 0, 0, 0, 0, 0, 0, + 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 0, 0, 0, 0, 0, 11, 0, 0, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 0, 0, 0, 0, 0, 43, 0, 0, 44, 0, + + 0, 0, 0, 0, 0, 0, 0, 47, 0, 44, + 44, 44, 44, 44, 39, 39, 42, 44, 0, 0, + 0, 0, 0, 0, 44, 0, 0, 0, 0, 11, + 0, 0, 0, 11, 0, 0, 0, 0, 25, 36, + 36, 36, 0, 36, 36, 36, 36, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 36, 36, 36, 36, 36, + 36, 0, 36, 0, 0, 0, 32, 0, 0, 0, + 0, 0, 47, 0, 0, 0, 44, 44, 44, 0, + + 0, 0, 44, 42, 42, 0, 44, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, + 11, 0, 11, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 0, 0, 0, 47, 0, 0, 0, 44, 0, 0, + 0, 0, 0, 0, 41, 0, 0, 44, 0, 0, + + 0, 0, 46, 0, 0, 46, 0, 0, 11, 0, + 11, 0, 0, 36, 36, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 36, 36, 36, 36, 37, + 37, 0, 0, 44, 33, 33, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 46, 0, 0, 46, 46, + + 46, 46, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 44, 33, 33, 0, 0, + 0, 0, 0, 0, 46, 46, 46, 46, 46, 46, + 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, + 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 35, 35, 46, 0, 46, 0, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 0, 0, 0, 0, 11, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, + 35, 0, 0, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 32, 0, 0, 0, 32, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 40, 40, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, + 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, + 40, 40, 40, 40, 40, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, + + 0, 0, 32, 32, 0, 0, 0, 0, 0, 0, + 32, 0, 0, 0, 0, 34, 34, 40, 40, 40, + 40, 40, 40, 40, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, + 0, 0, 0, 32, 0, 0, 0, 0, 0, 32, + 34, 34, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 46, 46, + + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 0, 0, 0, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 0, 0, + 0, 0, 32, 0, 0, 0, 32, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 32, 46, 46, 46, 32, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 0, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 0, 40, + + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 32, 46, 46, 32, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 0, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 0, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 0, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + + 46, 46, 46, 46, 46, 46, 46, 32, 46, 46, + 46, 46, 46, 46, 46, 32, 46, 46, 46, 46, + 32, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 32, 0, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 32, 46, 46, + + 46, 32, 32, 46, 46, 46, 46, 46, 46, 32, + 46, 46, 46, 46, 47, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 32, 40, 40, 40, 32, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 32, 46, 46, 32, 46, 46, 46, 46, 32, + + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 46, + 46, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 32, 40, 40, 32, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 46, 46, 32, 46, 46, 32, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 32, 40, 40, 40, 40, 40, + 40, 40, 32, 40, 40, 40, 40, 32, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 32, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 32, 40, 40, 40, + 32, 32, 40, 40, 40, 40, 40, 40, 32, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 32, 40, 40, 32, 40, 40, + + 40, 40, 32, 40, 40, 40, 40, 32, 40, 40, + 32, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 22, 23, 24, + 25, 26, 1, 1, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 36, 43, 44, 45, 46, 47, 48, 36, 49, 36, + 1, 1, 1, 50, 51, 1, 52, 53, 54, 55, + + 56, 57, 58, 59, 60, 36, 61, 62, 63, 64, + 65, 66, 36, 67, 68, 69, 70, 71, 72, 36, + 73, 36, 1, 74, 1, 75, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[76] = + { 0, + 1, 2, 3, 4, 5, 1, 6, 7, 1, 1, + 8, 8, 9, 10, 11, 12, 13, 14, 15, 11, + 16, 17, 18, 11, 11, 11, 19, 19, 19, 19, + 20, 19, 21, 22, 22, 22, 22, 22, 22, 22, + 22, 21, 22, 22, 22, 22, 22, 22, 22, 1, + 19, 19, 19, 19, 19, 20, 19, 21, 22, 22, + 22, 22, 22, 22, 22, 21, 22, 22, 22, 22, + 22, 22, 22, 1, 1 + } ; + +static yyconst flex_int16_t yy_base[3046] = + { 0, + 0, 4, 22, 96, 167, 98, 242, 317, 392, 0, + 113, 267, 142, 273, 102, 277, 291, 295, 342, 346, + 467, 542, 352, 369, 492, 496, 864,31091, 104, 112, + 838, 66, 616, 567, 572, 681, 246, 747, 71, 471, + 507, 91, 556, 561, 562, 638, 566, 821, 570, 582, + 604, 625, 886, 911, 473, 464, 240, 622, 665, 462, + 623, 604, 625, 318, 630, 651, 670, 97, 977, 517, + 668, 90, 735, 734, 739, 751, 792, 795, 463, 663, + 736, 98, 1048, 1122, 297, 1178, 319, 322, 325, 328, + 332, 0, 237, 477, 714, 478,31091, 371, 836, 0, + + 944, 592, 954, 829, 828,31091,31091, 809, 0, 0, + 557, 243, 0, 597, 657, 796, 0, 659, 722,31091, + 31091, 792, 0, 0, 723, 766,31091,31091,31091, 810, + 773, 829, 755, 0, 609, 877, 918, 668, 936, 961, + 1252, 1277, 960, 1083, 1087, 1109, 679, 1203, 733, 1208, + 31091, 739, 966, 1073, 1078, 1333, 1244, 1408, 0, 740, + 31091, 1153, 1159, 1310, 735, 730, 1482, 91,31091, 695, + 690, 1213, 1228, 1238, 1538, 1563, 1628, 764, 827, 962, + 570, 1063, 1065, 944, 642, 670, 734, 1095, 876, 1242, + 1260, 976, 1244, 1683, 1356, 1320, 829, 1263, 1317, 1168, + + 1072, 1339, 1393, 1234, 1318, 1340, 1430, 1438, 1415, 1392, + 1414, 1425, 1461, 1398, 872, 1464, 1323, 1463, 1341, 1466, + 836, 1516, 753, 853, 1754, 1828, 886, 1079, 805, 1497, + 1449, 650, 0, 1884, 1959, 1188, 0, 0, 910, 1233, + 921, 1521, 1275, 1335, 0, 1568, 1513, 626, 1344, 949, + 632,31091, 623, 603, 575, 0, 1044, 1050, 0, 1573, + 575, 1579, 571, 1454, 0, 1585, 566, 1591, 564, 1, + 0, 0, 1593, 0, 0, 1361, 1558, 1634, 1658, 1494, + 1585, 1557, 1614, 1669, 1789, 1784, 1663, 1984, 1988, 1779, + 1813, 1864, 2023,31091, 1796, 1869, 1615, 2087, 0, 1409, + + 1915, 571, 570, 1993, 2076, 2069, 2111, 2177, 2228, 1496, + 2027, 1662, 1513, 1551, 1666, 1647, 1571, 1778, 1650, 1685, + 1882, 2107, 1885, 2008, 1893, 2012, 2077, 1890, 1827, 1896, + 2071, 1989, 1993, 2089, 1584, 2108, 2026, 2110, 1897, 2134, + 2142, 2152, 2160, 2178, 1804, 2182, 2209, 2206, 1652, 2264, + 2225, 1765, 1415, 1484, 1766,31091, 2320, 0, 1782, 8, + 1806, 1854, 1880, 1540, 1747, 530, 516, 2030, 1812, 2047, + 2146, 931, 1156, 0, 2090, 1888, 2129, 2227, 2226, 2285, + 2351, 2355, 2360, 2364, 2383, 2228, 2446, 2341, 505, 2423, + 2428, 2440, 497, 2450, 2515, 2521, 2427, 2495, 2306, 2587, + + 2165, 2609, 2615, 2540, 2622, 2563, 2641, 2626, 2262, 2186, + 2208, 2647, 2673, 2246, 2350, 2245, 2247, 2547, 2428, 2248, + 2381, 2359, 2662, 2591, 2441, 2465, 2443, 2524, 2382, 2623, + 2663, 2449, 2482, 2641, 2261, 2699, 2677, 2685, 2691, 2692, + 2694, 2697, 2698, 2707, 2709, 2731, 2320, 2733, 2348, 2516, + 2766, 2770, 2750, 2805, 2530, 2547, 2809, 2832, 2857, 2861, + 2865, 1163, 2580, 1954, 2597, 2078, 2100, 2814, 2202, 1729, + 2604, 2233, 2748, 2869, 2675, 2873, 1940, 2881, 2886, 2906, + 2927, 2931, 2963, 2920, 2917, 0, 0, 2985, 2994, 3002, + 2678, 2307, 3019, 3024, 3042, 2726, 2357, 2763, 2998, 3016, + + 3007, 2769, 2747, 3064, 3075, 3094, 3098, 3120, 3101, 3144, + 3167, 3171, 3052, 2861, 2396, 3068, 2865, 3127, 2952, 3189, + 2961, 2867, 2870, 3076, 2978, 3053, 3157, 3159, 3150, 3151, + 3171, 3174, 3191, 2871, 3198, 3186, 2882, 3210, 3200, 3218, + 3124, 3208, 3224, 3226, 3230, 3083, 3227, 3237, 3232, 3242, + 2491, 2522, 3298, 3302, 3281, 3312,31091, 1318, 1322, 3323, + 3327, 3384, 467, 2562, 3458, 3349, 2647, 385, 2838, 3365, + 2942, 3409,31091, 2975, 3033, 3287, 3292, 3413, 3425, 3421, + 3434, 3451, 3476, 3459, 3408, 3501, 3524, 3528, 3535, 3545, + 3552, 3556, 2993, 2996, 3577, 3594, 3602, 3611, 3621, 3631, + + 3653, 3051, 3061, 3316, 3610, 3617, 3288, 3441, 3077, 3688, + 3696, 3700, 3675, 3112, 3718, 3388, 3611, 3151, 3722, 3167, + 3466, 3222, 3697, 3715, 3282, 3544, 3415, 3513, 3653, 3629, + 3714, 3720, 3717, 3736, 3729, 3265, 3520, 3791, 3309, 3750, + 3795, 3721, 3663, 3389, 3772, 3446, 3451, 3768, 3139, 3807, + 3817, 3792, 3832, 3855, 3861, 3871, 3940, 3877, 4002, 3481, + 3536, 3581, 3533, 3650, 3670, 375,31091, 3745, 3762, 3690, + 3784, 3796, 3841, 3886, 3902, 3917, 3929, 3948, 3929, 3985, + 4029, 4035, 4053, 4060, 4064, 3793, 3720, 4084, 4088, 4092, + 4109, 4114, 3812, 3772, 4041, 3811, 4087, 3923, 3869, 3848, + + 3952, 4159, 4110, 3873, 4167, 3872, 4177, 3859, 4181, 4005, + 4091, 3880, 4095, 3883, 3928, 4189, 4093, 4156, 3930, 4168, + 3934, 3945, 4157, 4144, 4166, 4170, 4171, 4239, 4246, 4199, + 4254, 4262, 3992, 4014, 3980, 4018, 4068, 4267, 4272, 4276, + 4099, 4297, 4303, 4311, 4319, 4335, 4343, 4347, 4369, 4352, + 4392, 4377, 4426, 4102, 4091, 4099, 4164,31091, 4166, 4208, + 4407, 4448, 4192, 4452, 4460, 4402, 4464, 4477, 4485, 4502, + 4469, 4519, 4526, 4535, 4544, 4552, 4230, 4494, 4561, 4569, + 4578, 4587, 4245, 4595, 4578, 4579, 4636, 4416, 4653, 4611, + 4648, 4669, 4635, 4261, 4686, 4272, 4693, 4707, 4719, 4332, + + 4636, 4304, 4669, 4494, 4731, 4741, 4579, 4334, 4346, 4685, + 4360, 4695, 4390, 4796, 4754, 4763, 4791, 4391, 4254, 4450, + 4298, 4786, 4802, 4826, 4571, 4830, 4660, 4837, 4852, 4779, + 4862, 4373, 4463,31091, 4511, 4467, 4874, 4886,31091, 4775, + 4904, 4908, 4563, 4920, 4926, 4930, 4941, 4953, 4957, 4962, + 4803, 4974, 4984, 4991, 4996, 5016, 5057, 5067, 5062, 5084, + 4541, 5108, 5132, 5136, 5140, 5157, 5182, 5186, 4543, 5205, + 5179, 4939, 5221, 5231, 5248, 5161, 5041, 5273, 5289, 5225, + 5296, 5267, 5317, 4579, 5321, 5254,31091, 5329, 5334, 4827, + 4628, 4959, 4629, 5388, 4696, 4730, 5022, 4717, 5365, 5350, + + 5359, 5413, 5434, 5420, 5429, 5459, 5523, 4635, 4716, 4666, + 5465, 5397, 5473, 4798, 5486, 5481, 5382, 5530, 5494, 4808, + 31091, 4688,31091, 5554, 5560, 97, 5566, 5572, 5578, 5585, + 5590, 5597, 5611, 5618, 5623, 5627, 5644, 5650, 5609, 4822, + 5637, 5669, 5702, 5709, 5728, 4844, 4866, 5732, 5737, 5754, + 5763, 4865, 5729, 5711, 5789, 5799, 5806, 5810, 5856, 5042, + 5877, 5897, 5903, 5923, 5929, 5831, 5881, 355, 5944, 5970, + 2215, 5994, 6001, 6007, 6013, 6019, 6036, 6040, 6057, 6061, + 4779, 6081, 5100, 4870, 6085, 6148, 6173, 5060, 6105, 6110, + 6117, 6198, 6132, 6223,31091, 6227, 6239, 6260, 4805, 6182, + + 4884, 4835, 0, 6252, 6266, 6336, 4876, 6295, 6287, 6361, + 6291, 4908, 4956, 366, 6300, 6367, 6371, 6375, 6397, 6416, + 4954, 5063, 6442, 6448, 5317, 6465, 4908, 5139, 6422, 6483, + 6491, 6514, 6525, 6532, 5212, 4969, 6536, 6557, 6582, 6601, + 6605, 6623, 5441, 6627, 5804, 6670, 6674, 6692, 296, 5020, + 5653, 6696, 6715, 5021, 293, 5066, 5789, 5811, 5273, 0, + 6741, 6719, 6761, 6784, 6447, 292, 5070, 5911, 6788, 6806, + 5511, 6810, 6829, 6856, 6875, 6392, 6879, 6897, 6944,31091, + 6541, 5541, 7009, 5093, 0, 7034, 6321, 6609, 6648, 6921, + 7059, 5102, 6948, 4972, 4990, 0, 6956, 6963, 6833, 7085, + + 0, 7160, 5116, 6977, 6971, 5041, 5039, 6901, 7234, 7238, + 7242, 7259, 5121, 5937, 5857, 5717, 7264, 5124, 6015, 6036, + 5873, 6765, 7285, 6986, 7308, 7329, 7042, 7110, 7336, 7355, + 6396, 7366, 6037, 6115, 5162, 5181, 7373, 6041, 6526, 5209, + 5272, 7383, 7393, 5251, 5219, 7400, 6593, 6659, 5252, 5247, + 7441, 7451, 7473, 7468, 7538, 6204, 0, 7593, 5325, 7115, + 5434, 5319, 7545, 7460, 0, 7619, 7122, 7694, 7659, 7719, + 7723, 5413, 7576, 7663, 5516, 5578, 7517, 6740, 6952, 5587, + 6165, 6789, 7090, 5609, 6446, 7139,31091, 7753, 7787, 7145, + 7127, 7794, 7813, 7830, 7409, 7819, 7246, 7836, 7862, 7879, + + 7493, 7896, 7287, 7906, 7913, 7947, 7964, 7981, 7998, 8016, + 5625, 6635, 5514, 5568, 8033, 8065, 8075, 8082, 8092, 8124, + 8134, 5645, 7305, 7227, 7601, 8160, 8182, 5597, 5648, 8192, + 8202, 8228, 8234, 8251, 8270, 8277, 5665, 7458, 5660, 5676, + 8318, 8311, 8328, 8360, 8425, 7569, 7954, 7065, 7580, 7988, + 0, 8450, 0, 5680, 8476, 8099, 8402, 5710, 5742, 8501, + 8566, 8506, 288, 8571, 8576, 6807, 286, 8583, 8588, 8653, + 8718, 8648, 5755, 7417, 7651, 7151,31091, 8394, 5666, 7499, + 7616, 8057, 5714, 7520, 7703, 8167, 8406, 8510, 7984, 8658, + 8726, 8736, 8783, 8793, 7718, 8801, 5749, 5771, 8810, 8851, + + 8868, 7876, 8875, 6109, 8885, 8937, 8894, 8956, 8963, 5769, + 5781, 9006, 9013, 9040, 9047, 9081, 7898, 9064, 5822, 5824, + 9088, 9130, 9140, 9147, 9199, 7931, 7676, 9264, 7778, 0, + 9289, 5836, 8730, 9314, 9379, 9444, 5988, 5872, 8918, 9222, + 9509, 9574, 5928, 5879, 8260, 5929, 5917, 5957, 5990, 8336, + 5969, 5992, 9319, 9216, 9336, 286, 7854, 8302, 8343, 9324, + 8087, 9355, 6876, 9397, 9401, 9422, 8089, 9466, 7288, 9486, + 9551, 9639, 9528, 9157, 9555, 8385, 9621, 9633, 9656, 8418, + 9704, 9708, 9725, 9751, 9731, 7716, 9783, 9800, 9775, 8122, + 6032, 8458, 9849, 9832, 8186, 9867, 9884, 9890, 6468, 8386, + + 9932, 9936, 9954, 9031, 9958, 6061, 9114,10001,10027,10033, + 10045, 8485,10077,10103, 9330, 8500, 6075, 9532,10120,10126, + 10146, 9681,10168,10172, 8759, 7799, 8817,10191,10255, 6082, + 10213, 6082, 6124, 6155,10264,10281, 6093, 6095, 8665,10298, + 10303, 8670, 6119, 6205, 6213, 6244, 8694,10339,10349, 8979, + 6267, 6266,10371,10375,10414, 6204, 8983, 8989, 9226, 8498, + 10381,10446,10450, 6769, 8505, 8567,10458,10469, 9857, 6900, + 8583,10515,10534,10551,10556, 7711, 6254, 8584, 6326, 6346, + 9979, 6361,10583,10603, 8417, 9596, 6417,10625,10629,10635, + 6356,10023,10671,10703,10707,10713, 8506, 7243, 6372,10248, + + 10754,10786,10790, 6516, 8805, 6397, 9909, 6501, 6541, 6510, + 10795,10812, 6565, 6523, 9825,10832, 9256, 6589, 6525, 6627, + 6533,10053,10857, 9477, 6653, 6570,10874,10886,10905, 6641, + 8509, 6678, 8654, 9645, 7722, 8649, 8719,10241, 7820,10944, + 10961,10971,11012,11030,11044,11062,11053, 6645, 7932,11095, + 6702, 6671,11119,11129,11136,11178,11201,11162,11219,11235, + 11252,11267, 6722,11284,11301,11311,11352,11370,11384,11402, + 11393,11435, 6793,10979, 8209, 8041, 9298, 0,11500, 6695, + 6811, 6802,11525,10967, 6824, 8294,10526, 9714, 6842, 9072, + 6873, 9105,10800,11141, 6926, 9374,11529,11534,11568, 7040, + + 11598, 7040, 8326,11603,11607, 8659,11638,11615,11662,11680, + 11684,11703,11749, 9504,11761,11776,11783,10881, 6832,10286, + 9578,11817,11795,11827,11861,11334, 6882, 9808,11884,11896, + 10490, 6953,10560,11918,11928,11954,11977,11995,12000,12042, + 12060,11260,11244,12077,12083,10538, 6961,10237,11211,11460, + 0,11358,12149, 0,12224, 6970, 7208,10608,12298,12065, + 12302,12367, 6972,12320,12371,12143,11970,12310, 6980,11482, + 7013,12389,12436,12440,12346,12414, 7016,11695,12482,12462, + 12546,12621,12696, 7259,10730,12770,12774,12786,12458,12792, + 12851,12857,11902,12874,12869,12934,12999,10867,31091,12941, + + 12953,12528, 7290,31091,10922,12976,13064,13018,13041,11379, + 7293,13083,13076,13141,13206, 0,13271, 0,13297,11470, + 13372,13158,13164,13228, 7217, 7299,13327,13397,13463,13223, + 7328,13402, 7335, 7340,12522,11852, 7380, 7434, 7438, 7464, + 12573,12004, 7471,13488,13496, 0, 0,13551,13556,13563, + 13574,13568,13640,13666,13689,13684, 7473,11623,13725,13757, + 12604,13761,13783,12985,13803,13826,13830,13849,13872,13853, + 13876,13895,13899,13918,13941,13945,13964,13968,13987,13991, + 0,14056,13406, 7352, 7388,14037,14102,14081, 256,14107, + 14124, 7618, 255,14159,14176,14241,14306,14167, 7501, 7509, + + 14235,14246,14314,14326,14346,14088, 7602, 7545, 9399, 7604, + 14224,10694, 7696,13153,14391,14395,10897, 7764,10948, 7802, + 13331,14413,14417,10953,14033,14202,14460,14464,14482, 143, + 14486,14505,14531,14551,14557, 141,14563,14583,14628,14609, + 14632,14651,14655,14697,14701, 8317, 101, 7794, 7848,14720, + 14724,14742,14746,14789,14793,14834, 7872,14900,14965,15030, + 15095,15160, 8716, 7858,14814,14878,15225,15290, 7891, 7912, + 12109, 7956, 7963, 7977, 8000,12175, 7996, 8049,14918,14959, + 14990,11036, 8047,15024,15035,15076,15102,15167,15202,15179, + 14882, 8091, 8070, 8119, 8134,11801,14860,12184,13240,13233, + + 12200,12306,13422,15127,15245,15267,15309,15335, 8172, 8178, + 15356,15367,15361,15379,15436,15446,15456, 8210, 8206,15488, + 8219, 8244, 8246, 8293,15515,15532,15538,15558, 8309,15584, + 15108,15605,15610,15627,15631,15654,15676, 8325, 8295, 8365, + 15696,15701, 8375, 8475,12505,15736,15743,12595, 8482, 8482, + 8513, 8540,12646,15762,15779,12654, 8579, 8651,15769,15787, + 15828, 8495,15846,15850,15867,15873, 8673, 8684, 8572, 8697, + 12590, 0,15917,15943,13087, 0,15949,15961,15984,12663, + 12863,12671,16018,16030,16036,12945,13922,16050,16095,16105, + 16115,16122,16127,16172,16192,16198, 8713, 8750,16224,16242, + + 16268,16274,16291,16309,16350,16360,16367,16386,16409,16443, + 8778, 8807,16453,16475,16487,16519,16545,16555, 8714, 8816, + 8841, 8840,16577,16589,16621,16647, 8849, 8854, 8713, 8859, + 14926,16664, 8807, 8863,13808,14336,13198, 8844, 8868, 8898, + 8900,14013,14509,13336, 8915, 8908,16668,16673,16712, 8915, + 16732,16742,16749,16768, 8976, 8956, 8961,11153,13439,14184, + 16791,16825,16835,16846,16857,16904,16915,16922, 8982, 9012, + 16926,16972,16991,16998,17041,17058,17048,17092,17118,17135, + 17141, 9032, 9056,17161,17167,17193,17210,17236, 9059,11908, + 9066, 9059,17242,17253,17294,17320,17330,17337, 9085, 9100, + + 9108, 9108,17363,17259, 9124,11186,15966,14318, 9125,11490, + 9128,11494,16147,14371, 9140,11591,17405,17409,17439, 9144, + 17444,17449,17471,17514,17518,17536, 9142,13414, 9152,17540, + 17583,17587,17605,17652,13506,17656,17673,14114,17496,17679, + 17699,17722,17744,17765,17788,17814,17831,17857, 9168,13633, + 17883,17863,17915,17941,17951,17958,18008,18025,18030,18042, + 18099,18109,18116, 9179,13672,18121,18186,18190,18197, 9179, + 18231,18257,18274, 9223, 9263,14438,18300,18306,18323,18349, + 18372,18390, 9267, 9221, 9279,11688,18416,18450,18457,18522, + 9221,18499,18540,18544,15071,15000, 9250,14766, 9327,18566, + + 18609,18589,15285,16418, 9331,14948,18631,18635,18702,18777, + 18852,11707,18926,18930,18937,18948,19005,19015, 9354,19022, + 19072,19089, 9366, 9370,19115,19121,19156,19173,19191, 9371, + 19214,19225, 9382,15413, 9402,19257,19274,19292,19315,19326, + 19349,19367,19372, 9396,15468,19393,19437,19442,19459, 9422, + 9289, 9423,16008,19486,19463,19469, 9439, 9388, 9429,19528, + 19545,19611,18142, 9466,19553, 9472, 9493,15719,14574, 9494, + 9512, 9518, 9535,16495,16062, 9556,19636,19644, 0, 0, + 19699,19704,19711,19722,19716,19788,19814,19837,19832,19873, + 9577,19883,19915,19919, 9577, 9581,11768, 9450,19941,19961, + + 19987,19993,20010,20036,20062, 9508,20079,20144, 9591, 9611, + 20137,20148,20189,20171,20215,20280,20238,20257,20345, 9626, + 20322,20357,20367,20379,20389,20436,16334,14211, 9628,20454, + 20519, 9623, 9623, 9638,20472,20477,20523,20545,20564,18696, + 9640, 9659, 9757, 9673,19534,12027, 9679,16300,20605,20615, + 12134, 9681,12212, 9709,16326,20622,20672,12216,20104,20689, + 20694,20698,20721, 93,20744,20763,20780,20790,20812, 2, + 20831,20863,20880,20890,20897,20947,20957,20967,20979, 9866, + 1, 9707, 9730,21014,21024,21036,21056,21101,21105,21122, + 21172, 9766,21128,21237,16479, 9782,16250,21194,21214,21271, + + 21264,21281,12834,21346,21323,21340,21358,21381,16565,13024, + 21392,21415,21427,21449,21461,21484,21549,21507,21526,21530, + 0,16947,21575,21595,21618,21641,21553,21660,21664,21149, + 17015,21683,21687,21706, 0, 9800,12446, 9799,21710,21729, + 21733,21752,21756,21798,21802,19909, 9709, 9814, 9833, 9860, + 13354,21821,14676,17219,17610,15112,15173,17302,18482,21868, + 21825,21876,21902, 9763, 9863,21908,21944,21949,21991,21985, + 21995,22037, 9887, 9903,22060, 9912, 9912, 9914, 9923,22072, + 22082,22104,22139,15580,22207,22161,22173,22219,16776,22241, + 22253,22276,22298,22318,22344,22409,15924, 0,22386,22390, + + 22413,22363, 0,16204,22431,22496,22478,22500,22522, 0, + 22545,22565,22591,22656,31091, 9951,22635,22661,22678,22713, + 9931, 9934, 9958, 9952,16523, 0,22735,22747,17066, 0, + 22770,22782,22804,16217,16800,16867,22816,22839,22851,16612, + 17630,22873,22883,22917,22928,22940,22960,23005,23009,23027, + 9969, 9972,23031,23050,23076,23096,23102,23108,23167,23173, + 23177,23199,23243,23248, 9982,10001,23265,23292,23324,23334, + 23341,23360,10021,10027,10033,10031,23401,23406,23411,23458, + 16882,23477,23481,23499,23546,23550,23567,23572,23616,23637, + 23643,23660,23686,23703,23709,23720,23730,23752,23787,23799, + + 10035,23804,23809,23869,23880,10057,10057,10072,12540,17024, + 17769,23886,23916,23890,23957,23961,23993,24004,24036,10061, + 10087,24040,24063,24082,24108,24114,24134,24140,24160,24183, + 24209,24226,10081,10088,24230,24252,24295,24301,24321,10091, + 17341,10096,10118,24327,24344,24371,24393,24415,24437,24502, + 24567,10127,24459,24544,24561,24587,24610,24633,10139,17561, + 10148,24653,24675,24679,24702,24721,17837,24744,24748,17908, + 21600,24725,24770,24790,24822,24839,24874,24891,24917,24940, + 10160,17932,24958,24992,25018,24999,25041,25064,25083,25087, + 25129,25152,25163,25170,25220,10164,17962,25237,25241,25263, + + 25307,10163,25312,25329,24796,10173,10194,18090,25339,25380, + 25398,25421,25447,25464,25470,25491,25535,25541,25558,25562, + 12578,25584,25607,25627,25649,25676,25659,10176,25717,25734, + 25724,10263,10267,25791,25744,25801,25812,25823,10271,25858, + 25869,10274,18208,10286,25890,25901,25942,25947,25974,26015, + 26019,26025,10279,18280,26061,26093,26097,26103,10293,10284, + 10295,18394,26168,26172,26178,26213,10306,26245,26256,26288, + 10317,10335,12686,10324,26305,26322,26332,26373,26391,26414, + 26440,10326,26457,26522,10334,10328,26515,26526,26567,26549, + 26593,26658,26616,26635,26723,10367,26700,26735,26745,26757, + + 26767,26814,18677,18066,10372,26832,26897,26850,10356,26901, + 26966,18728,10367,19041,26923,26943,27000,26993,27010,17278, + 27075,27052,27069,27087,27110,18767,17731,27121,27144,27156, + 27178,27190,27213,27278,27236,27255,27259, 0,19026,27304, + 27324,27347,27370,27282,27389,27393,23594,19047,27412,27416, + 27435, 0,17792,27500,27458,27481,27493,19099,27527,27550, + 24278,27568,27572,27615,27680,17983, 0,27637,27658,27684, + 27702, 0,18051,27725,27790,27767,27771,27794, 0,27812, + 27816,27859,27924,18461,27881,27902,27928,27946,27993,27950, + 27997,28015,28019,28062,28066,28084,28088,28107,28133,28111, + + 28176,28180,28153,28245,28310,28199,28203,28222,28226,28291, + 28303,31091,28376,28398,28420,28442,28464,28486,28508,28529, + 28550,28572,28576,28597,28618,28640,28661,28676,28694,28715, + 28736,28752,28757,28779,28801,28818,28840,28862,28883,28904, + 28925,28946,28968,28990,28997,29013,29032,29053,29073,29090, + 29112,29134,29152,29173,29194,29210,29215,29237,29259,29281, + 29303,29320,29342,29364,29386,29407,29428,29449,29471,29493, + 29500,29521,29537,29556,29578,29600,29617,29639,29661,29683, + 29705,29726,29748,29770,29791,29813,29834,29855,29876,29897, + 29918,29939,29960,29981,30002,30023,30044,30065,30086,30107, + + 30129,30151,30173,30195,30212,30233,30255,30277,30299,30320, + 30341,30363,30384,30405,30426,30443,30464,30486,30508,30529, + 30550,30571,30593,30615,30636,30658,30680,30701,30722,30744, + 30761,30782,30804,30826,30848,30870,30892,30914,30936,30958, + 30980,31002,31024,31046,31068 + } ; + +static yyconst flex_int16_t yy_def[3046] = + { 0, + 2913, 2913, 2912, 3, 2912, 5, 2914, 2914, 2912, 9, + 2915, 2915, 2916, 2916, 2917, 2917, 2917, 2917, 2917, 2917, + 2918, 2918, 2919, 2919, 2917, 2917, 2912, 2912, 2912, 2912, + 2912, 2912, 2920, 2921, 2921, 2920, 2912, 2922, 2923, 2912, + 2912, 2912, 2912, 2912, 2912, 2924, 2912, 2924, 2912, 2912, + 2912, 2912, 2925, 2925, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 2912, 54, 2912, 2912, 36, 69, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 2912, 2912, 83, 84, 2926, 2927, 2912, 2912, 2912, + 2928, 2928, 2928, 2928, 83, 2928, 2912, 2912, 2912, 2929, + + 2930, 2912, 2930, 2931, 2930, 2912, 2912, 2912, 2932, 2933, + 2933, 2933, 2934, 2934, 2934, 2934, 2935, 2935, 2935, 2912, + 2912, 2935, 2936, 2937, 2937, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2938, 2912, 36, 2939, 36, 2940, 2924, + 2941, 2941, 142, 2939, 2940, 2940, 36, 2939, 36, 2942, + 2912, 2943, 2943, 2912, 2940, 2944, 2943, 2944, 2945, 2945, + 2912, 2912, 2924, 2924, 2946, 2946, 2924, 167, 2912, 2912, + 2912, 2912, 2924, 2940, 2947, 2942, 2947, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 36, 194, 142, 142, 142, 142, 142, + + 142, 142, 142, 142, 142, 142, 194, 194, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 2912, 2912, 2912, 225, 2948, 2912, 2912, 226, + 2912, 2949, 2950, 2951, 2951, 2948, 2952, 2950, 2950, 2950, + 2950, 225, 2912, 2950, 2953, 2954, 2954, 2912, 2912, 2912, + 2955, 2912, 2956, 2956, 2956, 2957, 2957, 2957, 2958, 2958, + 2958, 2958, 2958, 2959, 2960, 2960, 2960, 2960, 2960, 2961, + 2962, 2963, 2963, 2964, 2965, 2912, 142, 2966, 2912, 142, + 142, 142, 142, 2966, 2966, 2966, 2967, 2968, 2967, 2968, + 2967, 2967, 2967, 2912, 2969, 2912, 2969, 2970, 2971, 2971, + + 2972, 2912, 2973, 289, 2968, 289, 2967, 2974, 2974, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 2912, 2912, 2912, 2912, 2912, 2975, 2976, 2977, 2977, + 2977, 2912, 2977, 2912, 2912, 2912, 2956, 2957, 2957, 2978, + 2959, 2979, 2961, 2964, 2912, 2912, 142, 142, 142, 2966, + 2966, 2966, 2968, 2968, 2968, 289, 2968, 289, 2912, 2912, + 2912, 2968, 2912, 2912, 2912, 2967, 396, 396, 2969, 2970, + + 2971, 2972, 387, 2968, 289, 387, 289, 396, 309, 309, + 309, 2912, 2972, 309, 309, 309, 309, 309, 309, 309, + 309, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 2912, 2972, 309, 2912, 2912, 2912, 2912, 2975, 2977, 2912, + 2912, 2977, 2912, 2977, 2912, 2912, 2957, 2957, 2978, 2979, + 2912, 2912, 142, 142, 142, 2966, 2966, 2966, 387, 387, + 387, 2968, 2968, 396, 396, 387, 387, 2968, 2968, 2980, + 2912, 2912, 2968, 2968, 2981, 2912, 2912, 396, 396, 396, + + 2969, 400, 2971, 2972, 387, 387, 387, 2968, 396, 387, + 387, 2968, 396, 309, 2912, 2972, 309, 309, 2912, 2972, + 309, 309, 309, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 2912, 2912, 2972, 2972, 309, 2982, 2912, 2912, 2912, 2982, + 2982, 2983, 2984, 2912, 2912, 2982, 2912, 2977, 2912, 2912, + 2957, 2912, 2912, 2912, 2912, 142, 142, 2966, 2912, 2966, + 2968, 2968, 2968, 396, 396, 2968, 2968, 2980, 2980, 2912, + 2980, 2980, 2912, 2912, 2968, 2968, 2981, 2981, 2912, 2981, + + 2981, 2912, 2912, 396, 396, 396, 2969, 400, 2971, 2972, + 2968, 2968, 396, 2912, 2972, 309, 309, 2912, 2972, 309, + 309, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 309, 309, 2972, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 2912, 2912, 2972, + 2972, 309, 2985, 2982, 2982, 2985, 2982, 2985, 2986, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2957, 2912, + 2912, 142, 142, 2966, 2966, 2968, 2968, 2968, 396, 396, + 2968, 2968, 2980, 2980, 2980, 2912, 2912, 2968, 2968, 2981, + 2981, 2981, 2912, 2912, 396, 396, 396, 2969, 400, 2971, + + 2972, 2968, 396, 2912, 2972, 309, 309, 2912, 2972, 309, + 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 309, 309, 309, 309, 2912, 2972, 309, + 309, 309, 309, 309, 2912, 2912, 2912, 2972, 2972, 2972, + 309, 2912, 2985, 657, 2985, 2985, 2985, 2985, 2985, 2985, + 2984, 2985, 2986, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2957, 2912, 2912, 142, 142, 2966, 2966, 2968, 2968, 2968, + 396, 396, 2968, 2968, 2980, 2980, 2912, 2912, 2968, 2968, + 2981, 2981, 2912, 2912, 396, 396, 396, 2969, 400, 2971, + 2972, 2968, 396, 2912, 2972, 309, 2912, 2972, 309, 142, + + 142, 142, 142, 142, 142, 142, 142, 142, 142, 309, + 309, 309, 309, 2987, 2912, 2972, 2972, 309, 2912, 2912, + 2912, 2972, 2972, 2972, 309, 2985, 2985, 2985, 2985, 2985, + 2985, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2972, 2912, 2912, 2968, 2968, 2968, + 396, 2912, 2912, 396, 2968, 2912, 2912, 2968, 2980, 2980, + 2912, 2912, 2968, 2912, 2912, 858, 2981, 2981, 2912, 2912, + 396, 396, 2988, 2988, 2989, 2969, 2969, 2969, 2969, 2912, + 2972, 2968, 396, 2912, 2972, 2912, 2912, 2912, 2972, 142, + 142, 142, 142, 2990, 142, 142, 309, 309, 309, 2991, + + 2992, 2993, 2994, 2912, 2972, 2972, 2987, 2912, 2912, 2912, + 2972, 2972, 2972, 2912, 2985, 2985, 2985, 2985, 2985, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2972, 2912, 2912, 2968, 2968, 2988, 2988, 2995, 396, 2912, + 396, 2968, 2968, 2980, 2980, 2912, 2912, 2968, 2968, 2981, + 2981, 2912, 396, 396, 2988, 2988, 2988, 2988, 2988, 959, + 2989, 2995, 961, 961, 961, 2969, 2912, 2969, 2969, 2969, + 2969, 2969, 2969, 2912, 2972, 2968, 2912, 2912, 396, 2968, + 2912, 2972, 142, 142, 142, 2996, 2990, 309, 2997, 2998, + 2999, 3000, 2912, 2993, 2912, 2912, 2972, 2994, 2912, 2972, + + 2912, 2912, 3001, 2972, 2972, 3002, 2912, 2985, 2985, 2985, + 2985, 2912, 2912, 2912, 2912, 2968, 2968, 2988, 2988, 2988, + 959, 959, 2995, 2995, 1024, 396, 2912, 396, 2968, 2968, + 3003, 3003, 2912, 3003, 2912, 2912, 2968, 2968, 3004, 3004, + 2912, 3004, 2912, 396, 396, 2988, 2988, 2988, 2912, 959, + 959, 2912, 2912, 959, 2912, 959, 959, 959, 959, 961, + 961, 961, 2912, 2912, 1024, 2912, 1024, 1024, 2912, 2912, + 961, 961, 961, 961, 961, 2912, 2912, 2912, 2968, 2912, + 2972, 142, 2996, 309, 3005, 3006, 2912, 2999, 2912, 2972, + 3000, 2912, 2972, 2912, 2912, 3001, 2972, 2972, 3001, 3002, + + 1100, 2912, 2912, 2985, 2985, 2912, 2912, 2968, 2968, 2988, + 2988, 2988, 959, 959, 959, 959, 2995, 1024, 1024, 1024, + 1024, 2912, 396, 2968, 3003, 3003, 2912, 2968, 3004, 3004, + 396, 3007, 959, 959, 2912, 2912, 3008, 959, 959, 959, + 959, 961, 961, 2912, 2912, 3009, 1024, 1024, 2912, 2912, + 961, 961, 961, 961, 3010, 309, 3005, 3006, 2912, 3011, + 2912, 2912, 2972, 2972, 1102, 3012, 1102, 3012, 1102, 1102, + 1102, 2912, 2985, 2985, 2912, 2912, 2968, 959, 959, 959, + 959, 1024, 1024, 1024, 1024, 2912, 2912, 2912, 2912, 396, + 2968, 2912, 2912, 2968, 3003, 3003, 2912, 2912, 2912, 2968, + + 3004, 3004, 396, 3007, 3007, 2912, 3007, 3007, 3007, 3007, + 959, 959, 2912, 2912, 3008, 3008, 2912, 3008, 3008, 3008, + 3008, 959, 959, 959, 959, 961, 961, 2912, 2912, 3009, + 3009, 2912, 3009, 3009, 3009, 3009, 1024, 1024, 2912, 2912, + 961, 961, 961, 961, 3010, 3013, 3014, 3015, 3015, 3011, + 3016, 3017, 3018, 2912, 3019, 2972, 1168, 1168, 1168, 1102, + 1168, 1102, 3018, 3018, 3018, 1168, 3018, 3018, 3018, 1102, + 1102, 1102, 2912, 2985, 2985, 3020, 2912, 2968, 959, 959, + 959, 959, 1024, 1024, 1024, 1024, 3003, 3004, 396, 3007, + 3007, 3007, 3007, 3007, 959, 959, 2912, 2912, 3008, 3008, + + 3008, 959, 959, 959, 2912, 2912, 959, 961, 961, 2912, + 2912, 3009, 3009, 3009, 3009, 3009, 1024, 1024, 2912, 2912, + 961, 961, 961, 2912, 2912, 961, 3021, 3022, 3015, 3016, + 3017, 2912, 2972, 1168, 1168, 1168, 1168, 1168, 1102, 1102, + 1168, 1168, 1168, 1168, 3023, 3018, 3018, 1168, 1168, 3024, + 3018, 3018, 1102, 1102, 1102, 2912, 3020, 2985, 3025, 2968, + 959, 959, 959, 2912, 2912, 959, 1024, 1024, 1024, 2912, + 2912, 1024, 3003, 2912, 3003, 3003, 3004, 2912, 3004, 3004, + 396, 3007, 3007, 3007, 3007, 959, 2912, 2912, 959, 959, + 2912, 2912, 3008, 3008, 959, 2912, 2912, 959, 959, 959, + + 961, 2912, 2912, 961, 961, 2912, 2912, 3009, 3009, 3009, + 3009, 1024, 2912, 2912, 1372, 1024, 2912, 2912, 961, 2912, + 2912, 961, 961, 961, 2912, 3021, 2912, 2972, 3022, 2912, + 2972, 1168, 1168, 1168, 1102, 1102, 1168, 1168, 3023, 3023, + 3023, 3023, 3018, 3018, 1168, 1168, 3024, 3024, 3024, 3024, + 3018, 3018, 1102, 1102, 1102, 2912, 2912, 3025, 2968, 959, + 2912, 2912, 959, 959, 959, 1024, 2912, 2912, 1372, 1024, + 1024, 3007, 3007, 3007, 3007, 959, 2912, 959, 959, 2912, + 2912, 2912, 3008, 3008, 959, 959, 959, 961, 961, 961, + 2912, 2912, 3009, 3009, 3009, 3009, 1024, 1024, 2912, 2912, + + 961, 961, 961, 2912, 2972, 2912, 2972, 1168, 1168, 1168, + 1102, 1102, 1168, 1168, 3023, 3023, 3023, 3018, 3018, 1168, + 1168, 3024, 3024, 3024, 3018, 3018, 1102, 1102, 1102, 2912, + 959, 2912, 959, 959, 959, 1024, 1024, 1024, 1024, 3007, + 3007, 3007, 3007, 2912, 3007, 3007, 959, 2912, 959, 959, + 2912, 2912, 3008, 3008, 2912, 3008, 3008, 959, 959, 961, + 961, 961, 2912, 3009, 3009, 3009, 3009, 2912, 3009, 3009, + 1024, 1024, 2912, 1562, 1562, 2912, 2972, 3026, 3027, 1168, + 1168, 1168, 1102, 1102, 1168, 1168, 3023, 3023, 3018, 3018, + 1168, 1168, 3024, 3024, 3018, 3018, 1102, 1102, 1102, 2912, + + 959, 2912, 959, 959, 1024, 1024, 1024, 3007, 3007, 2912, + 3007, 3007, 3007, 2912, 959, 2912, 2912, 959, 959, 2912, + 2912, 3008, 3008, 2912, 2912, 959, 959, 1562, 2912, 2912, + 961, 1024, 2912, 3009, 3009, 2912, 3009, 3009, 3009, 2912, + 2912, 1372, 2912, 2912, 2912, 961, 1024, 3028, 3028, 3029, + 3026, 3026, 3027, 1653, 2912, 1168, 1168, 1168, 1102, 3018, + 3018, 1102, 1168, 3018, 3018, 1168, 3023, 3023, 3018, 3018, + 1168, 3018, 3018, 1168, 3024, 3024, 3018, 3018, 1102, 1102, + 3030, 3030, 2912, 2912, 2912, 959, 2912, 2912, 959, 1024, + 2912, 2912, 1372, 3007, 3007, 3007, 3007, 2912, 2912, 2912, + + 2912, 959, 959, 2912, 2912, 3008, 3008, 2912, 2912, 961, + 1024, 3009, 3009, 3009, 3009, 3031, 3032, 1655, 3033, 1655, + 3033, 1655, 1655, 1655, 1168, 1168, 1682, 1682, 3034, 1102, + 3018, 1102, 1168, 1168, 3023, 3023, 3018, 3018, 1168, 1168, + 3024, 3024, 3018, 1102, 1102, 1682, 1682, 1682, 1682, 1682, + 1682, 1683, 3034, 1683, 1683, 1683, 2912, 2912, 2912, 2912, + 959, 2912, 2912, 1372, 3007, 3007, 3007, 2912, 3007, 3007, + 3008, 2912, 3008, 3008, 3009, 3009, 3009, 2912, 3009, 3009, + 3031, 3032, 1721, 1721, 1721, 1655, 1721, 1655, 3035, 3035, + 3035, 1721, 3035, 3035, 3035, 1655, 1655, 1655, 1168, 1168, + + 1682, 1682, 1682, 1682, 1682, 1753, 1753, 1753, 1662, 3018, + 1662, 1168, 1168, 3023, 3023, 3023, 3018, 3018, 1168, 1168, + 3024, 3024, 3024, 3018, 1102, 1102, 1682, 1682, 1682, 3018, + 1682, 1682, 3018, 3018, 1682, 3018, 1682, 1682, 1682, 1682, + 1683, 1683, 1683, 3018, 3018, 1753, 3018, 1753, 1753, 3018, + 3018, 1683, 1683, 1683, 1683, 1683, 2912, 3007, 3009, 1721, + 1721, 1721, 1721, 1721, 1655, 1655, 1721, 1721, 1721, 1721, + 3036, 3035, 3035, 1721, 1721, 3037, 3035, 3035, 1655, 1655, + 1655, 1168, 1168, 1682, 1682, 1682, 1682, 1682, 1682, 1682, + 1753, 1753, 1753, 1753, 1753, 3018, 1102, 1168, 3023, 3023, + + 3018, 1168, 3024, 3024, 1102, 3038, 1682, 1682, 3018, 3018, + 3039, 1682, 1682, 1682, 1682, 1683, 1683, 3018, 3018, 3040, + 1753, 1753, 3018, 3018, 1683, 1683, 1683, 1683, 2912, 3007, + 2912, 3007, 3007, 3009, 2912, 3009, 3009, 1721, 1721, 1721, + 1655, 1655, 1721, 1721, 3036, 3036, 3036, 3036, 3035, 3035, + 1721, 1721, 3037, 3037, 3037, 3037, 3035, 3035, 1655, 1655, + 1655, 1168, 1682, 1682, 1682, 1682, 1753, 1753, 1753, 1753, + 3018, 3018, 3018, 3018, 1662, 1168, 3018, 3018, 1168, 3023, + 3023, 3018, 3018, 3018, 1168, 3024, 3024, 1102, 3038, 3038, + 3038, 3038, 3038, 3038, 1682, 1682, 3018, 3018, 3039, 3039, + + 3039, 3039, 3039, 3039, 1682, 1682, 1682, 1682, 1683, 1683, + 3018, 3018, 3040, 3040, 3040, 3040, 3040, 3040, 1753, 1753, + 3018, 3018, 1683, 1683, 1683, 1683, 2912, 1721, 1721, 1721, + 1655, 1655, 1721, 1721, 3036, 3036, 3036, 3035, 3035, 1721, + 1721, 3037, 3037, 3037, 3035, 3035, 1655, 1655, 1655, 1168, + 1682, 1682, 1682, 1682, 1753, 1753, 1753, 1753, 3023, 3024, + 1102, 3038, 3038, 3038, 3038, 3038, 1682, 1682, 3018, 3018, + 3039, 3039, 3039, 1682, 1682, 1682, 3018, 3018, 1682, 1683, + 1683, 3018, 3018, 3040, 3040, 3040, 3040, 3040, 1753, 1753, + 3018, 3018, 1683, 1683, 1683, 3018, 3018, 1683, 2912, 1721, + + 1721, 1721, 1655, 1655, 1721, 1721, 3036, 3036, 3035, 3035, + 1721, 1721, 3037, 3037, 3035, 3035, 1655, 1655, 1655, 1168, + 1682, 1682, 1682, 3018, 3018, 1682, 1753, 1753, 1753, 3018, + 3018, 1753, 3023, 3023, 3023, 3024, 3024, 3024, 1102, 3038, + 3038, 3038, 3038, 1682, 3018, 3018, 1682, 1682, 3018, 3018, + 3039, 3039, 1682, 3018, 3018, 1682, 1682, 1682, 1683, 3018, + 3018, 1683, 1683, 3018, 3018, 3040, 3040, 3040, 3040, 1753, + 3018, 3018, 1753, 1753, 3018, 3018, 1683, 3018, 3018, 1683, + 1683, 1683, 2912, 1721, 1721, 1721, 1655, 3035, 3035, 1655, + 1721, 3035, 3035, 1721, 3036, 3036, 3035, 3035, 1721, 3035, + + 3035, 1721, 3037, 3037, 3035, 3035, 1655, 1655, 3041, 3041, + 2912, 1168, 1682, 3018, 3018, 1682, 1682, 1682, 1753, 3018, + 3018, 1753, 1753, 1753, 3038, 3038, 3038, 3038, 1682, 3018, + 1682, 1682, 3018, 3018, 3018, 3039, 3039, 1682, 1682, 1682, + 1683, 1683, 1683, 3018, 3018, 3040, 3040, 3040, 3040, 1753, + 1753, 3018, 3018, 1683, 1683, 1683, 2912, 1721, 1721, 2210, + 2210, 3042, 1655, 3035, 1655, 1721, 1721, 3036, 3036, 3035, + 3035, 1721, 1721, 3037, 3037, 3035, 1655, 1655, 2210, 2210, + 2210, 2210, 2210, 2210, 2211, 3042, 2211, 2211, 2211, 1682, + 3018, 1682, 1682, 1682, 1753, 1753, 1753, 1753, 3038, 3038, + + 3038, 3038, 3038, 3038, 1682, 3018, 1682, 1682, 3018, 3018, + 3039, 3039, 3039, 3039, 1682, 1682, 1683, 1683, 1683, 3018, + 3040, 3040, 3040, 3040, 3040, 3040, 1753, 1753, 3018, 1683, + 1683, 2912, 1721, 1721, 2210, 2210, 2210, 2210, 2210, 2286, + 2286, 2286, 2190, 3035, 2190, 1721, 1721, 3036, 3036, 3036, + 3035, 3035, 1721, 1721, 3037, 3037, 3037, 3035, 1655, 1655, + 2210, 2210, 2210, 3035, 2210, 2210, 3035, 3035, 2210, 3035, + 2210, 2210, 2210, 2210, 2211, 2211, 2211, 3035, 3035, 2286, + 3035, 2286, 2286, 3035, 3035, 2211, 2211, 2211, 2211, 2211, + 1682, 3018, 1682, 1682, 1753, 1753, 1753, 3038, 3038, 3038, + + 3038, 3038, 3018, 1682, 3018, 3018, 1682, 1682, 3018, 3018, + 3039, 3039, 3018, 3018, 1682, 1682, 1683, 3018, 3018, 1683, + 1753, 3018, 3040, 3040, 3040, 3040, 3040, 3018, 3018, 1753, + 3018, 3018, 3018, 1683, 1753, 2912, 1721, 1721, 2210, 2210, + 2210, 2210, 2210, 2210, 2210, 2286, 2286, 2286, 2286, 2286, + 3035, 1655, 1721, 3036, 3036, 3035, 1721, 3037, 3037, 1655, + 3043, 2210, 2210, 3035, 3035, 3044, 2210, 2210, 2210, 2210, + 2211, 2211, 3035, 3035, 3045, 2286, 2286, 3035, 3035, 2211, + 2211, 2211, 2211, 3018, 1682, 3018, 3018, 1682, 1753, 3018, + 3018, 1753, 3038, 3038, 3038, 3038, 3018, 3018, 3018, 3018, + + 1682, 1682, 3018, 3018, 3039, 3039, 3018, 3018, 1683, 1753, + 3040, 3040, 3040, 3040, 2912, 1721, 2210, 2210, 2210, 2210, + 2286, 2286, 2286, 2286, 3035, 3035, 3035, 3035, 2190, 1721, + 3035, 3035, 1721, 3036, 3036, 3035, 3035, 3035, 1721, 3037, + 3037, 1655, 3043, 3043, 3043, 3043, 3043, 3043, 2210, 2210, + 3035, 3035, 3044, 3044, 3044, 3044, 3044, 3044, 2210, 2210, + 2210, 2210, 2211, 2211, 3035, 3035, 3045, 3045, 3045, 3045, + 3045, 3045, 2286, 2286, 3035, 3035, 2211, 2211, 2211, 2211, + 3018, 3018, 3018, 1682, 3018, 3018, 1753, 3038, 3038, 3038, + 3038, 3038, 3039, 3039, 3039, 3040, 3040, 3040, 3040, 3040, + + 1721, 2210, 2210, 2210, 2210, 2286, 2286, 2286, 2286, 3036, + 3037, 1655, 3043, 3043, 3043, 3043, 3043, 2210, 2210, 3035, + 3035, 3044, 3044, 3044, 2210, 2210, 2210, 3035, 3035, 2210, + 2211, 2211, 3035, 3035, 3045, 3045, 3045, 3045, 3045, 2286, + 2286, 3035, 3035, 2211, 2211, 2211, 3035, 3035, 2211, 3038, + 3040, 1721, 2210, 2210, 2210, 3035, 3035, 2210, 2286, 2286, + 2286, 3035, 3035, 2286, 3036, 3036, 3036, 3037, 3037, 3037, + 1655, 3043, 3043, 3043, 3043, 2210, 3035, 3035, 2210, 2210, + 3035, 3035, 3044, 3044, 2210, 3035, 3035, 2210, 2210, 2210, + 2211, 3035, 3035, 2211, 2211, 3035, 3035, 3045, 3045, 3045, + + 3045, 2286, 3035, 3035, 2286, 2286, 3035, 3035, 2211, 3035, + 3035, 2211, 2211, 2211, 3038, 3038, 3038, 3040, 3040, 3040, + 1721, 2210, 3035, 3035, 2210, 2210, 2210, 2286, 3035, 3035, + 2286, 2286, 2286, 3043, 3043, 3043, 3043, 2210, 3035, 2210, + 2210, 3035, 3035, 3035, 3044, 3044, 2210, 2210, 2210, 2211, + 2211, 2211, 3035, 3035, 3045, 3045, 3045, 3045, 2286, 2286, + 3035, 3035, 2211, 2211, 2211, 2210, 3035, 2210, 2210, 2210, + 2286, 2286, 2286, 2286, 3043, 3043, 3043, 3043, 3043, 3043, + 2210, 3035, 2210, 2210, 3035, 3035, 3044, 3044, 3044, 3044, + 2210, 2210, 2211, 2211, 2211, 3035, 3045, 3045, 3045, 3045, + + 3045, 3045, 2286, 2286, 3035, 2211, 2211, 2210, 3035, 2210, + 2210, 2286, 2286, 2286, 3043, 3043, 3043, 3043, 3043, 3035, + 2210, 3035, 3035, 2210, 2210, 3035, 3035, 3044, 3044, 3035, + 3035, 2210, 2210, 2211, 3035, 3035, 2211, 2286, 3035, 3045, + 3045, 3045, 3045, 3045, 3035, 3035, 2286, 3035, 3035, 3035, + 2211, 2286, 3035, 2210, 3035, 3035, 2210, 2286, 3035, 3035, + 2286, 3043, 3043, 3043, 3043, 3035, 3035, 3035, 3035, 2210, + 2210, 3035, 3035, 3044, 3044, 3035, 3035, 2211, 2286, 3045, + 3045, 3045, 3045, 3035, 3035, 3035, 2210, 3035, 3035, 2286, + 3043, 3043, 3043, 3043, 3043, 3044, 3044, 3044, 3045, 3045, + + 3045, 3045, 3045, 3043, 3045, 3043, 3043, 3043, 3045, 3045, + 3045, 0, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912 + } ; + +static yyconst flex_int16_t yy_nxt[31167] = + { 0, + 2912, 29, 30, 265, 29, 29, 30, 253, 29, 460, + 460, 460, 461, 275, 275, 2912, 2912, 31, 2475, 2466, + 255, 31, 32, 33, 34, 35, 36, 37, 38, 32, + 39, 40, 41, 42, 42, 42, 43, 44, 42, 45, + 46, 47, 48, 49, 32, 50, 51, 52, 53, 54, + 55, 53, 56, 57, 58, 53, 59, 53, 53, 60, + 53, 61, 53, 62, 63, 53, 53, 53, 53, 64, + 53, 65, 66, 53, 54, 55, 53, 56, 57, 58, + 53, 59, 53, 60, 53, 61, 53, 62, 63, 53, + 53, 53, 53, 64, 53, 67, 68, 69, 303, 95, + + 70, 926, 95, 98, 30, 130, 98, 135, 130, 926, + 2461, 168, 160, 132, 114, 115, 132, 114, 1920, 99, + 211, 131, 71, 72, 73, 96, 74, 75, 223, 133, + 116, 135, 135, 76, 97, 97, 160, 77, 135, 78, + 79, 80, 81, 118, 119, 211, 118, 71, 72, 73, + 96, 74, 75, 223, 120, 121, 135, 76, 1911, 122, + 1906, 77, 135, 78, 79, 80, 81, 82, 83, 84, + 85, 83, 82, 86, 82, 82, 82, 87, 87, 88, + 89, 87, 87, 87, 90, 82, 87, 91, 87, 87, + 87, 87, 87, 92, 92, 92, 92, 93, 92, 92, + + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 82, 94, 92, 92, + 92, 92, 93, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 82, 82, 97, 98, 30, 97, 98, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 99, + 97, 97, 97, 97, 97, 97, 97, 97, 114, 115, + 151, 114, 1876, 1871, 118, 119, 240, 118, 98, 30, + 182, 98, 175, 258, 116, 120, 121, 135, 97, 97, + 122, 97, 98, 30, 99, 98, 98, 30, 226, 98, + + 240, 226, 1456, 1350, 182, 1345, 175, 258, 99, 1146, + 1137, 135, 99, 1132, 224, 97, 97, 97, 98, 30, + 97, 98, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 99, 97, 97, 97, 97, 97, + 97, 97, 97, 98, 30, 237, 98, 98, 30, 223, + 98, 192, 223, 125, 126, 223, 125, 2912, 223, 99, + 175, 294, 239, 99, 127, 128, 97, 968, 129, 99, + 125, 126, 130, 125, 223, 130, 192, 223, 1014, 667, + 223, 127, 128, 223, 175, 129, 99, 239, 131, 667, + 97, 97, 97, 101, 102, 97, 103, 97, 104, 97, + + 97, 97, 105, 105, 106, 107, 105, 105, 105, 108, + 97, 105, 109, 105, 105, 105, 105, 105, 110, 110, + 110, 110, 110, 110, 111, 110, 110, 110, 110, 110, + 110, 110, 110, 112, 110, 110, 110, 110, 110, 110, + 110, 97, 110, 110, 110, 110, 110, 110, 110, 111, + 110, 110, 110, 110, 110, 110, 110, 112, 110, 110, + 110, 110, 110, 110, 110, 97, 97, 97, 98, 30, + 97, 98, 97, 356, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 99, 97, 97, 97, 97, 97, + 97, 97, 97, 98, 30, 161, 98, 98, 30, 178, + + 98, 179, 188, 180, 175, 175, 175, 241, 244, 99, + 181, 220, 135, 99, 495, 175, 97, 151, 207, 148, + 148, 208, 490, 367, 178, 179, 188, 180, 175, 175, + 175, 161, 241, 244, 181, 220, 135, 366, 150, 175, + 97, 97, 97, 98, 30, 97, 98, 97, 135, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 99, + 97, 97, 97, 97, 97, 97, 97, 97, 144, 137, + 137, 144, 135, 137, 137, 137, 137, 303, 302, 134, + 161, 372, 367, 270, 133, 161, 161, 257, 370, 2912, + 161, 97, 264, 132, 169, 255, 132, 135, 260, 145, + + 312, 260, 135, 135, 145, 170, 151, 135, 146, 133, + 366, 135, 257, 146, 261, 97, 97, 136, 137, 137, + 138, 135, 139, 135, 145, 312, 135, 135, 151, 145, + 253, 135, 146, 131, 140, 135, 140, 146, 252, 162, + 162, 162, 163, 134, 190, 135, 175, 135, 142, 151, + 171, 276, 183, 189, 161, 191, 356, 143, 262, 150, + 266, 262, 184, 266, 175, 175, 135, 175, 190, 135, + 175, 135, 175, 142, 263, 276, 267, 183, 189, 164, + 191, 143, 147, 148, 148, 149, 184, 139, 175, 175, + 135, 175, 193, 175, 161, 135, 185, 175, 131, 140, + + 175, 140, 150, 164, 186, 175, 221, 175, 187, 277, + 209, 135, 210, 142, 161, 242, 193, 175, 242, 161, + 277, 185, 143, 268, 273, 175, 268, 273, 186, 175, + 221, 175, 187, 277, 209, 135, 210, 302, 142, 269, + 131, 243, 165, 151, 277, 294, 143, 152, 153, 154, + 153, 153, 152, 155, 152, 152, 152, 152, 152, 152, + 152, 178, 222, 152, 175, 152, 243, 132, 157, 152, + 132, 179, 274, 213, 277, 212, 175, 175, 175, 182, + 181, 175, 300, 133, 214, 215, 178, 222, 158, 175, + 134, 188, 352, 175, 175, 179, 152, 213, 277, 212, + + 175, 175, 175, 182, 181, 175, 300, 309, 214, 270, + 215, 130, 158, 264, 130, 188, 352, 175, 216, 175, + 152, 152, 162, 162, 162, 163, 134, 131, 165, 218, + 132, 309, 190, 132, 217, 252, 166, 175, 166, 167, + 219, 168, 150, 216, 355, 2912, 133, 167, 167, 167, + 167, 167, 167, 134, 218, 134, 190, 175, 217, 325, + 2912, 175, 164, 2912, 219, 2912, 350, 2912, 355, 2912, + 310, 167, 167, 167, 167, 167, 167, 167, 136, 137, + 137, 138, 175, 353, 325, 2912, 164, 172, 172, 172, + 173, 350, 174, 2912, 310, 2912, 2912, 2912, 2912, 344, + + 174, 174, 175, 174, 140, 174, 175, 176, 353, 174, + 174, 174, 172, 172, 172, 173, 353, 174, 277, 137, + 137, 137, 137, 317, 344, 174, 174, 175, 174, 140, + 174, 175, 176, 265, 174, 174, 174, 154, 154, 154, + 154, 353, 277, 374, 374, 246, 2912, 317, 246, 359, + 145, 2912, 2912, 177, 2912, 246, 2912, 279, 246, 278, + 361, 248, 162, 162, 162, 163, 2912, 153, 154, 153, + 153, 248, 294, 359, 175, 145, 249, 177, 194, 137, + 137, 195, 150, 278, 361, 250, 249, 157, 315, 365, + 280, 311, 175, 2912, 2912, 250, 2912, 2912, 2912, 175, + + 282, 249, 283, 196, 197, 198, 175, 199, 200, 250, + 320, 249, 315, 365, 201, 280, 311, 175, 202, 250, + 203, 204, 205, 206, 282, 2912, 283, 2912, 196, 197, + 198, 175, 199, 200, 2912, 320, 2912, 2912, 201, 2912, + 2912, 2912, 202, 2912, 203, 204, 205, 206, 224, 225, + 226, 226, 225, 224, 224, 224, 224, 224, 227, 227, + 224, 224, 227, 227, 227, 228, 224, 227, 224, 227, + 227, 227, 227, 227, 154, 154, 154, 154, 229, 154, + 154, 154, 154, 368, 144, 137, 137, 144, 154, 154, + 154, 154, 369, 175, 279, 175, 237, 224, 224, 279, + + 133, 2912, 280, 229, 314, 313, 329, 368, 279, 353, + 154, 154, 154, 154, 2912, 145, 369, 284, 175, 2912, + 175, 224, 224, 230, 278, 175, 230, 280, 314, 313, + 279, 329, 224, 224, 353, 316, 224, 224, 224, 231, + 145, 224, 284, 224, 224, 224, 224, 224, 278, 285, + 175, 286, 223, 2912, 162, 162, 162, 162, 265, 316, + 162, 162, 162, 163, 566, 566, 566, 566, 275, 275, + 2912, 2912, 2912, 285, 150, 286, 2912, 223, 232, 232, + 150, 232, 232, 232, 233, 232, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 280, 232, + + 232, 232, 232, 232, 148, 148, 148, 148, 235, 287, + 288, 288, 289, 328, 172, 172, 172, 172, 2912, 2912, + 290, 290, 2912, 280, 150, 2912, 2912, 232, 2912, 172, + 172, 172, 173, 235, 176, 145, 292, 328, 293, 154, + 154, 154, 154, 2912, 278, 295, 296, 295, 295, 176, + 294, 232, 232, 172, 172, 172, 173, 2912, 174, 279, + 145, 292, 360, 293, 280, 157, 174, 174, 278, 174, + 140, 174, 175, 176, 175, 174, 174, 174, 172, 172, + 172, 173, 334, 174, 318, 297, 321, 360, 2912, 280, + 175, 174, 174, 280, 174, 140, 174, 175, 176, 175, + + 174, 174, 174, 326, 319, 362, 334, 281, 318, 297, + 321, 162, 162, 162, 163, 175, 2912, 2912, 280, 566, + 566, 566, 566, 654, 654, 654, 655, 326, 319, 2912, + 362, 150, 281, 152, 153, 154, 153, 153, 152, 155, + 152, 152, 152, 152, 152, 152, 152, 280, 280, 152, + 280, 152, 301, 175, 157, 152, 327, 207, 148, 148, + 208, 335, 323, 346, 324, 330, 336, 363, 348, 280, + 280, 175, 280, 280, 364, 280, 301, 150, 175, 282, + 327, 331, 152, 2912, 2912, 335, 323, 346, 324, 2912, + 330, 336, 363, 348, 280, 280, 175, 2912, 2912, 364, + + 2912, 375, 2912, 282, 2912, 331, 152, 152, 152, 153, + 154, 153, 153, 152, 155, 152, 152, 152, 152, 152, + 152, 152, 175, 280, 152, 375, 152, 332, 175, 157, + 152, 207, 148, 148, 208, 2912, 338, 343, 333, 207, + 148, 148, 208, 337, 175, 175, 339, 175, 280, 401, + 298, 150, 332, 175, 455, 175, 259, 152, 2912, 150, + 338, 343, 333, 340, 341, 2912, 274, 2912, 337, 175, + 175, 339, 2912, 401, 298, 275, 275, 2912, 455, 353, + 175, 152, 152, 162, 162, 162, 163, 340, 341, 302, + 311, 175, 345, 175, 175, 347, 175, 166, 230, 166, + + 167, 230, 167, 150, 353, 342, 2912, 349, 167, 167, + 167, 167, 167, 167, 231, 311, 175, 345, 175, 175, + 347, 175, 242, 456, 280, 242, 411, 2912, 2912, 342, + 2912, 349, 167, 167, 167, 167, 167, 167, 167, 172, + 172, 172, 173, 175, 174, 2912, 175, 456, 243, 280, + 2912, 411, 174, 174, 2912, 174, 140, 174, 351, 176, + 2912, 174, 174, 174, 304, 305, 305, 306, 175, 246, + 2912, 175, 246, 243, 260, 290, 290, 260, 2912, 465, + 262, 415, 351, 262, 279, 248, 266, 280, 280, 266, + 261, 292, 268, 293, 273, 268, 263, 273, 282, 378, + + 249, 175, 267, 465, 307, 2912, 415, 2912, 269, 250, + 131, 2912, 280, 280, 436, 280, 292, 2912, 293, 2912, + 2912, 294, 282, 378, 377, 249, 175, 2912, 307, 172, + 172, 172, 173, 250, 174, 154, 154, 154, 154, 436, + 280, 2912, 174, 174, 280, 174, 140, 174, 377, 176, + 2912, 174, 174, 174, 379, 279, 2912, 399, 308, 296, + 296, 296, 296, 2912, 287, 288, 288, 289, 2912, 280, + 154, 154, 154, 154, 285, 290, 290, 175, 379, 279, + 175, 399, 450, 308, 194, 137, 137, 195, 417, 2912, + 279, 292, 175, 293, 2912, 419, 175, 2912, 285, 376, + + 2912, 414, 175, 2912, 2912, 175, 416, 450, 380, 196, + 197, 198, 417, 199, 200, 175, 292, 175, 293, 419, + 201, 175, 420, 376, 322, 414, 203, 204, 205, 206, + 416, 265, 380, 2912, 196, 197, 198, 2912, 199, 200, + 175, 374, 374, 2912, 201, 2912, 420, 2912, 322, 2912, + 203, 204, 205, 206, 224, 225, 226, 226, 225, 224, + 224, 224, 224, 224, 227, 227, 224, 224, 227, 227, + 227, 228, 224, 227, 224, 227, 227, 227, 227, 227, + 390, 391, 391, 392, 354, 154, 154, 154, 154, 466, + 154, 154, 154, 154, 454, 457, 393, 295, 296, 295, + + 295, 2912, 294, 224, 224, 279, 2912, 2912, 175, 354, + 279, 459, 2912, 466, 394, 395, 395, 396, 2912, 454, + 457, 2912, 418, 2912, 382, 290, 290, 224, 224, 226, + 389, 381, 226, 175, 175, 462, 459, 297, 224, 224, + 446, 2912, 224, 224, 224, 224, 418, 224, 382, 224, + 224, 224, 224, 224, 430, 381, 468, 280, 353, 175, + 462, 297, 2912, 2912, 446, 394, 395, 395, 396, 2912, + 296, 296, 296, 296, 2912, 2912, 290, 290, 2912, 430, + 468, 389, 280, 353, 232, 232, 463, 232, 232, 232, + 233, 232, 232, 232, 232, 232, 232, 232, 232, 232, + + 232, 232, 232, 232, 397, 232, 232, 232, 232, 232, + 376, 463, 175, 423, 464, 280, 162, 162, 162, 163, + 280, 2912, 421, 280, 431, 425, 280, 175, 397, 429, + 472, 440, 2912, 232, 376, 2912, 150, 175, 423, 464, + 280, 579, 579, 579, 579, 280, 421, 2912, 280, 431, + 425, 280, 175, 429, 472, 402, 440, 232, 232, 232, + 232, 279, 232, 232, 232, 233, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 232, 402, + 232, 232, 232, 232, 232, 288, 288, 288, 383, 386, + 387, 387, 388, 568, 304, 305, 305, 306, 357, 2912, + + 290, 290, 2912, 2912, 2912, 389, 2912, 2912, 232, 2912, + 2912, 2912, 384, 2912, 385, 2912, 292, 568, 293, 280, + 434, 433, 357, 280, 394, 395, 395, 396, 412, 412, + 412, 413, 232, 232, 307, 290, 290, 384, 280, 385, + 389, 292, 280, 293, 280, 434, 433, 2912, 280, 259, + 426, 427, 424, 2912, 2912, 2912, 175, 175, 307, 438, + 467, 2912, 398, 280, 2912, 2912, 2912, 280, 374, 374, + 405, 406, 406, 407, 426, 427, 424, 305, 305, 305, + 403, 175, 175, 2912, 438, 467, 398, 152, 153, 154, + 153, 153, 152, 155, 152, 152, 152, 152, 152, 152, + + 152, 280, 2912, 152, 384, 152, 385, 280, 157, 152, + 307, 432, 394, 395, 395, 396, 2912, 404, 471, 280, + 2912, 428, 570, 290, 290, 2912, 280, 400, 389, 384, + 435, 385, 280, 330, 307, 432, 152, 280, 280, 2912, + 175, 404, 571, 471, 280, 428, 570, 282, 259, 422, + 437, 400, 439, 408, 435, 2912, 2912, 2912, 330, 473, + 152, 152, 280, 280, 175, 175, 571, 275, 275, 2912, + 2912, 282, 175, 422, 437, 441, 439, 408, 172, 172, + 172, 173, 175, 174, 473, 442, 443, 2912, 444, 175, + 175, 174, 174, 503, 174, 140, 174, 175, 176, 441, + + 174, 174, 174, 409, 259, 2912, 2912, 175, 175, 442, + 447, 443, 175, 444, 2912, 175, 175, 2912, 503, 971, + 445, 294, 2912, 374, 374, 2912, 2912, 971, 409, 172, + 172, 172, 173, 175, 174, 447, 175, 175, 175, 175, + 2912, 175, 174, 174, 445, 174, 140, 174, 448, 176, + 449, 174, 174, 174, 475, 175, 280, 280, 410, 453, + 484, 175, 2912, 175, 175, 451, 451, 451, 452, 485, + 2912, 474, 448, 575, 449, 175, 175, 175, 522, 475, + 175, 280, 280, 410, 453, 484, 154, 154, 154, 154, + 517, 537, 175, 485, 175, 474, 2912, 575, 514, 2912, + + 175, 175, 175, 522, 2912, 2912, 279, 2912, 2912, 2912, + 2912, 2912, 294, 2912, 517, 476, 537, 175, 2912, 175, + 232, 232, 514, 232, 232, 232, 233, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, + 476, 232, 232, 232, 232, 232, 501, 594, 2912, 458, + 548, 2912, 154, 154, 154, 154, 154, 154, 154, 154, + 2912, 479, 480, 480, 481, 390, 391, 391, 392, 232, + 501, 594, 279, 484, 458, 548, 279, 393, 175, 2912, + 175, 393, 485, 478, 390, 391, 391, 392, 384, 280, + 385, 2912, 518, 232, 232, 477, 550, 603, 484, 524, + + 393, 2912, 2912, 175, 482, 175, 485, 2912, 478, 523, + 531, 175, 280, 384, 280, 385, 518, 2912, 2912, 477, + 550, 603, 483, 524, 390, 391, 391, 390, 482, 390, + 391, 391, 390, 2912, 523, 531, 175, 280, 614, 2912, + 393, 390, 391, 391, 392, 393, 483, 486, 387, 387, + 487, 394, 395, 395, 394, 491, 2912, 393, 175, 291, + 491, 2912, 614, 389, 492, 498, 499, 389, 291, 492, + 521, 280, 493, 280, 384, 527, 385, 534, 488, 280, + 491, 494, 496, 175, 291, 491, 529, 489, 492, 498, + 499, 497, 291, 492, 521, 280, 280, 493, 280, 384, + + 527, 385, 534, 488, 280, 494, 528, 496, 2912, 2912, + 529, 489, 280, 2912, 2912, 497, 394, 395, 395, 394, + 280, 535, 394, 395, 395, 396, 2912, 291, 2912, 2912, + 528, 648, 389, 290, 290, 2912, 291, 280, 389, 500, + 2912, 390, 391, 391, 392, 535, 175, 496, 519, 519, + 519, 520, 291, 484, 280, 648, 497, 393, 530, 558, + 291, 649, 485, 500, 510, 406, 406, 511, 2912, 2912, + 2912, 175, 496, 2912, 2912, 2912, 559, 175, 484, 280, + 497, 2912, 508, 530, 558, 649, 485, 152, 153, 154, + 153, 153, 152, 155, 152, 152, 152, 152, 152, 152, + + 152, 559, 175, 152, 512, 152, 508, 660, 157, 152, + 162, 162, 162, 163, 567, 502, 505, 506, 506, 507, + 2912, 280, 2912, 405, 406, 406, 407, 569, 512, 2912, + 150, 660, 393, 526, 574, 2912, 152, 504, 2912, 567, + 502, 2912, 405, 406, 406, 407, 280, 290, 412, 412, + 412, 412, 569, 280, 484, 2912, 404, 526, 291, 574, + 152, 152, 504, 509, 2912, 532, 513, 291, 176, 2912, + 2912, 280, 290, 484, 412, 412, 412, 413, 280, 484, + 404, 2912, 509, 291, 2912, 536, 666, 509, 515, 532, + 513, 291, 280, 280, 176, 525, 280, 2912, 484, 533, + + 451, 451, 451, 452, 2912, 577, 509, 280, 593, 536, + 666, 538, 515, 2912, 516, 175, 2912, 280, 280, 539, + 525, 175, 175, 533, 175, 540, 2912, 175, 175, 280, + 577, 541, 280, 593, 542, 546, 538, 175, 516, 175, + 175, 543, 544, 2912, 539, 2912, 175, 175, 2912, 175, + 540, 545, 175, 175, 280, 541, 602, 547, 542, 549, + 546, 175, 175, 175, 175, 543, 544, 451, 451, 451, + 451, 451, 451, 451, 452, 545, 555, 609, 280, 2912, + 175, 602, 547, 2912, 549, 2912, 175, 176, 175, 2912, + 576, 176, 2912, 2912, 551, 291, 552, 156, 553, 608, + + 554, 555, 609, 280, 604, 175, 556, 556, 556, 556, + 560, 560, 560, 561, 576, 572, 572, 572, 572, 551, + 291, 552, 156, 553, 608, 554, 573, 557, 604, 2912, + 2912, 557, 232, 562, 556, 562, 562, 232, 233, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, + 232, 232, 2912, 232, 563, 232, 232, 232, 556, 556, + 556, 556, 460, 460, 460, 460, 565, 565, 565, 565, + 519, 519, 519, 520, 154, 154, 154, 154, 2912, 557, + 668, 232, 154, 154, 154, 154, 2912, 479, 480, 480, + 481, 175, 564, 2912, 279, 175, 564, 175, 2912, 280, + + 621, 632, 279, 393, 668, 232, 232, 479, 480, 480, + 481, 580, 280, 2912, 2912, 578, 175, 564, 493, 2912, + 175, 564, 175, 393, 280, 621, 632, 494, 479, 480, + 480, 481, 390, 391, 391, 392, 580, 280, 493, 578, + 2912, 2912, 2912, 493, 393, 2912, 2912, 494, 393, 291, + 584, 494, 291, 519, 519, 519, 519, 585, 291, 493, + 2912, 291, 2912, 493, 390, 391, 391, 392, 494, 581, + 582, 494, 2912, 176, 291, 584, 669, 291, 2912, 2912, + 393, 585, 291, 2912, 493, 291, 390, 391, 391, 392, + 618, 175, 494, 581, 582, 390, 391, 391, 392, 2912, + + 620, 669, 393, 589, 590, 591, 589, 583, 280, 2912, + 2912, 393, 623, 294, 618, 586, 175, 2912, 670, 592, + 390, 391, 391, 392, 620, 390, 391, 391, 392, 605, + 291, 583, 686, 280, 587, 607, 393, 623, 687, 291, + 586, 393, 670, 598, 599, 600, 598, 2912, 291, 595, + 606, 2912, 2912, 2912, 605, 291, 686, 291, 587, 601, + 607, 671, 687, 291, 596, 162, 162, 162, 163, 162, + 162, 162, 163, 291, 595, 606, 505, 506, 506, 507, + 613, 291, 2912, 280, 291, 150, 671, 624, 596, 150, + 693, 2912, 393, 291, 610, 505, 506, 506, 507, 505, + + 506, 506, 507, 694, 622, 613, 280, 493, 280, 291, + 615, 393, 624, 175, 693, 393, 611, 291, 2912, 610, + 700, 390, 391, 391, 392, 643, 493, 694, 638, 622, + 493, 280, 493, 291, 615, 611, 2912, 393, 175, 611, + 611, 585, 291, 408, 700, 510, 406, 406, 511, 643, + 2912, 493, 704, 616, 175, 493, 2912, 175, 291, 611, + 612, 617, 2912, 611, 2912, 585, 291, 408, 510, 406, + 406, 511, 390, 391, 391, 392, 704, 708, 616, 175, + 280, 280, 175, 737, 612, 512, 617, 280, 393, 280, + 519, 519, 519, 520, 627, 628, 625, 175, 2912, 626, + + 630, 280, 708, 2912, 280, 280, 280, 737, 512, 512, + 176, 587, 280, 508, 280, 629, 280, 631, 627, 628, + 625, 280, 175, 626, 633, 630, 280, 619, 280, 280, + 175, 2912, 512, 2912, 634, 587, 635, 508, 175, 629, + 280, 280, 631, 2912, 636, 637, 280, 639, 175, 633, + 640, 619, 711, 280, 175, 175, 175, 175, 634, 644, + 175, 635, 175, 175, 642, 280, 645, 175, 636, 646, + 637, 639, 175, 175, 641, 640, 2912, 711, 2912, 175, + 2912, 175, 175, 647, 644, 175, 638, 175, 2912, 642, + 2912, 645, 175, 646, 294, 724, 2912, 175, 641, 162, + + 162, 162, 163, 162, 162, 162, 163, 647, 652, 2912, + 2912, 175, 280, 556, 556, 556, 556, 280, 698, 150, + 724, 672, 280, 150, 560, 560, 560, 560, 657, 657, + 657, 657, 2912, 652, 557, 673, 175, 280, 650, 726, + 2912, 651, 280, 698, 2912, 557, 672, 280, 291, 557, + 566, 566, 566, 566, 656, 2912, 695, 291, 656, 673, + 2912, 2912, 650, 2912, 726, 651, 572, 572, 572, 572, + 2912, 2912, 2912, 291, 2912, 2912, 2912, 573, 2912, 656, + 695, 291, 2912, 656, 232, 562, 556, 562, 562, 232, + 658, 232, 232, 232, 232, 232, 232, 232, 232, 232, + + 232, 232, 232, 232, 232, 232, 563, 232, 232, 232, + 572, 572, 572, 572, 154, 154, 154, 154, 175, 732, + 2912, 573, 154, 154, 154, 154, 579, 579, 579, 579, + 2912, 2912, 706, 232, 279, 390, 391, 391, 392, 2912, + 291, 715, 279, 175, 732, 280, 279, 674, 2912, 291, + 680, 393, 390, 391, 391, 392, 706, 232, 232, 565, + 565, 565, 565, 618, 675, 291, 715, 2912, 393, 156, + 280, 2912, 674, 291, 680, 676, 175, 390, 391, 391, + 392, 734, 677, 2912, 699, 2912, 661, 618, 675, 662, + 663, 291, 664, 393, 156, 665, 175, 2912, 679, 676, + + 291, 175, 390, 391, 391, 392, 734, 677, 699, 710, + 678, 661, 2912, 2912, 662, 663, 291, 664, 393, 665, + 754, 175, 679, 2912, 291, 390, 391, 391, 392, 589, + 590, 591, 589, 710, 2912, 678, 589, 590, 591, 589, + 681, 393, 2912, 280, 754, 592, 590, 590, 590, 590, + 175, 2912, 592, 589, 590, 591, 589, 589, 590, 591, + 589, 716, 755, 757, 681, 725, 682, 683, 280, 592, + 2912, 2912, 2912, 685, 280, 175, 684, 496, 390, 391, + 391, 392, 2912, 714, 683, 716, 497, 755, 757, 725, + 682, 2912, 683, 684, 393, 390, 391, 391, 392, 280, + + 684, 2912, 496, 598, 599, 600, 598, 714, 2912, 683, + 497, 393, 598, 599, 600, 598, 688, 684, 2912, 601, + 2912, 756, 599, 599, 599, 599, 660, 2912, 601, 2912, + 2912, 2912, 598, 599, 600, 598, 689, 2912, 2912, 707, + 688, 175, 291, 690, 696, 756, 2912, 2912, 601, 291, + 660, 291, 691, 491, 598, 599, 600, 598, 291, 280, + 689, 697, 492, 690, 707, 2912, 175, 291, 690, 696, + 692, 718, 691, 2912, 291, 291, 691, 2912, 491, 2912, + 2912, 758, 291, 280, 280, 697, 492, 717, 690, 162, + 162, 162, 163, 175, 2912, 718, 691, 390, 391, 391, + + 392, 390, 391, 391, 392, 703, 758, 291, 280, 150, + 759, 731, 717, 393, 2912, 2912, 291, 393, 175, 162, + 162, 162, 163, 162, 162, 162, 163, 280, 702, 2912, + 703, 701, 291, 762, 759, 731, 596, 2912, 508, 150, + 291, 712, 713, 150, 280, 280, 719, 280, 709, 720, + 280, 175, 280, 702, 721, 701, 723, 762, 705, 280, + 596, 730, 508, 673, 778, 712, 280, 713, 2912, 280, + 280, 719, 280, 709, 720, 280, 175, 722, 721, 760, + 175, 723, 705, 2912, 280, 730, 2912, 673, 778, 727, + 761, 280, 172, 172, 172, 173, 728, 728, 728, 729, + + 2912, 722, 175, 2912, 760, 175, 735, 736, 162, 162, + 162, 163, 176, 727, 763, 761, 784, 733, 162, 162, + 162, 163, 175, 777, 764, 175, 280, 175, 150, 741, + 735, 736, 2912, 742, 742, 742, 742, 2912, 150, 763, + 784, 733, 783, 786, 2912, 738, 739, 175, 777, 764, + 175, 280, 291, 741, 557, 2912, 654, 654, 654, 654, + 2912, 740, 744, 744, 744, 744, 2912, 783, 786, 738, + 739, 280, 742, 742, 742, 742, 291, 2912, 742, 742, + 742, 742, 2912, 2912, 765, 740, 656, 154, 154, 154, + 154, 790, 656, 557, 2912, 2912, 280, 156, 2912, 557, + + 797, 794, 796, 154, 154, 154, 154, 279, 765, 2912, + 800, 656, 789, 802, 766, 790, 745, 656, 390, 391, + 391, 392, 156, 279, 797, 2912, 794, 796, 2912, 294, + 390, 391, 391, 392, 393, 800, 789, 2912, 802, 766, + 745, 657, 657, 657, 657, 767, 393, 2912, 2912, 390, + 391, 391, 392, 162, 162, 162, 163, 768, 280, 771, + 806, 291, 557, 769, 280, 393, 788, 803, 746, 767, + 291, 747, 748, 150, 749, 808, 2912, 750, 2912, 2912, + 2912, 768, 2912, 280, 771, 806, 291, 2912, 769, 280, + 788, 803, 770, 746, 291, 791, 747, 748, 2912, 749, + + 808, 750, 232, 751, 742, 751, 751, 232, 752, 232, + 232, 232, 232, 232, 232, 232, 770, 291, 232, 791, + 232, 819, 175, 232, 563, 2912, 291, 2912, 2912, 772, + 390, 391, 391, 392, 818, 175, 390, 391, 391, 392, + 2912, 2912, 291, 2912, 175, 819, 393, 175, 799, 820, + 291, 232, 393, 772, 589, 590, 591, 589, 818, 773, + 175, 589, 590, 591, 589, 589, 590, 591, 589, 175, + 592, 2912, 799, 291, 820, 232, 232, 592, 2912, 774, + 785, 685, 291, 775, 773, 390, 391, 391, 392, 390, + 391, 391, 392, 598, 599, 600, 598, 2912, 291, 2912, + + 776, 393, 821, 774, 785, 393, 291, 2912, 775, 601, + 598, 599, 600, 598, 779, 598, 599, 600, 598, 291, + 720, 280, 781, 280, 776, 280, 601, 821, 291, 825, + 832, 692, 780, 804, 833, 787, 2912, 2912, 2912, 779, + 801, 834, 291, 2912, 291, 720, 280, 781, 280, 782, + 280, 291, 291, 793, 825, 832, 780, 804, 833, 787, + 390, 391, 391, 392, 801, 834, 2912, 291, 162, 162, + 162, 163, 810, 782, 175, 291, 393, 793, 519, 519, + 519, 520, 162, 162, 162, 163, 280, 280, 150, 792, + 728, 728, 728, 729, 809, 795, 175, 810, 280, 175, + + 175, 175, 150, 835, 805, 2912, 836, 175, 2912, 812, + 811, 280, 280, 807, 792, 813, 2912, 2912, 809, 280, + 795, 175, 798, 280, 2912, 175, 175, 835, 805, 175, + 836, 2912, 175, 812, 811, 843, 837, 807, 814, 813, + 728, 728, 728, 728, 280, 2912, 798, 728, 728, 728, + 729, 2912, 2912, 2912, 175, 815, 815, 815, 816, 843, + 176, 837, 814, 728, 728, 728, 817, 176, 162, 162, + 162, 163, 861, 162, 162, 162, 163, 162, 162, 162, + 163, 2912, 2912, 2912, 175, 2912, 2912, 869, 150, 2912, + 2912, 884, 175, 150, 908, 2912, 861, 150, 742, 742, + + 742, 742, 175, 823, 742, 742, 742, 742, 822, 175, + 824, 869, 744, 744, 744, 744, 884, 175, 908, 557, + 742, 742, 742, 742, 2912, 557, 2912, 175, 823, 2912, + 2912, 2912, 822, 2912, 280, 824, 742, 742, 742, 742, + 2912, 557, 910, 892, 742, 742, 742, 742, 742, 742, + 742, 742, 2912, 742, 742, 742, 742, 557, 826, 280, + 890, 827, 280, 2912, 280, 557, 910, 892, 2912, 557, + 742, 742, 742, 742, 557, 2912, 896, 829, 742, 742, + 742, 742, 826, 828, 2912, 890, 827, 280, 745, 280, + 898, 557, 831, 751, 742, 751, 751, 2912, 356, 557, + + 830, 896, 829, 579, 579, 579, 579, 828, 838, 838, + 838, 838, 745, 2912, 563, 898, 831, 920, 2912, 839, + 175, 907, 294, 279, 2912, 830, 232, 751, 742, 751, + 751, 232, 752, 232, 232, 232, 232, 232, 232, 232, + 2912, 920, 232, 2912, 232, 175, 907, 232, 563, 840, + 840, 840, 841, 519, 519, 519, 520, 2912, 2912, 876, + 842, 844, 844, 844, 845, 846, 846, 846, 847, 2912, + 2912, 2912, 842, 2912, 2912, 232, 842, 2912, 390, 391, + 391, 392, 280, 876, 909, 279, 390, 391, 391, 392, + 280, 2912, 2912, 921, 393, 862, 862, 862, 862, 232, + + 232, 291, 393, 390, 391, 391, 392, 280, 923, 909, + 291, 851, 2912, 2912, 2912, 280, 848, 849, 921, 393, + 852, 853, 853, 854, 280, 2912, 291, 390, 391, 391, + 392, 2912, 923, 894, 291, 851, 856, 857, 857, 858, + 848, 922, 849, 393, 2912, 589, 590, 591, 589, 280, + 850, 291, 393, 589, 590, 591, 589, 894, 2912, 2912, + 291, 592, 390, 391, 391, 392, 922, 2912, 855, 592, + 864, 865, 865, 866, 850, 946, 291, 952, 393, 598, + 599, 600, 598, 859, 291, 2912, 393, 914, 598, 599, + 600, 598, 855, 2912, 860, 601, 870, 870, 870, 870, + + 946, 175, 952, 863, 601, 2912, 929, 859, 871, 280, + 291, 291, 840, 840, 840, 841, 2912, 867, 860, 291, + 291, 895, 981, 842, 872, 2912, 175, 863, 2912, 868, + 929, 2912, 2912, 871, 280, 291, 291, 873, 874, 874, + 875, 867, 2912, 291, 291, 895, 981, 2912, 872, 880, + 880, 880, 881, 868, 877, 846, 877, 878, 984, 280, + 842, 742, 742, 742, 742, 879, 280, 291, 291, 150, + 390, 391, 391, 392, 1001, 2912, 291, 291, 883, 2912, + 891, 156, 557, 984, 280, 2912, 393, 162, 162, 162, + 163, 280, 291, 291, 886, 886, 886, 886, 1001, 280, + + 291, 291, 883, 916, 891, 887, 156, 150, 888, 888, + 888, 889, 882, 893, 1003, 175, 885, 2912, 2912, 887, + 844, 844, 844, 845, 280, 175, 987, 916, 150, 897, + 1013, 842, 815, 815, 815, 816, 882, 893, 1003, 899, + 175, 885, 728, 728, 728, 817, 914, 175, 1002, 175, + 175, 987, 2912, 897, 1013, 815, 815, 815, 815, 2912, + 280, 280, 2912, 899, 815, 815, 815, 816, 2912, 2912, + 2912, 280, 175, 1002, 175, 176, 840, 840, 840, 840, + 742, 742, 742, 742, 176, 280, 280, 162, 162, 162, + 163, 2912, 904, 904, 904, 905, 280, 900, 900, 900, + + 901, 557, 902, 162, 162, 162, 163, 150, 2912, 2912, + 174, 174, 176, 174, 140, 174, 175, 176, 906, 174, + 174, 174, 1080, 150, 1007, 2912, 911, 162, 162, 162, + 163, 742, 742, 742, 742, 291, 912, 939, 742, 742, + 742, 742, 1012, 906, 291, 1092, 1080, 150, 1027, 1007, + 911, 2912, 557, 742, 742, 742, 742, 280, 915, 557, + 291, 912, 939, 742, 742, 742, 742, 1012, 291, 1092, + 913, 983, 1035, 1027, 557, 838, 838, 838, 838, 917, + 1095, 2912, 280, 915, 557, 2912, 839, 838, 838, 838, + 838, 918, 1036, 1043, 913, 983, 2912, 1035, 839, 2912, + + 280, 2912, 919, 917, 1095, 924, 924, 924, 925, 927, + 927, 927, 928, 1103, 1094, 918, 926, 1036, 1043, 2912, + 926, 844, 844, 844, 844, 280, 919, 930, 930, 930, + 931, 846, 846, 846, 846, 2912, 2912, 1103, 926, 1094, + 2912, 176, 932, 932, 932, 933, 2912, 176, 1106, 1122, + 2912, 279, 2912, 926, 390, 391, 391, 392, 390, 391, + 391, 392, 279, 936, 937, 937, 938, 2912, 2912, 2912, + 393, 291, 1106, 1122, 393, 852, 853, 853, 852, 393, + 291, 954, 1107, 934, 1115, 852, 853, 853, 852, 280, + 2912, 389, 852, 853, 853, 854, 291, 390, 391, 391, + + 392, 389, 935, 985, 291, 954, 496, 1107, 934, 1115, + 1127, 1161, 940, 393, 280, 497, 496, 856, 857, 857, + 856, 2912, 940, 2912, 2912, 497, 935, 985, 2912, 941, + 942, 496, 1162, 393, 1127, 1161, 940, 2912, 2912, 497, + 2912, 496, 877, 846, 877, 877, 940, 294, 491, 497, + 1133, 958, 175, 941, 940, 942, 1162, 492, 856, 857, + 857, 856, 157, 589, 590, 591, 589, 988, 856, 857, + 857, 858, 958, 491, 393, 1133, 958, 175, 940, 592, + 1175, 492, 1059, 1176, 393, 589, 590, 591, 589, 491, + 175, 988, 944, 958, 2912, 940, 1138, 958, 492, 493, + + 1147, 592, 1084, 1116, 1175, 943, 1059, 1176, 494, 862, + 862, 862, 862, 2912, 491, 175, 2912, 944, 958, 940, + 2912, 1138, 492, 1156, 493, 1147, 1084, 1116, 945, 943, + 280, 1159, 494, 390, 391, 391, 392, 864, 865, 865, + 864, 864, 865, 865, 864, 1082, 947, 2912, 1156, 393, + 1172, 1178, 945, 393, 1182, 280, 1159, 393, 864, 865, + 865, 866, 966, 967, 966, 966, 948, 294, 491, 1082, + 947, 291, 491, 968, 947, 1172, 1178, 492, 947, 1182, + 1123, 492, 2912, 598, 599, 600, 598, 598, 599, 600, + 598, 948, 1213, 491, 2912, 949, 291, 491, 947, 601, + + 2912, 492, 947, 601, 1123, 492, 870, 870, 870, 870, + 2912, 291, 950, 862, 862, 862, 862, 1213, 953, 949, + 291, 1214, 955, 956, 956, 957, 880, 880, 880, 880, + 951, 2912, 955, 956, 956, 957, 291, 950, 389, 1224, + 2912, 2912, 953, 940, 291, 1214, 150, 2912, 389, 955, + 956, 956, 961, 959, 951, 886, 886, 886, 886, 1229, + 962, 962, 960, 959, 1224, 389, 887, 940, 390, 391, + 391, 392, 960, 2912, 969, 932, 969, 970, 959, 294, + 964, 1228, 1239, 1229, 393, 971, 960, 1240, 959, 965, + 972, 927, 972, 973, 157, 294, 960, 974, 974, 974, + + 975, 971, 958, 958, 2912, 964, 1228, 1239, 926, 2912, + 976, 1240, 2912, 965, 2912, 1141, 1225, 150, 977, 978, + 978, 979, 162, 162, 162, 163, 2912, 958, 958, 980, + 888, 888, 888, 888, 976, 888, 888, 888, 889, 1141, + 1225, 887, 150, 2912, 2912, 1254, 887, 962, 2912, 291, + 150, 900, 900, 900, 900, 150, 2912, 1121, 291, 2912, + 900, 900, 900, 901, 982, 991, 989, 989, 989, 990, + 1254, 176, 962, 1248, 291, 2912, 2912, 140, 2912, 140, + 176, 1121, 291, 742, 742, 742, 742, 2912, 982, 900, + 900, 900, 901, 2912, 902, 175, 2912, 1248, 162, 162, + + 162, 163, 174, 174, 557, 174, 140, 174, 280, 176, + 2912, 174, 174, 174, 993, 993, 993, 993, 150, 2912, + 175, 904, 904, 904, 904, 995, 2912, 2912, 2912, 1005, + 904, 904, 904, 905, 279, 996, 996, 996, 997, 1273, + 994, 176, 870, 870, 870, 870, 995, 999, 994, 994, + 176, 994, 140, 994, 1005, 176, 906, 994, 994, 994, + 162, 162, 162, 163, 1273, 2912, 162, 162, 162, 163, + 2912, 2912, 999, 2912, 162, 162, 162, 163, 1253, 2912, + 150, 906, 742, 742, 742, 742, 150, 742, 742, 742, + 742, 2912, 2912, 2912, 150, 742, 742, 742, 742, 1000, + + 2912, 2912, 1253, 557, 1004, 2912, 2912, 2912, 557, 2912, + 2912, 1009, 1069, 1070, 1070, 1071, 557, 1276, 1276, 1276, + 1276, 1006, 2912, 1000, 900, 900, 900, 901, 1004, 902, + 1008, 742, 742, 742, 742, 1011, 1009, 174, 174, 2912, + 174, 140, 174, 175, 176, 1006, 174, 174, 174, 2912, + 2912, 2912, 557, 1297, 1008, 924, 924, 924, 925, 1011, + 1010, 924, 924, 924, 925, 2912, 926, 927, 927, 927, + 928, 280, 926, 927, 927, 927, 928, 1297, 926, 967, + 967, 967, 967, 1155, 926, 1010, 930, 930, 930, 1015, + 1014, 930, 930, 930, 931, 2912, 280, 926, 932, 932, + + 932, 933, 926, 2912, 2912, 2912, 176, 1155, 1277, 926, + 1298, 176, 932, 932, 932, 933, 2912, 1281, 279, 390, + 391, 391, 392, 926, 390, 391, 391, 392, 1018, 1019, + 1019, 1020, 279, 1277, 1298, 393, 1310, 1026, 2912, 1285, + 393, 291, 1281, 2912, 393, 1018, 1019, 1019, 1020, 2912, + 291, 1018, 1019, 1019, 1023, 1295, 2912, 1016, 2912, 1021, + 1310, 393, 1026, 1028, 1285, 1017, 291, 393, 1022, 291, + 390, 391, 391, 392, 291, 1302, 1021, 2912, 291, 2912, + 1295, 1016, 1024, 958, 1021, 1022, 393, 2912, 1028, 1017, + 1311, 1025, 1022, 1134, 291, 1317, 1361, 1029, 2912, 1319, + + 1302, 1021, 291, 390, 391, 391, 392, 1024, 958, 1022, + 589, 590, 591, 589, 1311, 1025, 2912, 1134, 1320, 393, + 1317, 1361, 1029, 1319, 1332, 2912, 592, 2912, 1030, 1032, + 1033, 1034, 1032, 390, 391, 391, 392, 1045, 390, 391, + 391, 392, 1320, 291, 1367, 592, 2912, 958, 1332, 393, + 1337, 1031, 291, 1030, 393, 598, 599, 600, 598, 1181, + 1037, 291, 1045, 1038, 1040, 1041, 1042, 1040, 291, 1367, + 291, 601, 958, 1044, 1337, 1031, 291, 2912, 2912, 1391, + 601, 1338, 2912, 1181, 2912, 1037, 291, 2912, 1038, 2912, + 955, 956, 956, 957, 291, 2912, 1039, 1044, 1356, 1406, + + 955, 956, 956, 957, 1391, 1338, 389, 1046, 1047, 1047, + 1048, 1052, 1053, 1053, 1054, 1392, 389, 2912, 2912, 958, + 1039, 959, 1356, 1049, 1406, 1407, 2912, 1055, 2912, 1139, + 960, 959, 966, 967, 966, 966, 291, 294, 1050, 1392, + 960, 958, 1056, 968, 958, 291, 959, 1051, 1131, 1407, + 1140, 1057, 1417, 1139, 960, 2912, 959, 1052, 1053, 1053, + 1054, 291, 2912, 1050, 960, 2912, 958, 1056, 1418, 291, + 1430, 1051, 1131, 1055, 1140, 1057, 2912, 1417, 1046, 1047, + 1047, 1060, 967, 967, 967, 967, 1058, 958, 1056, 962, + 962, 2912, 1418, 1014, 1049, 1430, 1180, 1057, 1063, 1064, + + 1064, 1065, 2912, 962, 1069, 1070, 1070, 1071, 2912, 1061, + 2912, 1058, 958, 1056, 1066, 1185, 1434, 2912, 1062, 1438, + 1180, 1057, 2912, 2912, 1069, 1070, 1070, 1071, 962, 1067, + 1069, 1070, 1070, 1071, 1061, 1072, 2912, 2912, 1068, 1185, + 1434, 962, 1062, 1438, 1073, 969, 932, 969, 970, 2912, + 294, 1148, 2912, 1074, 1067, 1072, 971, 1444, 1437, 1443, + 1072, 1072, 1068, 2912, 1073, 157, 962, 958, 1073, 1075, + 1073, 969, 932, 969, 970, 1148, 294, 1179, 1074, 2912, + 1072, 1444, 971, 1437, 1443, 2912, 1072, 1445, 1073, 2912, + 2912, 157, 958, 1075, 1073, 972, 927, 972, 973, 1451, + + 294, 1179, 972, 927, 972, 973, 971, 294, 974, 974, + 974, 1076, 1445, 971, 974, 974, 974, 975, 2912, 926, + 1077, 1078, 1078, 1079, 1451, 926, 1432, 1433, 150, 2912, + 1446, 980, 1452, 2912, 150, 2912, 393, 977, 978, 978, + 977, 977, 978, 978, 977, 962, 2912, 2912, 1014, 2912, + 1432, 1433, 1014, 389, 1446, 1183, 1452, 389, 977, 978, + 978, 979, 390, 391, 391, 392, 962, 958, 496, 980, + 962, 958, 496, 980, 1480, 1184, 1211, 497, 393, 1183, + 1222, 497, 162, 162, 162, 163, 989, 989, 989, 990, + 2912, 962, 958, 496, 2912, 2912, 958, 496, 1480, 1184, + + 1211, 497, 150, 1491, 1222, 497, 989, 989, 989, 989, + 2912, 989, 989, 989, 990, 280, 1085, 1499, 1087, 1087, + 1087, 1087, 1506, 1508, 1081, 2912, 176, 1491, 140, 995, + 140, 176, 1513, 993, 993, 993, 993, 1514, 2912, 958, + 280, 1499, 2912, 1399, 995, 958, 1506, 1508, 1081, 996, + 996, 996, 997, 279, 994, 1509, 1513, 1212, 1518, 2912, + 995, 1514, 994, 994, 958, 994, 140, 994, 1399, 176, + 958, 994, 994, 994, 900, 900, 900, 901, 2912, 902, + 1509, 1212, 1518, 162, 162, 162, 163, 174, 174, 1510, + 174, 140, 174, 280, 176, 958, 174, 174, 174, 1089, + + 1089, 1089, 1090, 150, 1088, 1246, 1246, 1246, 1247, 1282, + 995, 1093, 1088, 1088, 1510, 1088, 140, 1088, 2912, 150, + 958, 1088, 1088, 1088, 993, 993, 993, 993, 996, 996, + 996, 996, 1530, 1282, 175, 995, 1093, 2912, 2912, 995, + 996, 996, 996, 997, 279, 2912, 2912, 1519, 176, 2912, + 2912, 995, 1520, 162, 162, 162, 163, 1530, 2912, 175, + 176, 996, 996, 996, 997, 2912, 994, 162, 162, 162, + 163, 1519, 995, 150, 994, 994, 1520, 994, 140, 994, + 1548, 176, 1097, 994, 994, 994, 1521, 150, 742, 742, + 742, 742, 742, 742, 742, 742, 742, 742, 742, 742, + + 2912, 930, 930, 930, 1015, 1548, 1525, 1097, 1526, 557, + 1521, 1098, 926, 557, 2912, 2912, 2912, 557, 2912, 2912, + 2912, 176, 1087, 1087, 1087, 1087, 2912, 2912, 2912, 1104, + 1525, 2912, 1526, 995, 2912, 1098, 1096, 1099, 162, 1099, + 1100, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, + 1096, 1096, 1096, 1096, 1104, 1096, 958, 1102, 1096, 1096, + 1096, 1096, 742, 742, 742, 742, 2912, 1550, 390, 391, + 391, 392, 390, 391, 391, 392, 1018, 1019, 1019, 1020, + 1551, 958, 2912, 557, 393, 1096, 2912, 1552, 393, 2912, + 1563, 1550, 393, 974, 974, 974, 1076, 1109, 1018, 1019, + + 1019, 1020, 2912, 1105, 926, 1551, 1573, 1021, 2912, 1096, + 1096, 1108, 1552, 150, 393, 1563, 1022, 1110, 1111, 1111, + 1112, 2912, 1109, 856, 857, 857, 858, 1105, 291, 1021, + 1203, 1573, 1021, 1066, 2912, 1108, 1578, 291, 1022, 393, + 1022, 2912, 2912, 1110, 1111, 1111, 1117, 958, 1113, 1063, + 1064, 1064, 1065, 291, 1021, 1203, 2912, 1114, 1559, 1066, + 1578, 291, 1022, 2912, 2912, 1066, 852, 853, 853, 854, + 2912, 2912, 958, 1113, 1118, 2912, 962, 962, 1120, 1118, + 1067, 1114, 1559, 1119, 390, 391, 391, 392, 1119, 1068, + 1286, 2912, 589, 590, 591, 589, 1486, 291, 958, 1118, + + 393, 962, 962, 1120, 1118, 1067, 291, 1119, 592, 2912, + 2912, 2912, 1119, 1068, 1286, 1032, 1033, 1034, 1032, 2912, + 2912, 1486, 291, 958, 1124, 1125, 1033, 1033, 1033, 1033, + 291, 592, 2912, 1032, 1033, 1034, 1032, 864, 865, 865, + 866, 1580, 162, 162, 162, 163, 683, 1576, 1124, 592, + 1125, 2912, 1126, 393, 1582, 684, 958, 496, 390, 391, + 391, 392, 150, 940, 683, 1580, 497, 1586, 1223, 1590, + 1126, 683, 1576, 684, 393, 1581, 1126, 1592, 1582, 684, + 2912, 958, 496, 598, 599, 600, 598, 940, 2912, 683, + 497, 1586, 1223, 1590, 1126, 1585, 2912, 684, 1128, 601, + + 1581, 1592, 1040, 1041, 1042, 1040, 1041, 1041, 1041, 1041, + 1087, 1087, 1087, 1087, 1596, 2912, 1129, 2912, 601, 1589, + 1585, 995, 1128, 962, 1040, 1041, 1042, 1040, 873, 874, + 874, 875, 1237, 690, 2912, 2912, 2912, 491, 1596, 1130, + 601, 1129, 691, 947, 1589, 2912, 492, 2912, 962, 1089, + 1089, 1089, 1089, 2912, 2912, 690, 1237, 1591, 690, 291, + 995, 1130, 491, 1130, 691, 958, 691, 947, 291, 150, + 492, 1046, 1047, 1047, 1048, 1046, 1047, 1047, 1048, 1296, + 690, 1600, 1591, 1595, 291, 1130, 1614, 1049, 691, 962, + 958, 1049, 291, 1046, 1047, 1047, 1048, 1052, 1053, 1053, + + 1052, 1238, 1050, 1296, 1602, 1600, 1050, 2912, 1595, 1049, + 1614, 1051, 1621, 1055, 962, 1051, 1052, 1053, 1053, 1052, + 1069, 1070, 1070, 1071, 1050, 1238, 2912, 1050, 1135, 1602, + 1620, 1050, 1055, 1051, 1656, 1051, 1621, 1136, 2912, 1051, + 2912, 2912, 1069, 1070, 1070, 1071, 2912, 1135, 2912, 1050, + 1633, 1072, 2912, 1135, 2912, 1620, 1136, 1051, 1656, 1143, + 1073, 1136, 1063, 1064, 1064, 1063, 1186, 1186, 1186, 1186, + 958, 1142, 1135, 1072, 2912, 1633, 1072, 1187, 1066, 1279, + 1136, 2912, 1073, 1143, 1073, 1063, 1064, 1064, 1063, 1069, + 1070, 1070, 1069, 1144, 2912, 958, 1142, 1534, 1072, 958, + + 2912, 1066, 1145, 1279, 2912, 1049, 1073, 1069, 1070, 1070, + 1069, 1069, 1070, 1070, 1071, 2912, 1144, 2912, 1144, 962, + 1149, 1643, 1534, 1049, 958, 1145, 1145, 2912, 1283, 1150, + 1069, 1070, 1070, 1071, 1099, 162, 1099, 1099, 1149, 1348, + 1151, 1144, 1072, 1657, 962, 1149, 1643, 1150, 1349, 1145, + 1658, 1073, 1283, 1150, 1102, 2912, 2912, 1069, 1070, 1070, + 1071, 1072, 958, 1149, 1348, 1151, 1663, 1072, 1657, 1152, + 1073, 1150, 1349, 2912, 1658, 1073, 1069, 1070, 1070, 1071, + 1077, 1078, 1078, 1077, 1669, 2912, 1072, 958, 1072, 2912, + 1663, 1014, 2912, 1152, 1073, 1153, 393, 1073, 1077, 1078, + + 1078, 1077, 936, 937, 937, 938, 958, 1072, 1669, 1014, + 1464, 491, 958, 1072, 393, 1671, 1073, 1154, 393, 1153, + 492, 1073, 1089, 1089, 1089, 1090, 2912, 2912, 1538, 491, + 962, 958, 1072, 995, 2912, 1464, 491, 958, 492, 1671, + 1073, 1154, 150, 2912, 492, 1077, 1078, 1078, 1079, 162, + 162, 162, 163, 1538, 491, 962, 980, 162, 162, 162, + 163, 393, 492, 2912, 162, 162, 162, 163, 1677, 150, + 2912, 2912, 742, 742, 742, 742, 493, 150, 742, 742, + 742, 742, 958, 962, 150, 494, 2912, 1192, 1193, 1193, + 1194, 962, 1677, 557, 1280, 1163, 1160, 1174, 1191, 557, + + 1725, 493, 2912, 393, 2912, 1164, 1733, 958, 962, 494, + 996, 996, 996, 997, 1737, 994, 962, 1173, 1280, 1163, + 1160, 995, 1174, 994, 994, 1725, 994, 140, 994, 1164, + 176, 1733, 994, 994, 994, 162, 162, 162, 163, 1737, + 1157, 1173, 2912, 1197, 1197, 1197, 1197, 1739, 1157, 1157, + 1743, 1157, 140, 1157, 1187, 150, 2912, 1157, 1157, 1157, + 1089, 1089, 1089, 1090, 2912, 1088, 1329, 1329, 1329, 1329, + 2912, 995, 1739, 1088, 1088, 1743, 1088, 140, 1088, 1684, + 150, 1685, 1088, 1088, 1088, 1096, 1099, 162, 1099, 1100, + 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, + + 1096, 1096, 1096, 1684, 1096, 1685, 1102, 1096, 1096, 1096, + 1096, 1198, 1199, 1199, 1200, 2912, 1249, 1249, 1249, 1250, + 962, 1251, 1191, 1260, 387, 1261, 1262, 393, 390, 391, + 391, 392, 1284, 140, 1096, 140, 150, 2912, 2912, 1263, + 1186, 1186, 1186, 1186, 393, 962, 1188, 1189, 1189, 1190, + 2912, 1187, 1276, 1276, 1276, 1276, 1284, 1191, 1096, 1096, + 1096, 1165, 288, 1166, 1167, 1096, 1096, 1096, 1096, 1096, + 1096, 1096, 1168, 1168, 1096, 1096, 1096, 1096, 1169, 1096, + 1169, 1096, 1096, 1096, 1096, 1096, 1169, 1169, 1170, 1169, + 1171, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, + + 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1096, + 1169, 1169, 1169, 1170, 1169, 1171, 1169, 1169, 1169, 1169, + 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, + 1169, 1169, 1169, 1096, 1096, 390, 391, 391, 392, 1110, + 1111, 1111, 1112, 1110, 1111, 1111, 1112, 1197, 1197, 1197, + 1197, 393, 2912, 1726, 2912, 1066, 1799, 958, 1187, 1066, + 1110, 1111, 1111, 1112, 2912, 1110, 1111, 1111, 1117, 1304, + 1113, 2912, 2912, 962, 1113, 2912, 1066, 1726, 1177, 1114, + 1799, 1066, 958, 1114, 1572, 2912, 1188, 1189, 1189, 1190, + 1757, 1113, 2912, 1304, 2912, 1113, 1118, 1191, 962, 1113, + + 1114, 2912, 1177, 1114, 2912, 1119, 2912, 1114, 1572, 589, + 590, 591, 589, 2912, 2912, 1757, 1113, 291, 962, 291, + 958, 1118, 1470, 962, 1114, 592, 291, 1289, 291, 1119, + 589, 590, 591, 589, 2912, 958, 1195, 598, 599, 600, + 598, 1800, 291, 962, 291, 958, 592, 1470, 962, 1303, + 291, 1289, 291, 601, 1810, 1196, 598, 599, 600, 598, + 958, 1195, 2912, 1812, 1201, 1800, 1813, 1205, 1206, 1207, + 1205, 2912, 601, 1303, 1216, 1217, 1218, 1216, 2912, 1810, + 1196, 1202, 2912, 1208, 1069, 1070, 1070, 1071, 1812, 1201, + 1219, 1813, 1863, 2912, 1069, 1070, 1070, 1071, 1209, 2912, + + 2912, 1231, 1232, 1233, 1231, 1220, 1202, 1210, 1817, 2912, + 1032, 1033, 1034, 1032, 1221, 1072, 1863, 1234, 1357, 1357, + 1357, 1357, 1226, 1209, 1073, 1072, 592, 1864, 2912, 2912, + 1220, 1210, 1235, 1817, 1073, 1227, 2912, 2912, 1221, 557, + 1072, 1236, 1069, 1070, 1070, 1071, 1226, 2912, 1073, 2912, + 1072, 1864, 1069, 1070, 1070, 1071, 2912, 1235, 1073, 1227, + 1818, 162, 162, 162, 163, 1236, 1819, 2912, 2912, 1069, + 1070, 1070, 1071, 1072, 1069, 1070, 1070, 1071, 2912, 2912, + 1241, 150, 1073, 1072, 2912, 1818, 1256, 2912, 962, 2912, + 1820, 1819, 1073, 1242, 1040, 1041, 1042, 1040, 1072, 1824, + + 1072, 2912, 1318, 1243, 1241, 1072, 1073, 1857, 1072, 1073, + 601, 1256, 1244, 962, 1073, 1820, 1073, 1242, 390, 391, + 391, 392, 2912, 2912, 1824, 1072, 1318, 2912, 1243, 958, + 1072, 2912, 1857, 1073, 393, 1883, 1244, 2912, 1073, 172, + 172, 172, 173, 1362, 174, 1882, 162, 162, 162, 163, + 962, 1278, 174, 174, 958, 174, 140, 174, 2912, 176, + 1883, 174, 174, 174, 1368, 2912, 150, 1362, 1245, 1882, + 1246, 1246, 1246, 1246, 2912, 962, 1278, 742, 742, 742, + 742, 1249, 1249, 1249, 1249, 1895, 2912, 2912, 1368, 1255, + 176, 2912, 2912, 1245, 162, 162, 162, 163, 557, 1157, + + 2912, 150, 1305, 1306, 1306, 1307, 2912, 1157, 1157, 1895, + 1157, 140, 1157, 1255, 150, 1274, 1157, 1157, 1157, 1096, + 1166, 288, 1166, 1257, 1096, 1096, 1096, 1096, 1096, 1096, + 1096, 958, 1894, 1096, 1096, 1096, 1096, 2912, 1096, 1274, + 1096, 1096, 1096, 1096, 1096, 1896, 958, 1258, 2912, 1259, + 1874, 2912, 742, 742, 742, 742, 958, 1894, 1363, 1875, + 1268, 395, 1269, 1270, 742, 742, 742, 742, 1096, 1896, + 2912, 958, 1258, 557, 1259, 1874, 1263, 1425, 1425, 1425, + 1425, 1358, 1363, 1875, 2912, 557, 2912, 1169, 2912, 1169, + 2912, 2912, 1096, 1096, 1096, 1264, 391, 1265, 1266, 1096, + + 1096, 1096, 1096, 1096, 1096, 1096, 1358, 1275, 1096, 1096, + 1096, 1267, 1169, 1096, 1169, 1096, 1096, 1096, 1096, 1096, + 1268, 395, 1269, 1270, 1268, 395, 1269, 1270, 2912, 2912, + 2912, 1275, 2912, 962, 2912, 2912, 1263, 1898, 2912, 1547, + 1263, 958, 2912, 1096, 2912, 1369, 958, 1169, 958, 1169, + 1476, 1169, 958, 1169, 1188, 1189, 1189, 1188, 962, 1271, + 1386, 1898, 1272, 1604, 1547, 1187, 958, 1096, 1096, 1369, + 389, 958, 1169, 958, 1169, 1476, 1169, 958, 1169, 1329, + 1329, 1329, 1329, 1271, 1386, 496, 1272, 1604, 1188, 1189, + 1189, 1188, 2912, 2912, 497, 1192, 1193, 1193, 1192, 1187, + + 1425, 1425, 1425, 1425, 389, 1901, 1187, 2912, 2912, 2912, + 496, 393, 2912, 2912, 1192, 1193, 1193, 1192, 497, 496, + 589, 590, 591, 589, 1921, 1187, 491, 2912, 497, 1901, + 393, 1192, 1193, 1193, 1194, 492, 592, 1198, 1199, 1199, + 1198, 2912, 1191, 1902, 496, 491, 2912, 393, 1187, 1921, + 962, 491, 497, 393, 492, 1357, 1357, 1357, 1357, 492, + 1287, 1607, 493, 1198, 1199, 1199, 1198, 1902, 491, 2912, + 491, 494, 2912, 2912, 1187, 962, 557, 492, 492, 393, + 1198, 1199, 1199, 1200, 1287, 1607, 2912, 493, 1922, 2912, + 2912, 1191, 2912, 491, 491, 494, 393, 598, 599, 600, + + 598, 492, 1940, 492, 1929, 2912, 958, 1205, 1206, 1207, + 1205, 493, 1922, 601, 1205, 1206, 1207, 1205, 1395, 491, + 494, 1943, 2912, 1208, 2912, 2912, 1940, 492, 962, 1929, + 1208, 958, 1324, 1325, 1325, 1326, 493, 1288, 1209, 2912, + 1412, 2912, 1395, 2912, 494, 1290, 1943, 1210, 1206, 1206, + 1206, 1206, 1944, 962, 1291, 1246, 1246, 1246, 1247, 2912, + 1327, 1288, 958, 1209, 1412, 1205, 1206, 1207, 1205, 1424, + 1290, 1210, 140, 1615, 140, 176, 1944, 2912, 1291, 1149, + 2912, 1208, 1205, 1206, 1207, 1205, 1949, 958, 1150, 1249, + 1249, 1249, 1250, 1424, 1251, 2912, 1290, 1615, 1292, 1205, + + 1206, 1207, 1205, 1950, 1149, 1291, 140, 1951, 140, 150, + 2912, 1949, 1150, 1209, 2912, 1208, 291, 1205, 1206, 1207, + 1205, 1290, 1210, 1381, 2912, 291, 1957, 1950, 1293, 1291, + 1209, 2912, 1951, 1208, 1216, 1217, 1218, 1216, 1209, 1210, + 1952, 291, 1648, 1648, 1648, 1648, 1210, 1381, 1209, 291, + 1219, 1957, 2912, 1293, 2912, 1209, 1294, 1210, 1364, 1365, + 1365, 1366, 2912, 1210, 1952, 1220, 1216, 1217, 1218, 1216, + 2912, 2912, 2912, 1209, 1221, 2912, 1217, 1217, 1217, 1217, + 1294, 1210, 1219, 1216, 1217, 1218, 1216, 958, 2912, 1958, + 1220, 1962, 2912, 1216, 1217, 1218, 1216, 1220, 1221, 1219, + + 162, 162, 162, 163, 2912, 2912, 1221, 1135, 2912, 1299, + 1968, 2912, 958, 1958, 1220, 1962, 1136, 958, 2912, 962, + 150, 1967, 1220, 1221, 1220, 1216, 1217, 1218, 1216, 1460, + 1221, 1466, 1135, 1221, 1968, 1216, 1217, 1218, 1216, 1220, + 1136, 1219, 958, 1333, 962, 2912, 1967, 1221, 1479, 1220, + 2912, 1219, 958, 1460, 1300, 1466, 1220, 1221, 1969, 2912, + 2912, 1069, 1070, 1070, 1071, 1221, 1220, 1333, 1370, 1371, + 1371, 1372, 2912, 1479, 1301, 1221, 1970, 958, 2912, 1300, + 2912, 1220, 1969, 1069, 1070, 1070, 1071, 2912, 2912, 1221, + 1308, 1220, 1072, 1231, 1232, 1233, 1231, 962, 1301, 1221, + + 1970, 1073, 1997, 1231, 1232, 1233, 1231, 2912, 2912, 1234, + 1644, 1645, 1645, 1646, 1072, 1308, 958, 1072, 1998, 1234, + 1485, 1647, 962, 1073, 1235, 1073, 1309, 1997, 2912, 1232, + 1232, 1232, 1232, 1236, 1312, 1231, 1232, 1233, 1231, 1072, + 2011, 958, 1998, 1313, 2912, 1485, 2012, 1073, 2912, 1235, + 1309, 1234, 1231, 1232, 1233, 1231, 2912, 1236, 2019, 1312, + 1144, 1440, 590, 1441, 1440, 2011, 1312, 1313, 1314, 1145, + 2012, 1231, 1232, 1233, 1231, 1313, 2021, 1442, 1231, 1232, + 1233, 1231, 2019, 1235, 2912, 1144, 2020, 1234, 2912, 2912, + 2912, 1312, 1236, 1145, 1234, 1664, 857, 1665, 1666, 1313, + + 1315, 2021, 1235, 742, 742, 742, 742, 2912, 1235, 1235, + 2020, 1236, 1069, 1070, 1070, 1071, 1236, 1316, 1236, 1069, + 1070, 1070, 1071, 2912, 557, 1315, 2029, 1235, 2912, 1069, + 1070, 1070, 1071, 2022, 1235, 1236, 2912, 1448, 599, 1449, + 1448, 1316, 1236, 1072, 1457, 1457, 1457, 1457, 1321, 1892, + 1072, 2029, 1073, 1450, 2027, 1322, 958, 2022, 1893, 1073, + 1072, 1324, 1325, 1325, 1326, 557, 2028, 1686, 1072, 1073, + 1323, 2912, 2912, 1321, 1892, 1072, 1073, 2912, 2027, 1322, + 2912, 958, 1893, 1073, 2912, 1072, 589, 590, 591, 589, + 2028, 1686, 1072, 1073, 1323, 390, 391, 391, 392, 2030, + + 2912, 1073, 592, 1334, 480, 1335, 1336, 1373, 1374, 1375, + 1373, 393, 1487, 2912, 2033, 2912, 958, 1072, 1376, 598, + 599, 600, 598, 592, 2030, 1073, 1246, 1246, 1246, 1247, + 1258, 174, 1259, 2912, 1360, 601, 2912, 1487, 2033, 174, + 174, 958, 174, 140, 174, 1558, 176, 958, 174, 174, + 174, 162, 162, 162, 163, 1258, 1330, 1259, 1360, 1481, + 1481, 1481, 1481, 2912, 1330, 1330, 2912, 1330, 140, 1330, + 1558, 150, 958, 1330, 1330, 1330, 1096, 1099, 162, 1099, + 1100, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, + 1096, 1096, 1096, 1096, 2912, 1096, 1482, 1102, 1096, 1096, + + 1096, 1096, 1260, 387, 1261, 1262, 2912, 1260, 387, 1261, + 1262, 1377, 1378, 1379, 1377, 962, 2912, 2034, 1263, 1497, + 1482, 2038, 1380, 1263, 2039, 1096, 1498, 601, 958, 2050, + 962, 1535, 1531, 1339, 1571, 958, 962, 1601, 1339, 958, + 962, 2034, 1340, 2912, 1497, 2038, 2912, 1340, 2039, 1096, + 1096, 1498, 2040, 958, 2050, 962, 1535, 1531, 1339, 1571, + 958, 962, 1601, 1339, 958, 2912, 1340, 1341, 387, 1261, + 1342, 1340, 1264, 391, 1265, 1264, 2040, 1264, 391, 1265, + 1264, 2912, 2041, 1263, 1268, 395, 1269, 1268, 1267, 1268, + 395, 1269, 1268, 1267, 1258, 2912, 1259, 962, 1343, 2912, + + 1263, 1536, 2057, 1346, 2912, 1263, 2041, 1344, 1346, 1539, + 1549, 2912, 1347, 962, 958, 1351, 2912, 1347, 2045, 1258, + 1351, 1259, 962, 1343, 1352, 2912, 1536, 2057, 1346, 1352, + 2912, 1344, 2912, 1346, 1539, 1549, 1347, 2912, 962, 958, + 1351, 1347, 2045, 2912, 2912, 1351, 2912, 2912, 1352, 1268, + 395, 1269, 1270, 1352, 1268, 395, 1269, 1270, 2912, 1205, + 1206, 1207, 1205, 2912, 2912, 1263, 1440, 590, 1441, 1440, + 1263, 1440, 590, 1441, 1440, 1208, 1169, 1605, 1169, 962, + 1603, 1169, 1442, 1169, 958, 1339, 2912, 1517, 1382, 962, + 1209, 2912, 1355, 2046, 1340, 1448, 599, 1449, 1448, 1210, + + 1690, 1169, 1605, 1169, 962, 1603, 1169, 2912, 1169, 958, + 1339, 1450, 2055, 1382, 962, 1209, 1355, 2046, 1340, 1268, + 395, 1269, 1270, 1210, 1690, 2912, 2056, 1205, 1206, 1207, + 1205, 162, 162, 162, 163, 1263, 2055, 1205, 1206, 1207, + 1205, 2058, 2912, 1208, 2089, 1606, 1169, 2101, 1169, 962, + 2056, 150, 2069, 1292, 1938, 1939, 1353, 1354, 1209, 2912, + 1425, 1425, 1425, 1425, 1431, 2058, 1383, 1210, 1209, 2089, + 1606, 1169, 2101, 1169, 962, 2912, 2069, 1210, 1938, 1939, + 1353, 1354, 2912, 1209, 1205, 1206, 1207, 1205, 2912, 1431, + 1383, 1210, 2070, 1209, 1205, 1206, 1207, 1205, 2912, 1504, + + 1208, 1210, 1387, 1388, 1388, 1389, 162, 162, 162, 163, + 1208, 1216, 1217, 1218, 1216, 1209, 2070, 2082, 1427, 1427, + 1427, 1427, 1384, 1504, 1210, 1209, 150, 1299, 2912, 2912, + 2912, 958, 2912, 2912, 1210, 1385, 1577, 2105, 150, 1390, + 1209, 2082, 1220, 2912, 2912, 2912, 1384, 2912, 1210, 2083, + 1209, 1221, 1216, 1217, 1218, 1216, 958, 1504, 1210, 1385, + 2090, 1577, 2105, 1390, 2912, 2912, 2912, 1220, 1219, 1216, + 1217, 1218, 1216, 2083, 2109, 1221, 1396, 1397, 1397, 1398, + 2091, 1504, 2092, 1220, 2090, 1219, 1305, 1306, 1306, 1305, + 1393, 2099, 1221, 2912, 2100, 1305, 1306, 1306, 1307, 2109, + + 1220, 2912, 1055, 2102, 2091, 958, 2092, 2106, 1220, 1221, + 1394, 2912, 2110, 1390, 1393, 2099, 1221, 1135, 2100, 1268, + 395, 1269, 1270, 940, 958, 1220, 1136, 2102, 2111, 2912, + 958, 2106, 1400, 1221, 1394, 1263, 2110, 1390, 1305, 1306, + 1306, 1305, 1135, 2912, 2112, 2115, 1169, 940, 1435, 958, + 1136, 2912, 2116, 2111, 1055, 2120, 1400, 1069, 1070, 1070, + 1071, 2912, 2912, 2912, 1402, 1403, 1403, 1404, 2112, 1135, + 2115, 1169, 2912, 1435, 2912, 940, 2116, 2912, 1136, 2120, + 1448, 599, 1449, 1448, 1457, 1457, 1457, 1457, 1072, 2912, + 1457, 1457, 1457, 1457, 1135, 1072, 1524, 1073, 1401, 940, + + 2128, 1405, 1136, 2129, 1073, 557, 2127, 1231, 1232, 1233, + 1231, 557, 2149, 1072, 1231, 1232, 1233, 1231, 2912, 2912, + 1072, 1073, 1401, 1234, 2128, 1405, 2912, 2129, 1073, 2912, + 1234, 2127, 1402, 1403, 1403, 1404, 1408, 2149, 1235, 2912, + 2912, 1231, 1232, 1233, 1231, 1235, 2912, 1236, 1231, 1232, + 1233, 1231, 2912, 1409, 1236, 2912, 2150, 1314, 2912, 2912, + 2912, 1408, 2164, 1235, 1234, 1413, 1414, 1414, 1415, 1489, + 1235, 1236, 1235, 1670, 862, 1670, 1670, 1409, 1236, 1235, + 2150, 1236, 1231, 1232, 1233, 1231, 1410, 2164, 1236, 1069, + 1070, 1070, 1071, 1489, 962, 2912, 2175, 1235, 1234, 2912, + + 2165, 2170, 1416, 2176, 1235, 1236, 1672, 865, 1673, 1674, + 1410, 2183, 1236, 1235, 2912, 1492, 1492, 1492, 1492, 962, + 1072, 2175, 1236, 1411, 2165, 2170, 1416, 2176, 2912, 1073, + 1419, 1420, 1421, 1421, 1422, 2912, 2183, 2912, 1235, 2184, + 2185, 1069, 1070, 1070, 1071, 1072, 1236, 1411, 1324, 1325, + 1325, 1324, 1482, 1073, 1419, 2912, 2186, 2912, 1374, 1374, + 1374, 1374, 1072, 2184, 1049, 2185, 2191, 2197, 1405, 1187, + 2199, 1073, 1072, 2912, 1423, 2912, 1482, 2912, 2912, 1149, + 2186, 1073, 2205, 2212, 2219, 940, 2223, 1072, 1150, 496, + 2191, 2197, 1405, 2912, 2199, 1073, 2912, 1072, 497, 1423, + + 1324, 1325, 1325, 1324, 1149, 1073, 2205, 2212, 2219, 940, + 2233, 2223, 1150, 2250, 496, 2912, 1049, 1268, 395, 1269, + 1270, 2244, 497, 1268, 395, 1269, 1270, 936, 937, 937, + 938, 1149, 2912, 1263, 2233, 2912, 2912, 940, 2250, 1263, + 1150, 2912, 2912, 393, 1169, 2244, 1169, 1454, 2912, 2251, + 1169, 2258, 1169, 2912, 2912, 2266, 1149, 1440, 590, 1441, + 1440, 940, 1436, 2912, 1150, 1427, 1427, 1427, 1428, 1169, + 1426, 1169, 1454, 1517, 2251, 1169, 2258, 1169, 1426, 1426, + 2266, 1426, 140, 1426, 2270, 150, 1436, 1426, 1426, 1426, + 162, 162, 162, 163, 2912, 1330, 2912, 2912, 2912, 1649, + + 1649, 1649, 1650, 1330, 1330, 2252, 1330, 140, 1330, 2270, + 150, 2257, 1330, 1330, 1330, 1334, 480, 1335, 1336, 150, + 1268, 395, 1269, 1270, 2259, 390, 391, 391, 392, 2252, + 2328, 1413, 1414, 1414, 1415, 2257, 1263, 1268, 395, 1269, + 1270, 393, 1258, 2912, 1259, 2912, 1348, 1169, 2259, 1169, + 2912, 2912, 2912, 1263, 2328, 1349, 1461, 1462, 1462, 1463, + 1453, 2272, 2912, 1459, 1169, 2276, 1169, 1258, 1416, 1259, + 1455, 1348, 1169, 2912, 1169, 1678, 870, 1678, 1678, 1349, + 1334, 480, 1335, 1336, 1453, 958, 2272, 1459, 2295, 1169, + 2276, 1169, 1416, 1390, 2297, 1455, 2298, 2306, 1364, 1365, + + 1365, 1364, 1364, 1365, 1365, 1364, 2912, 1258, 2912, 1259, + 958, 1348, 2912, 2295, 1055, 2912, 2309, 1390, 1055, 2297, + 1349, 2298, 2306, 1364, 1365, 1365, 1366, 2333, 2310, 1135, + 2320, 1169, 1258, 1135, 1259, 947, 1348, 1169, 1136, 947, + 1169, 2309, 1136, 2912, 1349, 1334, 480, 1335, 1336, 2912, + 2327, 2333, 958, 2310, 1135, 2320, 1169, 2329, 1135, 947, + 1465, 1169, 1136, 947, 1169, 2912, 1136, 1467, 1468, 1468, + 1469, 2334, 1258, 2332, 1259, 2327, 1348, 958, 1448, 599, + 1449, 1448, 2329, 2912, 1465, 1349, 2912, 1370, 1371, 1371, + 1370, 2397, 2344, 2912, 1524, 2334, 962, 1258, 2332, 1259, + + 2346, 1348, 2912, 1066, 1416, 1698, 1698, 1698, 1698, 1349, + 1341, 387, 1261, 1342, 2912, 2397, 1699, 2344, 1144, 2347, + 2912, 962, 2351, 2912, 947, 2346, 1263, 1145, 1416, 1373, + 1374, 1375, 1373, 1500, 1500, 1500, 1500, 1258, 2352, 1259, + 1376, 1343, 2912, 1144, 2347, 592, 2353, 2351, 947, 2403, + 1344, 1145, 1370, 1371, 1371, 1370, 1373, 1374, 1375, 1373, + 683, 2354, 1258, 2352, 1259, 2912, 1343, 1376, 1066, 684, + 1482, 2353, 592, 2403, 1344, 1341, 387, 1261, 1342, 1705, + 1705, 1705, 1705, 1144, 2358, 683, 2354, 683, 2912, 947, + 1704, 1263, 1145, 684, 1482, 2912, 684, 1305, 1306, 1306, + + 1307, 2912, 1258, 2392, 1259, 2395, 1343, 2396, 1144, 2358, + 2912, 2912, 683, 947, 2912, 1344, 1145, 2912, 2912, 2409, + 684, 2912, 1377, 1378, 1379, 1377, 958, 1258, 2392, 1259, + 2395, 1343, 2396, 1380, 1378, 1378, 1378, 1378, 601, 1344, + 1370, 1371, 1371, 1372, 2409, 1187, 1364, 1365, 1365, 1366, + 2912, 958, 2410, 690, 2422, 2912, 2431, 1377, 1378, 1379, + 1377, 2912, 691, 2436, 2438, 491, 2912, 2437, 1380, 962, + 2449, 1118, 2912, 601, 492, 958, 2410, 1471, 690, 2422, + 1119, 2431, 1420, 1421, 1421, 1422, 691, 2436, 690, 2438, + 491, 2437, 2912, 2912, 962, 2449, 1118, 691, 492, 2450, + + 958, 1471, 2912, 2912, 1119, 873, 874, 874, 875, 1205, + 1206, 1207, 1205, 690, 2451, 1440, 590, 1441, 1440, 1405, + 2453, 691, 2456, 2450, 2912, 1208, 1205, 1206, 1207, 1205, + 2912, 1442, 1205, 1206, 1207, 1205, 291, 2476, 2451, 2521, + 1209, 2912, 1208, 1405, 2453, 291, 2456, 1472, 1208, 1210, + 2457, 2912, 1205, 1206, 1207, 1205, 1668, 1209, 2912, 2912, + 2912, 291, 2476, 1209, 2521, 1209, 1210, 1473, 1208, 291, + 2477, 1472, 1210, 1210, 2457, 1475, 1387, 1388, 1388, 1389, + 1668, 1474, 1209, 1209, 1387, 1388, 1388, 1387, 1209, 1722, + 1210, 1473, 1210, 2551, 2477, 1722, 1210, 2912, 1722, 1475, + + 1055, 1387, 1388, 1388, 1387, 958, 1474, 2484, 1209, 1708, + 1709, 1709, 1710, 1478, 1722, 1135, 1210, 1055, 2551, 1722, + 1711, 1477, 1722, 2489, 1136, 2912, 1440, 590, 1441, 1440, + 958, 2484, 1135, 1216, 1217, 1218, 1216, 1478, 1477, 2515, + 1135, 1136, 1442, 2516, 2912, 1477, 2912, 2489, 1136, 1219, + 1216, 1217, 1218, 1216, 2522, 1587, 2912, 1135, 1467, 1468, + 1468, 1469, 1477, 2515, 1220, 1136, 1219, 2516, 1396, 1397, + 1397, 1396, 2523, 1221, 2912, 2912, 1484, 2912, 2522, 1483, + 1587, 1220, 2912, 2912, 1055, 1396, 1397, 1397, 1396, 1220, + 1221, 1396, 1397, 1397, 1398, 1537, 2523, 1221, 2447, 1135, + + 1484, 1055, 2524, 2552, 1483, 1482, 1220, 2448, 1136, 2912, + 162, 162, 162, 163, 1221, 2912, 1135, 2565, 2912, 1537, + 958, 2912, 1482, 2447, 1135, 1136, 2524, 2552, 1390, 1482, + 150, 2448, 1136, 1069, 1070, 1070, 1071, 1402, 1403, 1403, + 1402, 1135, 2565, 2566, 2575, 958, 1482, 2912, 1579, 1136, + 2912, 2573, 1390, 1049, 2574, 1402, 1403, 1403, 1402, 1069, + 1070, 1070, 1071, 2576, 1072, 2912, 1488, 2566, 1149, 2575, + 2606, 1049, 1579, 1073, 1477, 2573, 2607, 1150, 2574, 2912, + 1481, 1481, 1481, 1481, 1490, 2601, 1149, 2576, 2608, 1072, + 1072, 1488, 1477, 1149, 2606, 1150, 2609, 1073, 1477, 1073, + + 2607, 1150, 1231, 1232, 1233, 1231, 2912, 2912, 2620, 1490, + 2601, 1149, 2912, 2608, 2621, 1072, 1477, 1482, 1234, 1150, + 2609, 2633, 2912, 1073, 1492, 1492, 1492, 1492, 1231, 1232, + 1233, 1231, 2620, 1235, 1231, 1232, 1233, 1231, 2621, 2912, + 1493, 1482, 1236, 2634, 1234, 2633, 1231, 1232, 1233, 1231, + 1234, 2640, 2912, 2912, 1448, 599, 1449, 1448, 1235, 1235, + 2912, 1532, 1234, 1495, 1493, 1235, 1236, 2634, 1236, 1494, + 1450, 2641, 2642, 2643, 1236, 2652, 2640, 1235, 1413, 1414, + 1414, 1413, 2912, 1593, 1235, 1532, 1236, 2659, 1495, 1496, + 1235, 2681, 1236, 1494, 1066, 2641, 2642, 2643, 1236, 2652, + + 2912, 2660, 1235, 2912, 1413, 1414, 1414, 1413, 1593, 1144, + 1236, 2696, 2659, 1496, 2661, 1482, 2681, 2912, 1145, 2912, + 1066, 1069, 1070, 1070, 1071, 2660, 2707, 1420, 1421, 1421, + 1420, 2682, 2697, 2702, 1144, 1144, 2696, 2912, 2661, 1482, + 2912, 1482, 1145, 1049, 1145, 2912, 2912, 1420, 1421, 1421, + 1420, 2707, 1072, 2912, 1501, 2682, 2697, 2702, 1149, 2912, + 1144, 1073, 2708, 1049, 1482, 1482, 2721, 1150, 1145, 1069, + 1070, 1070, 1071, 1069, 1070, 1070, 1071, 1072, 1149, 1501, + 2912, 2728, 2732, 1149, 1482, 1073, 2708, 1150, 1482, 2912, + 2721, 1150, 1427, 1427, 1427, 1428, 1502, 2759, 1503, 2760, + + 1072, 2912, 2742, 1149, 1072, 2728, 2753, 2732, 1482, 1073, + 2771, 1150, 150, 1073, 162, 162, 162, 163, 2912, 2912, + 2912, 1502, 2759, 1503, 2760, 1072, 2742, 2912, 2912, 1072, + 2753, 1505, 2912, 1073, 150, 2771, 2761, 1073, 1648, 1648, + 1648, 1648, 1370, 1371, 1371, 1372, 2912, 2912, 2912, 1500, + 1500, 1500, 1500, 1507, 2912, 1505, 1427, 1427, 1427, 1428, + 2761, 1426, 2912, 2912, 2912, 1268, 395, 1269, 1270, 1426, + 1426, 962, 1426, 140, 1426, 2912, 150, 1507, 1426, 1426, + 1426, 1263, 1268, 395, 1269, 1270, 1477, 1481, 1481, 1481, + 1481, 2773, 1169, 2774, 1169, 2912, 962, 2782, 1263, 1440, + + 590, 1441, 1440, 1511, 1440, 590, 1441, 1440, 2785, 1169, + 1477, 1169, 2786, 2796, 2912, 1442, 2773, 1169, 2774, 1169, + 1442, 2803, 2782, 1512, 1482, 2804, 2912, 1511, 2912, 2805, + 1515, 2912, 2809, 2785, 1169, 1515, 1169, 2786, 2796, 1516, + 1448, 599, 1449, 1448, 1516, 2812, 2803, 1512, 1482, 2804, + 1448, 599, 1449, 1448, 2805, 1515, 1450, 2809, 2912, 2912, + 1515, 2813, 2826, 1516, 2912, 2814, 1450, 2820, 1516, 2827, + 2812, 1522, 1268, 395, 1269, 1270, 1268, 395, 1269, 1270, + 1523, 1522, 1461, 1462, 1462, 1461, 2813, 2826, 1263, 2814, + 1523, 2820, 1263, 2827, 2912, 2839, 1522, 2853, 1055, 1169, + + 2848, 1169, 2912, 1169, 1523, 1169, 1522, 2912, 2858, 1528, + 2912, 1527, 2912, 1135, 1523, 1268, 395, 1269, 1270, 1532, + 2839, 2853, 1136, 2912, 1169, 2848, 1169, 2912, 1169, 2912, + 1169, 1263, 2858, 2912, 1528, 1527, 2912, 2912, 1135, 2912, + 2912, 2912, 1169, 1532, 1169, 2912, 1136, 1461, 1462, 1462, + 1461, 1461, 1462, 1462, 1463, 2912, 2912, 2912, 1529, 1467, + 1468, 1468, 1467, 1055, 2912, 2912, 2912, 1169, 2912, 1169, + 1467, 1468, 1468, 1467, 2912, 1066, 2912, 2912, 1135, 2912, + 958, 2912, 1529, 2912, 1532, 2912, 1066, 1136, 1533, 2912, + 1144, 1629, 1630, 1630, 1631, 2912, 1532, 2912, 2912, 1145, + + 2912, 1144, 1632, 1135, 2912, 958, 2912, 1532, 1532, 2912, + 1145, 1136, 1533, 2912, 2912, 1144, 1205, 1206, 1207, 1205, + 1532, 2912, 2912, 1145, 2912, 2912, 1144, 1440, 590, 1441, + 1440, 1532, 1208, 2912, 1145, 1205, 1206, 1207, 1205, 1644, + 1645, 1645, 1646, 1442, 2912, 1540, 2912, 1209, 2912, 2912, + 1647, 1208, 1205, 1206, 1207, 1205, 1210, 1543, 1544, 1545, + 1543, 1492, 1492, 1492, 1492, 1667, 1209, 2912, 1208, 2912, + 1540, 2912, 1209, 1208, 2912, 1210, 2912, 2912, 1541, 2912, + 1210, 2912, 2912, 1209, 1216, 1217, 1218, 1216, 1209, 1667, + 2912, 1209, 1210, 1542, 1546, 2912, 2912, 1210, 1482, 1210, + + 1219, 2912, 1541, 2912, 1554, 1555, 1556, 1554, 1209, 1727, + 937, 1728, 1729, 1209, 2912, 1220, 1210, 1542, 1546, 2912, + 1219, 1210, 1482, 2912, 1221, 1553, 1069, 1070, 1070, 1071, + 1069, 1070, 1070, 1071, 2912, 1220, 1069, 1070, 1070, 1071, + 1220, 1557, 2912, 2912, 1221, 2912, 2912, 2912, 1221, 1553, + 2912, 2912, 2912, 1560, 2912, 1561, 2912, 1072, 2912, 2912, + 1220, 1072, 2912, 2912, 2912, 1557, 1073, 1072, 1221, 2912, + 1073, 2912, 1231, 1232, 1233, 1231, 1562, 2912, 1560, 2912, + 1561, 2912, 1072, 2912, 2912, 2912, 1072, 2912, 1234, 2912, + 1073, 2912, 1072, 2912, 1073, 1664, 857, 1665, 1666, 2912, + + 1562, 1564, 2912, 1235, 1231, 1232, 1233, 1231, 1231, 1232, + 1233, 1231, 1236, 2912, 1567, 1568, 1569, 1567, 2912, 2912, + 1234, 2912, 2912, 2912, 1234, 2912, 1564, 2912, 1235, 2912, + 1234, 1758, 1758, 1758, 1758, 1235, 1236, 2912, 2912, 1235, + 2912, 2912, 1699, 2912, 1236, 1235, 2912, 1565, 1236, 1566, + 2912, 1570, 2912, 2912, 1236, 1069, 1070, 1070, 1071, 2912, + 1235, 2912, 2912, 2912, 1235, 2912, 2912, 2912, 1236, 2912, + 1235, 1565, 1236, 1566, 2912, 1570, 2912, 2912, 1236, 2912, + 2912, 2912, 1574, 2912, 2912, 2912, 1072, 1324, 1325, 1325, + 1326, 1069, 1070, 1070, 1071, 1073, 1268, 395, 1269, 1270, + + 2912, 1448, 599, 1449, 1448, 2912, 2912, 1574, 2912, 2912, + 2912, 1072, 1263, 1268, 395, 1269, 1270, 1450, 1072, 1073, + 2912, 2912, 1072, 1169, 2912, 1583, 2912, 1073, 2912, 1263, + 2912, 1575, 2912, 1440, 590, 1441, 1440, 2912, 2912, 1675, + 1169, 2912, 1169, 1072, 2912, 2912, 2912, 1072, 1169, 1442, + 1583, 1073, 2912, 2912, 2912, 1575, 1584, 2912, 1448, 599, + 1449, 1448, 2912, 1675, 2912, 1169, 2912, 1169, 1698, 1698, + 1698, 1698, 1588, 2912, 1450, 1268, 395, 1269, 1270, 1699, + 1584, 2912, 1616, 1617, 1617, 1618, 2912, 1268, 395, 1269, + 1270, 1263, 2912, 1619, 2912, 2912, 1588, 1594, 1670, 862, + + 1670, 1670, 1169, 1263, 1169, 2912, 1268, 395, 1269, 1270, + 2912, 958, 2912, 1597, 1169, 2912, 1169, 2912, 1598, 2912, + 2912, 1594, 1263, 1705, 1705, 1705, 1705, 1169, 2912, 1169, + 2912, 2912, 2912, 1169, 1704, 1169, 958, 1597, 2912, 1169, + 2912, 1169, 2912, 1598, 2912, 1205, 1206, 1207, 1205, 1672, + 865, 1673, 1674, 1599, 1678, 870, 1678, 1678, 1169, 2912, + 1169, 1208, 1609, 1610, 1611, 1609, 2912, 2912, 1660, 853, + 1661, 1662, 1205, 1206, 1207, 1205, 1209, 1599, 1208, 2912, + 1420, 1421, 1421, 1422, 1263, 1210, 1608, 2912, 1208, 2912, + 2912, 962, 2912, 1209, 2912, 1169, 2912, 1169, 2912, 1546, + + 2912, 1209, 1210, 1209, 2912, 1612, 2912, 2912, 2912, 1210, + 1608, 2912, 1210, 1543, 1544, 1545, 1543, 1405, 1209, 963, + 1169, 2912, 1169, 1546, 2912, 2912, 1210, 2912, 1209, 1208, + 1612, 1544, 1544, 1544, 1544, 2912, 1210, 1727, 937, 1728, + 1729, 1405, 2912, 963, 1290, 1543, 1544, 1545, 1543, 2912, + 1546, 2912, 2912, 1291, 1387, 1388, 1388, 1389, 2912, 2912, + 2912, 1208, 1149, 1205, 1206, 1207, 1205, 2912, 1482, 1290, + 2912, 1150, 2912, 2912, 1546, 2912, 1290, 1291, 2912, 1208, + 2912, 2912, 1546, 958, 2912, 1291, 2912, 1149, 1613, 2912, + 2912, 1390, 1482, 2912, 1209, 1150, 1616, 1617, 1617, 1618, + + 2912, 1290, 2912, 1210, 2912, 2912, 1546, 1619, 958, 1291, + 2912, 2912, 2912, 1613, 2912, 1390, 2912, 2912, 2912, 1209, + 1216, 1217, 1218, 1216, 2912, 958, 2912, 1210, 2912, 2912, + 1554, 1555, 1556, 1554, 2912, 1139, 1219, 1555, 1555, 1555, + 1555, 2912, 1448, 599, 1449, 1448, 1219, 2912, 2912, 2912, + 958, 1220, 2912, 1622, 2130, 1371, 2131, 2132, 1450, 1139, + 1221, 1220, 2912, 1396, 1397, 1397, 1398, 1557, 1135, 2912, + 1221, 2912, 2912, 2912, 1482, 2912, 1220, 1136, 1622, 1554, + 1555, 1556, 1554, 1676, 1221, 2912, 1220, 2192, 857, 2193, + 2194, 1557, 958, 1135, 1221, 1219, 2912, 2912, 1482, 2912, + + 1390, 1136, 1216, 1217, 1218, 1216, 2912, 1676, 2912, 2912, + 1220, 2912, 1649, 1649, 1649, 1649, 1557, 958, 1219, 1221, + 1624, 1625, 1625, 1626, 1390, 2912, 2912, 1623, 2912, 2912, + 2912, 1627, 150, 1220, 2912, 1220, 1402, 1403, 1403, 1404, + 1557, 2912, 1221, 1221, 2912, 1500, 1500, 1500, 1500, 958, + 2912, 2912, 1623, 1069, 1070, 1070, 1071, 2912, 1220, 1139, + 2912, 1640, 1641, 1641, 1642, 2912, 1221, 1072, 1629, 1630, + 1630, 1631, 1632, 1405, 958, 2912, 1073, 2912, 2912, 1632, + 2912, 2912, 1482, 1139, 1072, 1231, 1232, 1233, 1231, 2912, + 2912, 2912, 1072, 1628, 2912, 2912, 2912, 1405, 962, 1072, + + 1073, 1234, 1635, 1636, 1637, 1635, 1482, 1152, 1073, 1072, + 2912, 2912, 1231, 1232, 1233, 1231, 1235, 1628, 1234, 2912, + 2912, 2912, 962, 2912, 1072, 1236, 1634, 2912, 1234, 2912, + 2912, 1152, 1073, 1235, 2912, 1624, 1625, 1625, 1626, 1570, + 2912, 1235, 1236, 1235, 2912, 1638, 1627, 2912, 2912, 1236, + 1634, 2912, 1236, 1567, 1568, 1569, 1567, 2912, 1235, 1652, + 162, 1652, 1652, 1570, 958, 2912, 1236, 2912, 1235, 1234, + 1638, 1568, 1568, 1568, 1568, 2912, 1236, 2912, 2912, 1655, + 1708, 1709, 1709, 1710, 1312, 1567, 1568, 1569, 1567, 958, + 1570, 1711, 2912, 1313, 1413, 1414, 1414, 1415, 2912, 2912, + + 2912, 1234, 1144, 1231, 1232, 1233, 1231, 2912, 1482, 1312, + 2912, 1145, 2912, 2912, 1570, 2912, 1312, 1313, 2912, 1234, + 2912, 2912, 1570, 962, 2912, 1313, 2912, 1144, 1639, 2912, + 2912, 1416, 1482, 2912, 1235, 1145, 1640, 1641, 1641, 1642, + 2912, 1312, 2912, 1236, 2912, 2912, 1570, 1632, 962, 1313, + 2912, 2912, 2912, 1639, 2912, 1416, 2912, 2912, 2912, 1235, + 2912, 1649, 1649, 1649, 1650, 962, 1716, 1236, 2912, 2912, + 2912, 1786, 387, 1787, 1788, 1148, 2912, 2912, 140, 2912, + 140, 150, 2912, 1670, 862, 1670, 1670, 1789, 2912, 2912, + 962, 2198, 862, 2198, 2198, 2200, 865, 2201, 2202, 1148, + + 1651, 1652, 162, 1652, 1653, 1651, 1651, 1651, 1651, 1651, + 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 2912, 1651, + 1738, 1655, 1651, 1651, 1651, 1651, 1268, 395, 1269, 1270, + 1268, 395, 1269, 1270, 2912, 1268, 395, 1269, 1270, 2912, + 2912, 2912, 1263, 2912, 1738, 2912, 1263, 2912, 2912, 1651, + 2912, 1263, 2912, 1169, 2912, 1169, 2912, 1169, 2912, 1679, + 2912, 2912, 1169, 2912, 1169, 2912, 2912, 1659, 2912, 1681, + 874, 1682, 1683, 1651, 1651, 2912, 2912, 2912, 1169, 1680, + 1169, 2912, 1169, 2912, 1679, 1263, 2912, 1169, 2912, 1169, + 2912, 1659, 2206, 870, 2206, 2206, 1169, 2912, 1169, 1461, + + 1462, 1462, 1463, 1680, 1687, 1688, 1688, 1689, 1467, 1468, + 1468, 1469, 2912, 2912, 2912, 1627, 1205, 1206, 1207, 1205, + 2912, 1169, 2912, 1169, 1758, 1758, 1758, 1758, 958, 2912, + 2912, 2912, 1208, 958, 2912, 1699, 1390, 962, 2912, 1691, + 1692, 1692, 1693, 1139, 2912, 1416, 2912, 1209, 2912, 1694, + 1647, 2912, 2912, 958, 2912, 2912, 1210, 2912, 958, 2912, + 1390, 2912, 962, 1609, 1610, 1611, 1609, 1139, 962, 1416, + 2912, 2912, 1209, 2912, 1694, 2912, 2912, 2912, 1148, 1208, + 1210, 1610, 1610, 1610, 1610, 1609, 1610, 1611, 1609, 2260, + 937, 2261, 2262, 962, 1290, 2912, 1678, 870, 1678, 1678, + + 1695, 1208, 1148, 1291, 1205, 1206, 1207, 1205, 1727, 937, + 1728, 1729, 1149, 2912, 2912, 2912, 1290, 2912, 1477, 1290, + 1208, 1150, 1695, 2912, 1695, 1291, 2912, 1291, 2912, 2912, + 2912, 1696, 2912, 1731, 2912, 1209, 2912, 1149, 2912, 2912, + 2912, 1290, 1477, 2912, 1210, 1150, 1695, 2912, 2912, 1291, + 1205, 1206, 1207, 1205, 2912, 2912, 1696, 1731, 2912, 2912, + 1209, 2912, 1700, 1701, 1701, 1702, 1208, 2912, 1210, 2130, + 1371, 2131, 2132, 1703, 2912, 2912, 2912, 1616, 1617, 1617, + 1616, 1209, 2912, 2912, 1616, 1617, 1617, 1616, 1704, 2912, + 1697, 958, 2912, 1055, 2912, 1704, 1216, 1217, 1218, 1216, + + 1055, 1139, 1971, 1186, 1971, 1971, 1209, 2912, 1135, 2912, + 2912, 2912, 1219, 1972, 1697, 1135, 958, 1136, 1216, 1217, + 1218, 1216, 2912, 2912, 1136, 1139, 2912, 1220, 1624, 1625, + 1625, 1624, 2912, 1135, 1219, 2912, 1707, 2912, 2912, 1187, + 1135, 1136, 2912, 2912, 1055, 1706, 2912, 2912, 1136, 1220, + 2912, 2912, 1220, 1815, 1033, 1816, 1815, 2912, 1221, 1135, + 1707, 2912, 1624, 1625, 1625, 1624, 2912, 2912, 1136, 1442, + 1706, 2912, 2912, 1187, 1220, 2912, 2912, 2912, 1055, 2912, + 2912, 2912, 1221, 2912, 1135, 1629, 1630, 1630, 1629, 2912, + 2912, 2912, 1136, 1135, 2912, 2912, 1704, 1629, 1630, 1630, + + 1629, 1049, 1136, 1691, 1692, 1692, 1693, 2912, 1704, 2171, + 1414, 2172, 2173, 1049, 1647, 2912, 1149, 2912, 1135, 1231, + 1232, 1233, 1231, 2912, 2912, 1150, 1136, 2912, 1149, 1635, + 1636, 1637, 1635, 2912, 2912, 1234, 2912, 1150, 2912, 2912, + 962, 1149, 2912, 2912, 2912, 1234, 2174, 2912, 2912, 1150, + 1235, 2912, 1712, 1149, 2912, 1636, 1636, 1636, 1636, 1236, + 1312, 1150, 2912, 2912, 962, 2912, 1713, 2912, 2912, 1313, + 2174, 1440, 590, 1441, 1440, 1235, 2912, 1712, 1635, 1636, + 1637, 1635, 2912, 1236, 2912, 1312, 1144, 1442, 2912, 2912, + 1713, 2912, 1532, 1313, 1234, 1145, 1231, 1232, 1233, 1231, + + 1735, 1231, 1232, 1233, 1231, 1822, 1041, 1823, 1822, 1312, + 2912, 1144, 1234, 2912, 2912, 1713, 1532, 1234, 1313, 1145, + 2912, 1450, 2912, 1714, 2912, 1735, 2912, 1235, 2192, 857, + 2193, 2194, 1235, 2912, 1312, 2912, 1236, 2912, 2912, 1713, + 2912, 1715, 1313, 1640, 1641, 1641, 1640, 2912, 1714, 2912, + 2912, 2912, 1235, 2912, 1704, 2912, 2912, 1235, 2912, 1066, + 1236, 1640, 1641, 1641, 1640, 1715, 1660, 853, 1661, 1660, + 2912, 2912, 1704, 2912, 1144, 2912, 2912, 1066, 1644, 1645, + 1645, 1644, 1263, 1145, 1644, 1645, 1645, 1644, 2912, 1187, + 2912, 2912, 1144, 2912, 1049, 1187, 2912, 1351, 2912, 1144, + + 1049, 1145, 2912, 1731, 2912, 2912, 1352, 1145, 2912, 1149, + 1946, 590, 1947, 1946, 2912, 1149, 2912, 1144, 1150, 2912, + 2912, 2912, 1351, 2912, 1150, 1145, 1948, 1731, 2912, 2912, + 1352, 2912, 2912, 2912, 1149, 2198, 862, 2198, 2198, 2912, + 1149, 2912, 1150, 2912, 1664, 857, 1665, 1666, 1150, 1651, + 1652, 162, 1652, 1653, 1651, 1651, 1651, 1651, 1651, 1651, + 1651, 1651, 1651, 1651, 1651, 1651, 1651, 2912, 1651, 2912, + 1655, 1651, 1651, 1651, 1651, 1348, 1954, 599, 1955, 1954, + 2912, 1734, 2912, 2912, 1349, 1977, 1193, 1978, 1979, 2912, + 2912, 2912, 1956, 2912, 2912, 2912, 1976, 2912, 1651, 2912, + + 1348, 1982, 1197, 1982, 1982, 1734, 2912, 2912, 1349, 2912, + 2912, 2912, 1972, 2200, 865, 2201, 2202, 2206, 870, 2206, + 2206, 2912, 1651, 1651, 1651, 1718, 288, 1719, 1720, 1651, + 1651, 1651, 1651, 1651, 1651, 1651, 1721, 1721, 1651, 1651, + 1651, 1651, 1722, 1651, 1722, 1651, 1651, 1651, 1651, 1651, + 1722, 1722, 1723, 1722, 1724, 1722, 1722, 1722, 1722, 1722, + 1722, 1722, 1722, 1722, 1722, 1722, 1722, 1722, 1722, 1722, + 1722, 1722, 1722, 1651, 1722, 1722, 1722, 1723, 1722, 1724, + 1722, 1722, 1722, 1722, 1722, 1722, 1722, 1722, 1722, 1722, + 1722, 1722, 1722, 1722, 1722, 1722, 1722, 1651, 1651, 1268, + + 395, 1269, 1270, 1660, 853, 1661, 1660, 1983, 1199, 1984, + 1985, 1440, 590, 1441, 1440, 1263, 2912, 2912, 1976, 1263, + 2912, 1664, 857, 1665, 1664, 2912, 1169, 1442, 1169, 2912, + 2912, 2912, 1730, 2912, 1351, 2912, 2912, 1267, 2912, 2912, + 1731, 2912, 2912, 1352, 2912, 2912, 2912, 1448, 599, 1449, + 1448, 1169, 1346, 1169, 1736, 2912, 2912, 1730, 1731, 1351, + 2912, 1347, 2912, 1450, 1731, 2912, 2912, 1352, 1660, 853, + 1661, 1662, 1664, 857, 1665, 1664, 1741, 1346, 1736, 2912, + 2912, 2912, 1731, 2912, 1263, 1347, 2912, 2912, 1267, 2912, + 1672, 865, 1673, 1672, 2912, 1169, 2912, 1169, 2912, 1339, + + 2912, 1741, 2912, 1346, 2912, 1732, 1267, 2912, 1340, 1731, + 2912, 2912, 1347, 2912, 2912, 1448, 599, 1449, 1448, 2912, + 1169, 1346, 1169, 2912, 1339, 2912, 2912, 1738, 1346, 1732, + 1347, 1450, 1340, 1731, 2912, 2912, 1347, 1672, 865, 1673, + 1672, 1672, 865, 1673, 1674, 2912, 1346, 2260, 937, 2261, + 2262, 1738, 2912, 1267, 1347, 2912, 2912, 2912, 1742, 1687, + 1688, 1688, 1689, 1268, 395, 1269, 1270, 2912, 1346, 2912, + 1627, 2912, 1348, 2912, 1738, 2912, 2912, 1347, 1740, 1263, + 2912, 1349, 1742, 1268, 395, 1269, 1270, 2912, 958, 2912, + 1169, 2912, 1169, 1346, 2912, 2912, 2912, 1348, 1738, 1263, + + 2912, 1347, 1740, 2912, 1745, 1349, 1946, 590, 1947, 1946, + 1169, 2912, 1169, 958, 2912, 1169, 2912, 1169, 2912, 2912, + 2912, 1744, 1948, 1440, 590, 1441, 1440, 2912, 1745, 1700, + 1701, 1701, 1702, 2912, 2912, 1169, 2912, 1169, 2912, 1442, + 1703, 2662, 1371, 2663, 2664, 1744, 1096, 1746, 956, 1747, + 1748, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 958, 2912, + 1096, 1096, 1096, 1263, 1814, 1096, 2912, 1096, 1096, 1096, + 1096, 1096, 2912, 2912, 1448, 599, 1449, 1448, 1750, 2260, + 937, 2261, 2262, 958, 2912, 2912, 2912, 1751, 1814, 2912, + 1450, 1971, 1186, 1971, 1971, 1096, 1946, 590, 1947, 1946, + + 2912, 2912, 1972, 1750, 2912, 1759, 1760, 1760, 1761, 2912, + 2912, 1751, 2037, 2912, 2912, 1821, 1703, 2912, 2912, 1096, + 1096, 1096, 1746, 956, 1747, 1748, 1096, 1096, 1096, 1096, + 1096, 1096, 1096, 2912, 958, 1096, 1096, 1096, 1263, 1821, + 1096, 2912, 1096, 1096, 1096, 1096, 1096, 1954, 599, 1955, + 1954, 2912, 2912, 1750, 2912, 1954, 599, 1955, 1954, 958, + 2912, 2912, 1751, 1956, 1815, 1033, 1816, 1815, 2912, 2912, + 1096, 2044, 1982, 1197, 1982, 1982, 2912, 2912, 1750, 2912, + 1442, 2912, 2912, 1972, 2912, 2912, 1751, 2662, 1371, 2663, + 2664, 2912, 2912, 2912, 1096, 1096, 1096, 1746, 956, 1747, + + 1752, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1753, 1753, + 1096, 1096, 1096, 1263, 1754, 1096, 1754, 1096, 1096, 1096, + 1096, 1096, 1754, 1754, 1754, 1754, 1754, 1754, 1755, 1754, + 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1756, 1754, 1754, + 1754, 1754, 1754, 1754, 1754, 1096, 1754, 1754, 1754, 1754, + 1754, 1754, 1754, 1755, 1754, 1754, 1754, 1754, 1754, 1754, + 1754, 1756, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1096, + 1096, 1759, 1760, 1760, 1761, 1687, 1688, 1688, 1687, 2912, + 2912, 2912, 1703, 2912, 2912, 2912, 1187, 1687, 1688, 1688, + 1687, 1055, 2912, 1762, 1763, 1763, 1764, 2912, 1187, 2912, + + 958, 2912, 2912, 1055, 1711, 2912, 1135, 2912, 2912, 2912, + 1139, 2912, 2912, 2912, 2912, 1136, 2912, 2912, 1135, 2912, + 2912, 2912, 962, 2912, 2912, 958, 2912, 1136, 2912, 2912, + 2912, 1135, 1148, 2912, 1139, 2497, 1698, 2497, 2497, 1136, + 2912, 2912, 2912, 1135, 2912, 2912, 2498, 962, 2912, 2912, + 2912, 1136, 1691, 1692, 1692, 1691, 1148, 2912, 1691, 1692, + 1692, 1691, 2912, 1187, 1440, 590, 1441, 1440, 1066, 1187, + 1205, 1206, 1207, 1205, 1066, 1205, 1206, 1207, 1205, 2912, + 1442, 2912, 2912, 1144, 2912, 2912, 1208, 2912, 2912, 1144, + 2912, 1208, 1145, 2912, 2912, 1766, 2912, 2912, 1145, 2912, + + 2912, 1209, 1765, 2912, 2059, 2912, 1209, 2912, 1144, 2912, + 1210, 2912, 2912, 2912, 1144, 1210, 1145, 2912, 2912, 2912, + 1766, 2912, 1145, 2912, 2912, 2912, 1209, 1765, 2059, 2912, + 2912, 1209, 2912, 2912, 1210, 1543, 1544, 1545, 1543, 1210, + 2912, 2912, 1700, 1701, 1701, 1700, 1822, 1041, 1823, 1822, + 2912, 1208, 2912, 1699, 1700, 1701, 1701, 1700, 1055, 2912, + 2912, 2912, 1450, 2912, 2912, 1699, 1209, 2912, 2912, 2912, + 1055, 2912, 1546, 1135, 2912, 1210, 2912, 1554, 1555, 1556, + 1554, 2912, 1136, 2912, 2912, 1135, 1762, 1763, 1763, 1764, + 2912, 1209, 2912, 1219, 1136, 2912, 1546, 1711, 1135, 1210, + + 1767, 1768, 1769, 1767, 2912, 2912, 1136, 2912, 1220, 2912, + 1135, 1770, 2912, 2912, 1557, 2912, 1208, 1221, 1136, 1708, + 1709, 1709, 1708, 962, 2912, 2504, 1705, 2504, 2504, 2912, + 1699, 1209, 2912, 1220, 2912, 1049, 2503, 2912, 1557, 1294, + 1210, 1221, 1708, 1709, 1709, 1708, 2912, 962, 2912, 2912, + 1149, 2912, 2912, 1699, 2912, 2912, 1209, 2912, 1049, 1150, + 2912, 2912, 2912, 1294, 1210, 1771, 1772, 1773, 1771, 2912, + 2912, 2912, 2912, 1149, 2912, 1149, 1774, 1231, 1232, 1233, + 1231, 1219, 1150, 1150, 1231, 1232, 1233, 1231, 1973, 1189, + 1974, 1975, 2912, 1234, 2912, 2912, 1220, 2912, 1149, 1976, + + 1234, 2912, 1776, 2912, 1301, 1221, 1150, 2912, 1235, 2912, + 2912, 1775, 2912, 2912, 2912, 1235, 2912, 1236, 2912, 2912, + 2912, 1220, 2912, 2912, 1236, 1169, 2912, 1776, 1301, 1221, + 2912, 2912, 2912, 1235, 2912, 2912, 1775, 2912, 2912, 2912, + 1235, 1236, 1567, 1568, 1569, 1567, 2912, 2912, 1236, 1169, + 2912, 2912, 2912, 2912, 1440, 590, 1441, 1440, 1234, 1794, + 395, 1795, 1796, 2912, 2912, 1794, 395, 1795, 1796, 2912, + 1442, 2912, 2912, 1235, 2912, 1789, 2912, 2912, 2912, 1570, + 2912, 1789, 1236, 2912, 2912, 2912, 1722, 1899, 1722, 2912, + 2912, 2912, 1722, 2912, 1722, 2912, 2912, 2912, 1235, 1946, + + 590, 1947, 1946, 1570, 1797, 2912, 1236, 1777, 1778, 1779, + 1777, 1722, 1899, 1722, 2912, 2037, 2912, 1722, 1780, 1722, + 2912, 2912, 2912, 1234, 1268, 395, 1269, 1270, 1797, 1794, + 395, 1795, 1796, 2912, 1440, 590, 1441, 1440, 1235, 2912, + 1263, 1440, 590, 1441, 1440, 1789, 1316, 1236, 2912, 2912, + 1442, 1809, 2912, 1169, 2912, 2912, 1722, 1442, 1722, 1981, + 2912, 2912, 2912, 1235, 2912, 2912, 2912, 1798, 1980, 2912, + 1316, 1236, 162, 162, 162, 163, 1809, 1781, 1169, 2912, + 2912, 1722, 2912, 1722, 1981, 1781, 1781, 2912, 1781, 140, + 1781, 1798, 150, 1980, 1781, 1781, 1781, 1651, 1719, 288, + + 1719, 1783, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 2912, + 2912, 1651, 1651, 1651, 1651, 2912, 1651, 2912, 1651, 1651, + 1651, 1651, 1651, 2912, 2912, 1784, 2912, 1785, 1801, 1019, + 1802, 1803, 1448, 599, 1449, 1448, 2912, 1954, 599, 1955, + 1954, 2912, 2912, 2912, 1267, 2912, 1651, 2912, 1450, 2912, + 1784, 2912, 1785, 2044, 2912, 2525, 1186, 2525, 2525, 1804, + 2912, 2912, 2912, 2912, 2912, 1903, 2526, 2912, 1805, 2912, + 1651, 1651, 1651, 1790, 391, 1791, 1792, 1651, 1651, 1651, + 1651, 1651, 1651, 1651, 1804, 2912, 1651, 1651, 1651, 1793, + 1903, 1651, 1805, 1651, 1651, 1651, 1651, 1651, 1801, 1019, + + 1802, 1803, 2912, 1268, 395, 1269, 1270, 1860, 480, 1861, + 1862, 2912, 2912, 2912, 1267, 2220, 1468, 2221, 2222, 1263, + 2912, 1651, 2912, 1448, 599, 1449, 1448, 2912, 1811, 1804, + 1169, 2912, 1169, 2912, 1784, 2912, 1785, 2912, 1805, 1450, + 2133, 1374, 2134, 2133, 2912, 1651, 1651, 2912, 2912, 2912, + 1986, 2135, 2174, 1811, 1804, 1169, 1442, 1169, 2912, 1784, + 2912, 1785, 1805, 1096, 1801, 1019, 1802, 1806, 1096, 1096, + 1096, 1096, 1096, 1096, 1096, 1986, 2174, 1096, 1096, 1096, + 1267, 2912, 1096, 2912, 1096, 1096, 1096, 1096, 1096, 1268, + 395, 1269, 1270, 2912, 2912, 1807, 2912, 1268, 395, 1269, + + 1270, 2912, 2912, 2912, 1808, 1263, 2912, 1440, 590, 1441, + 1440, 2912, 1096, 1263, 2912, 2912, 1169, 2912, 1169, 2912, + 1807, 2912, 1826, 1442, 1169, 2912, 1169, 2912, 1808, 2912, + 2912, 2912, 1825, 2912, 2912, 2912, 1096, 1096, 2912, 2912, + 2912, 1169, 2912, 1169, 2912, 2912, 2912, 1826, 2912, 1169, + 2912, 1169, 1827, 1047, 1828, 1829, 1825, 1833, 1053, 1834, + 1835, 2912, 2912, 2912, 1833, 1053, 1834, 1835, 1830, 1827, + 1047, 1828, 1841, 1836, 2912, 1833, 1053, 1834, 1835, 2912, + 1836, 2912, 2912, 1831, 2912, 1830, 2912, 2912, 1837, 2912, + 2912, 1836, 1832, 1839, 2912, 1837, 2912, 1838, 2912, 2912, + + 1842, 2912, 2912, 2912, 1838, 2912, 1837, 2912, 1831, 1843, + 2912, 2912, 2912, 1837, 1840, 1838, 1832, 2912, 1839, 2912, + 1837, 1838, 2912, 2912, 2912, 1842, 2912, 2912, 1838, 2912, + 2912, 1837, 2912, 1843, 2234, 1481, 2234, 2234, 1840, 1838, + 1096, 1844, 1064, 1845, 1846, 1096, 1096, 1096, 1096, 1096, + 1096, 1096, 2912, 2912, 1096, 1096, 1096, 1847, 2912, 1096, + 2912, 1096, 1096, 1096, 1096, 1096, 2912, 1850, 1070, 1851, + 1852, 2235, 1848, 2245, 1492, 2245, 2245, 2912, 2912, 2912, + 2912, 1849, 2912, 1830, 2912, 1850, 1070, 1851, 1852, 1096, + 1850, 1070, 1851, 1852, 2912, 2235, 2912, 1848, 1853, 2912, + + 2912, 1830, 2912, 2912, 2912, 1849, 1830, 1854, 2912, 2912, + 2235, 2912, 2912, 1096, 1096, 2912, 1853, 2912, 2912, 1855, + 2912, 1853, 2912, 1853, 1856, 1854, 1759, 1760, 1760, 1759, + 1854, 1854, 2912, 2912, 2235, 2912, 2912, 1699, 2912, 2912, + 2912, 1853, 1055, 2912, 1855, 2912, 1853, 2912, 1856, 1854, + 2912, 2912, 2912, 2912, 1854, 2912, 2912, 1135, 1759, 1760, + 1760, 1759, 1762, 1763, 1763, 1762, 1136, 2912, 2912, 1699, + 2912, 2912, 2912, 1699, 1055, 2912, 2912, 2912, 1066, 2912, + 2912, 2912, 1135, 2912, 1762, 1763, 1763, 1762, 2912, 1135, + 1136, 2912, 2912, 1144, 2912, 1699, 2912, 2912, 1136, 2912, + + 1066, 2912, 1145, 2912, 1609, 1610, 1611, 1609, 2912, 1946, + 590, 1947, 1946, 2912, 1135, 1144, 2912, 2912, 1144, 2912, + 1208, 2912, 1136, 2912, 1145, 1948, 1145, 1205, 1206, 1207, + 1205, 1767, 1768, 1769, 1767, 1209, 2912, 2912, 2107, 2912, + 1144, 1546, 1770, 1208, 1210, 2912, 2912, 1208, 1145, 2912, + 1768, 1768, 1768, 1768, 1205, 1206, 1207, 1205, 1209, 2912, + 1209, 1704, 1290, 2107, 2912, 1546, 2912, 1858, 1210, 2912, + 1208, 1291, 2912, 1767, 1768, 1769, 1767, 1771, 1772, 1773, + 1771, 1149, 2912, 1209, 1770, 1209, 2912, 1290, 1774, 1208, + 1150, 1858, 2912, 1219, 1210, 1291, 1772, 1772, 1772, 1772, + + 1771, 1772, 1773, 1771, 1290, 2912, 1149, 1704, 1220, 2912, + 1209, 1774, 2912, 1291, 1150, 2912, 1219, 1221, 1210, 1216, + 1217, 1218, 1216, 1448, 599, 1449, 1448, 1135, 2912, 1290, + 2912, 1220, 2912, 1220, 2912, 1219, 1136, 1291, 2912, 1450, + 1221, 1221, 1635, 1636, 1637, 1635, 1231, 1232, 1233, 1231, + 1220, 2912, 1135, 2912, 2912, 2912, 1220, 2912, 1234, 1221, + 1136, 2912, 1234, 2060, 1221, 1777, 1778, 1779, 1777, 1778, + 1778, 1778, 1778, 1235, 2912, 1220, 1780, 1235, 2912, 1570, + 1704, 1234, 1236, 1221, 2912, 2912, 1859, 2060, 1777, 1778, + 1779, 1777, 1231, 1232, 1233, 1231, 1312, 2912, 1235, 1780, + + 1144, 2912, 1235, 1570, 1234, 1313, 1236, 2912, 1234, 1145, + 1859, 2912, 2912, 2912, 1954, 599, 1955, 1954, 2912, 1312, + 2912, 1312, 2912, 1235, 2912, 1144, 2912, 2912, 1313, 1313, + 1956, 2912, 1236, 1145, 1681, 874, 1682, 1683, 1786, 387, + 1787, 1788, 2912, 2113, 1312, 2912, 2912, 2912, 1235, 2912, + 1263, 2912, 1313, 2912, 1789, 2912, 1236, 162, 162, 162, + 163, 1169, 1781, 1169, 2912, 2912, 2912, 2912, 2113, 1865, + 1781, 1781, 2912, 1781, 140, 1781, 2912, 150, 1866, 1781, + 1781, 1781, 1786, 387, 1787, 1788, 1169, 2912, 1169, 1884, + 1111, 1885, 1891, 2912, 1865, 2912, 2912, 2912, 1789, 2912, + + 2912, 2912, 1866, 1867, 387, 1787, 1868, 2912, 1790, 391, + 1791, 1790, 2912, 1865, 2912, 1448, 599, 1449, 1448, 1789, + 1892, 2912, 1866, 2912, 1793, 1790, 391, 1791, 1790, 1893, + 1784, 1450, 1785, 2912, 1869, 2912, 2912, 2912, 1865, 1872, + 2912, 1793, 2912, 1870, 2912, 1892, 1866, 2912, 1873, 2912, + 2912, 2912, 2912, 1893, 2912, 1784, 1872, 1785, 2912, 1869, + 1794, 395, 1795, 1794, 1872, 1873, 2912, 1870, 1794, 395, + 1795, 1796, 1873, 2912, 2912, 2912, 1789, 1794, 395, 1795, + 1794, 1872, 2912, 2912, 1789, 2136, 1378, 2137, 2136, 1873, + 2912, 1877, 2912, 1789, 2912, 1722, 2138, 1722, 2912, 2912, + + 1878, 1450, 2912, 1268, 395, 1269, 1270, 2912, 1877, 2912, + 2912, 1881, 2428, 1641, 2429, 2430, 1877, 1878, 2912, 1263, + 1722, 2912, 1722, 2421, 1878, 1268, 395, 1269, 1270, 2912, + 1169, 2912, 1169, 1877, 2912, 1881, 1801, 1019, 1802, 1803, + 2912, 1878, 1794, 395, 1795, 1796, 1905, 1801, 1019, 1802, + 1803, 1922, 1267, 2912, 2912, 1169, 1169, 1169, 1789, 2912, + 2912, 2912, 1169, 1267, 2912, 1897, 2912, 1804, 2912, 1722, + 1905, 1722, 2912, 1865, 2912, 1922, 1805, 2912, 1804, 2912, + 2912, 1169, 1866, 2912, 2912, 2912, 1169, 1805, 2912, 1897, + 2912, 2912, 1804, 2912, 1722, 2912, 1722, 2912, 1865, 2912, + + 1805, 2912, 2912, 1804, 2912, 2912, 1866, 1794, 395, 1795, + 1796, 1805, 2912, 2912, 2912, 1884, 1111, 1885, 1886, 1946, + 590, 1947, 1946, 1789, 2912, 2912, 2912, 1833, 1053, 1834, + 1835, 1847, 2912, 2912, 1722, 1948, 1722, 1946, 590, 1947, + 1946, 2912, 2912, 1836, 1879, 1880, 1887, 1833, 1053, 1834, + 1835, 2912, 2912, 1948, 2912, 1888, 1889, 2912, 1837, 1722, + 2196, 1722, 2912, 1836, 2912, 2912, 2912, 1838, 1879, 1880, + 2912, 1887, 1954, 599, 1955, 1954, 2108, 2912, 1837, 1888, + 2912, 1889, 2912, 1837, 2196, 2912, 1890, 1838, 1956, 2912, + 2912, 1838, 1815, 1033, 1816, 1815, 1815, 1033, 1816, 1815, + + 2108, 2912, 2912, 1837, 2912, 2912, 2912, 2912, 1442, 2912, + 1890, 1838, 1442, 2204, 1822, 1041, 1823, 1822, 1822, 1041, + 1823, 1822, 2912, 1515, 2912, 2912, 2912, 1515, 2912, 1900, + 1450, 2912, 1516, 1900, 1450, 2912, 1516, 2204, 2912, 2253, + 1500, 2253, 2253, 2912, 2912, 1522, 2912, 2912, 1515, 1522, + 2912, 1904, 1515, 1900, 1523, 1904, 1516, 1900, 1523, 2912, + 1516, 1827, 1047, 1828, 1829, 1827, 1047, 1828, 1829, 2912, + 1522, 2912, 2912, 2912, 1522, 1904, 2235, 1830, 1523, 1904, + 2912, 1830, 1523, 1827, 1047, 1828, 1829, 1833, 1053, 1834, + 1835, 2912, 1831, 2912, 2912, 2912, 1831, 2912, 2912, 1830, + + 2235, 1832, 2912, 1836, 2912, 1832, 1833, 1053, 1834, 1835, + 1954, 599, 1955, 1954, 1831, 2912, 1907, 1831, 1837, 2912, + 2912, 1831, 1836, 1832, 2912, 1832, 1956, 1838, 2912, 1832, + 2912, 2912, 1833, 1053, 1834, 1833, 2912, 1837, 2912, 1831, + 2912, 1907, 2912, 1837, 2912, 1908, 1838, 1832, 1836, 2114, + 2912, 1838, 1833, 1053, 1834, 1833, 2912, 2912, 1833, 1053, + 1834, 1835, 1837, 1909, 1833, 1053, 1834, 1835, 1836, 1908, + 1838, 2912, 1910, 2114, 1836, 2349, 1033, 2350, 2349, 2912, + 1836, 2912, 2912, 1909, 1833, 1053, 1834, 1835, 1909, 1837, + 2912, 1948, 1910, 1912, 2912, 1837, 1910, 2912, 1838, 2912, + + 1836, 2912, 2912, 2912, 1838, 2912, 2912, 2912, 1909, 2912, + 1833, 1053, 1834, 1835, 1837, 1837, 1910, 2912, 1912, 2912, + 1837, 2912, 1838, 1913, 1838, 2912, 1836, 2912, 1838, 1833, + 1053, 1834, 1835, 1827, 1047, 1828, 1841, 2912, 2912, 2912, + 1837, 1837, 2912, 2912, 2912, 1836, 2912, 1913, 1838, 1830, + 1838, 1915, 1850, 1070, 1851, 1852, 1850, 1070, 1851, 1852, + 1837, 2912, 2912, 2912, 1842, 2912, 1837, 1914, 1830, 1838, + 2912, 2912, 1830, 1843, 1838, 1915, 2912, 2531, 1193, 2532, + 2533, 1916, 2912, 1853, 2912, 1837, 2912, 1853, 2530, 1842, + 2912, 1914, 1854, 1838, 2912, 1917, 1854, 1843, 1844, 1064, + + 1845, 1844, 1844, 1064, 1845, 1844, 1916, 2912, 1853, 2912, + 2912, 2912, 1853, 2912, 1847, 2912, 1854, 2912, 1847, 1917, + 1854, 1850, 1070, 1851, 1850, 1850, 1070, 1851, 1850, 1918, + 2912, 2912, 2912, 1918, 2912, 2912, 2912, 1830, 1919, 2912, + 2912, 1830, 1919, 1850, 1070, 1851, 1852, 1850, 1070, 1851, + 1852, 2912, 1923, 2912, 1918, 2912, 1923, 2912, 1918, 1830, + 2912, 1924, 1919, 1830, 2912, 1924, 1919, 2198, 862, 2198, + 2198, 2912, 2912, 2912, 1842, 2912, 1925, 1923, 1853, 2912, + 2912, 1923, 2912, 1843, 2912, 1924, 2912, 1854, 2912, 1924, + 1850, 1070, 1851, 1852, 1850, 1070, 1851, 1852, 2912, 1842, + + 2912, 1925, 2912, 1853, 2271, 2912, 1830, 1843, 2912, 2912, + 1830, 1854, 2912, 2912, 2912, 1794, 395, 1795, 1796, 2912, + 2912, 1853, 2912, 2912, 2912, 1853, 2912, 2912, 2271, 1926, + 1854, 1789, 1927, 2912, 1854, 1850, 1070, 1851, 1852, 2912, + 2912, 2912, 1722, 2912, 1941, 2912, 1853, 2912, 2912, 2912, + 1853, 1830, 2912, 1926, 1854, 2912, 1927, 2912, 1854, 2912, + 2912, 1973, 1189, 1974, 1975, 2912, 1853, 1722, 2912, 1941, + 2912, 2912, 1976, 2912, 2912, 1854, 1928, 1263, 2912, 1794, + 395, 1795, 1796, 1884, 1111, 1885, 1891, 2912, 1169, 2912, + 1169, 1853, 2912, 2912, 2912, 1789, 2912, 2912, 2912, 1854, + + 1928, 1930, 1931, 1932, 1930, 2912, 1722, 2912, 1722, 2912, + 2912, 2912, 1933, 1169, 1892, 1169, 2912, 1208, 1942, 1794, + 395, 1795, 1796, 1893, 2912, 2912, 2912, 1794, 395, 1795, + 1796, 1722, 1209, 1722, 2912, 1789, 2912, 2912, 2912, 1892, + 1294, 1210, 1942, 1789, 2912, 2912, 1722, 1893, 1722, 2206, + 870, 2206, 2206, 2912, 1722, 2912, 2103, 1209, 2912, 1959, + 1794, 395, 1795, 1796, 1294, 1210, 1934, 1935, 1936, 1934, + 2912, 1722, 2912, 1722, 2912, 2912, 1789, 1937, 2912, 1722, + 2912, 2103, 1234, 1959, 2912, 2912, 2264, 1722, 2912, 1722, + 1960, 1794, 395, 1795, 1796, 2912, 2912, 1235, 2912, 2912, + + 2912, 1946, 590, 1947, 1946, 1316, 1236, 1789, 2912, 2912, + 2264, 2912, 1722, 2912, 1722, 1960, 2912, 1948, 1722, 2912, + 1722, 2912, 1235, 2912, 1961, 1884, 1111, 1885, 1886, 1316, + 1236, 1860, 480, 1861, 1862, 2912, 1884, 1111, 1885, 1886, + 2912, 1847, 2912, 1722, 2269, 1722, 2912, 2912, 2912, 1961, + 2912, 2912, 1847, 2912, 2912, 2912, 1887, 2912, 1784, 2912, + 1785, 2912, 1874, 2912, 2912, 1888, 2912, 1887, 2269, 2912, + 2912, 1875, 1946, 590, 1947, 1946, 1888, 1884, 1111, 1885, + 1886, 1887, 2912, 1784, 2912, 1785, 2912, 1874, 1948, 1888, + 2912, 2912, 1887, 1847, 2912, 1875, 1860, 480, 1861, 1862, + + 1888, 2268, 2912, 1833, 1053, 1834, 1835, 2912, 1887, 1931, + 1931, 1931, 1931, 2536, 1197, 2536, 2536, 1888, 2912, 1836, + 1699, 2912, 2912, 1784, 2526, 1785, 2268, 1874, 1448, 599, + 1449, 1448, 1963, 1887, 1837, 2912, 1875, 2912, 2912, 2912, + 1149, 1888, 2912, 1838, 1450, 2912, 2912, 2912, 1784, 1150, + 1785, 2912, 1874, 1987, 2912, 2912, 2912, 1963, 2912, 1837, + 1875, 1860, 480, 1861, 1862, 1149, 2912, 1838, 1833, 1053, + 1834, 1835, 2912, 1150, 2537, 1199, 2538, 2539, 1987, 2912, + 1833, 1053, 1834, 1835, 1836, 2530, 2912, 2912, 1784, 2912, + 1785, 2912, 1874, 2912, 2912, 2912, 1836, 2912, 2912, 1837, + + 2912, 1875, 2912, 1833, 1053, 1834, 1835, 1964, 1838, 2912, + 2912, 1837, 2912, 1784, 2912, 1785, 2912, 1874, 2912, 1836, + 1838, 1966, 2912, 2912, 1837, 1875, 1867, 387, 1787, 1868, + 2912, 1964, 1838, 2912, 1837, 2912, 1837, 2912, 2912, 2912, + 2912, 1965, 1789, 1838, 1838, 1966, 1268, 395, 1269, 1270, + 2912, 2912, 2912, 1784, 2912, 1785, 2912, 1869, 2912, 1837, + 2912, 2912, 1263, 2912, 2912, 1965, 1870, 1838, 1990, 1206, + 1991, 1990, 2912, 1169, 2912, 1169, 2912, 2912, 1784, 1988, + 1785, 2912, 1869, 2912, 1992, 2912, 1954, 599, 1955, 1954, + 1870, 1867, 387, 1787, 1868, 2912, 2912, 2912, 1169, 1993, + + 1169, 2912, 1956, 2912, 1988, 2912, 2912, 1789, 1994, 2912, + 1833, 1053, 1834, 1835, 2912, 2274, 2912, 2912, 1784, 2912, + 1785, 2912, 1869, 2912, 1993, 2912, 1836, 2912, 2912, 2912, + 2912, 1870, 1994, 2912, 2912, 2912, 1833, 1053, 1834, 1835, + 2274, 1837, 2912, 1784, 2912, 1785, 2912, 1869, 1995, 2912, + 1838, 2912, 1836, 2912, 2912, 1870, 2912, 2000, 1217, 2001, + 2000, 2912, 1833, 1053, 1834, 1835, 1837, 1837, 1833, 1053, + 1834, 1835, 1995, 2002, 1838, 2912, 1838, 1996, 1836, 2912, + 1833, 1053, 1834, 1835, 1836, 2912, 2912, 2912, 2003, 2912, + 2912, 2912, 1837, 1837, 2912, 2912, 1836, 2004, 2912, 1837, + + 1838, 1996, 1838, 2006, 2912, 2912, 2005, 2912, 1838, 2007, + 2912, 1837, 2912, 2003, 2234, 1481, 2234, 2234, 1837, 2912, + 1838, 2004, 2912, 2912, 1837, 2912, 1838, 2006, 2912, 2912, + 2005, 2912, 1838, 2912, 2007, 2912, 1837, 1833, 1053, 1834, + 1835, 2912, 2912, 2912, 1838, 2912, 2912, 1850, 1070, 1851, + 1852, 2235, 2912, 1836, 2912, 2912, 2912, 1850, 1070, 1851, + 1852, 2912, 2912, 1830, 2912, 2912, 2912, 2912, 1837, 2245, + 1492, 2245, 2245, 1830, 2912, 2235, 2912, 1838, 1853, 2912, + 2008, 2912, 2912, 2912, 2912, 2009, 2912, 1854, 1853, 2014, + 1232, 2015, 2014, 1837, 2912, 2912, 2912, 1854, 2010, 2912, + + 2912, 1838, 2912, 1853, 2008, 2016, 2291, 2912, 2912, 2009, + 2912, 1854, 2912, 1853, 2912, 2912, 1850, 1070, 1851, 1852, + 2017, 1854, 2010, 2912, 2912, 2912, 2912, 2912, 2912, 2018, + 2291, 2912, 1830, 1850, 1070, 1851, 1852, 2912, 2912, 1850, + 1070, 1851, 1852, 2912, 2912, 2017, 2912, 1853, 2912, 1830, + 2912, 2912, 2912, 2018, 2023, 1830, 1854, 2912, 2912, 1850, + 1070, 1851, 1852, 2912, 1853, 2912, 2912, 2912, 2025, 2912, + 1853, 2912, 1853, 1854, 2024, 1830, 2912, 2912, 2023, 1854, + 1854, 2581, 1758, 2581, 2581, 1930, 1931, 1932, 1930, 1853, + 1853, 2912, 2498, 2025, 2912, 1853, 1933, 1854, 2024, 1854, + + 2912, 1208, 2026, 1854, 2912, 2912, 1930, 1931, 1932, 1930, + 2912, 1205, 1206, 1207, 1205, 1853, 1290, 1933, 2912, 2912, + 2912, 2912, 1208, 1854, 2912, 1291, 2026, 1208, 1934, 1935, + 1936, 1934, 1935, 1935, 1935, 1935, 2912, 1290, 2912, 1937, + 2912, 1290, 1209, 1699, 1234, 2912, 1291, 2912, 2912, 1291, + 2912, 1210, 2912, 2912, 2912, 1934, 1935, 1936, 1934, 1312, + 2912, 2912, 1290, 1144, 2912, 2912, 1937, 1209, 1313, 2912, + 1291, 1234, 1145, 2912, 2912, 1210, 2912, 1231, 1232, 1233, + 1231, 2912, 2912, 2912, 1312, 2912, 1312, 2912, 1144, 2912, + 2912, 2912, 1313, 1234, 2912, 1313, 1145, 1794, 395, 1795, + + 1796, 2912, 1794, 395, 1795, 1796, 2912, 2912, 1235, 2912, + 2912, 1312, 2912, 1789, 2912, 2912, 2912, 1236, 1789, 1313, + 1946, 590, 1947, 1946, 1722, 2912, 1722, 2912, 2912, 1722, + 2912, 1722, 2912, 1235, 2912, 2031, 1948, 1946, 590, 1947, + 1946, 1236, 2912, 2032, 1946, 590, 1947, 1946, 2912, 1722, + 2912, 1722, 2912, 1948, 1722, 2912, 1722, 2912, 2912, 2031, + 1948, 2348, 2912, 1954, 599, 1955, 1954, 2032, 2035, 2912, + 1794, 395, 1795, 1796, 2912, 2035, 2912, 2036, 2912, 1956, + 1954, 599, 1955, 1954, 2036, 2348, 1789, 2912, 1794, 395, + 1795, 1796, 2912, 2035, 2042, 2912, 1956, 1722, 2912, 1722, + + 2035, 2036, 2912, 2043, 1789, 2912, 2912, 2912, 2036, 2047, + 2912, 2042, 2912, 2912, 2912, 1722, 2912, 1722, 2912, 2042, + 2043, 2048, 1722, 2912, 1722, 2912, 2912, 2043, 2912, 1794, + 395, 1795, 1796, 2047, 2912, 2912, 2042, 2912, 2912, 2912, + 1722, 2912, 1722, 2912, 2043, 1789, 2048, 1833, 1053, 1834, + 1835, 1833, 1053, 1834, 1835, 2912, 1722, 2912, 1722, 2912, + 2912, 2912, 2912, 1836, 2912, 2912, 2912, 1836, 1833, 1053, + 1834, 1835, 2049, 2912, 1833, 1053, 1834, 1835, 1837, 2912, + 2912, 1722, 1837, 1722, 1836, 2051, 2912, 1838, 2912, 2912, + 1836, 1838, 2052, 2912, 2912, 2912, 2049, 2053, 2912, 1837, + + 2912, 2912, 2912, 1837, 2912, 1837, 2912, 1837, 1838, 2051, + 2912, 1838, 2912, 2912, 1838, 1838, 2052, 2054, 1973, 1189, + 1974, 1973, 2053, 2912, 1837, 2497, 1698, 2497, 2497, 1972, + 1837, 2912, 1838, 2912, 1263, 2912, 2498, 2912, 1838, 2912, + 2912, 2054, 2912, 2912, 1973, 1189, 1974, 1973, 2912, 1351, + 1977, 1193, 1978, 1977, 2912, 1972, 2912, 2912, 1352, 2912, + 1263, 1972, 1977, 1193, 1978, 1977, 1267, 1946, 590, 1947, + 1946, 2912, 2912, 1972, 1351, 1351, 2912, 2912, 1267, 2912, + 2912, 1346, 1352, 1948, 1352, 1977, 1193, 1978, 1979, 2912, + 1347, 2912, 2912, 1346, 2912, 2912, 1976, 2912, 2912, 2912, + + 1351, 2912, 1347, 2912, 2912, 2195, 1346, 2912, 1352, 2253, + 1500, 2253, 2253, 2912, 1347, 2912, 1348, 2912, 1346, 1983, + 1199, 1984, 1983, 2912, 2912, 1349, 1347, 2912, 2912, 2195, + 1972, 1983, 1199, 1984, 1983, 1267, 2912, 1983, 1199, 1984, + 1985, 1348, 1972, 2912, 2912, 2912, 2230, 1267, 1976, 1349, + 1346, 1268, 395, 1269, 1270, 2912, 2912, 2912, 2912, 1347, + 2912, 2912, 1346, 2356, 1041, 2357, 2356, 1263, 1348, 2912, + 2230, 1347, 2912, 2912, 2912, 1346, 2912, 1349, 1169, 1956, + 1169, 2912, 2912, 1347, 2912, 2912, 2912, 1346, 2912, 2912, + 2061, 2912, 2912, 1348, 2912, 1347, 1990, 1206, 1991, 1990, + + 2912, 1349, 2912, 1169, 2912, 1169, 1990, 1206, 1991, 1990, + 2912, 2912, 1992, 2912, 2061, 2912, 1990, 1206, 1991, 1990, + 2912, 2912, 1992, 1990, 1206, 1991, 1990, 1993, 1990, 1206, + 1991, 1990, 1992, 2912, 2912, 2912, 1994, 2062, 2912, 2064, + 2912, 2912, 2912, 2912, 1992, 2912, 2063, 2062, 1954, 599, + 1955, 1954, 1993, 2912, 1993, 2912, 2063, 2065, 2912, 1993, + 1994, 2912, 2062, 1994, 1956, 2912, 2912, 2912, 1994, 2912, + 2063, 2912, 2062, 1990, 1206, 1991, 1990, 2912, 2912, 1993, + 2063, 2912, 2065, 2912, 1993, 2912, 2203, 1994, 2912, 1992, + 2912, 2912, 1994, 1833, 1053, 1834, 1835, 2912, 2912, 1833, + + 1053, 1834, 1835, 2912, 1993, 2504, 1705, 2504, 2504, 1836, + 2203, 2912, 2066, 1994, 2912, 1836, 2503, 2912, 2349, 1033, + 2350, 2349, 2067, 2912, 1837, 2000, 1217, 2001, 2000, 1993, + 1837, 2912, 2912, 1838, 1948, 2912, 2066, 1994, 2912, 1838, + 2912, 2002, 2068, 2000, 1217, 2001, 2000, 2067, 2912, 1837, + 2912, 2490, 1692, 2491, 2492, 1837, 2003, 1838, 2912, 2002, + 2912, 2912, 2435, 1838, 2912, 2004, 2068, 2912, 2912, 2000, + 1217, 2001, 2000, 2912, 2003, 2000, 1217, 2001, 2000, 2912, + 2912, 2003, 2912, 2004, 2912, 2002, 2912, 2912, 2912, 2004, + 1922, 2071, 2000, 1217, 2001, 2000, 2912, 2912, 2912, 2003, + + 2003, 1946, 590, 1947, 1946, 2912, 2003, 2004, 2002, 2004, + 2000, 1217, 2001, 2000, 1922, 2004, 2912, 1948, 2912, 2912, + 2912, 2072, 2912, 2003, 2912, 2003, 2002, 1954, 599, 1955, + 1954, 2003, 2004, 2004, 2454, 2171, 1414, 2172, 2173, 2004, + 2912, 2003, 2912, 1956, 2912, 2912, 2072, 2912, 2003, 2073, + 2004, 1833, 1053, 1834, 1835, 2912, 2004, 2912, 2912, 2454, + 2458, 1833, 1053, 1834, 1835, 2912, 2003, 1836, 1833, 1053, + 1834, 1835, 2174, 2073, 2004, 2912, 2912, 1836, 2912, 2912, + 2074, 2912, 1837, 2912, 1836, 2458, 2912, 2077, 1306, 2078, + 2079, 1838, 1837, 2912, 2912, 2912, 2174, 2912, 2912, 1837, + + 2912, 1838, 2912, 1836, 2075, 2074, 2912, 1837, 1838, 2076, + 1850, 1070, 1851, 1852, 2912, 1838, 2912, 1837, 1837, 1954, + 599, 1955, 1954, 2912, 1837, 1838, 1830, 1838, 2075, 2912, + 2912, 2912, 1838, 2076, 2912, 1956, 2912, 2912, 2912, 2080, + 2912, 1853, 2912, 1837, 1850, 1070, 1851, 1852, 2912, 2912, + 1854, 1838, 2912, 2912, 2014, 1232, 2015, 2014, 2912, 2912, + 1830, 2912, 2275, 2912, 2080, 2912, 1853, 2912, 2912, 2912, + 2016, 2912, 2912, 2912, 1854, 1853, 2014, 1232, 2015, 2014, + 2220, 1468, 2221, 2222, 1854, 2017, 2275, 2081, 2014, 1232, + 2015, 2014, 2016, 2912, 2018, 2912, 1954, 599, 1955, 1954, + + 1853, 2912, 2912, 2912, 2016, 2912, 2912, 2084, 1854, 2912, + 2017, 2081, 1956, 2912, 2912, 2912, 2085, 2174, 2018, 2084, + 2014, 1232, 2015, 2014, 2525, 1186, 2525, 2525, 2085, 2912, + 2912, 2912, 2084, 2912, 2912, 2526, 2086, 2355, 2912, 2912, + 2085, 2174, 2912, 2912, 2084, 2912, 2014, 1232, 2015, 2014, + 2912, 2017, 2085, 2912, 2912, 2912, 2014, 1232, 2015, 2014, + 2018, 2355, 2016, 2912, 2912, 2912, 2234, 1481, 2234, 2234, + 2912, 2912, 2016, 2912, 2912, 2087, 2017, 2017, 1850, 1070, + 1851, 1852, 2912, 2912, 2018, 2912, 2018, 2017, 2912, 2912, + 1850, 1070, 1851, 1852, 1830, 2088, 2018, 2912, 2912, 2912, + + 2087, 2912, 2017, 2235, 2912, 2912, 1830, 2093, 2912, 1853, + 2018, 2912, 2017, 2356, 1041, 2357, 2356, 2912, 1854, 2088, + 2018, 1853, 1850, 1070, 1851, 1852, 2912, 2235, 2912, 1956, + 1854, 2912, 2093, 2094, 1853, 2912, 2912, 2912, 1830, 2912, + 2912, 2912, 1854, 2912, 2912, 2912, 1853, 2912, 2096, 1325, + 2097, 2098, 2912, 1853, 1854, 2912, 2912, 2094, 2912, 2912, + 2912, 2912, 1854, 2095, 1830, 1794, 395, 1795, 1796, 1794, + 395, 1795, 1796, 2912, 1794, 395, 1795, 1796, 1853, 1853, + 2912, 1789, 2912, 2912, 2912, 1789, 1854, 2095, 1854, 2912, + 1789, 2912, 1722, 2912, 1722, 2912, 1722, 2912, 1722, 2912, + + 2912, 1722, 2912, 1722, 1853, 2118, 2912, 2117, 2104, 2912, + 2912, 2912, 1854, 1794, 395, 1795, 1796, 1722, 2912, 1722, + 2912, 1722, 2912, 1722, 2912, 2912, 1722, 2912, 1722, 1789, + 2118, 2117, 2104, 1833, 1053, 1834, 1835, 2912, 2912, 2912, + 1722, 2912, 1722, 1833, 1053, 1834, 1835, 2912, 2912, 1836, + 1833, 1053, 1834, 1835, 2912, 2912, 2912, 2912, 2912, 1836, + 2119, 2912, 2121, 2912, 1837, 1722, 1836, 1722, 2912, 2124, + 1365, 2125, 2126, 1838, 1837, 2912, 2912, 2585, 1763, 2586, + 2587, 1837, 2912, 1838, 2119, 1836, 2122, 2121, 2510, 1837, + 1838, 2123, 1268, 395, 1269, 1270, 2912, 1838, 2912, 1837, + + 1837, 1946, 590, 1947, 1946, 2912, 1837, 1838, 1263, 1838, + 2122, 2912, 2912, 2912, 1838, 2123, 1922, 1948, 2912, 1169, + 2912, 1169, 2912, 2912, 2912, 1837, 1990, 1206, 1991, 1990, + 2139, 2912, 2912, 1838, 2912, 2912, 1990, 1206, 1991, 1990, + 1922, 2610, 1992, 2912, 1169, 2912, 1169, 1990, 1206, 1991, + 1990, 2912, 1992, 2912, 2139, 2140, 2912, 1993, 1990, 1206, + 1991, 1990, 2912, 2064, 2912, 2610, 1994, 1993, 2536, 1197, + 2536, 2536, 2912, 2912, 1992, 2141, 1994, 2912, 1993, 2526, + 2140, 2912, 1993, 2581, 1758, 2581, 2581, 1994, 2912, 1993, + 1994, 2912, 1993, 2912, 2498, 2912, 2142, 2912, 1994, 2141, + + 1994, 2912, 2912, 1993, 2912, 1990, 1206, 1991, 1990, 2912, + 2912, 1994, 2912, 2912, 1993, 2912, 1833, 1053, 1834, 1835, + 2142, 1992, 1994, 2145, 1388, 2146, 2147, 2000, 1217, 2001, + 2000, 2912, 1836, 2912, 2912, 2912, 1993, 2912, 2912, 1836, + 2912, 2912, 2912, 2071, 2912, 1994, 2143, 1837, 2245, 1492, + 2245, 2245, 2912, 2912, 1837, 2912, 1838, 2144, 2003, 2912, + 2148, 1993, 2912, 1838, 2912, 2912, 2912, 2004, 2912, 1994, + 2143, 2912, 1837, 2000, 1217, 2001, 2000, 2912, 2912, 1837, + 1838, 2144, 2912, 2003, 2148, 2235, 2912, 1838, 2912, 2002, + 2912, 2004, 2000, 1217, 2001, 2000, 2912, 2912, 2912, 1833, + + 1053, 1834, 1835, 2912, 2003, 2912, 2912, 2912, 2002, 2235, + 2912, 2151, 2912, 2004, 2912, 1836, 2253, 1500, 2253, 2253, + 2912, 2912, 2912, 2003, 2912, 2665, 1374, 2666, 2665, 2003, + 1837, 2912, 2004, 2152, 2912, 2151, 2667, 2004, 2912, 1838, + 2153, 1948, 2154, 1397, 2155, 2156, 2912, 2912, 2003, 2077, + 1306, 2078, 2077, 2235, 2912, 1837, 2004, 2152, 1836, 1833, + 1053, 1834, 1835, 1838, 2153, 1836, 2912, 2527, 1189, 2528, + 2529, 2912, 2912, 1837, 2912, 1836, 2912, 2235, 2530, 2148, + 1909, 2912, 1838, 2912, 2912, 2912, 1731, 2912, 2912, 1910, + 1837, 2912, 2157, 2077, 1306, 2078, 2077, 2912, 1837, 1838, + + 2912, 2912, 2912, 2148, 1722, 1909, 1838, 2912, 2912, 1836, + 1731, 2912, 2912, 1910, 2912, 1837, 2912, 2157, 2912, 2077, + 1306, 2078, 2079, 1838, 1909, 2912, 2912, 2912, 1722, 2912, + 1731, 2912, 2912, 1910, 2912, 1836, 1850, 1070, 1851, 1852, + 2912, 2912, 2160, 1403, 2161, 2162, 2912, 2912, 2912, 1909, + 1837, 2912, 1830, 2912, 1731, 2912, 2158, 1910, 1830, 1838, + 2912, 2912, 2014, 1232, 2015, 2014, 2912, 1853, 2014, 1232, + 2015, 2014, 2912, 1853, 2912, 1837, 1854, 2159, 2016, 2163, + 2158, 2912, 1854, 1838, 2016, 2912, 2912, 2912, 2912, 2912, + 2912, 2166, 1853, 2017, 2014, 1232, 2015, 2014, 1853, 2017, + + 1854, 2159, 2018, 2163, 2912, 2912, 1854, 2167, 2018, 2912, + 2086, 2014, 1232, 2015, 2014, 2912, 2166, 2912, 2017, 2912, + 1946, 590, 1947, 1946, 2017, 2017, 2018, 2016, 2912, 2912, + 2912, 2167, 2018, 2912, 2018, 2912, 1948, 2014, 1232, 2015, + 2014, 2912, 2017, 1850, 1070, 1851, 1852, 2534, 2912, 2168, + 2017, 2018, 2912, 2016, 2178, 1421, 2179, 2180, 2018, 1830, + 2188, 853, 2189, 2190, 2912, 2912, 2912, 2017, 2017, 2912, + 1830, 2912, 2534, 2168, 1853, 2018, 1789, 2018, 2169, 2866, + 1698, 2866, 2866, 1854, 2177, 1853, 2912, 1722, 2912, 1722, + 2867, 2163, 2912, 2017, 1854, 1850, 1070, 1851, 1852, 1853, + + 2912, 2018, 2169, 1954, 599, 1955, 1954, 1854, 2177, 2912, + 1853, 1830, 1722, 2912, 1722, 2163, 2912, 2912, 1854, 1956, + 2912, 2096, 1325, 2097, 2096, 2912, 1853, 2912, 2181, 2912, + 2540, 2096, 1325, 2097, 2096, 1854, 2912, 1830, 2096, 1325, + 2097, 2098, 2703, 1414, 2704, 2705, 2912, 1830, 2912, 2912, + 2912, 1853, 1923, 2181, 1830, 2540, 2912, 2912, 1731, 1854, + 2912, 1924, 1923, 2912, 1794, 395, 1795, 1796, 1731, 1842, + 2912, 1924, 2912, 2912, 2912, 2182, 2912, 1923, 1843, 2706, + 1789, 2912, 1731, 2912, 2912, 1924, 2912, 1923, 2912, 2912, + 2912, 1722, 1731, 1722, 1842, 1924, 2912, 2912, 2912, 2182, + + 2912, 2912, 1843, 2706, 2912, 2187, 1794, 395, 1795, 1796, + 1794, 395, 1795, 1796, 2912, 2912, 1722, 2912, 1722, 2912, + 2912, 2912, 1789, 2912, 2912, 2912, 1789, 2912, 2912, 2187, + 2912, 2912, 2912, 1722, 2912, 2207, 2912, 1722, 2912, 1722, + 2209, 874, 2210, 2211, 2912, 1833, 1053, 1834, 1835, 2912, + 2214, 1462, 2215, 2216, 2208, 2912, 1789, 2912, 1722, 2912, + 2207, 1836, 1722, 2912, 1722, 2912, 1836, 1722, 2912, 1722, + 2912, 2912, 1833, 1053, 1834, 1835, 1837, 2912, 2208, 2912, + 2912, 1837, 2912, 2912, 2912, 1838, 2213, 2148, 1836, 2912, + 1838, 2912, 1722, 2912, 1722, 2912, 2912, 1681, 874, 1682, + + 1683, 1837, 2912, 1837, 2912, 2217, 1837, 2912, 2912, 1838, + 2213, 2148, 1838, 1263, 1838, 2124, 1365, 2125, 2124, 2124, + 1365, 2125, 2124, 2912, 1169, 2912, 1169, 2912, 1837, 2912, + 2217, 1836, 2912, 2912, 2912, 1836, 1838, 2124, 1365, 2125, + 2126, 2130, 1371, 2131, 2130, 2912, 1909, 2912, 2912, 1169, + 1909, 1169, 1738, 1836, 2912, 1910, 1738, 1847, 2912, 1910, + 2912, 2912, 2729, 1468, 2730, 2731, 2912, 2912, 1837, 2912, + 2912, 1909, 1918, 2912, 2218, 1909, 1738, 1838, 1738, 1910, + 1738, 1919, 2912, 1910, 2130, 1371, 2131, 2130, 2130, 1371, + 2131, 2132, 2912, 1837, 2912, 2912, 2912, 1918, 2218, 2706, + + 1847, 1838, 1738, 2912, 2912, 1919, 2133, 1374, 2134, 2133, + 2912, 1946, 590, 1947, 1946, 1918, 2912, 2135, 2912, 1892, + 2912, 1738, 1442, 2706, 1919, 2224, 2912, 1948, 1893, 2912, + 2912, 1954, 599, 1955, 1954, 2912, 2535, 1515, 2912, 2912, + 1918, 2912, 2912, 2912, 1892, 1738, 1516, 1956, 1919, 2224, + 2912, 2912, 1893, 2133, 1374, 2134, 2133, 2136, 1378, 2137, + 2136, 2535, 1515, 2912, 2135, 2912, 2912, 2912, 2138, 1442, + 1516, 2611, 2912, 1450, 2136, 1378, 2137, 2136, 2912, 2912, + 1990, 1206, 1991, 1990, 1515, 2138, 2912, 2912, 1522, 2912, + 1450, 2912, 2912, 1516, 2912, 2611, 1992, 1523, 2912, 2912, + + 1990, 1206, 1991, 1990, 2912, 1522, 2912, 2912, 2912, 1515, + 2912, 1993, 2912, 1522, 1523, 2912, 1992, 1516, 2225, 2912, + 1994, 1523, 2912, 1990, 1206, 1991, 1990, 2912, 2912, 2912, + 1522, 1993, 2873, 1705, 2873, 2873, 1993, 2912, 1523, 1992, + 1994, 2226, 2225, 2872, 1994, 1990, 1206, 1991, 1990, 2912, + 2912, 2912, 2227, 2912, 1993, 2912, 1993, 2912, 2912, 2912, + 2912, 1992, 2912, 1994, 1994, 2226, 1833, 1053, 1834, 1835, + 2668, 1378, 2669, 2668, 2912, 2912, 1993, 2227, 2912, 1993, + 2912, 2670, 1836, 2912, 2912, 1994, 1956, 1994, 2228, 2145, + 1388, 2146, 2145, 2884, 1758, 2884, 2884, 1837, 2912, 2229, + + 2912, 1993, 2912, 2912, 2867, 1836, 1838, 2912, 2912, 1994, + 2912, 2912, 2228, 2912, 2912, 2145, 1388, 2146, 2145, 2912, + 1909, 2912, 1837, 2912, 2229, 2912, 2230, 2912, 2912, 1910, + 1838, 1836, 2145, 1388, 2146, 2147, 2912, 2912, 1946, 590, + 1947, 1946, 2912, 2912, 2912, 1909, 1909, 2912, 1836, 2912, + 2230, 2912, 2230, 1910, 1948, 1910, 2912, 2912, 1833, 1053, + 1834, 1835, 2912, 1837, 2000, 1217, 2001, 2000, 2912, 2231, + 2912, 1909, 1838, 2912, 1836, 2912, 2230, 2912, 2912, 1910, + 2002, 2912, 2912, 2232, 2000, 1217, 2001, 2000, 1837, 1837, + 2912, 2912, 2912, 2231, 2912, 2003, 1838, 2912, 1838, 2912, + + 2002, 2912, 2912, 2912, 2004, 2912, 2912, 2237, 2232, 1954, + 599, 1955, 1954, 2236, 1837, 2003, 1833, 1053, 1834, 1835, + 2003, 2912, 1838, 2912, 2004, 1956, 2912, 2912, 2004, 2912, + 2912, 2237, 1836, 2743, 1481, 2743, 2743, 2912, 2236, 2912, + 2003, 2912, 2154, 1397, 2155, 2154, 2912, 1837, 2004, 2238, + 2912, 2912, 2154, 1397, 2155, 2154, 1838, 2912, 1836, 2154, + 1397, 2155, 2156, 2754, 1492, 2754, 2754, 2912, 1836, 2912, + 2744, 2912, 1837, 1909, 2238, 1836, 2912, 2912, 2912, 2235, + 1838, 2912, 1910, 1909, 2866, 1698, 2866, 2866, 2912, 2235, + 1837, 2912, 1910, 2912, 2744, 2867, 2148, 2912, 1909, 1838, + + 2744, 2912, 2912, 2235, 2912, 2912, 1910, 2912, 1909, 1833, + 1053, 1834, 1835, 2235, 2912, 1837, 1910, 2912, 2912, 2912, + 2148, 2912, 2912, 1838, 2744, 1836, 1833, 1053, 1834, 1835, + 2912, 1850, 1070, 1851, 1852, 2912, 2239, 2912, 2912, 2912, + 1837, 2912, 1836, 2160, 1403, 2161, 2160, 1830, 2912, 1838, + 2912, 2240, 2873, 1705, 2873, 2873, 2912, 1837, 2912, 1830, + 2912, 2239, 1853, 2872, 2241, 1837, 1838, 2845, 1641, 2846, + 2847, 1854, 2912, 1838, 1923, 2912, 2240, 2912, 2838, 2912, + 2230, 2912, 1837, 1924, 2912, 2912, 2912, 1853, 2912, 2241, + 1838, 2762, 1500, 2762, 2762, 1854, 2912, 2912, 2912, 1923, + + 2160, 1403, 2161, 2160, 2230, 2912, 2477, 1924, 2912, 2912, + 2160, 1403, 2161, 2162, 2912, 2912, 1830, 1850, 1070, 1851, + 1852, 2912, 2014, 1232, 2015, 2014, 1830, 2912, 2744, 2912, + 2477, 1923, 2912, 1830, 2912, 2912, 2912, 2230, 2016, 2912, + 1924, 1842, 2243, 1794, 395, 1795, 1796, 2242, 1853, 2912, + 1843, 2912, 2744, 2017, 2912, 2912, 1923, 1854, 2912, 1789, + 2246, 2230, 2018, 2912, 1924, 2912, 1842, 2243, 2912, 2912, + 2343, 2242, 1722, 1853, 1843, 2912, 2912, 2912, 2017, 2912, + 2912, 1854, 2912, 2912, 2246, 2912, 2018, 2014, 1232, 2015, + 2014, 2014, 1232, 2015, 2014, 2343, 2912, 1722, 2014, 1232, + + 2015, 2014, 2912, 2016, 2912, 2912, 2912, 2016, 2912, 2743, + 1481, 2743, 2743, 2912, 2016, 2912, 2912, 2912, 2017, 2912, + 2248, 2912, 2017, 2912, 2912, 2912, 2912, 2018, 2247, 2017, + 2912, 2018, 2171, 1414, 2172, 2171, 2912, 2912, 2018, 2912, + 2912, 2249, 2912, 2017, 2912, 2248, 2744, 2017, 1847, 2912, + 2912, 2018, 2247, 2912, 2017, 2018, 2912, 2912, 2171, 1414, + 2172, 2171, 2018, 1918, 2912, 2249, 2912, 2912, 2912, 2235, + 2744, 2912, 1919, 2912, 1847, 2171, 1414, 2172, 2173, 2912, + 2912, 2754, 1492, 2754, 2754, 2912, 2912, 2912, 1918, 1918, + 2912, 2912, 2912, 2235, 2912, 2235, 1919, 2912, 1919, 2912, + + 2912, 1850, 1070, 1851, 1852, 2912, 1892, 2178, 1421, 2179, + 2178, 2912, 2174, 2912, 1918, 1893, 2912, 1830, 2767, 2235, + 2912, 2912, 1919, 1830, 2178, 1421, 2179, 2178, 2912, 2912, + 2912, 1892, 1853, 2912, 2254, 2912, 2174, 2912, 1923, 1893, + 1830, 1854, 2767, 2912, 2235, 2912, 2912, 1924, 2912, 2912, + 2178, 1421, 2179, 2180, 2912, 1923, 2912, 1853, 2912, 2254, + 2912, 2235, 2912, 1923, 1924, 1854, 1830, 2912, 2235, 2912, + 2912, 1924, 2912, 1850, 1070, 1851, 1852, 2912, 2912, 2912, + 1923, 1842, 2912, 2912, 2912, 2235, 2912, 2163, 1924, 1830, + 1843, 1850, 1070, 1851, 1852, 2762, 1500, 2762, 2762, 2912, + + 2255, 2912, 2912, 2912, 1853, 2912, 1842, 1830, 2912, 2912, + 2912, 2163, 2912, 1854, 1843, 2912, 2256, 1794, 395, 1795, + 1796, 2912, 1853, 2912, 2912, 2255, 2912, 2912, 2912, 1853, + 2912, 1854, 2739, 1789, 2912, 2912, 2912, 1854, 2912, 2912, + 2912, 2256, 2912, 2912, 1722, 2912, 1722, 1853, 2912, 2912, + 2263, 2188, 853, 2189, 2188, 1854, 2739, 2912, 2188, 853, + 2189, 2188, 2884, 1758, 2884, 2884, 2912, 1789, 2912, 1722, + 2912, 1722, 2912, 2867, 1789, 2263, 2912, 2912, 2912, 2912, + 2912, 2912, 1877, 1954, 599, 1955, 1954, 2912, 2264, 1877, + 2912, 1878, 2912, 2912, 2912, 2264, 2912, 2912, 1878, 1956, + + 2192, 857, 2193, 2192, 2912, 2912, 2912, 1877, 2541, 2912, + 2912, 2912, 2264, 2912, 1877, 1878, 1793, 2912, 2912, 2264, + 2912, 2912, 1878, 2188, 853, 2189, 2190, 2912, 2912, 2912, + 2912, 1872, 2912, 2541, 2912, 2912, 2912, 2264, 2912, 1789, + 1873, 2192, 857, 2193, 2192, 2192, 857, 2193, 2194, 2912, + 1722, 2912, 1722, 2912, 1865, 2912, 1872, 1793, 2912, 2912, + 2265, 2264, 2912, 1866, 1873, 2912, 2912, 2200, 865, 2201, + 2200, 2912, 1872, 2912, 2912, 1722, 1874, 1722, 2264, 1865, + 2912, 1873, 2267, 1793, 2265, 1875, 2912, 1866, 2912, 2912, + 2200, 865, 2201, 2202, 2912, 2912, 2912, 1872, 1872, 2912, + + 2912, 1874, 2264, 2912, 2271, 1873, 2267, 1873, 2912, 1875, + 2200, 865, 2201, 2200, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 1874, 2912, 1872, 2912, 2912, 1793, 2273, 2271, 2912, + 1875, 1873, 1794, 395, 1795, 1796, 1794, 395, 1795, 1796, + 2912, 1872, 2912, 2912, 2912, 2912, 1874, 2271, 1789, 2912, + 1873, 2273, 1789, 2912, 1875, 2912, 2912, 2912, 2912, 1722, + 2912, 1722, 2912, 1722, 2912, 1722, 1872, 2912, 2912, 2912, + 2277, 2271, 2912, 2912, 1873, 2912, 2912, 2278, 2703, 1414, + 2704, 2705, 2912, 2912, 1722, 2912, 1722, 2912, 1722, 2912, + 1722, 2912, 2912, 2912, 2277, 2912, 2912, 2439, 1111, 2440, + + 2446, 2278, 1651, 2279, 956, 2280, 2281, 1651, 1651, 1651, + 1651, 1651, 1651, 1651, 2912, 2706, 1651, 1651, 1651, 1789, + 2912, 1651, 2912, 1651, 1651, 1651, 1651, 1651, 2447, 2729, + 1468, 2730, 2731, 2912, 2283, 2912, 2912, 2448, 2912, 2706, + 2912, 2912, 2912, 2284, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 1651, 2912, 2447, 2912, 2912, 2912, 2912, 2912, 2283, + 2912, 2448, 2912, 2912, 2912, 2912, 2706, 2284, 2743, 1481, + 2743, 2743, 2912, 2912, 2912, 1651, 1651, 1651, 2279, 956, + 2280, 2281, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 2912, + 2706, 1651, 1651, 1651, 1789, 2912, 1651, 2912, 1651, 1651, + + 1651, 1651, 1651, 2912, 2912, 2744, 2912, 2912, 2912, 2283, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2284, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 1651, 2912, 2912, 2744, + 2912, 2912, 2912, 2912, 2283, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2284, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 1651, 1651, 1651, 2279, 956, 2280, 2285, 1651, 1651, 1651, + 1651, 1651, 1651, 1651, 2286, 2286, 1651, 1651, 1651, 1789, + 2287, 1651, 2287, 1651, 1651, 1651, 1651, 1651, 2287, 2287, + 2287, 2287, 2287, 2287, 2288, 2287, 2287, 2287, 2287, 2287, + 2287, 2287, 2287, 2289, 2287, 2287, 2287, 2287, 2287, 2287, + + 2287, 1651, 2287, 2287, 2287, 2287, 2287, 2287, 2287, 2288, + 2287, 2287, 2287, 2287, 2287, 2287, 2287, 2289, 2287, 2287, + 2287, 2287, 2287, 2287, 2287, 1651, 1651, 1833, 1053, 1834, + 1835, 2214, 1462, 2215, 2214, 2912, 2912, 2912, 2214, 1462, + 2215, 2214, 2912, 1836, 2912, 2912, 2912, 1836, 2912, 2214, + 1462, 2215, 2216, 2912, 1836, 2912, 2912, 2912, 1837, 2912, + 2290, 2912, 1909, 2912, 2912, 1836, 2912, 1838, 2291, 1909, + 2912, 1910, 2912, 2912, 2912, 2291, 2912, 2912, 1910, 2912, + 1837, 2912, 2912, 1837, 2912, 2290, 2292, 1909, 2912, 1838, + 2912, 1838, 2291, 2912, 1909, 1910, 2912, 2912, 2912, 2291, + + 2912, 2912, 1910, 2912, 2912, 1837, 1833, 1053, 1834, 1835, + 2292, 2912, 2912, 1838, 2912, 2912, 1833, 1053, 1834, 1835, + 2912, 2912, 1836, 2220, 1468, 2221, 2220, 2754, 1492, 2754, + 2754, 2912, 1836, 2293, 2912, 2912, 2912, 1837, 2912, 1847, + 2912, 2294, 2859, 1692, 2860, 2861, 1838, 1837, 2762, 1500, + 2762, 2762, 2912, 2852, 1918, 2912, 1838, 2912, 2293, 2912, + 2291, 2912, 1837, 1919, 2744, 2912, 2294, 2912, 2912, 2912, + 1838, 2912, 1837, 2220, 1468, 2221, 2220, 2912, 2912, 1918, + 1838, 2477, 2912, 2912, 2291, 2744, 2912, 1919, 2744, 1847, + 2220, 1468, 2221, 2222, 2912, 2912, 2912, 2912, 2912, 2912, + + 2888, 1763, 2889, 2890, 1918, 2477, 2912, 2912, 2912, 2744, + 2291, 2879, 2912, 1919, 2912, 2912, 1990, 1206, 1991, 1990, + 2912, 1892, 1990, 1206, 1991, 1990, 2912, 2296, 2912, 1918, + 1893, 2912, 1992, 2912, 2291, 2912, 2912, 1919, 1992, 2477, + 2912, 2912, 2912, 2912, 2912, 2299, 1892, 1993, 2912, 2912, + 2912, 2296, 2912, 1993, 1893, 2912, 1994, 1990, 1206, 1991, + 1990, 2912, 1994, 2477, 2912, 2300, 2912, 2912, 2912, 2912, + 2299, 2912, 1993, 1992, 2302, 1544, 2303, 2302, 1993, 2912, + 1994, 2912, 2912, 2912, 2912, 2912, 1994, 2912, 1993, 2300, + 1992, 2912, 1833, 1053, 1834, 1835, 2912, 1994, 2301, 2912, + + 2912, 2912, 2912, 2912, 2912, 1993, 2912, 2912, 1836, 2912, + 2912, 2304, 2912, 1993, 1994, 1833, 1053, 1834, 1835, 2305, + 2912, 1994, 2301, 1837, 2912, 2912, 1833, 1053, 1834, 1835, + 1993, 1836, 1838, 2912, 2912, 2304, 2912, 2912, 1994, 2912, + 2307, 2912, 1836, 2912, 2305, 2912, 1837, 2912, 1837, 2912, + 2912, 2912, 2912, 2912, 2912, 1838, 1838, 1837, 2000, 1217, + 2001, 2000, 2912, 2912, 2912, 2307, 2308, 2912, 2912, 2912, + 2912, 1837, 2912, 2912, 2002, 2312, 1555, 2313, 2312, 1838, + 2912, 2912, 1837, 2912, 2912, 2912, 2912, 2912, 2912, 2003, + 2308, 2002, 2912, 1833, 1053, 1834, 1835, 2912, 2004, 2311, + + 2912, 2912, 2912, 2912, 2912, 2912, 2003, 2912, 2912, 1836, + 2912, 2912, 2314, 2912, 2003, 2004, 2077, 1306, 2078, 2079, + 2315, 2912, 2004, 2311, 1837, 2912, 2912, 1833, 1053, 1834, + 1835, 2003, 1836, 1838, 2912, 2912, 2314, 2912, 2912, 2004, + 2912, 2912, 2912, 1836, 2912, 2315, 2912, 1837, 2912, 1837, + 1850, 1070, 1851, 1852, 2912, 2912, 1838, 1838, 1837, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 1830, 2316, 1850, 1070, + 1851, 1852, 1837, 1850, 1070, 1851, 1852, 2317, 2912, 2912, + 1838, 1853, 2912, 1837, 1830, 2912, 2912, 2912, 2912, 1830, + 1854, 2316, 2912, 2318, 2014, 1232, 2015, 2014, 2912, 1853, + + 2912, 2912, 2317, 2912, 1853, 2912, 1853, 2912, 1854, 2912, + 2016, 2912, 2912, 2319, 1854, 2912, 2912, 2912, 2318, 2912, + 2912, 2912, 2912, 2321, 1853, 2017, 2912, 2912, 2912, 1853, + 2912, 2912, 1854, 2912, 2018, 2912, 2912, 2319, 2014, 1232, + 2015, 2014, 2912, 2014, 1232, 2015, 2014, 2912, 2321, 2912, + 2017, 2912, 2912, 2912, 2016, 2912, 2912, 2912, 2018, 2016, + 2324, 1568, 2325, 2324, 2096, 1325, 2097, 2098, 2912, 2017, + 1850, 1070, 1851, 1852, 2017, 2912, 2016, 2912, 2018, 2912, + 1830, 2322, 2912, 2018, 2323, 2912, 1830, 1850, 1070, 1851, + 1852, 2017, 2912, 2912, 2017, 1853, 2912, 2326, 2912, 2017, + + 2018, 1853, 2018, 1830, 1854, 2322, 2912, 2018, 2323, 2912, + 2331, 2912, 2912, 2912, 2330, 2912, 2017, 2912, 1853, 2912, + 1853, 2326, 2912, 2912, 2018, 2912, 1853, 1854, 1854, 2335, + 1019, 2336, 2337, 2912, 2331, 1794, 395, 1795, 1796, 2330, + 2912, 2912, 2912, 1853, 2912, 1793, 2335, 1019, 2336, 2337, + 2912, 1854, 2912, 2912, 1794, 395, 1795, 1796, 2912, 2912, + 2338, 2912, 1793, 2912, 2912, 2912, 1722, 2912, 2912, 2339, + 1789, 2912, 1722, 2912, 2912, 2452, 2912, 2338, 2912, 2345, + 2912, 1722, 2912, 1722, 2912, 2338, 2339, 2912, 2912, 2912, + 2912, 1722, 2912, 2339, 2912, 2912, 1722, 2912, 2912, 2452, + + 2912, 2912, 2338, 2912, 2345, 2912, 1722, 2912, 1722, 2912, + 2339, 1651, 2335, 1019, 2336, 2340, 1651, 1651, 1651, 1651, + 1651, 1651, 1651, 2912, 2912, 1651, 1651, 1651, 1793, 2912, + 1651, 2912, 1651, 1651, 1651, 1651, 1651, 1794, 395, 1795, + 1796, 2912, 2912, 2341, 2912, 1794, 395, 1795, 1796, 2912, + 2912, 2912, 2342, 1789, 2912, 2912, 2912, 2912, 2912, 2912, + 1651, 1789, 2912, 2912, 1722, 2912, 1722, 2912, 2341, 2912, + 2360, 2912, 1722, 2912, 1722, 2912, 2342, 2912, 2912, 2912, + 2359, 2912, 2912, 2912, 1651, 1651, 2912, 2912, 2912, 1722, + 2912, 1722, 2912, 2912, 2912, 2360, 2912, 1722, 2912, 1722, + + 2361, 1047, 2362, 2363, 2359, 2367, 1053, 2368, 2369, 2912, + 2912, 2912, 2367, 1053, 2368, 2369, 2364, 2361, 1047, 2362, + 2375, 2370, 2912, 2367, 1053, 2368, 2369, 2912, 2370, 2912, + 2912, 2365, 2912, 2364, 2912, 2912, 2371, 2912, 2912, 2370, + 2366, 2373, 2912, 2371, 2912, 2372, 2912, 2912, 2376, 2912, + 2912, 2912, 2372, 2912, 2371, 2912, 2365, 2377, 2912, 2912, + 2912, 2371, 2374, 2372, 2366, 2912, 2373, 2912, 2371, 2372, + 2912, 2912, 2912, 2376, 2912, 2912, 2372, 2912, 2912, 2371, + 2912, 2377, 2912, 2912, 2912, 2912, 2374, 2372, 1651, 2378, + 1064, 2379, 2380, 1651, 1651, 1651, 1651, 1651, 1651, 1651, + + 2912, 2912, 1651, 1651, 1651, 2381, 2912, 1651, 2912, 1651, + 1651, 1651, 1651, 1651, 2912, 2384, 1070, 2385, 2386, 2912, + 2382, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2383, + 2912, 2364, 2912, 2384, 1070, 2385, 2386, 1651, 2384, 1070, + 2385, 2386, 2912, 2912, 2912, 2382, 2387, 2912, 2912, 2364, + 2912, 2912, 2912, 2383, 2364, 2388, 2912, 2912, 2912, 2912, + 2912, 1651, 1651, 2912, 2387, 2912, 2912, 2389, 2912, 2387, + 2912, 2387, 2390, 2388, 1833, 1053, 1834, 1835, 2388, 2388, + 2912, 2912, 2912, 2912, 1833, 1053, 1834, 1835, 2912, 2387, + 1836, 2912, 2389, 2912, 2387, 2912, 2390, 2388, 2912, 2912, + + 1836, 2391, 2388, 2912, 2912, 1837, 2912, 2912, 2912, 2393, + 2439, 1111, 2440, 2446, 1838, 1837, 2124, 1365, 2125, 2126, + 1833, 1053, 1834, 1835, 1838, 2912, 2391, 2912, 2912, 2912, + 1837, 2912, 1836, 2912, 2393, 2912, 1836, 2912, 1838, 2912, + 1837, 2447, 1990, 1206, 1991, 1990, 2912, 1837, 1838, 2912, + 2448, 1837, 2912, 2912, 2912, 2912, 1838, 2912, 1992, 2912, + 2394, 2912, 2399, 1610, 2400, 2399, 2447, 2912, 2912, 2912, + 2912, 2912, 1837, 1993, 2448, 2912, 1837, 2912, 1992, 2912, + 1838, 2912, 1994, 2398, 2394, 2912, 2912, 2912, 1990, 1206, + 1991, 1990, 2912, 1993, 2302, 1544, 2303, 2302, 1993, 2304, + + 2912, 2912, 1994, 2912, 1992, 2912, 1994, 2398, 2912, 2912, + 1992, 2302, 1544, 2303, 2302, 2912, 2912, 2912, 1993, 1993, + 2912, 2401, 2912, 2304, 2912, 2062, 1994, 1992, 1994, 2912, + 2912, 2304, 2912, 2912, 2063, 2912, 2912, 1990, 1206, 1991, + 1990, 2912, 2062, 2912, 1993, 2912, 2401, 2912, 2304, 2912, + 2062, 2063, 1994, 1992, 2912, 2304, 2912, 2912, 2063, 2912, + 2912, 2912, 2402, 2145, 1388, 2146, 2147, 2062, 1993, 2912, + 2912, 2912, 2304, 2912, 2912, 2063, 2912, 1994, 2912, 1836, + 1833, 1053, 1834, 1835, 2912, 2912, 2912, 2402, 2912, 2912, + 2912, 2912, 2912, 1993, 1837, 2912, 1836, 2912, 2912, 2912, + + 2148, 1994, 2912, 1838, 2912, 2209, 874, 2210, 2211, 2912, + 2912, 1837, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 1837, + 2404, 1789, 2912, 2912, 2148, 2912, 2912, 1838, 2912, 2912, + 2912, 2912, 1722, 2912, 1722, 2912, 1837, 2912, 2000, 1217, + 2001, 2000, 2912, 2912, 2404, 2405, 1617, 2406, 2407, 2312, + 1555, 2313, 2312, 2912, 2002, 2912, 2408, 1722, 2912, 1722, + 2912, 1836, 2912, 2912, 2912, 2002, 2912, 2912, 2912, 2003, + 2912, 2411, 2000, 1217, 2001, 2000, 1837, 2912, 2004, 2912, + 2003, 2912, 2912, 2912, 1913, 1838, 2314, 2912, 2002, 2004, + 2312, 1555, 2313, 2312, 2003, 2912, 2411, 2412, 2912, 2912, + + 2912, 1837, 2004, 2003, 2912, 2003, 2002, 2912, 1913, 1838, + 2314, 2912, 2004, 2004, 2912, 2912, 2154, 1397, 2155, 2156, + 2912, 2003, 2412, 2912, 2912, 2912, 2912, 2314, 2003, 2912, + 2004, 2912, 1836, 2912, 2912, 2912, 2004, 2912, 2912, 2160, + 1403, 2161, 2162, 2912, 2912, 2912, 2003, 1837, 2912, 2912, + 2912, 2314, 2912, 2148, 2004, 1830, 1838, 2912, 1850, 1070, + 1851, 1852, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 1853, 2912, 1837, 2912, 1830, 2912, 2163, 2148, 2912, 1854, + 1838, 2413, 1625, 2414, 2415, 2912, 2912, 2912, 2912, 1853, + 2912, 2912, 2416, 2912, 2912, 1853, 2912, 1836, 2417, 2912, + + 2163, 2912, 2912, 1854, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 1837, 2912, 1853, 2912, 2912, 2912, 2912, 2912, + 1913, 1838, 2417, 2014, 1232, 2015, 2014, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 1837, 2912, 2016, + 2912, 2912, 2912, 2912, 1913, 1838, 2418, 1630, 2419, 2420, + 2912, 2912, 2912, 2912, 2017, 2912, 2912, 2421, 2424, 1636, + 2425, 2424, 1830, 2018, 2423, 2912, 2912, 2912, 2014, 1232, + 2015, 2014, 2912, 2912, 2016, 2912, 2912, 1853, 2912, 2017, + 2324, 1568, 2325, 2324, 2016, 1926, 1854, 2018, 2423, 2017, + 2324, 1568, 2325, 2324, 2912, 2326, 2016, 2912, 2018, 2017, + + 2912, 2426, 1853, 2912, 2912, 2912, 2016, 2912, 2018, 1926, + 1854, 2084, 2912, 2912, 2017, 2912, 2912, 2326, 2912, 2326, + 2085, 2084, 2018, 2912, 2017, 2912, 2426, 2326, 2912, 2912, + 2085, 2912, 2018, 2912, 2912, 2912, 2084, 2014, 1232, 2015, + 2014, 2326, 2912, 2912, 2085, 2912, 2084, 2912, 2912, 2912, + 2912, 2326, 2912, 2016, 2085, 2178, 1421, 2179, 2180, 2912, + 2912, 2912, 2427, 2912, 2912, 2912, 2912, 2912, 2017, 2912, + 2912, 1830, 2912, 2335, 1019, 2336, 2337, 2018, 2335, 1019, + 2336, 2337, 2912, 2912, 2912, 2912, 1853, 2427, 2912, 1793, + 2912, 2912, 2163, 2017, 1793, 1854, 2912, 2912, 2912, 2912, + + 2912, 2018, 2912, 2912, 2338, 2912, 2912, 2912, 2912, 2338, + 2912, 1853, 2912, 2339, 2912, 2912, 2163, 2912, 2339, 1854, + 2432, 1645, 2433, 2434, 2439, 1111, 2440, 2441, 2912, 2338, + 2912, 2435, 2912, 2912, 2338, 2912, 1830, 2339, 2912, 2912, + 2381, 2912, 2339, 2912, 2912, 2912, 2367, 1053, 2368, 2369, + 2912, 1853, 2912, 2912, 2912, 2442, 2912, 2912, 2912, 1926, + 1854, 2912, 2370, 2912, 2443, 2367, 1053, 2368, 2369, 2912, + 2912, 2912, 2912, 2912, 2912, 2444, 1853, 2371, 2912, 2912, + 2442, 2370, 2912, 1926, 1854, 2912, 2372, 2912, 2443, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2371, 2912, 2912, 2912, + + 2444, 2912, 2371, 2912, 2445, 2372, 2349, 1033, 2350, 2349, + 2372, 2912, 2912, 2912, 2912, 2912, 2349, 1033, 2350, 2349, + 2912, 2371, 1948, 2356, 1041, 2357, 2356, 2912, 2445, 2372, + 2912, 2912, 1948, 2912, 2912, 2912, 2912, 2035, 2912, 1956, + 2912, 2912, 2912, 2455, 2912, 2912, 2036, 2035, 2912, 2912, + 2912, 2912, 2912, 2455, 2042, 2912, 2036, 2912, 2912, 2912, + 2459, 2912, 2035, 2043, 2912, 2912, 2912, 2455, 2912, 2912, + 2036, 2912, 2035, 2356, 1041, 2357, 2356, 2455, 2912, 2042, + 2036, 2912, 2912, 2912, 2459, 2912, 2912, 2043, 2912, 1956, + 1794, 395, 1795, 1796, 2912, 2361, 1047, 2362, 2363, 2361, + + 1047, 2362, 2363, 2912, 2042, 2912, 1789, 2912, 2912, 2912, + 2459, 2364, 2912, 2043, 2912, 2364, 2912, 1722, 2912, 1722, + 2912, 2912, 2361, 1047, 2362, 2363, 2365, 2912, 2912, 2042, + 2365, 2912, 2912, 2460, 2459, 2366, 2912, 2043, 2364, 2366, + 2912, 2912, 1722, 2912, 1722, 2367, 1053, 2368, 2369, 2912, + 2912, 2365, 2912, 2365, 2912, 2365, 2912, 2460, 2912, 2366, + 2912, 2370, 2366, 2366, 2367, 1053, 2368, 2369, 2912, 2912, + 2912, 2912, 2912, 2912, 2462, 2912, 2371, 2912, 2365, 2912, + 2370, 2367, 1053, 2368, 2367, 2372, 2366, 2912, 2912, 2912, + 2912, 2367, 1053, 2368, 2367, 2371, 2912, 2370, 2912, 2462, + + 2912, 2371, 2912, 2463, 2372, 2912, 2912, 2370, 2912, 2372, + 2912, 2912, 2464, 2367, 1053, 2368, 2369, 2912, 2912, 2912, + 2371, 2465, 2464, 2912, 2912, 2912, 2912, 2463, 2372, 2370, + 2912, 2465, 2367, 1053, 2368, 2369, 2912, 2464, 2912, 2912, + 2912, 2912, 2912, 2912, 2371, 2465, 2912, 2464, 2370, 2912, + 2912, 2912, 2912, 2372, 2912, 2465, 2912, 2912, 2912, 2912, + 2912, 2467, 2912, 2371, 2367, 1053, 2368, 2369, 2912, 2371, + 2912, 2912, 2372, 2912, 2912, 2912, 2912, 2372, 2912, 2912, + 2370, 2367, 1053, 2368, 2369, 2912, 2467, 2912, 2371, 2912, + 2912, 2367, 1053, 2368, 2369, 2371, 2372, 2370, 2361, 1047, + + 2362, 2375, 2912, 2468, 2372, 2912, 2912, 2370, 2912, 2912, + 2912, 2912, 2371, 2912, 2364, 2912, 2912, 2912, 2912, 2469, + 2371, 2372, 2371, 2912, 2912, 2912, 2912, 2468, 2372, 2376, + 2912, 2372, 2470, 2912, 2912, 2912, 2912, 2371, 2377, 2912, + 2912, 2912, 2912, 2469, 2912, 2372, 2912, 2371, 2384, 1070, + 2385, 2386, 2912, 2912, 2376, 2372, 2470, 2912, 2384, 1070, + 2385, 2386, 2377, 2912, 2364, 2912, 2912, 2912, 2378, 1064, + 2379, 2378, 2912, 2912, 2364, 2912, 2912, 2471, 2912, 2387, + 2378, 1064, 2379, 2378, 2381, 2912, 2912, 2912, 2388, 2387, + 2912, 2912, 2912, 2912, 2912, 2912, 2381, 2472, 2388, 2473, + + 2912, 2912, 2471, 2912, 2387, 2912, 2912, 2912, 2474, 2912, + 2912, 2473, 2388, 2912, 2387, 2384, 1070, 2385, 2384, 2912, + 2474, 2472, 2388, 2912, 2473, 2384, 1070, 2385, 2384, 2912, + 2912, 2364, 2474, 2912, 2912, 2912, 2473, 2384, 1070, 2385, + 2386, 2364, 2912, 2912, 2474, 2912, 2478, 2912, 2912, 2912, + 2912, 2912, 2912, 2364, 2912, 2479, 2478, 2384, 1070, 2385, + 2386, 2912, 2912, 2912, 2912, 2479, 2912, 2912, 2376, 2912, + 2912, 2478, 2912, 2364, 2912, 2912, 2912, 2377, 2912, 2479, + 2912, 2478, 2912, 2912, 2912, 2912, 2480, 2912, 2387, 2479, + 2912, 2912, 2912, 2376, 2912, 2912, 2912, 2388, 2912, 2912, + + 2912, 2377, 2384, 1070, 2385, 2386, 2384, 1070, 2385, 2386, + 2912, 2480, 2912, 2387, 2912, 2912, 2912, 2912, 2364, 2912, + 2912, 2388, 2364, 2384, 1070, 2385, 2386, 2912, 2912, 1833, + 1053, 1834, 1835, 2387, 2912, 2912, 2912, 2387, 2912, 2364, + 2912, 2481, 2388, 2912, 2482, 1836, 2388, 2912, 2912, 2912, + 2428, 1641, 2429, 2430, 2387, 2912, 2912, 2912, 2387, 2912, + 1837, 2421, 2387, 2388, 2483, 2481, 2388, 2912, 2482, 2485, + 2388, 2912, 2912, 2214, 1462, 2215, 2216, 2912, 2912, 2387, + 2912, 1892, 2912, 2912, 2912, 1837, 2912, 2388, 2483, 1836, + 1893, 2912, 2912, 2485, 2912, 1990, 1206, 1991, 1990, 2912, + + 2912, 2912, 2912, 2912, 1837, 2912, 1892, 2912, 2912, 2912, + 2148, 1992, 2912, 1838, 1893, 2399, 1610, 2400, 2399, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 1993, 2912, 2493, 1837, + 2912, 1992, 2912, 2912, 2148, 1994, 2912, 1838, 2486, 1688, + 2487, 2488, 2912, 2912, 2912, 2912, 2062, 2912, 2912, 2416, + 2912, 1993, 2494, 2493, 1836, 2063, 2912, 2912, 2912, 1994, + 2912, 2912, 2912, 2912, 2912, 1990, 1206, 1991, 1990, 1837, + 2912, 2062, 2399, 1610, 2400, 2399, 2494, 1913, 1838, 2063, + 2912, 1992, 1990, 1206, 1991, 1990, 2912, 2912, 1992, 2912, + 2912, 2912, 2495, 2912, 1837, 2912, 1993, 2912, 1992, 2912, + + 2912, 1913, 1838, 2062, 2912, 1994, 2912, 2912, 2912, 2494, + 2912, 2912, 2063, 1993, 2912, 2912, 2912, 2495, 2912, 2912, + 2912, 1993, 2496, 2912, 2405, 1617, 2406, 2405, 2062, 1994, + 2912, 2912, 2912, 2494, 2912, 2503, 2063, 2912, 1993, 2912, + 1836, 2405, 1617, 2406, 2405, 2912, 2496, 2499, 1701, 2500, + 2501, 2912, 2503, 2912, 2912, 1909, 2912, 1836, 2502, 2405, + 1617, 2406, 2407, 1836, 1910, 2912, 2912, 2912, 2912, 2912, + 2408, 2912, 1909, 2912, 2912, 1836, 2912, 2912, 1837, 2912, + 1909, 1910, 1833, 1053, 1834, 1835, 1913, 1838, 1910, 2912, + 1837, 2912, 2912, 2000, 1217, 2001, 2000, 1909, 1836, 1838, + + 2912, 2912, 2912, 1837, 2912, 1910, 2912, 2912, 2912, 2002, + 1913, 1838, 2912, 1837, 2912, 1837, 2000, 1217, 2001, 2000, + 2505, 2912, 1838, 1838, 2003, 2912, 2912, 2912, 2413, 1625, + 2414, 2413, 2002, 2004, 2912, 2912, 2912, 2912, 1837, 1972, + 2912, 2912, 2912, 2912, 1836, 2505, 1838, 2003, 2912, 2003, + 2413, 1625, 2414, 2413, 2912, 2912, 2506, 2004, 2912, 1909, + 2912, 1972, 2413, 1625, 2414, 2415, 1836, 2912, 1910, 2912, + 2912, 2912, 2003, 2416, 2912, 2912, 2912, 2912, 1836, 2912, + 2506, 1909, 2912, 2912, 1909, 1833, 1053, 1834, 1835, 2912, + 1910, 2912, 1910, 1837, 2912, 2912, 2912, 2912, 2912, 2912, + + 2912, 1836, 1838, 2912, 2912, 2912, 1909, 2912, 2418, 1630, + 2419, 2418, 2912, 2912, 1910, 2912, 1837, 2912, 1837, 2503, + 2912, 2912, 2912, 2912, 1830, 1838, 1838, 2418, 1630, 2419, + 2418, 2418, 1630, 2419, 2420, 2912, 2912, 2912, 2503, 1923, + 2912, 1837, 2421, 1830, 2912, 2912, 2912, 1830, 1924, 1838, + 2507, 1709, 2508, 2509, 2014, 1232, 2015, 2014, 1923, 2912, + 2912, 2510, 1842, 2912, 1923, 2912, 1830, 1924, 2912, 2912, + 2016, 1843, 1924, 2912, 2912, 2912, 2014, 1232, 2015, 2014, + 2912, 1853, 2912, 1923, 2912, 2017, 2912, 1842, 2912, 1926, + 1854, 1924, 2016, 2912, 2514, 1843, 2424, 1636, 2425, 2424, + + 2912, 2209, 874, 2210, 2211, 2912, 1853, 2017, 2912, 2511, + 2017, 2912, 2016, 1926, 1854, 2912, 2018, 1789, 2514, 2424, + 1636, 2425, 2424, 2912, 2912, 2912, 2912, 2084, 1722, 2912, + 1722, 2912, 2017, 2512, 2511, 2016, 2085, 2912, 2912, 2912, + 2018, 2912, 2014, 1232, 2015, 2014, 2912, 2912, 2912, 2912, + 2084, 2912, 2084, 1722, 2912, 1722, 2512, 2512, 2016, 2085, + 2085, 2428, 1641, 2429, 2428, 2428, 1641, 2429, 2428, 2513, + 2912, 2912, 2503, 2017, 2912, 2084, 2503, 1847, 2912, 2912, + 2512, 1847, 2018, 2085, 2432, 1645, 2433, 2432, 2432, 1645, + 2433, 2432, 1918, 2912, 2513, 1972, 1918, 2912, 2017, 1972, + + 1830, 1919, 2912, 2912, 1830, 1919, 2018, 2432, 1645, 2433, + 2434, 2439, 1111, 2440, 2441, 1923, 2912, 1918, 2435, 1923, + 2912, 1918, 2912, 1830, 1924, 1919, 2912, 2381, 1924, 1919, + 2439, 1111, 2440, 2441, 2439, 1111, 2440, 2441, 1842, 2912, + 1923, 2912, 2442, 2912, 1923, 2912, 2381, 1843, 1924, 2912, + 2381, 2443, 1924, 2367, 1053, 2368, 2369, 2367, 1053, 2368, + 2369, 2442, 2912, 1842, 2912, 2442, 2912, 2442, 2912, 2370, + 2443, 1843, 2912, 2370, 2443, 2443, 2912, 2912, 2912, 2912, + 2912, 2912, 2517, 2912, 2371, 2912, 2442, 2912, 2371, 2912, + 2442, 2912, 2912, 2372, 2443, 2912, 2518, 2372, 2443, 2367, + + 1053, 2368, 2369, 2367, 1053, 2368, 2369, 2517, 2912, 2371, + 2912, 2912, 2912, 2371, 2912, 2370, 2912, 2372, 2912, 2370, + 2518, 2372, 2527, 1189, 2528, 2529, 2544, 1206, 2545, 2544, + 2371, 2912, 2912, 2530, 2371, 2912, 2912, 2519, 1789, 2372, + 2912, 2912, 2546, 2372, 2520, 2912, 2912, 2912, 2912, 1722, + 2912, 1722, 2912, 2912, 2912, 2371, 2912, 2547, 2912, 2371, + 2912, 2519, 2912, 2372, 2912, 2912, 2548, 2372, 2520, 1794, + 395, 1795, 1796, 2912, 1722, 2912, 1722, 2367, 1053, 2368, + 2369, 2912, 2547, 2912, 2912, 1789, 2912, 2912, 2912, 2912, + 2548, 2912, 2912, 2370, 2912, 2912, 1722, 2912, 1722, 2912, + + 2912, 2912, 2542, 2367, 1053, 2368, 2369, 2912, 2371, 2554, + 1217, 2555, 2554, 2912, 2912, 2549, 2912, 2372, 2912, 2370, + 2912, 1722, 2912, 1722, 2912, 2556, 2912, 2542, 2912, 2912, + 2912, 2912, 2912, 2371, 2371, 2912, 2912, 2912, 2912, 2549, + 2557, 2372, 2912, 2372, 2550, 2367, 1053, 2368, 2369, 2558, + 2367, 1053, 2368, 2369, 2912, 2912, 2912, 2912, 2912, 2371, + 2912, 2370, 2912, 2912, 2912, 2557, 2370, 2372, 2550, 2912, + 2912, 2912, 2912, 2558, 2912, 2912, 2371, 2912, 2912, 2912, + 2912, 2371, 2912, 2559, 2912, 2372, 2367, 1053, 2368, 2369, + 2372, 2560, 2367, 1053, 2368, 2369, 2384, 1070, 2385, 2386, + + 2912, 2371, 2370, 2912, 2912, 2912, 2371, 2559, 2370, 2372, + 2912, 2912, 2364, 2912, 2372, 2560, 2912, 2371, 2912, 2912, + 2912, 2561, 2912, 2371, 2912, 2912, 2372, 2387, 2912, 2562, + 2912, 2912, 2372, 2912, 2563, 2912, 2388, 2912, 2384, 1070, + 2385, 2386, 2371, 2912, 2912, 2912, 2561, 2912, 2371, 2912, + 2372, 2912, 2387, 2562, 2364, 2912, 2372, 2912, 2563, 2912, + 2388, 2568, 1232, 2569, 2568, 2912, 2912, 2912, 2912, 2387, + 2912, 2912, 2912, 2384, 1070, 2385, 2386, 2570, 2388, 2564, + 2912, 2912, 2912, 2384, 1070, 2385, 2386, 2912, 2912, 2364, + 2912, 2912, 2571, 2912, 2387, 2912, 2912, 2912, 2912, 2364, + + 2912, 2572, 2388, 2564, 2387, 2384, 1070, 2385, 2386, 2912, + 2912, 2577, 2912, 2388, 2387, 2912, 2912, 2571, 2912, 2912, + 2912, 2364, 2912, 2388, 2578, 2572, 2912, 2912, 2912, 2387, + 2912, 2912, 2912, 2912, 2579, 2577, 2387, 2388, 2912, 2387, + 2384, 1070, 2385, 2386, 2912, 2388, 2912, 2388, 2578, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2364, 2912, 2912, 2579, + 2912, 2387, 2486, 1688, 2487, 2486, 2912, 2912, 2912, 2388, + 2912, 2387, 2912, 1972, 2486, 1688, 2487, 2486, 1836, 2912, + 2388, 2912, 2912, 2580, 2912, 1972, 2912, 2912, 2912, 2912, + 1836, 2912, 2912, 1909, 2912, 2912, 2387, 2912, 2912, 2912, + + 2912, 2912, 1910, 2912, 2388, 1909, 2912, 2580, 2582, 1760, + 2583, 2584, 2912, 2912, 1910, 2912, 2912, 2912, 1909, 2502, + 2486, 1688, 2487, 2488, 1836, 2912, 1910, 2912, 2912, 2912, + 1909, 2416, 2912, 2912, 2912, 2912, 1836, 2912, 1910, 1837, + 2912, 2912, 2490, 1692, 2491, 2490, 2912, 1913, 1838, 2912, + 2912, 1837, 2912, 1972, 2490, 1692, 2491, 2490, 1847, 2912, + 1838, 2912, 2912, 2912, 1837, 1972, 2912, 2912, 2912, 2912, + 1847, 1913, 1838, 1918, 2912, 2912, 1837, 2490, 1692, 2491, + 2492, 2912, 1919, 2912, 1838, 1918, 2912, 2912, 2435, 2912, + 2912, 2912, 2912, 2912, 1919, 2912, 2912, 2912, 1918, 1990, + + 1206, 1991, 1990, 2912, 2912, 2912, 1919, 2912, 1892, 2912, + 1918, 2912, 2912, 2912, 2912, 1992, 2912, 1893, 1919, 1990, + 1206, 1991, 1990, 2912, 2912, 2912, 2588, 2912, 2912, 2912, + 1993, 2912, 2912, 1892, 2912, 1992, 2912, 2912, 2912, 1994, + 2912, 1893, 2912, 2912, 2589, 2302, 1544, 2303, 2302, 2912, + 1993, 2588, 2912, 2912, 2912, 1993, 2912, 2912, 2912, 1994, + 2912, 1992, 2912, 1994, 1833, 1053, 1834, 1835, 2912, 2589, + 2912, 2912, 2912, 2912, 2912, 1993, 1993, 2912, 2912, 2912, + 1836, 2912, 2304, 1994, 2912, 1994, 2912, 2499, 1701, 2500, + 2499, 2499, 1701, 2500, 2499, 1837, 2912, 2912, 2498, 2912, + + 2912, 1993, 2498, 1836, 1838, 2912, 2304, 1836, 2912, 1994, + 2590, 1768, 2591, 2590, 2499, 1701, 2500, 2501, 1909, 2912, + 1837, 2592, 1909, 2912, 2912, 2502, 1992, 1910, 1838, 2912, + 1836, 1910, 2312, 1555, 2313, 2312, 2912, 2912, 2912, 2912, + 2912, 1993, 2912, 1909, 2912, 1837, 2912, 1909, 2002, 2066, + 1994, 1910, 2912, 2912, 1838, 1910, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2003, 2912, 2912, 1993, 2912, 2912, 2314, + 1837, 2912, 2004, 2066, 1994, 2912, 2912, 2912, 1838, 2507, + 1709, 2508, 2507, 2912, 2912, 2912, 2912, 2912, 2003, 2912, + 2498, 2912, 2912, 2314, 2912, 1830, 2004, 2593, 1772, 2594, + + 2593, 2507, 1709, 2508, 2507, 2912, 2912, 2912, 2595, 2912, + 1923, 2912, 2498, 2002, 2912, 2912, 2912, 1830, 2912, 1924, + 2912, 2912, 2912, 2507, 1709, 2508, 2509, 2912, 2003, 2912, + 2912, 2912, 1923, 2912, 2510, 1923, 2073, 2004, 2912, 1830, + 2912, 1924, 2912, 1924, 2912, 2912, 2014, 1232, 2015, 2014, + 2912, 2912, 2912, 2003, 1842, 2912, 2912, 1923, 2912, 2912, + 2073, 2004, 2016, 1843, 2912, 1924, 2014, 1232, 2015, 2014, + 2912, 2912, 2912, 2596, 2912, 2912, 2912, 2017, 2912, 1842, + 2912, 2912, 2016, 2912, 2912, 2912, 2018, 1843, 2912, 2912, + 2912, 2597, 2324, 1568, 2325, 2324, 2912, 2017, 2596, 2912, + + 2912, 2912, 2017, 2912, 2912, 2912, 2018, 2912, 2016, 2912, + 2018, 2912, 2912, 2912, 2912, 2912, 2597, 2912, 2912, 2912, + 2912, 2912, 2017, 2017, 2912, 2912, 2912, 2912, 2912, 2326, + 2018, 2912, 2018, 2912, 2912, 2912, 2367, 1053, 2368, 2369, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2017, 2912, + 2912, 2912, 2370, 2326, 2912, 2912, 2018, 2598, 1778, 2599, + 2598, 2912, 2367, 1053, 2368, 2369, 2912, 2371, 2600, 2912, + 2912, 2912, 2912, 2016, 2602, 2912, 2372, 2912, 2370, 2367, + 1053, 2368, 2369, 2912, 2912, 2912, 2912, 2912, 2017, 2912, + 2912, 2912, 2371, 2371, 2912, 2370, 2088, 2018, 2602, 2912, + + 2372, 2912, 2372, 2603, 2912, 2912, 2912, 2912, 2604, 2912, + 2371, 2912, 2912, 2017, 2367, 1053, 2368, 2369, 2371, 2372, + 2088, 2018, 2912, 2912, 2912, 2912, 2372, 2603, 2912, 2912, + 2370, 2912, 2912, 2604, 2912, 2371, 2527, 1189, 2528, 2527, + 2912, 2912, 2912, 2372, 2912, 2371, 2912, 2526, 2527, 1189, + 2528, 2527, 1789, 2912, 2372, 2912, 2912, 2605, 2912, 2526, + 2912, 2912, 2912, 2912, 1789, 2912, 2912, 1877, 2912, 2912, + 2371, 2531, 1193, 2532, 2531, 2912, 1878, 2912, 2372, 1877, + 2912, 2605, 2526, 2531, 1193, 2532, 2531, 1793, 1878, 2912, + 2912, 2912, 1877, 2912, 2526, 2912, 2912, 2912, 2912, 1793, + + 1878, 2912, 1872, 2912, 1877, 2531, 1193, 2532, 2533, 2912, + 2912, 1873, 1878, 2912, 1872, 2912, 2530, 2537, 1199, 2538, + 2537, 2912, 2912, 1873, 2912, 2912, 2912, 1872, 2526, 2912, + 2912, 2912, 2912, 1793, 2912, 1873, 1874, 2912, 2912, 1872, + 2537, 1199, 2538, 2537, 2912, 1875, 2912, 1873, 1872, 2912, + 2912, 2526, 2537, 1199, 2538, 2539, 1793, 1873, 2912, 2912, + 2912, 1874, 2912, 2530, 2912, 2912, 2912, 2912, 2912, 1875, + 2912, 1872, 2912, 1872, 1794, 395, 1795, 1796, 2912, 2912, + 1873, 1873, 2912, 1874, 2544, 1206, 2545, 2544, 2912, 2912, + 1789, 2912, 1875, 2912, 2912, 2912, 1872, 2912, 2912, 2912, + + 2546, 1722, 2912, 1722, 1873, 2912, 2912, 2912, 1874, 2912, + 2912, 2912, 2912, 2612, 2912, 2547, 1875, 2912, 2544, 1206, + 2545, 2544, 2912, 2912, 2548, 2912, 1722, 2912, 1722, 2544, + 1206, 2545, 2544, 2912, 2546, 2912, 2912, 2612, 2912, 2912, + 2547, 2544, 1206, 2545, 2544, 2546, 2912, 2912, 2548, 2613, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2615, 2614, 2912, + 2613, 2544, 1206, 2545, 2544, 2912, 2912, 2912, 2912, 2614, + 2912, 2912, 2547, 2912, 2613, 2912, 2912, 2546, 2912, 2912, + 2912, 2548, 2614, 2912, 2912, 2613, 2912, 2912, 2912, 2912, + 2616, 2912, 2547, 2614, 2912, 2912, 2912, 2547, 2912, 2912, + + 2912, 2548, 2912, 2912, 2912, 2548, 2544, 1206, 2545, 2544, + 2367, 1053, 2368, 2369, 2912, 2616, 2912, 2547, 2912, 2912, + 2912, 2912, 2546, 2912, 2912, 2548, 2370, 2912, 2367, 1053, + 2368, 2369, 2554, 1217, 2555, 2554, 2912, 2547, 2912, 2618, + 2912, 2371, 2912, 2912, 2370, 2617, 2548, 2912, 2556, 2912, + 2372, 2554, 1217, 2555, 2554, 2912, 2912, 2912, 2912, 2371, + 2912, 2912, 2547, 2557, 2618, 2912, 2371, 2556, 2372, 2617, + 2548, 2619, 2558, 2912, 2372, 2912, 2912, 2554, 1217, 2555, + 2554, 2912, 2557, 2912, 2371, 2912, 2912, 2912, 2557, 2912, + 2912, 2558, 2372, 2556, 2912, 2619, 2558, 2554, 1217, 2555, + + 2554, 2912, 2912, 2554, 1217, 2555, 2554, 2557, 2557, 2554, + 1217, 2555, 2554, 2622, 2912, 2558, 2912, 2558, 2912, 2556, + 2912, 2912, 2912, 2912, 2912, 2556, 2912, 2912, 2557, 2912, + 2912, 2912, 2623, 2557, 2557, 2912, 2912, 2558, 2912, 2912, + 2557, 2558, 2912, 2558, 2912, 2912, 2912, 2912, 2624, 2558, + 2912, 2912, 2912, 2557, 2912, 2912, 2912, 2623, 2912, 2557, + 2912, 2558, 2912, 2912, 2912, 2557, 2912, 2558, 2367, 1053, + 2368, 2369, 2624, 2558, 2367, 1053, 2368, 2369, 2367, 1053, + 2368, 2369, 2912, 2912, 2370, 2912, 2912, 2912, 2912, 2912, + 2370, 2912, 2912, 2912, 2370, 2912, 2912, 2625, 2912, 2371, + + 2628, 1306, 2629, 2630, 2912, 2371, 2912, 2912, 2372, 2371, + 2912, 2912, 2912, 2912, 2372, 2912, 2370, 2626, 2372, 2627, + 2912, 2912, 2625, 2912, 2371, 2912, 2912, 2912, 2912, 2912, + 2371, 2371, 2372, 2912, 2371, 2912, 2912, 2912, 2372, 2912, + 2372, 2626, 2372, 2627, 2384, 1070, 2385, 2386, 2912, 2384, + 1070, 2385, 2386, 2912, 2912, 2912, 2371, 2912, 2912, 2912, + 2364, 2912, 2912, 2912, 2372, 2364, 2568, 1232, 2569, 2568, + 2912, 2912, 2912, 2631, 2912, 2387, 2912, 2912, 2912, 2912, + 2387, 2912, 2570, 2912, 2388, 2912, 2912, 2912, 2912, 2388, + 2912, 2912, 2632, 2568, 1232, 2569, 2568, 2571, 2631, 2912, + + 2387, 2912, 2912, 2912, 2912, 2387, 2572, 2912, 2388, 2570, + 2912, 2912, 2912, 2388, 2912, 2912, 2632, 2912, 2912, 2912, + 2912, 2912, 2571, 2912, 2635, 2568, 1232, 2569, 2568, 2912, + 2572, 2912, 2912, 2636, 2912, 2568, 1232, 2569, 2568, 2912, + 2912, 2570, 2568, 1232, 2569, 2568, 2912, 2912, 2912, 2635, + 2912, 2637, 2912, 2912, 2912, 2912, 2635, 2636, 2570, 2912, + 2912, 2568, 1232, 2569, 2568, 2636, 2571, 2912, 2912, 2912, + 2912, 2638, 2912, 2571, 2912, 2572, 2912, 2570, 2912, 2912, + 2912, 2635, 2572, 2912, 2912, 2912, 2912, 2912, 2912, 2636, + 2912, 2571, 2571, 2912, 2912, 2912, 2638, 2912, 2571, 2572, + + 2639, 2572, 2384, 1070, 2385, 2386, 2572, 2384, 1070, 2385, + 2386, 2912, 2384, 1070, 2385, 2386, 2912, 2571, 2364, 2912, + 2912, 2912, 2912, 2364, 2639, 2572, 2912, 2912, 2364, 2912, + 2912, 2644, 2912, 2387, 2912, 2912, 2912, 2912, 2387, 2912, + 2912, 2912, 2388, 2387, 2912, 2912, 2912, 2388, 2912, 2912, + 2645, 2912, 2388, 2646, 2912, 2912, 2644, 2912, 2387, 2647, + 1325, 2648, 2649, 2387, 2912, 2912, 2388, 2912, 2387, 2912, + 2912, 2388, 2912, 2912, 2645, 2364, 2388, 2646, 2582, 1760, + 2583, 2582, 2582, 1760, 2583, 2582, 2912, 2912, 2912, 2498, + 2387, 2912, 2912, 2498, 1836, 2912, 2912, 2912, 1836, 2388, + + 2582, 1760, 2583, 2584, 2912, 2912, 2912, 2912, 2912, 1909, + 2912, 2502, 2912, 1909, 2912, 2387, 1836, 2912, 1910, 2912, + 2912, 2912, 1910, 2388, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 1837, 2912, 2912, 1909, 2912, 2912, 2912, 1909, 2912, + 1838, 2912, 1910, 2912, 2912, 2912, 1910, 2585, 1763, 2586, + 2585, 2585, 1763, 2586, 2585, 2912, 1837, 2912, 2498, 2912, + 2912, 2912, 2498, 1847, 1838, 2912, 2912, 1847, 2585, 1763, + 2586, 2587, 2912, 2399, 1610, 2400, 2399, 2912, 1918, 2510, + 2912, 2912, 1918, 2912, 2912, 2912, 2912, 1919, 2912, 1992, + 2912, 1919, 2912, 2912, 2912, 2845, 1641, 2846, 2847, 1892, + + 2912, 2912, 2912, 1918, 1993, 2912, 2838, 1918, 1893, 2912, + 2304, 1919, 2912, 1994, 2912, 1919, 2912, 1990, 1206, 1991, + 1990, 2912, 2912, 2912, 1892, 2912, 2447, 2912, 2912, 1993, + 2912, 2912, 1893, 1992, 2304, 2448, 2912, 1994, 2590, 1768, + 2591, 2590, 2912, 2912, 2590, 1768, 2591, 2590, 1993, 2592, + 2912, 2447, 2912, 2912, 1992, 2592, 2912, 2650, 2912, 2448, + 1992, 1990, 1206, 1991, 1990, 2912, 2912, 2912, 2912, 2062, + 2912, 2912, 2912, 1993, 2912, 2062, 2912, 1992, 2063, 2912, + 2912, 2650, 2912, 2912, 2063, 2912, 2912, 2593, 1772, 2594, + 2593, 2912, 1993, 2912, 2062, 2912, 2912, 2912, 2595, 2912, + + 2062, 1994, 2063, 2002, 2593, 1772, 2594, 2593, 2063, 2912, + 2000, 1217, 2001, 2000, 2912, 2595, 2912, 1993, 2003, 2912, + 2002, 2424, 1636, 2425, 2424, 1994, 2002, 2004, 2912, 2912, + 2912, 2014, 1232, 2015, 2014, 2003, 2912, 2016, 2912, 2912, + 2912, 2003, 2912, 2003, 2004, 2912, 2912, 2016, 2912, 2912, + 2004, 2004, 2017, 2598, 1778, 2599, 2598, 2912, 2326, 2912, + 2003, 2018, 2017, 2912, 2600, 2912, 2003, 2912, 2004, 2016, + 2912, 2651, 2912, 2912, 2004, 2912, 2912, 2017, 2912, 2912, + 2912, 2912, 2326, 2912, 2084, 2018, 2912, 2017, 2598, 1778, + 2599, 2598, 2912, 2085, 2912, 2651, 2912, 2912, 2912, 2600, + + 2014, 1232, 2015, 2014, 2016, 2367, 1053, 2368, 2369, 2084, + 2367, 1053, 2368, 2369, 2912, 2912, 2016, 2085, 2912, 2084, + 2912, 2370, 2912, 2912, 2912, 2912, 2370, 2912, 2085, 2912, + 2912, 2017, 2912, 2912, 2653, 2912, 2371, 2912, 2912, 2912, + 2018, 2371, 2912, 2912, 2084, 2372, 2912, 2912, 2912, 2912, + 2372, 2912, 2085, 2654, 2912, 2912, 2017, 2912, 2912, 2653, + 2912, 2371, 2912, 2912, 2018, 2912, 2371, 2912, 2912, 2372, + 2367, 1053, 2368, 2369, 2372, 2912, 2912, 2654, 2912, 2912, + 2912, 2656, 1365, 2657, 2658, 2912, 2370, 1794, 395, 1795, + 1796, 2544, 1206, 2545, 2544, 2912, 2912, 2370, 2912, 2912, + + 2912, 2371, 2912, 1789, 2912, 2912, 2912, 2546, 2912, 2912, + 2372, 2655, 2371, 2912, 1722, 2912, 1722, 2544, 1206, 2545, + 2544, 2372, 2547, 2912, 2912, 2671, 2371, 2912, 2912, 2912, + 2673, 2548, 2912, 2546, 2372, 2655, 2912, 2371, 2912, 1722, + 2912, 1722, 2912, 2912, 2912, 2372, 2672, 2547, 2547, 2671, + 2912, 2912, 2912, 2912, 2673, 2548, 2912, 2548, 2544, 1206, + 2545, 2544, 2544, 1206, 2545, 2544, 2912, 2912, 2912, 2912, + 2912, 2672, 2912, 2547, 2615, 2912, 2912, 2912, 2546, 2912, + 2912, 2548, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2547, + 2912, 2912, 2912, 2547, 2544, 1206, 2545, 2544, 2548, 2912, + + 2674, 2912, 2548, 2912, 2912, 2367, 1053, 2368, 2369, 2912, + 2546, 2912, 2912, 2912, 2547, 2912, 2912, 2912, 2547, 2912, + 2912, 2370, 2548, 2912, 2674, 2547, 2548, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2548, 2675, 2371, 2677, 1388, 2678, + 2679, 2554, 1217, 2555, 2554, 2372, 2676, 2912, 2912, 2912, + 2547, 2912, 2912, 2370, 2912, 2912, 2912, 2622, 2548, 2675, + 2912, 2371, 2912, 2912, 2554, 1217, 2555, 2554, 2371, 2372, + 2676, 2912, 2557, 2912, 2680, 2912, 2912, 2372, 2912, 2912, + 2556, 2558, 2912, 2554, 1217, 2555, 2554, 2912, 2912, 2912, + 2912, 2912, 2912, 2371, 2912, 2557, 2912, 2557, 2680, 2556, + + 2912, 2372, 2683, 2912, 2558, 2558, 2912, 2912, 2912, 2367, + 1053, 2368, 2369, 2912, 2557, 2686, 1397, 2687, 2688, 2912, + 2557, 2912, 2912, 2558, 2684, 2370, 2683, 2912, 2558, 2912, + 2912, 2370, 2912, 2912, 2912, 2367, 1053, 2368, 2369, 2557, + 2371, 2628, 1306, 2629, 2628, 2912, 2371, 2558, 2684, 2372, + 2685, 2370, 2680, 2912, 2912, 2372, 2912, 2370, 2912, 2912, + 2912, 2628, 1306, 2629, 2628, 2371, 2371, 2912, 2689, 2912, + 2912, 2371, 2464, 2372, 2685, 2372, 2680, 2370, 2264, 2372, + 2912, 2465, 2912, 2912, 2628, 1306, 2629, 2630, 2912, 2912, + 2912, 2371, 2464, 2689, 2912, 2912, 2912, 2464, 2264, 2372, + + 2370, 2465, 2264, 2912, 2912, 2465, 2912, 2912, 2912, 2912, + 2384, 1070, 2385, 2386, 2912, 2371, 2912, 2464, 2912, 2912, + 2912, 2690, 2264, 2912, 2372, 2465, 2364, 2692, 1403, 2693, + 2694, 2568, 1232, 2569, 2568, 2912, 2912, 2912, 2912, 2912, + 2371, 2387, 2912, 2364, 2912, 2690, 2912, 2570, 2372, 2912, + 2388, 2691, 2912, 2568, 1232, 2569, 2568, 2912, 2387, 2912, + 2698, 2912, 2571, 2912, 2695, 2912, 2387, 2388, 2912, 2570, + 2912, 2572, 2912, 2912, 2388, 2691, 2912, 2912, 2912, 2859, + 1692, 2860, 2861, 2387, 2571, 2698, 2912, 2571, 2695, 2912, + 2852, 2388, 2699, 2572, 2912, 2572, 2568, 1232, 2569, 2568, + + 2912, 2912, 2568, 1232, 2569, 2568, 2912, 2912, 2912, 2571, + 2447, 2912, 2637, 2912, 2912, 2912, 2699, 2572, 2570, 2448, + 2912, 2912, 2568, 1232, 2569, 2568, 2912, 2571, 2384, 1070, + 2385, 2386, 2912, 2571, 2912, 2447, 2572, 2912, 2570, 2912, + 2700, 2912, 2572, 2448, 2364, 2710, 1421, 2711, 2712, 2912, + 2912, 2912, 2571, 2571, 2912, 2912, 2912, 2912, 2571, 2387, + 2572, 2364, 2572, 2701, 2700, 2912, 2572, 2912, 2388, 2709, + 2912, 2912, 2384, 1070, 2385, 2386, 2387, 2912, 2571, 2912, + 2912, 2912, 2695, 2912, 2387, 2388, 2572, 2701, 2364, 2912, + 2912, 2912, 2388, 2709, 2647, 1325, 2648, 2647, 2912, 2912, + + 2912, 2387, 2912, 2387, 2912, 2713, 2695, 2912, 2912, 2388, + 2364, 2912, 2388, 2912, 2912, 2912, 2647, 1325, 2648, 2647, + 2912, 2912, 2912, 2912, 2912, 2478, 2912, 2912, 2387, 2912, + 2713, 2264, 2364, 2912, 2479, 2912, 2388, 2912, 2647, 1325, + 2648, 2649, 2912, 2912, 2912, 2912, 2912, 2478, 2912, 2912, + 2478, 2912, 2912, 2264, 2364, 2264, 2479, 2912, 2479, 2912, + 2367, 1053, 2368, 2369, 2912, 2912, 2912, 2912, 2912, 2376, + 2912, 2912, 2478, 2912, 2912, 2714, 2370, 2264, 2377, 2912, + 2479, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2371, 2912, 2912, 2376, 2912, 2912, 2912, 2912, 2714, + + 2372, 2722, 2377, 2715, 1931, 2716, 2715, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2717, 2912, 2371, 2912, 2912, 1992, + 2912, 2912, 2912, 2912, 2372, 2722, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 1993, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2066, 1994, 2912, 2723, 1462, 2724, 2725, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 1993, + 2912, 2370, 2367, 1053, 2368, 2369, 2066, 1994, 2718, 1935, + 2719, 2718, 2912, 2912, 2912, 2912, 2371, 2912, 2370, 2720, + 2912, 2912, 2680, 2912, 2016, 2372, 2912, 2912, 2656, 1365, + 2657, 2656, 2912, 2371, 2912, 2726, 2912, 2912, 2912, 2017, + + 2912, 2371, 2372, 2912, 2370, 2912, 2680, 2088, 2018, 2372, + 2912, 2656, 1365, 2657, 2656, 2912, 2912, 2912, 2371, 2464, + 2726, 2912, 2912, 2912, 2017, 2271, 2372, 2370, 2465, 2912, + 2912, 2088, 2018, 2912, 2656, 1365, 2657, 2658, 2912, 2912, + 2912, 2912, 2464, 2912, 2464, 2912, 2912, 2912, 2271, 2271, + 2370, 2465, 2465, 2912, 2662, 1371, 2663, 2662, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2371, 2912, 2464, 2912, 2912, + 2381, 2727, 2271, 2912, 2372, 2465, 2662, 1371, 2663, 2662, + 2662, 1371, 2663, 2664, 2912, 2473, 2912, 2912, 2912, 2912, + 2371, 2271, 2381, 2912, 2474, 2727, 2912, 2912, 2372, 2912, + + 2912, 2912, 2912, 2665, 1374, 2666, 2665, 2473, 2912, 2912, + 2473, 2447, 2912, 2271, 2667, 2271, 2474, 2733, 2474, 1948, + 2448, 2912, 2665, 1374, 2666, 2665, 2544, 1206, 2545, 2544, + 2912, 2912, 2473, 2667, 2035, 2912, 2447, 2271, 1948, 2912, + 2474, 2733, 2546, 2036, 2448, 2668, 1378, 2669, 2668, 2668, + 1378, 2669, 2668, 2035, 2912, 2912, 2670, 2547, 2912, 2035, + 2670, 1956, 2036, 2912, 2734, 1956, 2548, 2036, 2912, 2912, + 2912, 2544, 1206, 2545, 2544, 2912, 2042, 2912, 2035, 2912, + 2042, 2912, 2547, 2912, 2912, 2043, 2036, 2546, 2734, 2043, + 2548, 2544, 1206, 2545, 2544, 2912, 2912, 2703, 1414, 2704, + + 2705, 2042, 2547, 2912, 2912, 2042, 2912, 2546, 2912, 2043, + 2912, 2548, 2735, 2043, 2912, 2912, 2912, 2912, 2912, 2912, + 2736, 2912, 2547, 2544, 1206, 2545, 2544, 2547, 2447, 2912, + 2912, 2548, 2912, 2912, 2706, 2548, 2735, 2448, 2912, 2546, + 2367, 1053, 2368, 2369, 2912, 2736, 2912, 2547, 2912, 2912, + 2912, 2912, 2912, 2447, 2547, 2548, 2370, 2912, 2706, 2912, + 2912, 2448, 2912, 2548, 2912, 2912, 2737, 2912, 2912, 2912, + 2912, 2371, 2912, 2738, 2912, 2677, 1388, 2678, 2677, 2547, + 2372, 2912, 2912, 2912, 2912, 2912, 2912, 2548, 2912, 2912, + 2737, 2370, 2677, 1388, 2678, 2677, 2371, 2912, 2738, 2912, + + 2912, 2912, 2912, 2912, 2372, 2912, 2464, 2912, 2370, 2912, + 2912, 2912, 2739, 2912, 2912, 2465, 2912, 2912, 2677, 1388, + 2678, 2679, 2912, 2464, 2912, 2912, 2912, 2912, 2912, 2739, + 2912, 2464, 2465, 2912, 2370, 2912, 2739, 2912, 2912, 2465, + 2912, 2367, 1053, 2368, 2369, 2912, 2912, 2912, 2464, 2371, + 2912, 2912, 2912, 2739, 2912, 2740, 2465, 2370, 2372, 2554, + 1217, 2555, 2554, 2912, 2912, 2912, 2741, 2912, 2912, 2912, + 2912, 2912, 2371, 2912, 2371, 2556, 2912, 2912, 2912, 2740, + 2912, 2372, 2372, 2912, 2912, 2912, 2912, 2912, 2745, 2912, + 2557, 2741, 2912, 2554, 1217, 2555, 2554, 2371, 2912, 2558, + + 2686, 1397, 2687, 2686, 2912, 2372, 2912, 2912, 2912, 2556, + 2912, 2912, 2912, 2745, 2912, 2557, 2370, 2912, 2912, 2367, + 1053, 2368, 2369, 2558, 2557, 2912, 2912, 2912, 2912, 2912, + 2912, 2464, 2912, 2558, 2912, 2370, 2746, 2744, 2912, 2912, + 2465, 2912, 2686, 1397, 2687, 2686, 2912, 2912, 2912, 2557, + 2371, 2912, 2747, 2912, 2912, 2912, 2464, 2558, 2370, 2372, + 2746, 2744, 2912, 2912, 2465, 2686, 1397, 2687, 2688, 2912, + 2912, 2912, 2912, 2464, 2912, 2371, 2912, 2747, 2912, 2744, + 2912, 2370, 2465, 2372, 2367, 1053, 2368, 2369, 2367, 1053, + 2368, 2369, 2912, 2912, 2912, 2912, 2371, 2912, 2464, 2912, + + 2370, 2912, 2680, 2744, 2370, 2372, 2465, 2912, 2912, 2912, + 2912, 2748, 2912, 2749, 2912, 2371, 2912, 2912, 2912, 2371, + 2912, 2371, 2912, 2912, 2372, 2912, 2680, 2912, 2372, 2372, + 2384, 1070, 2385, 2386, 2912, 2912, 2748, 2912, 2749, 2912, + 2371, 2912, 2912, 2912, 2371, 2912, 2364, 2912, 2372, 2912, + 2912, 2912, 2372, 2692, 1403, 2693, 2692, 2912, 2912, 2912, + 2912, 2387, 2912, 2750, 2692, 1403, 2693, 2692, 2912, 2364, + 2388, 2692, 1403, 2693, 2694, 2912, 2912, 2912, 2912, 2912, + 2364, 2912, 2912, 2912, 2478, 2912, 2387, 2364, 2750, 2912, + 2739, 2912, 2912, 2479, 2388, 2478, 2912, 2912, 2912, 2912, + + 2912, 2739, 2376, 2912, 2479, 2912, 2912, 2912, 2751, 2478, + 2912, 2377, 2912, 2912, 2739, 2912, 2912, 2479, 2912, 2912, + 2478, 2384, 1070, 2385, 2386, 2739, 2912, 2376, 2479, 2912, + 2912, 2912, 2751, 2912, 2912, 2377, 2912, 2364, 2568, 1232, + 2569, 2568, 2568, 1232, 2569, 2568, 2752, 2912, 2912, 2912, + 2912, 2912, 2387, 2912, 2570, 2912, 2912, 2912, 2570, 2912, + 2912, 2388, 2912, 2912, 2568, 1232, 2569, 2568, 2912, 2571, + 2912, 2752, 2912, 2571, 2912, 2912, 2755, 2387, 2572, 2912, + 2570, 2912, 2572, 2756, 2912, 2388, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2757, 2571, 2571, 2912, 2912, 2571, 2912, + + 2755, 2912, 2572, 2912, 2572, 2912, 2572, 2756, 2568, 1232, + 2569, 2568, 2912, 2703, 1414, 2704, 2703, 2912, 2757, 2912, + 2571, 2912, 2912, 2912, 2570, 2912, 2912, 2912, 2572, 2381, + 2703, 1414, 2704, 2703, 2912, 2912, 2912, 2912, 2912, 2571, + 2384, 1070, 2385, 2386, 2473, 2912, 2381, 2912, 2572, 2912, + 2744, 2758, 2912, 2474, 2912, 2912, 2364, 2912, 2912, 2912, + 2912, 2473, 2912, 2912, 2571, 2912, 2912, 2744, 2912, 2473, + 2474, 2387, 2572, 2763, 2744, 2758, 2912, 2474, 2912, 2912, + 2388, 2710, 1421, 2711, 2710, 2912, 2473, 2912, 2912, 2912, + 2912, 2744, 2912, 2912, 2474, 2912, 2387, 2364, 2763, 2710, + + 1421, 2711, 2710, 2912, 2388, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2478, 2912, 2912, 2364, 2912, 2912, 2744, 2912, + 2912, 2479, 2710, 1421, 2711, 2712, 2912, 2912, 2912, 2912, + 2478, 2912, 2912, 2912, 2912, 2912, 2744, 2478, 2364, 2479, + 2912, 2912, 2744, 2912, 2912, 2479, 2912, 2912, 2384, 1070, + 2385, 2386, 2912, 2376, 2912, 2478, 2912, 2912, 2912, 2695, + 2744, 2912, 2377, 2479, 2364, 2384, 1070, 2385, 2386, 2912, + 2912, 2715, 1931, 2716, 2715, 2764, 2912, 2912, 2376, 2387, + 2912, 2364, 2717, 2695, 2912, 2912, 2377, 1992, 2388, 2912, + 2765, 2912, 2715, 1931, 2716, 2715, 2387, 2912, 2912, 2912, + + 2764, 2912, 2062, 2717, 2387, 2388, 2912, 2912, 1992, 2912, + 2912, 2063, 2388, 2912, 2912, 2765, 2912, 2912, 2912, 2912, + 2912, 2387, 2912, 2062, 2912, 2912, 2912, 2062, 2912, 2388, + 2912, 2912, 2063, 2912, 2912, 2063, 1990, 1206, 1991, 1990, + 2912, 2912, 2718, 1935, 2719, 2718, 2912, 2912, 2062, 2912, + 2912, 2912, 1992, 2720, 2912, 2912, 2063, 2912, 2016, 2718, + 1935, 2719, 2718, 2014, 1232, 2015, 2014, 1993, 2912, 2912, + 2720, 2912, 2912, 2084, 2912, 2016, 1994, 2912, 2912, 2016, + 2912, 2912, 2085, 2912, 2912, 2367, 1053, 2368, 2369, 2912, + 2084, 2912, 1993, 2912, 2017, 2912, 2912, 2912, 2084, 2085, + + 1994, 2370, 2912, 2018, 2912, 2912, 2085, 2912, 2723, 1462, + 2724, 2723, 2912, 2912, 2912, 2084, 2371, 2912, 2766, 2017, + 2912, 2912, 2912, 2085, 2370, 2372, 2912, 2018, 2723, 1462, + 2724, 2723, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2464, + 2912, 2371, 2912, 2766, 2370, 2767, 2912, 2912, 2465, 2372, + 2723, 1462, 2724, 2725, 2912, 2912, 2912, 2912, 2912, 2464, + 2367, 1053, 2368, 2369, 2464, 2767, 2370, 2912, 2465, 2767, + 2912, 2912, 2465, 2912, 2912, 2912, 2370, 2367, 1053, 2368, + 2369, 2371, 2912, 2912, 2464, 2770, 2912, 2768, 2912, 2767, + 2372, 2371, 2465, 2370, 2912, 2912, 2912, 2912, 2912, 2912, + + 2372, 2912, 2912, 2912, 2769, 2912, 2371, 2912, 2371, 2912, + 2770, 2768, 2912, 2912, 2372, 2912, 2371, 2372, 2729, 1468, + 2730, 2729, 2912, 2912, 2372, 2729, 1468, 2730, 2731, 2769, + 2912, 2912, 2912, 2371, 2381, 2729, 1468, 2730, 2729, 2912, + 2912, 2372, 2912, 2912, 2912, 2544, 1206, 2545, 2544, 2473, + 2912, 2381, 2912, 2912, 2912, 2767, 2447, 2912, 2474, 2912, + 2912, 2546, 2772, 2912, 2912, 2448, 2473, 2912, 2912, 2912, + 2912, 2912, 2767, 2912, 2473, 2474, 2547, 2912, 2912, 2767, + 2912, 2447, 2474, 2912, 2912, 2548, 2772, 2912, 2776, 2448, + 2912, 2473, 2544, 1206, 2545, 2544, 2767, 2912, 2912, 2474, + + 2912, 2547, 2544, 1206, 2545, 2544, 2912, 2912, 2546, 2548, + 2912, 2912, 2776, 2778, 1544, 2779, 2778, 2912, 2546, 2912, + 2912, 2775, 2912, 2547, 2367, 1053, 2368, 2369, 2912, 2546, + 2912, 2912, 2548, 2547, 2912, 2912, 2912, 2912, 2912, 2912, + 2370, 2912, 2548, 2777, 2547, 2912, 2775, 2912, 2547, 2912, + 2780, 2781, 2912, 2548, 2912, 2371, 2548, 2912, 2547, 2367, + 1053, 2368, 2369, 2912, 2372, 2912, 2548, 2777, 2912, 2547, + 2367, 1053, 2368, 2369, 2780, 2370, 2781, 2548, 2912, 2912, + 2371, 2912, 2912, 2912, 2783, 2912, 2370, 2912, 2372, 2912, + 2371, 2554, 1217, 2555, 2554, 2912, 2912, 2912, 2912, 2372, + + 2912, 2371, 2788, 1555, 2789, 2788, 2912, 2556, 2912, 2783, + 2784, 2912, 2912, 2912, 2912, 2371, 2912, 2912, 2556, 2912, + 2912, 2912, 2557, 2372, 2912, 2912, 2371, 2912, 2912, 2912, + 2912, 2558, 2787, 2557, 2784, 2912, 2912, 2912, 2912, 2790, + 2912, 2912, 2558, 2367, 1053, 2368, 2369, 2557, 2628, 1306, + 2629, 2630, 2912, 2912, 2912, 2558, 2787, 2912, 2557, 2370, + 2912, 2912, 2912, 2790, 2370, 2912, 2558, 2912, 2912, 2912, + 2791, 2912, 2912, 2912, 2371, 2367, 1053, 2368, 2369, 2371, + 2912, 2912, 2912, 2372, 2912, 2912, 2912, 2912, 2372, 2912, + 2912, 2370, 2912, 2912, 2912, 2791, 2912, 2912, 2912, 2371, + + 2912, 2912, 2912, 2912, 2371, 2912, 2371, 2372, 2912, 2912, + 2912, 2912, 2372, 2912, 2912, 2792, 2384, 1070, 2385, 2386, + 2384, 1070, 2385, 2386, 2912, 2912, 2384, 1070, 2385, 2386, + 2912, 2371, 2364, 2912, 2912, 2912, 2364, 2912, 2912, 2792, + 2912, 2912, 2364, 2793, 2912, 2794, 2912, 2387, 2912, 2912, + 2912, 2387, 2912, 2912, 2912, 2912, 2388, 2387, 2912, 2912, + 2388, 2912, 2568, 1232, 2569, 2568, 2795, 2912, 2793, 2912, + 2794, 2912, 2387, 2912, 2912, 2912, 2387, 2912, 2570, 2912, + 2388, 2912, 2387, 2912, 2388, 2912, 2912, 2912, 2912, 2912, + 2795, 2797, 2912, 2571, 2568, 1232, 2569, 2568, 2568, 1232, + + 2569, 2568, 2572, 2912, 2800, 1568, 2801, 2800, 2912, 2912, + 2570, 2912, 2912, 2912, 2570, 2912, 2797, 2912, 2571, 2912, + 2570, 2912, 2912, 2912, 2912, 2571, 2572, 2912, 2912, 2571, + 2912, 2912, 2912, 2912, 2572, 2571, 2912, 2798, 2572, 2799, + 2912, 2802, 2912, 2912, 2572, 2912, 2912, 2912, 2912, 2912, + 2571, 2912, 2912, 2912, 2571, 2912, 2912, 2912, 2572, 2912, + 2571, 2798, 2572, 2799, 2912, 2802, 2912, 2912, 2572, 2384, + 1070, 2385, 2386, 2647, 1325, 2648, 2649, 2912, 2912, 2384, + 1070, 2385, 2386, 2912, 2912, 2364, 2912, 2912, 2912, 2364, + 2912, 2912, 2912, 2912, 2912, 2364, 2806, 2912, 2912, 2912, + + 2387, 2912, 2912, 2912, 2387, 2912, 2912, 2912, 2912, 2388, + 2387, 2912, 2912, 2388, 2367, 1053, 2368, 2369, 2912, 2807, + 2912, 2806, 2912, 2912, 2912, 2387, 2912, 2912, 2912, 2387, + 2370, 2912, 2912, 2388, 2912, 2387, 2912, 2388, 2912, 2912, + 2912, 2808, 2912, 2807, 2912, 2371, 2367, 1053, 2368, 2369, + 2912, 2912, 2912, 2912, 2372, 2912, 2912, 2656, 1365, 2657, + 2658, 2912, 2370, 2912, 2912, 2912, 2808, 2912, 2912, 2912, + 2371, 2810, 2912, 2370, 2912, 2912, 2912, 2371, 2372, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2372, 2912, 2371, 2367, + 1053, 2368, 2369, 2912, 2912, 2912, 2810, 2372, 2912, 2912, + + 2912, 2912, 2371, 2912, 2912, 2370, 2544, 1206, 2545, 2544, + 2372, 2912, 2912, 2371, 2912, 2912, 2912, 2912, 2912, 2912, + 2371, 2372, 2546, 2816, 1610, 2817, 2816, 2912, 2912, 2811, + 2912, 2912, 2912, 2544, 1206, 2545, 2544, 2547, 2912, 2546, + 2912, 2912, 2912, 2912, 2912, 2371, 2548, 2815, 2912, 2546, + 2912, 2912, 2912, 2811, 2547, 2912, 2912, 2912, 2912, 2912, + 2780, 2912, 2547, 2548, 2547, 2912, 2818, 2912, 2912, 2912, + 2548, 2815, 2912, 2548, 2778, 1544, 2779, 2778, 2912, 2547, + 2912, 2912, 2912, 2912, 2780, 2912, 2912, 2548, 2912, 2547, + 2546, 2818, 2778, 1544, 2779, 2778, 2912, 2548, 2912, 2912, + + 2912, 2912, 2912, 2912, 2912, 2613, 2912, 2912, 2546, 2912, + 2912, 2780, 2912, 2912, 2614, 2544, 1206, 2545, 2544, 2912, + 2912, 2912, 2912, 2613, 2912, 2912, 2912, 2912, 2912, 2780, + 2613, 2546, 2614, 2912, 2912, 2780, 2912, 2912, 2614, 2912, + 2819, 2677, 1388, 2678, 2679, 2912, 2547, 2912, 2613, 2912, + 2912, 2912, 2912, 2780, 2912, 2548, 2614, 2370, 2367, 1053, + 2368, 2369, 2912, 2912, 2912, 2819, 2912, 2912, 2912, 2912, + 2912, 2547, 2371, 2912, 2370, 2912, 2912, 2912, 2680, 2548, + 2912, 2372, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2371, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2371, 2821, 2912, + + 2912, 2912, 2680, 2912, 2912, 2372, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2371, 2912, 2554, 1217, 2555, 2554, + 2912, 2912, 2821, 2822, 1617, 2823, 2824, 2788, 1555, 2789, + 2788, 2912, 2556, 2912, 2825, 2912, 2912, 2912, 2912, 2370, + 2912, 2912, 2912, 2556, 2912, 2912, 2912, 2557, 2912, 2828, + 2554, 1217, 2555, 2554, 2371, 2912, 2558, 2912, 2557, 2912, + 2912, 2912, 2468, 2372, 2790, 2912, 2556, 2558, 2788, 1555, + 2789, 2788, 2557, 2912, 2828, 2829, 2912, 2912, 2912, 2371, + 2558, 2557, 2912, 2557, 2556, 2912, 2468, 2372, 2790, 2912, + 2558, 2558, 2912, 2912, 2686, 1397, 2687, 2688, 2912, 2557, + + 2829, 2912, 2912, 2912, 2912, 2790, 2557, 2912, 2558, 2912, + 2370, 2912, 2912, 2912, 2558, 2912, 2912, 2692, 1403, 2693, + 2694, 2912, 2912, 2912, 2557, 2371, 2912, 2912, 2912, 2790, + 2912, 2680, 2558, 2364, 2372, 2912, 2384, 1070, 2385, 2386, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2387, 2912, + 2371, 2912, 2364, 2912, 2695, 2680, 2912, 2388, 2372, 2830, + 1625, 2831, 2832, 2912, 2912, 2912, 2912, 2387, 2912, 2912, + 2833, 2912, 2912, 2387, 2912, 2370, 2834, 2912, 2695, 2912, + 2912, 2388, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2371, 2912, 2387, 2912, 2912, 2912, 2912, 2912, 2468, 2372, + + 2834, 2568, 1232, 2569, 2568, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2371, 2912, 2570, 2912, 2912, + 2912, 2912, 2468, 2372, 2835, 1630, 2836, 2837, 2912, 2912, + 2912, 2912, 2571, 2912, 2912, 2838, 2841, 1636, 2842, 2841, + 2364, 2572, 2840, 2912, 2912, 2912, 2568, 1232, 2569, 2568, + 2912, 2912, 2570, 2912, 2912, 2387, 2912, 2571, 2800, 1568, + 2801, 2800, 2570, 2481, 2388, 2572, 2840, 2571, 2800, 1568, + 2801, 2800, 2912, 2802, 2570, 2912, 2572, 2571, 2912, 2843, + 2387, 2912, 2912, 2912, 2570, 2912, 2572, 2481, 2388, 2635, + 2912, 2912, 2571, 2912, 2912, 2802, 2912, 2802, 2636, 2635, + + 2572, 2912, 2571, 2912, 2843, 2802, 2912, 2912, 2636, 2912, + 2572, 2912, 2912, 2912, 2635, 2568, 1232, 2569, 2568, 2802, + 2912, 2912, 2636, 2912, 2635, 2912, 2912, 2912, 2912, 2802, + 2912, 2570, 2636, 2710, 1421, 2711, 2712, 2912, 2912, 2912, + 2844, 2912, 2912, 2912, 2912, 2912, 2571, 2912, 2912, 2364, + 2912, 2723, 1462, 2724, 2725, 2572, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2387, 2844, 2912, 2370, 2912, 2912, + 2695, 2571, 2912, 2388, 2912, 2912, 2912, 2912, 2912, 2572, + 2912, 2912, 2371, 2912, 2912, 2912, 2912, 2912, 2680, 2387, + 2912, 2372, 2912, 2912, 2695, 2912, 2912, 2388, 2849, 1645, + + 2850, 2851, 2367, 1053, 2368, 2369, 2912, 2371, 2912, 2852, + 2912, 2912, 2680, 2912, 2364, 2372, 2912, 2912, 2370, 2912, + 2912, 2912, 2912, 2912, 2544, 1206, 2545, 2544, 2912, 2387, + 2912, 2912, 2912, 2371, 2912, 2912, 2912, 2481, 2388, 2912, + 2546, 2912, 2854, 2912, 2816, 1610, 2817, 2816, 2912, 2912, + 2912, 2912, 2912, 2912, 2387, 2547, 2912, 2862, 2371, 2912, + 2546, 2481, 2388, 2912, 2548, 2912, 2854, 2855, 1688, 2856, + 2857, 2912, 2912, 2912, 2912, 2613, 2912, 2912, 2833, 2912, + 2547, 2863, 2862, 2370, 2614, 2912, 2912, 2912, 2548, 2912, + 2912, 2912, 2912, 2912, 2544, 1206, 2545, 2544, 2371, 2912, + + 2613, 2816, 1610, 2817, 2816, 2863, 2468, 2372, 2614, 2912, + 2546, 2544, 1206, 2545, 2544, 2912, 2912, 2546, 2912, 2912, + 2912, 2864, 2912, 2371, 2912, 2547, 2912, 2546, 2912, 2912, + 2468, 2372, 2613, 2912, 2548, 2912, 2912, 2912, 2863, 2912, + 2912, 2614, 2547, 2912, 2912, 2912, 2864, 2912, 2912, 2912, + 2547, 2865, 2912, 2822, 1617, 2823, 2822, 2613, 2548, 2912, + 2912, 2912, 2863, 2912, 2872, 2614, 2912, 2547, 2912, 2370, + 2822, 1617, 2823, 2822, 2912, 2865, 2868, 1701, 2869, 2870, + 2912, 2872, 2912, 2912, 2464, 2912, 2370, 2871, 2822, 1617, + 2823, 2824, 2370, 2465, 2912, 2912, 2912, 2912, 2912, 2825, + + 2912, 2464, 2912, 2912, 2370, 2912, 2912, 2371, 2912, 2464, + 2465, 2367, 1053, 2368, 2369, 2468, 2372, 2465, 2912, 2371, + 2912, 2912, 2554, 1217, 2555, 2554, 2464, 2370, 2372, 2912, + 2912, 2912, 2371, 2912, 2465, 2912, 2912, 2912, 2556, 2468, + 2372, 2912, 2371, 2912, 2371, 2554, 1217, 2555, 2554, 2874, + 2912, 2372, 2372, 2557, 2912, 2912, 2912, 2830, 1625, 2831, + 2830, 2556, 2558, 2912, 2912, 2912, 2912, 2371, 2526, 2912, + 2912, 2912, 2912, 2370, 2874, 2372, 2557, 2912, 2557, 2830, + 1625, 2831, 2830, 2912, 2912, 2875, 2558, 2912, 2464, 2912, + 2526, 2830, 1625, 2831, 2832, 2370, 2912, 2465, 2912, 2912, + + 2912, 2557, 2833, 2912, 2912, 2912, 2912, 2370, 2912, 2875, + 2464, 2912, 2912, 2464, 2367, 1053, 2368, 2369, 2912, 2465, + 2912, 2465, 2371, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2370, 2372, 2912, 2912, 2912, 2464, 2912, 2835, 1630, 2836, + 2835, 2912, 2912, 2465, 2912, 2371, 2912, 2371, 2872, 2912, + 2912, 2912, 2912, 2364, 2372, 2372, 2835, 1630, 2836, 2835, + 2835, 1630, 2836, 2837, 2912, 2912, 2912, 2872, 2478, 2912, + 2371, 2838, 2364, 2912, 2912, 2912, 2364, 2479, 2372, 2876, + 1709, 2877, 2878, 2568, 1232, 2569, 2568, 2478, 2912, 2912, + 2879, 2376, 2912, 2478, 2912, 2364, 2479, 2912, 2912, 2570, + + 2377, 2479, 2912, 2912, 2912, 2568, 1232, 2569, 2568, 2912, + 2387, 2912, 2478, 2912, 2571, 2912, 2376, 2912, 2481, 2388, + 2479, 2570, 2912, 2883, 2377, 2841, 1636, 2842, 2841, 2912, + 2912, 2912, 2912, 2912, 2912, 2387, 2571, 2912, 2880, 2571, + 2912, 2570, 2481, 2388, 2912, 2572, 2912, 2883, 2841, 1636, + 2842, 2841, 2912, 2912, 2912, 2912, 2635, 2912, 2912, 2912, + 2912, 2571, 2881, 2880, 2570, 2636, 2912, 2912, 2912, 2572, + 2912, 2568, 1232, 2569, 2568, 2912, 2912, 2912, 2912, 2635, + 2912, 2635, 2912, 2912, 2912, 2881, 2881, 2570, 2636, 2636, + 2845, 1641, 2846, 2845, 2845, 1641, 2846, 2845, 2882, 2912, + + 2912, 2872, 2571, 2912, 2635, 2872, 2381, 2912, 2912, 2881, + 2381, 2572, 2636, 2849, 1645, 2850, 2849, 2849, 1645, 2850, + 2849, 2473, 2912, 2882, 2526, 2473, 2912, 2571, 2526, 2364, + 2474, 2912, 2912, 2364, 2474, 2572, 2849, 1645, 2850, 2851, + 2912, 2912, 2912, 2912, 2478, 2912, 2473, 2852, 2478, 2912, + 2473, 2912, 2364, 2479, 2474, 2912, 2912, 2479, 2474, 2855, + 1688, 2856, 2855, 2912, 2912, 2912, 2912, 2376, 2912, 2478, + 2526, 2912, 2912, 2478, 2912, 2370, 2377, 2479, 2912, 2912, + 2912, 2479, 2855, 1688, 2856, 2855, 2912, 2912, 2912, 2912, + 2464, 2912, 2376, 2526, 2855, 1688, 2856, 2857, 2370, 2465, + + 2377, 2885, 1760, 2886, 2887, 2833, 2912, 2912, 2912, 2912, + 2370, 2912, 2871, 2464, 2912, 2464, 2912, 2370, 2912, 2912, + 2912, 2912, 2465, 2465, 2912, 2371, 2912, 2912, 2859, 1692, + 2860, 2859, 2371, 2912, 2372, 2912, 2912, 2912, 2464, 2526, + 2468, 2372, 2912, 2912, 2381, 2912, 2465, 2912, 2912, 2912, + 2371, 2859, 1692, 2860, 2859, 2912, 2912, 2371, 2372, 2473, + 2912, 2912, 2526, 2912, 2468, 2372, 2912, 2381, 2474, 2544, + 1206, 2545, 2544, 2544, 1206, 2545, 2544, 2912, 2912, 2912, + 2912, 2912, 2473, 2912, 2473, 2546, 2912, 2912, 2912, 2546, + 2912, 2474, 2474, 2912, 2912, 2912, 2891, 2912, 2892, 2912, + + 2547, 2912, 2912, 2912, 2547, 2912, 2912, 2473, 2912, 2548, + 2912, 2912, 2912, 2548, 2912, 2474, 2778, 1544, 2779, 2778, + 2912, 2891, 2912, 2892, 2912, 2547, 2912, 2912, 2912, 2547, + 2912, 2912, 2546, 2548, 2912, 2912, 2912, 2548, 2868, 1701, + 2869, 2868, 2912, 2912, 2912, 2912, 2912, 2547, 2912, 2867, + 2912, 2912, 2912, 2780, 2370, 2912, 2548, 2912, 2912, 2868, + 1701, 2869, 2868, 2912, 2912, 2912, 2912, 2912, 2912, 2464, + 2867, 2912, 2547, 2912, 2912, 2370, 2912, 2780, 2465, 2912, + 2548, 2893, 1768, 2894, 2893, 2868, 1701, 2869, 2870, 2912, + 2464, 2912, 2895, 2912, 2464, 2912, 2871, 2546, 2912, 2465, + + 2912, 2370, 2465, 2367, 1053, 2368, 2369, 2912, 2912, 2912, + 2912, 2912, 2547, 2912, 2912, 2464, 2371, 2912, 2912, 2370, + 2617, 2548, 2912, 2465, 2912, 2372, 2788, 1555, 2789, 2788, + 2912, 2912, 2912, 2912, 2371, 2912, 2912, 2547, 2912, 2912, + 2912, 2371, 2556, 2372, 2617, 2548, 2912, 2912, 2912, 2372, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2557, 2912, 2371, + 2912, 2912, 2912, 2790, 2912, 2912, 2558, 2372, 2876, 1709, + 2877, 2876, 2876, 1709, 2877, 2876, 2912, 2912, 2912, 2867, + 2912, 2912, 2557, 2867, 2364, 2912, 2912, 2790, 2364, 2912, + 2558, 2896, 1772, 2897, 2896, 2876, 1709, 2877, 2878, 2478, + + 2912, 2912, 2898, 2478, 2912, 2912, 2879, 2556, 2479, 2912, + 2912, 2364, 2479, 2568, 1232, 2569, 2568, 2568, 1232, 2569, + 2568, 2912, 2557, 2912, 2478, 2912, 2376, 2912, 2478, 2570, + 2624, 2558, 2479, 2570, 2912, 2377, 2479, 2912, 2912, 2912, + 2899, 2912, 2900, 2912, 2571, 2912, 2912, 2557, 2571, 2912, + 2912, 2376, 2912, 2572, 2624, 2558, 2912, 2572, 2912, 2377, + 2800, 1568, 2801, 2800, 2912, 2899, 2912, 2900, 2912, 2571, + 2912, 2912, 2912, 2571, 2912, 2912, 2570, 2572, 2912, 2912, + 2912, 2572, 2885, 1760, 2886, 2885, 2912, 2912, 2912, 2912, + 2912, 2571, 2912, 2867, 2912, 2912, 2912, 2802, 2370, 2912, + + 2572, 2912, 2912, 2885, 1760, 2886, 2885, 2912, 2912, 2912, + 2912, 2912, 2912, 2464, 2867, 2912, 2571, 2912, 2912, 2370, + 2912, 2802, 2465, 2912, 2572, 2901, 1778, 2902, 2901, 2885, + 1760, 2886, 2887, 2912, 2464, 2912, 2903, 2912, 2464, 2912, + 2871, 2570, 2912, 2465, 2912, 2370, 2465, 2888, 1763, 2889, + 2888, 2888, 1763, 2889, 2890, 2912, 2571, 2912, 2867, 2464, + 2371, 2912, 2879, 2381, 2639, 2572, 2912, 2465, 2912, 2372, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2473, 2912, + 2912, 2571, 2447, 2912, 2912, 2371, 2912, 2474, 2639, 2572, + 2912, 2448, 2912, 2372, 2888, 1763, 2889, 2888, 2816, 1610, + + 2817, 2816, 2912, 2473, 2912, 2867, 2912, 2447, 2912, 2912, + 2381, 2474, 2912, 2912, 2546, 2448, 2544, 1206, 2545, 2544, + 2893, 1768, 2894, 2893, 2912, 2473, 2912, 2912, 2912, 2547, + 2912, 2895, 2546, 2912, 2474, 2780, 2546, 2912, 2548, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2547, 2912, 2912, + 2473, 2613, 2912, 2912, 2547, 2912, 2904, 2912, 2474, 2780, + 2614, 2912, 2548, 2893, 1768, 2894, 2893, 2544, 1206, 2545, + 2544, 2912, 2547, 2912, 2895, 2912, 2613, 2912, 2912, 2546, + 2904, 2912, 2912, 2546, 2614, 2896, 1772, 2897, 2896, 2896, + 1772, 2897, 2896, 2912, 2613, 2912, 2898, 2912, 2547, 2912, + + 2898, 2556, 2912, 2614, 2912, 2556, 2912, 2548, 2554, 1217, + 2555, 2554, 2568, 1232, 2569, 2568, 2557, 2912, 2912, 2613, + 2557, 2912, 2912, 2547, 2556, 2558, 2912, 2614, 2570, 2558, + 2912, 2548, 2912, 2912, 2841, 1636, 2842, 2841, 2912, 2557, + 2912, 2557, 2912, 2571, 2912, 2557, 2912, 2912, 2558, 2558, + 2570, 2912, 2905, 2558, 2568, 1232, 2569, 2568, 2912, 2912, + 2912, 2912, 2912, 2912, 2557, 2571, 2912, 2912, 2571, 2912, + 2570, 2802, 2558, 2912, 2572, 2912, 2905, 2901, 1778, 2902, + 2901, 2901, 1778, 2902, 2901, 2571, 2912, 2912, 2903, 2912, + 2571, 2912, 2903, 2570, 2572, 2802, 2912, 2570, 2572, 2912, + + 2906, 1931, 2907, 2906, 2906, 1931, 2907, 2906, 2635, 2912, + 2571, 2908, 2635, 2912, 2912, 2908, 2546, 2636, 2572, 2912, + 2546, 2636, 2912, 2544, 1206, 2545, 2544, 2909, 1935, 2910, + 2909, 2613, 2912, 2635, 2912, 2613, 2912, 2635, 2911, 2546, + 2614, 2636, 2912, 2570, 2614, 2636, 2906, 1931, 2907, 2906, + 2912, 2912, 2912, 2912, 2547, 2912, 2613, 2908, 2635, 2912, + 2613, 2912, 2546, 2548, 2614, 2912, 2912, 2636, 2614, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2547, 2912, 2547, + 2912, 2912, 2912, 2635, 2912, 2617, 2548, 2548, 2912, 2912, + 2912, 2636, 2909, 1935, 2910, 2909, 2912, 2912, 2912, 2912, + + 2912, 2912, 2547, 2911, 2568, 1232, 2569, 2568, 2570, 2617, + 2548, 2909, 1935, 2910, 2909, 2912, 2912, 2912, 2912, 2912, + 2570, 2912, 2911, 2635, 2912, 2912, 2912, 2570, 2912, 2912, + 2912, 2912, 2636, 2912, 2912, 2571, 2912, 2912, 2912, 2912, + 2912, 2912, 2571, 2912, 2572, 2912, 2912, 2912, 2635, 2912, + 2639, 2572, 2912, 2912, 2912, 2912, 2636, 2912, 2912, 2912, + 2571, 2912, 2912, 2912, 2912, 2912, 2912, 2571, 2572, 2912, + 2912, 2912, 2912, 2912, 2639, 2572, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 100, 100, + + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + + 123, 123, 123, 123, 123, 123, 123, 123, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 141, 141, 141, 141, 141, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 141, 141, 141, 2912, 2912, 141, 141, 141, + 141, 139, 139, 139, 139, 139, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 139, 2912, 2912, 2912, 2912, 139, 139, + 139, 139, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 159, 159, 159, 159, 140, 140, + + 140, 140, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 140, 140, 140, 2912, 140, 140, 140, 140, 175, + 175, 175, 175, 175, 2912, 2912, 2912, 2912, 175, 175, + 2912, 175, 175, 175, 175, 2912, 175, 175, 175, 175, + 234, 234, 2912, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 236, 2912, 2912, 236, 2912, 2912, 236, 2912, + 2912, 236, 236, 236, 2912, 2912, 2912, 236, 236, 2912, + 236, 238, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 238, 2912, 2912, 238, 238, 238, 238, 245, 2912, + + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 245, + 2912, 2912, 245, 245, 245, 245, 247, 2912, 2912, 247, + 2912, 2912, 247, 2912, 2912, 247, 247, 247, 247, 2912, + 2912, 247, 247, 2912, 2912, 247, 251, 251, 2912, 251, + 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, + 251, 251, 251, 251, 251, 251, 251, 251, 254, 2912, + 2912, 2912, 2912, 254, 2912, 254, 254, 254, 2912, 2912, + 254, 254, 256, 2912, 2912, 256, 256, 256, 256, 259, + 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, + 259, 259, 259, 259, 259, 2912, 2912, 259, 259, 259, + + 259, 265, 265, 265, 265, 265, 265, 265, 265, 2912, + 2912, 265, 265, 265, 265, 265, 265, 265, 265, 265, + 265, 265, 265, 271, 2912, 2912, 2912, 2912, 271, 271, + 2912, 271, 2912, 271, 2912, 2912, 271, 271, 271, 271, + 272, 272, 2912, 272, 272, 272, 272, 272, 2912, 2912, + 272, 272, 2912, 2912, 272, 272, 272, 272, 272, 272, + 272, 272, 275, 275, 2912, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 139, 139, 139, 139, 139, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + + 2912, 139, 139, 139, 139, 174, 174, 174, 174, 174, + 2912, 2912, 2912, 2912, 174, 174, 2912, 174, 2912, 174, + 174, 2912, 174, 174, 174, 174, 280, 280, 280, 280, + 280, 2912, 2912, 2912, 2912, 280, 280, 2912, 280, 280, + 280, 280, 2912, 280, 280, 280, 280, 291, 291, 291, + 291, 2912, 2912, 2912, 291, 291, 2912, 2912, 2912, 2912, + 291, 291, 2912, 2912, 291, 291, 291, 291, 152, 152, + 2912, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 299, 2912, 2912, 299, 299, 299, 299, 166, + 2912, 2912, 2912, 2912, 166, 2912, 166, 166, 166, 2912, + 2912, 166, 166, 175, 175, 175, 175, 175, 2912, 2912, + 2912, 2912, 175, 175, 2912, 175, 175, 175, 175, 2912, + 175, 175, 175, 175, 236, 2912, 2912, 236, 2912, 2912, + 236, 2912, 2912, 236, 236, 236, 2912, 2912, 2912, 236, + 236, 2912, 236, 232, 232, 2912, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 238, 2912, 2912, 2912, 2912, + + 2912, 2912, 2912, 2912, 2912, 238, 2912, 2912, 238, 238, + 238, 238, 234, 234, 2912, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 358, 358, 2912, 358, 358, 358, + 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, + 358, 358, 358, 358, 358, 358, 245, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 245, 2912, 2912, + 245, 245, 245, 245, 247, 2912, 2912, 247, 2912, 2912, + 247, 2912, 2912, 247, 247, 247, 247, 2912, 2912, 247, + 247, 2912, 2912, 247, 251, 251, 2912, 251, 251, 251, + + 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, + 251, 251, 251, 251, 251, 251, 254, 2912, 2912, 2912, + 2912, 254, 2912, 254, 254, 254, 2912, 2912, 254, 254, + 256, 2912, 2912, 256, 256, 256, 256, 259, 259, 259, + 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, + 259, 259, 259, 2912, 2912, 259, 259, 259, 259, 371, + 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, + 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, + 371, 265, 265, 265, 265, 265, 265, 265, 265, 2912, + 2912, 265, 265, 265, 265, 265, 265, 265, 265, 265, + + 265, 265, 265, 373, 373, 373, 373, 373, 373, 373, + 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, + 373, 373, 373, 373, 373, 271, 2912, 2912, 2912, 2912, + 271, 271, 2912, 271, 2912, 271, 2912, 2912, 271, 271, + 271, 271, 272, 272, 2912, 272, 272, 272, 272, 272, + 2912, 2912, 272, 272, 2912, 2912, 272, 272, 272, 272, + 272, 272, 272, 272, 374, 374, 2912, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 275, 275, 2912, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + + 275, 275, 275, 275, 275, 275, 275, 275, 174, 174, + 174, 174, 174, 2912, 2912, 2912, 2912, 174, 174, 2912, + 174, 2912, 174, 174, 2912, 174, 174, 174, 174, 291, + 291, 291, 291, 2912, 2912, 2912, 291, 291, 2912, 2912, + 2912, 2912, 291, 291, 2912, 2912, 291, 291, 291, 291, + 290, 290, 290, 290, 2912, 2912, 2912, 290, 290, 2912, + 2912, 2912, 2912, 290, 290, 2912, 2912, 290, 290, 290, + 290, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 156, 156, 156, 156, 156, 156, 156, + + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 299, 2912, 2912, 299, 299, + 299, 299, 140, 140, 140, 140, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 140, 140, 140, 2912, 140, + 140, 140, 140, 166, 2912, 2912, 2912, 2912, 166, 2912, + 166, 166, 166, 2912, 2912, 166, 166, 175, 175, 175, + 175, 175, 2912, 2912, 2912, 2912, 175, 175, 2912, 175, + 175, 175, 175, 2912, 175, 175, 175, 175, 234, 234, + 2912, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + + 358, 358, 2912, 358, 358, 358, 358, 358, 358, 358, + 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, + 358, 358, 238, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 238, 2912, 2912, 238, 238, 238, 238, 469, + 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + 469, 470, 470, 470, 470, 470, 470, 470, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, + 470, 470, 470, 588, 588, 588, 588, 588, 588, 588, + 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, + + 588, 588, 588, 588, 588, 597, 597, 597, 597, 597, + 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, + 597, 597, 597, 597, 597, 597, 597, 653, 653, 653, + 653, 653, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 653, 653, 653, 653, 653, 659, 659, + 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, + 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, + 232, 232, 2912, 232, 232, 232, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, + 232, 232, 743, 743, 743, 743, 743, 2912, 2912, 2912, + + 2912, 743, 743, 2912, 743, 2912, 743, 2912, 743, 743, + 743, 743, 743, 753, 753, 753, 753, 753, 753, 753, + 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, + 753, 753, 753, 753, 753, 903, 903, 903, 903, 903, + 2912, 2912, 2912, 2912, 903, 903, 2912, 903, 903, 903, + 903, 2912, 903, 903, 903, 903, 958, 958, 958, 958, + 2912, 2912, 2912, 958, 958, 2912, 2912, 2912, 958, 958, + 958, 2912, 2912, 958, 958, 958, 958, 963, 963, 963, + 963, 2912, 2912, 2912, 963, 963, 2912, 2912, 2912, 963, + 963, 963, 2912, 2912, 963, 963, 963, 963, 986, 986, + + 986, 986, 986, 2912, 2912, 2912, 2912, 986, 986, 2912, + 986, 986, 986, 986, 2912, 986, 986, 986, 986, 991, + 991, 991, 991, 991, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 991, 2912, 991, 991, 991, 991, + 992, 992, 992, 992, 992, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 992, 992, 992, 2912, 992, 992, 992, + 992, 994, 994, 994, 994, 994, 2912, 2912, 994, 2912, + 994, 994, 2912, 994, 2912, 994, 994, 2912, 994, 994, + 994, 994, 998, 998, 998, 998, 998, 2912, 2912, 998, + 2912, 998, 998, 2912, 998, 998, 998, 998, 2912, 998, + + 998, 998, 998, 962, 962, 962, 962, 2912, 2912, 2912, + 962, 962, 2912, 2912, 2912, 962, 962, 962, 2912, 2912, + 962, 962, 962, 962, 1083, 1083, 1083, 1083, 1083, 2912, + 2912, 1083, 2912, 1083, 1083, 2912, 1083, 1083, 1083, 1083, + 2912, 1083, 1083, 1083, 1083, 1085, 1085, 1085, 1085, 1085, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 1085, 2912, 1085, 1085, 1085, 1085, 1086, 1086, 1086, 1086, + 1086, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 1086, + 1086, 1086, 2912, 1086, 1086, 1086, 1086, 1088, 1088, 1088, + 1088, 1088, 2912, 2912, 1088, 2912, 1088, 1088, 2912, 1088, + + 2912, 1088, 2912, 2912, 1088, 1088, 1088, 1088, 1091, 1091, + 1091, 1091, 1091, 2912, 2912, 1091, 2912, 1091, 1091, 2912, + 1091, 1091, 1091, 1091, 2912, 1091, 1091, 1091, 1091, 1096, + 1096, 2912, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, + 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, + 1096, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, + 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, + 1101, 1101, 1101, 588, 588, 588, 588, 588, 588, 588, + 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, + 588, 588, 588, 588, 588, 597, 597, 597, 597, 597, + + 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, + 597, 597, 597, 597, 597, 597, 597, 1157, 2912, 2912, + 2912, 2912, 1157, 1157, 2912, 1157, 2912, 1157, 2912, 2912, + 1157, 1157, 1157, 1157, 1158, 1158, 1158, 1158, 1158, 2912, + 2912, 2912, 2912, 1158, 1158, 2912, 1158, 1158, 1158, 1158, + 2912, 1158, 1158, 1158, 1158, 1204, 1204, 1204, 1204, 1204, + 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, + 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1215, 1215, 1215, + 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, + 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1230, + + 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, + 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, + 1230, 280, 280, 280, 280, 280, 2912, 2912, 2912, 2912, + 280, 280, 2912, 280, 280, 280, 280, 2912, 280, 280, + 280, 280, 1252, 1252, 1252, 1252, 1252, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 1252, 1252, 1252, 2912, 1252, + 1252, 1252, 1252, 1168, 1168, 1168, 1168, 1168, 1168, 1168, + 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, + 1168, 1168, 1168, 1168, 1168, 1327, 1327, 1327, 1327, 1327, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + + 1327, 2912, 1327, 1327, 1327, 1327, 1328, 1328, 1328, 1328, + 1328, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 1328, + 1328, 1328, 2912, 1328, 1328, 1328, 1328, 1251, 1251, 1251, + 1251, 1251, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 1251, 1251, 1251, 1251, 1330, 2912, + 2912, 2912, 2912, 1330, 1330, 2912, 1330, 2912, 1330, 2912, + 2912, 1330, 1330, 1330, 1330, 1331, 1331, 1331, 1331, 1331, + 2912, 2912, 2912, 2912, 1331, 1331, 2912, 1331, 1331, 1331, + 1331, 2912, 1331, 1331, 1331, 1331, 1096, 1096, 2912, 1096, + 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, + + 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1101, 1101, + 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, + 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, + 1359, 1359, 1359, 1359, 1359, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 1359, 1359, 1359, + 1359, 1426, 1426, 1426, 1426, 1426, 2912, 2912, 2912, 2912, + 1426, 1426, 2912, 1426, 2912, 1426, 2912, 2912, 1426, 1426, + 1426, 1426, 1429, 1429, 1429, 1429, 1429, 2912, 2912, 2912, + 2912, 1429, 1429, 2912, 1429, 1429, 1429, 1429, 2912, 1429, + 1429, 1429, 1429, 1439, 1439, 1439, 1439, 1439, 1439, 1439, + + 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, + 1439, 1439, 1439, 1439, 1439, 1447, 1447, 1447, 1447, 1447, + 1447, 1447, 1447, 1447, 1447, 1447, 1447, 1447, 1447, 1447, + 1447, 1447, 1447, 1447, 1447, 1447, 1447, 1458, 1458, 1458, + 1458, 1458, 2912, 2912, 2912, 2912, 1458, 1458, 2912, 1458, + 2912, 1458, 2912, 1458, 1458, 1458, 1458, 1458, 1651, 1651, + 2912, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, + 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, + 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + + 1654, 1654, 1716, 1716, 1716, 1716, 1716, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 1716, + 1716, 1716, 1716, 1717, 1717, 1717, 1717, 1717, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 1717, 1717, 1717, 2912, + 1717, 1717, 1717, 1717, 1749, 1749, 1749, 1749, 1749, 1749, + 1749, 1749, 1749, 1749, 1749, 1749, 1749, 1749, 1749, 1749, + 1749, 1749, 1749, 1749, 1749, 1749, 1781, 2912, 2912, 2912, + 2912, 1781, 1781, 2912, 1781, 2912, 1781, 2912, 2912, 1781, + 1781, 1781, 1781, 1782, 1782, 1782, 1782, 1782, 2912, 2912, + 2912, 2912, 1782, 1782, 2912, 1782, 1782, 1782, 1782, 2912, + + 1782, 1782, 1782, 1782, 1721, 1721, 1721, 1721, 1721, 1721, + 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721, + 1721, 1721, 1721, 1721, 1721, 1721, 1753, 1753, 1753, 1753, + 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1651, 1651, + 2912, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, + 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, + 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, + 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, + 1945, 1945, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, + + 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953, + 1953, 1953, 1953, 1953, 1989, 1989, 1989, 1989, 1989, 1989, + 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, + 1989, 1989, 1989, 1989, 1989, 1989, 1999, 1999, 1999, 1999, + 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, + 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 2013, 2013, + 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, + 2282, 2282, 2282, 2282, 2282, 2282, 2282, 2282, 2282, 2282, + 2282, 2282, 2282, 2282, 2282, 2282, 2282, 2282, 2282, 2282, + + 2282, 2282, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, + 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, + 2286, 2286, 2286, 2286, 2543, 2543, 2543, 2543, 2543, 2543, + 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543, + 2543, 2543, 2543, 2543, 2543, 2543, 2553, 2553, 2553, 2553, + 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, + 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2567, 2567, + 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, + 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, 2567, + 27, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912 + } ; + +static yyconst flex_int16_t yy_chk[31167] = + { 0, + 0, 1, 1, 270, 1, 2, 2, 109, 2, 360, + 360, 360, 360, 270, 270, 0, 0, 1, 2381, 2370, + 109, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 4, 168, 6, + + 4, 926, 6, 15, 15, 29, 15, 32, 29, 926, + 2364, 168, 39, 30, 11, 11, 30, 11, 1847, 15, + 72, 29, 4, 4, 4, 6, 4, 4, 82, 30, + 11, 32, 42, 4, 11, 11, 39, 4, 68, 4, + 4, 4, 4, 13, 13, 72, 13, 4, 4, 4, + 6, 4, 4, 82, 13, 13, 42, 4, 1836, 13, + 1830, 4, 68, 4, 4, 4, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 12, 12, + 37, 12, 1793, 1789, 14, 14, 93, 14, 16, 16, + 57, 16, 57, 112, 12, 14, 14, 37, 12, 12, + 14, 7, 17, 17, 16, 17, 18, 18, 85, 18, + + 93, 85, 1356, 1267, 57, 1263, 57, 112, 17, 1066, + 1055, 37, 18, 1049, 85, 7, 7, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 19, 19, 90, 19, 20, 20, 87, + 20, 64, 88, 23, 23, 89, 23, 968, 90, 19, + 64, 968, 91, 20, 23, 23, 8, 968, 23, 23, + 24, 24, 98, 24, 87, 98, 64, 88, 1014, 666, + 89, 24, 24, 90, 64, 24, 24, 91, 98, 568, + 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, + + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 21, 21, 21, + 21, 21, 21, 563, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 25, 25, 40, 25, 26, 26, 55, + + 26, 56, 60, 56, 60, 79, 56, 94, 96, 25, + 56, 79, 40, 26, 393, 55, 21, 41, 70, 70, + 70, 70, 389, 367, 55, 56, 60, 56, 60, 79, + 56, 41, 94, 96, 56, 79, 40, 366, 70, 55, + 21, 21, 22, 22, 22, 22, 22, 22, 41, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 34, 34, + 34, 34, 41, 35, 35, 35, 35, 303, 302, 45, + 43, 269, 255, 267, 34, 44, 45, 111, 263, 35, + 47, 22, 261, 102, 49, 255, 102, 43, 114, 34, + + 181, 114, 44, 45, 35, 50, 50, 47, 34, 102, + 254, 49, 111, 35, 114, 22, 22, 33, 33, 33, + 33, 43, 33, 50, 34, 181, 44, 45, 51, 35, + 253, 47, 34, 33, 33, 49, 33, 35, 251, 46, + 46, 46, 46, 248, 62, 51, 62, 50, 33, 52, + 52, 135, 58, 61, 65, 63, 232, 33, 115, 46, + 118, 115, 58, 118, 58, 61, 52, 63, 62, 51, + 62, 65, 185, 33, 115, 135, 118, 58, 61, 46, + 63, 33, 36, 36, 36, 36, 58, 36, 58, 61, + 52, 63, 66, 66, 67, 65, 59, 185, 36, 36, + + 186, 36, 36, 46, 59, 80, 80, 59, 59, 138, + 71, 67, 71, 36, 171, 95, 66, 66, 95, 170, + 147, 59, 36, 119, 125, 186, 119, 125, 59, 80, + 80, 59, 59, 138, 71, 67, 71, 166, 36, 119, + 125, 95, 165, 67, 147, 152, 36, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, + 38, 73, 81, 38, 187, 38, 95, 126, 38, 38, + 126, 74, 133, 74, 149, 73, 74, 73, 81, 75, + 74, 75, 160, 126, 75, 76, 73, 81, 38, 187, + 131, 76, 223, 76, 178, 74, 38, 74, 149, 73, + + 74, 73, 81, 75, 74, 75, 160, 178, 75, 122, + 76, 130, 38, 116, 130, 76, 223, 76, 77, 178, + 38, 38, 48, 48, 48, 48, 108, 130, 48, 78, + 132, 178, 77, 132, 77, 104, 48, 78, 48, 48, + 78, 48, 48, 77, 229, 105, 132, 48, 48, 48, + 48, 48, 48, 99, 78, 31, 77, 179, 77, 197, + 105, 78, 48, 27, 78, 0, 221, 0, 229, 105, + 179, 48, 48, 48, 48, 48, 48, 48, 136, 136, + 136, 136, 179, 224, 197, 105, 48, 53, 53, 53, + 53, 221, 53, 105, 179, 0, 0, 0, 136, 215, + + 53, 53, 215, 53, 53, 53, 189, 53, 224, 53, + 53, 53, 54, 54, 54, 54, 227, 54, 136, 137, + 137, 137, 137, 189, 215, 54, 54, 215, 54, 54, + 54, 189, 54, 372, 54, 54, 54, 139, 139, 139, + 139, 227, 136, 372, 372, 101, 0, 189, 101, 239, + 137, 0, 0, 54, 0, 103, 0, 139, 103, 137, + 241, 101, 140, 140, 140, 140, 0, 153, 153, 153, + 153, 103, 153, 239, 184, 137, 101, 54, 69, 69, + 69, 69, 140, 137, 241, 101, 103, 153, 184, 250, + 143, 180, 180, 0, 0, 103, 0, 0, 69, 184, + + 143, 101, 143, 69, 69, 69, 192, 69, 69, 101, + 192, 103, 184, 250, 69, 143, 180, 180, 69, 103, + 69, 69, 69, 69, 143, 0, 143, 0, 69, 69, + 69, 192, 69, 69, 0, 192, 0, 0, 69, 0, + 0, 0, 69, 0, 69, 69, 69, 69, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 154, 154, 154, 154, 83, 155, + 155, 155, 155, 257, 144, 144, 144, 144, 145, 145, + 145, 145, 258, 182, 154, 183, 228, 83, 83, 155, + + 144, 0, 201, 83, 183, 182, 201, 257, 145, 228, + 146, 146, 146, 146, 0, 144, 258, 145, 182, 0, + 183, 83, 83, 84, 144, 188, 84, 201, 183, 182, + 146, 201, 84, 84, 228, 188, 84, 84, 84, 84, + 144, 84, 145, 84, 84, 84, 84, 84, 144, 146, + 188, 146, 84, 0, 162, 162, 162, 162, 373, 188, + 163, 163, 163, 163, 462, 462, 462, 462, 373, 373, + 0, 0, 0, 146, 162, 146, 0, 84, 86, 86, + 163, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 200, 86, + + 86, 86, 86, 86, 148, 148, 148, 148, 86, 150, + 150, 150, 150, 200, 172, 172, 172, 172, 236, 0, + 150, 150, 0, 200, 148, 0, 0, 86, 0, 173, + 173, 173, 173, 86, 172, 148, 150, 200, 150, 174, + 174, 174, 174, 236, 148, 157, 157, 157, 157, 173, + 157, 86, 86, 141, 141, 141, 141, 0, 141, 174, + 148, 150, 240, 150, 204, 157, 141, 141, 148, 141, + 141, 141, 190, 141, 193, 141, 141, 141, 142, 142, + 142, 142, 204, 142, 190, 157, 193, 240, 0, 204, + 191, 142, 142, 198, 142, 142, 142, 190, 142, 193, + + 142, 142, 142, 198, 191, 243, 204, 142, 190, 157, + 193, 164, 164, 164, 164, 191, 0, 0, 198, 558, + 558, 558, 558, 559, 559, 559, 559, 198, 191, 0, + 243, 164, 142, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 199, 205, 156, + 196, 156, 164, 217, 156, 156, 199, 195, 195, 195, + 195, 205, 196, 217, 196, 202, 206, 244, 219, 202, + 206, 219, 199, 205, 249, 196, 164, 195, 217, 202, + 199, 202, 156, 0, 0, 205, 196, 217, 196, 0, + 202, 206, 244, 219, 202, 206, 219, 0, 0, 249, + + 0, 276, 0, 202, 0, 202, 156, 156, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 210, 203, 158, 276, 158, 203, 214, 158, + 158, 207, 207, 207, 207, 0, 210, 214, 203, 208, + 208, 208, 208, 209, 211, 209, 211, 210, 203, 300, + 158, 207, 203, 214, 353, 212, 264, 158, 0, 208, + 210, 214, 203, 212, 212, 0, 231, 0, 209, 211, + 209, 211, 0, 300, 158, 264, 264, 0, 353, 231, + 212, 158, 158, 167, 167, 167, 167, 212, 212, 167, + 213, 213, 216, 218, 216, 218, 220, 167, 230, 167, + + 167, 230, 167, 167, 231, 213, 0, 220, 167, 167, + 167, 167, 167, 167, 230, 213, 213, 216, 218, 216, + 218, 220, 242, 354, 280, 242, 310, 0, 0, 213, + 247, 220, 167, 167, 167, 167, 167, 167, 167, 175, + 175, 175, 175, 313, 175, 247, 222, 354, 242, 280, + 0, 310, 175, 175, 247, 175, 175, 175, 222, 175, + 0, 175, 175, 175, 176, 176, 176, 176, 313, 246, + 247, 222, 246, 242, 260, 176, 176, 260, 247, 364, + 262, 314, 222, 262, 176, 246, 266, 282, 277, 266, + 260, 176, 268, 176, 273, 268, 262, 273, 277, 282, + + 246, 317, 266, 364, 176, 0, 314, 0, 268, 246, + 273, 0, 282, 277, 335, 281, 176, 297, 176, 0, + 0, 297, 277, 282, 281, 246, 317, 0, 176, 177, + 177, 177, 177, 246, 177, 278, 278, 278, 278, 335, + 281, 0, 177, 177, 283, 177, 177, 177, 281, 177, + 0, 177, 177, 177, 283, 278, 0, 297, 177, 279, + 279, 279, 279, 0, 287, 287, 287, 287, 0, 283, + 284, 284, 284, 284, 278, 287, 287, 316, 283, 279, + 319, 297, 349, 177, 194, 194, 194, 194, 316, 0, + 284, 287, 312, 287, 0, 319, 315, 0, 278, 279, + + 0, 312, 316, 0, 194, 319, 315, 349, 284, 194, + 194, 194, 316, 194, 194, 320, 287, 312, 287, 319, + 194, 315, 320, 279, 194, 312, 194, 194, 194, 194, + 315, 470, 284, 0, 194, 194, 194, 0, 194, 194, + 320, 470, 470, 0, 194, 0, 320, 0, 194, 0, + 194, 194, 194, 194, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 290, 290, 290, 290, 225, 286, 286, 286, 286, 365, + 285, 285, 285, 285, 352, 355, 290, 295, 295, 295, + + 295, 0, 295, 225, 225, 286, 0, 0, 318, 225, + 285, 359, 0, 365, 291, 291, 291, 291, 0, 352, + 355, 0, 318, 0, 286, 291, 291, 225, 225, 226, + 291, 285, 226, 318, 345, 361, 359, 295, 226, 226, + 345, 0, 226, 226, 226, 226, 318, 226, 286, 226, + 226, 226, 226, 226, 329, 285, 369, 329, 226, 345, + 361, 295, 0, 0, 345, 292, 292, 292, 292, 0, + 296, 296, 296, 296, 0, 0, 292, 292, 0, 329, + 369, 292, 329, 226, 234, 234, 362, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + + 234, 234, 234, 234, 292, 234, 234, 234, 234, 234, + 296, 362, 321, 323, 363, 323, 301, 301, 301, 301, + 328, 0, 321, 325, 330, 325, 330, 339, 292, 328, + 376, 339, 0, 234, 296, 0, 301, 321, 323, 363, + 323, 477, 477, 477, 477, 328, 321, 0, 325, 330, + 325, 330, 339, 328, 376, 301, 339, 234, 234, 235, + 235, 477, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 301, + 235, 235, 235, 235, 235, 288, 288, 288, 288, 289, + 289, 289, 289, 464, 304, 304, 304, 304, 235, 0, + + 289, 289, 0, 0, 0, 289, 0, 0, 235, 0, + 304, 0, 288, 0, 288, 0, 289, 464, 289, 332, + 333, 332, 235, 333, 293, 293, 293, 293, 311, 311, + 311, 311, 235, 235, 304, 293, 293, 288, 324, 288, + 293, 289, 326, 289, 332, 333, 332, 0, 333, 370, + 326, 326, 324, 0, 0, 0, 337, 311, 304, 337, + 368, 0, 293, 324, 0, 0, 0, 326, 370, 370, + 306, 306, 306, 306, 326, 326, 324, 305, 305, 305, + 305, 337, 311, 0, 337, 368, 293, 298, 298, 298, + 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, + + 298, 331, 0, 298, 305, 298, 305, 327, 298, 298, + 306, 331, 307, 307, 307, 307, 0, 305, 375, 334, + 0, 327, 466, 307, 307, 0, 331, 298, 307, 305, + 334, 305, 327, 322, 306, 331, 298, 322, 336, 0, + 338, 305, 467, 375, 334, 327, 466, 322, 371, 322, + 336, 298, 338, 307, 334, 0, 0, 0, 322, 377, + 298, 298, 322, 336, 340, 338, 467, 371, 371, 0, + 0, 322, 341, 322, 336, 340, 338, 307, 308, 308, + 308, 308, 342, 308, 377, 341, 342, 0, 343, 340, + 343, 308, 308, 401, 308, 308, 308, 341, 308, 340, + + 308, 308, 308, 308, 469, 0, 0, 342, 344, 341, + 346, 342, 346, 343, 0, 343, 410, 971, 401, 971, + 344, 971, 0, 469, 469, 0, 0, 971, 308, 309, + 309, 309, 309, 344, 309, 346, 348, 346, 411, 347, + 0, 410, 309, 309, 344, 309, 309, 309, 347, 309, + 348, 309, 309, 309, 379, 351, 379, 378, 309, 351, + 386, 348, 0, 411, 347, 350, 350, 350, 350, 386, + 0, 378, 347, 472, 348, 416, 414, 417, 420, 379, + 351, 379, 378, 309, 351, 386, 380, 380, 380, 380, + 414, 435, 409, 386, 350, 378, 0, 472, 409, 0, + + 416, 414, 417, 420, 0, 0, 380, 0, 399, 0, + 0, 0, 399, 0, 414, 380, 435, 409, 0, 350, + 357, 357, 409, 357, 357, 357, 357, 357, 357, 357, + 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, + 380, 357, 357, 357, 357, 357, 399, 492, 0, 357, + 447, 0, 381, 381, 381, 381, 382, 382, 382, 382, + 0, 383, 383, 383, 383, 384, 384, 384, 384, 357, + 399, 492, 381, 388, 357, 447, 382, 383, 449, 0, + 415, 384, 388, 382, 385, 385, 385, 385, 383, 422, + 383, 0, 415, 357, 357, 381, 449, 497, 388, 422, + + 385, 0, 0, 449, 384, 415, 388, 0, 382, 421, + 429, 421, 429, 383, 422, 383, 415, 0, 0, 381, + 449, 497, 385, 422, 390, 390, 390, 390, 384, 391, + 391, 391, 391, 0, 421, 429, 421, 429, 515, 0, + 390, 392, 392, 392, 392, 391, 385, 387, 387, 387, + 387, 394, 394, 394, 394, 390, 0, 392, 419, 397, + 391, 0, 515, 387, 390, 397, 397, 394, 397, 391, + 419, 425, 392, 427, 387, 425, 387, 432, 387, 432, + 390, 392, 394, 419, 397, 391, 427, 387, 390, 397, + 397, 394, 397, 391, 419, 426, 425, 392, 427, 387, + + 425, 387, 432, 387, 432, 392, 426, 394, 0, 0, + 427, 387, 433, 0, 0, 394, 395, 395, 395, 395, + 426, 433, 396, 396, 396, 396, 0, 398, 0, 0, + 426, 551, 395, 396, 396, 0, 398, 433, 396, 398, + 0, 404, 404, 404, 404, 433, 450, 395, 418, 418, + 418, 418, 398, 396, 428, 551, 395, 404, 428, 455, + 398, 552, 396, 398, 406, 406, 406, 406, 0, 0, + 0, 450, 395, 0, 0, 0, 456, 418, 396, 428, + 395, 0, 404, 428, 455, 552, 396, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, + + 400, 456, 418, 400, 406, 400, 404, 564, 400, 400, + 402, 402, 402, 402, 463, 400, 403, 403, 403, 403, + 0, 424, 0, 405, 405, 405, 405, 465, 406, 0, + 402, 564, 403, 424, 471, 0, 400, 402, 0, 463, + 400, 0, 407, 407, 407, 407, 424, 403, 412, 412, + 412, 412, 465, 430, 405, 0, 403, 424, 408, 471, + 400, 400, 402, 405, 0, 430, 408, 408, 412, 0, + 0, 434, 403, 407, 413, 413, 413, 413, 430, 405, + 403, 0, 407, 408, 0, 434, 567, 405, 412, 430, + 408, 408, 423, 431, 413, 423, 434, 0, 407, 431, + + 436, 436, 436, 436, 0, 475, 407, 437, 491, 434, + 567, 437, 412, 0, 413, 438, 0, 423, 431, 438, + 423, 439, 440, 431, 441, 439, 0, 442, 443, 436, + 475, 440, 437, 491, 441, 445, 437, 444, 413, 445, + 438, 442, 443, 0, 438, 0, 439, 440, 0, 441, + 439, 444, 442, 443, 436, 440, 496, 446, 441, 448, + 445, 446, 444, 448, 445, 442, 443, 451, 451, 451, + 451, 452, 452, 452, 452, 444, 453, 503, 473, 0, + 453, 496, 446, 0, 448, 0, 446, 451, 448, 0, + 473, 452, 0, 0, 451, 498, 451, 502, 452, 502, + + 452, 453, 503, 473, 498, 453, 454, 454, 454, 454, + 457, 457, 457, 457, 473, 468, 468, 468, 468, 451, + 498, 451, 502, 452, 502, 452, 468, 454, 498, 0, + 0, 457, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 0, 458, 458, 458, 458, 458, 459, 459, + 459, 459, 460, 460, 460, 460, 461, 461, 461, 461, + 474, 474, 474, 474, 476, 476, 476, 476, 0, 459, + 569, 458, 478, 478, 478, 478, 0, 479, 479, 479, + 479, 514, 460, 0, 476, 517, 461, 522, 0, 474, + + 523, 534, 478, 479, 569, 458, 458, 480, 480, 480, + 480, 478, 537, 0, 0, 476, 514, 460, 479, 0, + 517, 461, 522, 480, 474, 523, 534, 479, 481, 481, + 481, 481, 482, 482, 482, 482, 478, 537, 480, 476, + 0, 0, 0, 479, 481, 0, 0, 480, 482, 485, + 484, 479, 484, 519, 519, 519, 519, 485, 485, 481, + 0, 484, 0, 480, 483, 483, 483, 483, 481, 482, + 482, 480, 0, 519, 485, 484, 571, 484, 0, 0, + 483, 485, 485, 0, 481, 484, 488, 488, 488, 488, + 519, 521, 481, 482, 482, 489, 489, 489, 489, 0, + + 521, 571, 488, 490, 490, 490, 490, 483, 525, 501, + 0, 489, 525, 501, 519, 488, 521, 0, 574, 490, + 493, 493, 493, 493, 521, 494, 494, 494, 494, 499, + 499, 483, 593, 525, 489, 501, 493, 525, 594, 499, + 488, 494, 574, 495, 495, 495, 495, 0, 500, 493, + 500, 0, 0, 0, 499, 499, 593, 500, 489, 495, + 501, 575, 594, 499, 494, 504, 504, 504, 504, 516, + 516, 516, 516, 500, 493, 500, 505, 505, 505, 505, + 513, 500, 0, 526, 513, 504, 575, 526, 494, 516, + 602, 0, 505, 513, 504, 506, 506, 506, 506, 507, + + 507, 507, 507, 603, 524, 513, 524, 505, 526, 513, + 516, 506, 526, 546, 602, 507, 505, 513, 0, 504, + 609, 508, 508, 508, 508, 546, 506, 603, 541, 524, + 507, 524, 505, 509, 516, 506, 0, 508, 546, 507, + 505, 509, 509, 509, 609, 510, 510, 510, 510, 546, + 0, 506, 614, 518, 541, 507, 0, 518, 509, 506, + 508, 518, 0, 507, 0, 509, 509, 509, 511, 511, + 511, 511, 512, 512, 512, 512, 614, 618, 518, 541, + 529, 530, 518, 649, 508, 510, 518, 527, 512, 528, + 520, 520, 520, 520, 529, 530, 527, 620, 0, 528, + + 532, 531, 618, 0, 532, 529, 530, 649, 511, 510, + 520, 512, 527, 512, 528, 531, 536, 533, 529, 530, + 527, 533, 620, 528, 535, 532, 531, 520, 535, 532, + 539, 0, 511, 0, 536, 512, 538, 512, 542, 531, + 538, 536, 533, 0, 539, 540, 533, 542, 540, 535, + 543, 520, 622, 535, 543, 539, 544, 547, 536, 547, + 545, 538, 549, 542, 545, 538, 548, 548, 539, 549, + 540, 542, 550, 540, 544, 543, 0, 622, 0, 543, + 0, 544, 547, 550, 547, 545, 625, 549, 0, 545, + 607, 548, 548, 549, 607, 636, 0, 550, 544, 553, + + 553, 553, 553, 554, 554, 554, 554, 550, 555, 0, + 0, 555, 625, 556, 556, 556, 556, 576, 607, 553, + 636, 576, 577, 554, 560, 560, 560, 560, 561, 561, + 561, 561, 0, 555, 556, 577, 555, 625, 553, 639, + 0, 554, 576, 607, 0, 560, 576, 577, 604, 561, + 566, 566, 566, 566, 560, 0, 604, 604, 561, 577, + 0, 0, 553, 0, 639, 554, 570, 570, 570, 570, + 0, 566, 0, 604, 0, 0, 0, 570, 0, 560, + 604, 604, 0, 561, 562, 562, 562, 562, 562, 562, + 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, + + 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, + 572, 572, 572, 572, 578, 578, 578, 578, 616, 644, + 0, 572, 580, 580, 580, 580, 579, 579, 579, 579, + 0, 0, 616, 562, 578, 581, 581, 581, 581, 0, + 585, 627, 580, 616, 644, 627, 579, 578, 0, 585, + 585, 581, 582, 582, 582, 582, 616, 562, 562, 565, + 565, 565, 565, 579, 580, 585, 627, 0, 582, 608, + 627, 0, 578, 585, 585, 581, 646, 583, 583, 583, + 583, 647, 582, 0, 608, 0, 565, 579, 580, 565, + 565, 584, 565, 583, 608, 565, 621, 0, 584, 581, + + 584, 646, 586, 586, 586, 586, 647, 582, 608, 621, + 583, 565, 0, 0, 565, 565, 584, 565, 586, 565, + 660, 621, 584, 0, 584, 587, 587, 587, 587, 588, + 588, 588, 588, 621, 0, 583, 589, 589, 589, 589, + 586, 587, 0, 628, 660, 588, 590, 590, 590, 590, + 637, 0, 589, 591, 591, 591, 591, 592, 592, 592, + 592, 628, 661, 663, 586, 637, 587, 589, 628, 591, + 0, 0, 0, 592, 626, 637, 589, 590, 595, 595, + 595, 595, 0, 626, 591, 628, 590, 661, 663, 637, + 587, 0, 589, 591, 595, 596, 596, 596, 596, 626, + + 589, 0, 590, 597, 597, 597, 597, 626, 0, 591, + 590, 596, 598, 598, 598, 598, 595, 591, 0, 597, + 0, 662, 599, 599, 599, 599, 662, 0, 598, 0, + 0, 0, 600, 600, 600, 600, 596, 0, 0, 617, + 595, 617, 605, 598, 605, 662, 0, 0, 600, 606, + 662, 605, 598, 599, 601, 601, 601, 601, 606, 630, + 596, 606, 599, 600, 617, 0, 617, 605, 598, 605, + 601, 630, 600, 0, 606, 605, 598, 0, 599, 0, + 0, 664, 606, 629, 630, 606, 599, 629, 600, 610, + 610, 610, 610, 643, 0, 630, 600, 611, 611, 611, + + 611, 612, 612, 612, 612, 613, 664, 613, 629, 610, + 665, 643, 629, 611, 0, 0, 613, 612, 643, 615, + 615, 615, 615, 619, 619, 619, 619, 623, 612, 0, + 613, 610, 613, 670, 665, 643, 611, 0, 611, 615, + 613, 623, 624, 619, 631, 624, 631, 633, 619, 632, + 632, 642, 623, 612, 633, 610, 635, 670, 615, 635, + 611, 642, 611, 632, 687, 623, 634, 624, 0, 631, + 624, 631, 633, 619, 632, 632, 642, 634, 633, 668, + 640, 635, 615, 0, 635, 642, 0, 632, 687, 640, + 669, 634, 638, 638, 638, 638, 641, 641, 641, 641, + + 0, 634, 645, 0, 668, 640, 648, 648, 650, 650, + 650, 650, 638, 640, 671, 669, 694, 645, 651, 651, + 651, 651, 652, 686, 672, 641, 672, 645, 650, 652, + 648, 648, 0, 653, 653, 653, 653, 0, 651, 671, + 694, 645, 693, 696, 0, 650, 650, 652, 686, 672, + 641, 672, 696, 652, 653, 0, 654, 654, 654, 654, + 0, 651, 655, 655, 655, 655, 0, 693, 696, 650, + 650, 673, 656, 656, 656, 656, 696, 654, 658, 658, + 658, 658, 0, 655, 673, 651, 654, 674, 674, 674, + 674, 700, 655, 656, 0, 0, 673, 699, 0, 658, + + 708, 704, 706, 675, 675, 675, 675, 674, 673, 0, + 712, 654, 699, 714, 674, 700, 656, 655, 676, 676, + 676, 676, 699, 675, 708, 698, 704, 706, 0, 698, + 677, 677, 677, 677, 676, 712, 699, 0, 714, 674, + 656, 657, 657, 657, 657, 675, 677, 0, 0, 678, + 678, 678, 678, 701, 701, 701, 701, 676, 715, 679, + 719, 679, 657, 677, 721, 678, 698, 715, 657, 675, + 679, 657, 657, 701, 657, 722, 0, 657, 0, 0, + 0, 676, 0, 715, 679, 719, 679, 0, 677, 721, + 698, 715, 678, 657, 679, 701, 657, 657, 0, 657, + + 722, 657, 659, 659, 659, 659, 659, 659, 659, 659, + 659, 659, 659, 659, 659, 659, 678, 680, 659, 701, + 659, 735, 733, 659, 659, 0, 680, 0, 0, 680, + 681, 681, 681, 681, 733, 710, 682, 682, 682, 682, + 0, 0, 680, 0, 734, 735, 681, 733, 710, 736, + 680, 659, 682, 680, 683, 683, 683, 683, 733, 681, + 710, 684, 684, 684, 684, 685, 685, 685, 685, 734, + 683, 0, 710, 695, 736, 659, 659, 684, 0, 682, + 695, 685, 695, 683, 681, 688, 688, 688, 688, 689, + 689, 689, 689, 690, 690, 690, 690, 0, 695, 0, + + 684, 688, 737, 682, 695, 689, 695, 0, 683, 690, + 691, 691, 691, 691, 688, 692, 692, 692, 692, 697, + 711, 711, 690, 717, 684, 713, 691, 737, 697, 741, + 754, 692, 689, 717, 755, 697, 0, 0, 0, 688, + 713, 756, 703, 0, 697, 711, 711, 690, 717, 691, + 713, 703, 697, 703, 741, 754, 689, 717, 755, 697, + 702, 702, 702, 702, 713, 756, 0, 703, 705, 705, + 705, 705, 724, 691, 724, 703, 702, 703, 707, 707, + 707, 707, 709, 709, 709, 709, 718, 723, 705, 702, + 716, 716, 716, 716, 723, 705, 725, 724, 720, 724, + + 726, 727, 709, 757, 718, 0, 759, 707, 0, 726, + 725, 718, 723, 720, 702, 727, 0, 0, 723, 716, + 705, 725, 709, 720, 0, 726, 727, 757, 718, 730, + 759, 0, 707, 726, 725, 763, 760, 720, 730, 727, + 728, 728, 728, 728, 716, 0, 709, 729, 729, 729, + 729, 0, 0, 0, 730, 731, 731, 731, 731, 763, + 728, 760, 730, 732, 732, 732, 732, 729, 738, 738, + 738, 738, 777, 739, 739, 739, 739, 740, 740, 740, + 740, 0, 0, 0, 731, 0, 0, 783, 738, 0, + 0, 794, 732, 739, 819, 0, 777, 740, 742, 742, + + 742, 742, 796, 739, 743, 743, 743, 743, 738, 731, + 740, 783, 744, 744, 744, 744, 794, 732, 819, 742, + 745, 745, 745, 745, 0, 743, 0, 796, 739, 0, + 0, 0, 738, 744, 802, 740, 746, 746, 746, 746, + 0, 745, 821, 802, 747, 747, 747, 747, 748, 748, + 748, 748, 0, 750, 750, 750, 750, 746, 745, 802, + 800, 746, 800, 0, 808, 747, 821, 802, 0, 748, + 749, 749, 749, 749, 750, 0, 809, 748, 752, 752, + 752, 752, 745, 747, 0, 800, 746, 800, 747, 808, + 811, 749, 750, 751, 751, 751, 751, 0, 751, 752, + + 749, 809, 748, 766, 766, 766, 766, 747, 761, 761, + 761, 761, 747, 0, 751, 811, 750, 832, 788, 761, + 813, 818, 788, 766, 0, 749, 753, 753, 753, 753, + 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, + 0, 832, 753, 0, 753, 813, 818, 753, 753, 762, + 762, 762, 762, 764, 764, 764, 764, 0, 0, 788, + 762, 765, 765, 765, 765, 767, 767, 767, 767, 0, + 0, 0, 765, 0, 0, 753, 767, 0, 768, 768, + 768, 768, 764, 788, 820, 767, 769, 769, 769, 769, + 765, 0, 0, 833, 768, 778, 778, 778, 778, 753, + + 753, 771, 769, 770, 770, 770, 770, 764, 836, 820, + 771, 771, 0, 0, 0, 765, 768, 769, 833, 770, + 772, 772, 772, 772, 804, 0, 771, 773, 773, 773, + 773, 0, 836, 804, 771, 771, 774, 774, 774, 774, + 768, 835, 769, 773, 0, 775, 775, 775, 775, 804, + 770, 772, 774, 776, 776, 776, 776, 804, 0, 0, + 772, 775, 779, 779, 779, 779, 835, 0, 773, 776, + 780, 780, 780, 780, 770, 861, 772, 869, 779, 781, + 781, 781, 781, 775, 772, 0, 780, 825, 782, 782, + 782, 782, 773, 0, 776, 781, 784, 784, 784, 784, + + 861, 825, 869, 779, 782, 0, 843, 775, 785, 807, + 785, 786, 790, 790, 790, 790, 0, 781, 776, 785, + 786, 807, 884, 790, 786, 0, 825, 779, 0, 782, + 843, 0, 0, 785, 807, 785, 786, 787, 787, 787, + 787, 781, 0, 785, 786, 807, 884, 0, 786, 791, + 791, 791, 791, 782, 789, 789, 789, 789, 891, 893, + 791, 827, 827, 827, 827, 789, 801, 793, 787, 791, + 792, 792, 792, 792, 908, 0, 793, 787, 793, 0, + 801, 789, 827, 891, 893, 0, 792, 795, 795, 795, + 795, 801, 793, 787, 797, 797, 797, 797, 908, 803, + + 793, 787, 793, 827, 801, 797, 789, 795, 798, 798, + 798, 798, 792, 803, 910, 810, 795, 0, 0, 798, + 799, 799, 799, 799, 803, 812, 895, 827, 798, 810, + 922, 799, 805, 805, 805, 805, 792, 803, 910, 812, + 810, 795, 806, 806, 806, 806, 896, 898, 909, 799, + 812, 895, 0, 810, 922, 815, 815, 815, 815, 0, + 896, 805, 0, 812, 816, 816, 816, 816, 0, 0, + 0, 806, 898, 909, 799, 815, 840, 840, 840, 840, + 830, 830, 830, 830, 816, 896, 805, 822, 822, 822, + 822, 0, 817, 817, 817, 817, 806, 814, 814, 814, + + 814, 830, 814, 823, 823, 823, 823, 822, 0, 0, + 814, 814, 817, 814, 814, 814, 814, 814, 817, 814, + 814, 814, 981, 823, 914, 0, 822, 824, 824, 824, + 824, 826, 826, 826, 826, 851, 823, 851, 828, 828, + 828, 828, 920, 817, 851, 999, 981, 824, 940, 914, + 822, 0, 826, 829, 829, 829, 829, 890, 826, 828, + 851, 823, 851, 831, 831, 831, 831, 920, 851, 999, + 824, 890, 946, 940, 829, 837, 837, 837, 837, 828, + 1002, 0, 890, 826, 831, 0, 837, 838, 838, 838, + 838, 829, 947, 952, 824, 890, 0, 946, 838, 0, + + 984, 0, 831, 828, 1002, 841, 841, 841, 841, 842, + 842, 842, 842, 1007, 1001, 829, 841, 947, 952, 0, + 842, 844, 844, 844, 844, 984, 831, 845, 845, 845, + 845, 846, 846, 846, 846, 0, 0, 1007, 845, 1001, + 0, 844, 847, 847, 847, 847, 0, 845, 1012, 1027, + 0, 846, 0, 847, 848, 848, 848, 848, 849, 849, + 849, 849, 847, 850, 850, 850, 850, 0, 0, 0, + 848, 872, 1012, 1027, 849, 852, 852, 852, 852, 850, + 872, 872, 1013, 848, 1021, 853, 853, 853, 853, 892, + 0, 852, 854, 854, 854, 854, 872, 855, 855, 855, + + 855, 853, 849, 892, 872, 872, 852, 1013, 848, 1021, + 1036, 1094, 852, 855, 892, 852, 853, 856, 856, 856, + 856, 0, 853, 0, 0, 853, 849, 892, 0, 854, + 855, 852, 1095, 856, 1036, 1094, 852, 0, 0, 852, + 0, 853, 877, 877, 877, 877, 853, 877, 856, 853, + 1050, 1054, 897, 854, 856, 855, 1095, 856, 857, 857, + 857, 857, 877, 859, 859, 859, 859, 897, 858, 858, + 858, 858, 960, 856, 857, 1050, 1054, 897, 856, 859, + 1106, 856, 960, 1107, 858, 860, 860, 860, 860, 857, + 988, 897, 859, 1022, 0, 857, 1056, 960, 857, 858, + + 1067, 860, 988, 1022, 1106, 858, 960, 1107, 858, 862, + 862, 862, 862, 0, 857, 988, 0, 859, 1022, 857, + 0, 1056, 857, 1084, 858, 1067, 988, 1022, 860, 858, + 983, 1092, 858, 863, 863, 863, 863, 864, 864, 864, + 864, 865, 865, 865, 865, 983, 862, 0, 1084, 863, + 1103, 1113, 860, 864, 1118, 983, 1092, 865, 866, 866, + 866, 866, 876, 876, 876, 876, 863, 876, 864, 983, + 862, 1028, 865, 876, 864, 1103, 1113, 864, 865, 1118, + 1028, 865, 0, 867, 867, 867, 867, 868, 868, 868, + 868, 863, 1135, 864, 0, 866, 1028, 865, 864, 867, + + 0, 864, 865, 868, 1028, 865, 870, 870, 870, 870, + 0, 871, 867, 1035, 1035, 1035, 1035, 1135, 871, 866, + 871, 1136, 873, 873, 873, 873, 880, 880, 880, 880, + 868, 0, 874, 874, 874, 874, 871, 867, 873, 1140, + 0, 0, 871, 870, 871, 1136, 880, 0, 874, 875, + 875, 875, 875, 873, 868, 886, 886, 886, 886, 1145, + 875, 875, 873, 874, 1140, 875, 886, 870, 882, 882, + 882, 882, 874, 0, 878, 878, 878, 878, 873, 878, + 875, 1144, 1149, 1145, 882, 878, 873, 1150, 874, 875, + 879, 879, 879, 879, 878, 879, 874, 881, 881, 881, + + 881, 879, 1141, 1059, 0, 875, 1144, 1149, 881, 0, + 882, 1150, 0, 875, 0, 1059, 1141, 881, 883, 883, + 883, 883, 885, 885, 885, 885, 0, 1141, 1059, 883, + 888, 888, 888, 888, 882, 889, 889, 889, 889, 1059, + 1141, 888, 885, 0, 0, 1162, 889, 1025, 0, 883, + 888, 900, 900, 900, 900, 889, 0, 1025, 883, 0, + 901, 901, 901, 901, 885, 901, 899, 899, 899, 899, + 1162, 900, 1025, 1159, 883, 0, 0, 901, 0, 901, + 901, 1025, 883, 917, 917, 917, 917, 0, 885, 894, + 894, 894, 894, 0, 894, 899, 0, 1159, 912, 912, + + 912, 912, 894, 894, 917, 894, 894, 894, 894, 894, + 0, 894, 894, 894, 902, 902, 902, 902, 912, 0, + 899, 904, 904, 904, 904, 902, 0, 0, 0, 912, + 905, 905, 905, 905, 902, 903, 903, 903, 903, 1172, + 903, 904, 1043, 1043, 1043, 1043, 903, 904, 903, 903, + 905, 903, 903, 903, 912, 903, 905, 903, 903, 903, + 906, 906, 906, 906, 1172, 0, 911, 911, 911, 911, + 0, 0, 904, 0, 913, 913, 913, 913, 1161, 0, + 906, 905, 916, 916, 916, 916, 911, 915, 915, 915, + 915, 0, 0, 0, 913, 919, 919, 919, 919, 906, + + 0, 0, 1161, 916, 911, 0, 0, 0, 915, 0, + 0, 916, 1071, 1071, 1071, 1071, 919, 1175, 1175, 1175, + 1175, 913, 0, 906, 907, 907, 907, 907, 911, 907, + 915, 918, 918, 918, 918, 919, 916, 907, 907, 0, + 907, 907, 907, 907, 907, 913, 907, 907, 907, 0, + 0, 0, 918, 1213, 915, 924, 924, 924, 924, 919, + 918, 925, 925, 925, 925, 0, 924, 927, 927, 927, + 927, 1082, 925, 928, 928, 928, 928, 1213, 927, 929, + 929, 929, 929, 1082, 928, 918, 930, 930, 930, 930, + 929, 931, 931, 931, 931, 0, 1082, 930, 932, 932, + + 932, 932, 931, 0, 0, 0, 930, 1082, 1176, 932, + 1214, 931, 933, 933, 933, 933, 0, 1180, 932, 934, + 934, 934, 934, 933, 935, 935, 935, 935, 936, 936, + 936, 936, 933, 1176, 1214, 934, 1228, 939, 0, 1184, + 935, 939, 1180, 0, 936, 937, 937, 937, 937, 0, + 939, 938, 938, 938, 938, 1211, 0, 934, 0, 936, + 1228, 937, 939, 941, 1184, 935, 939, 938, 936, 941, + 942, 942, 942, 942, 939, 1222, 937, 0, 941, 0, + 1211, 934, 938, 1051, 936, 937, 942, 0, 941, 935, + 1229, 938, 936, 1051, 941, 1237, 1279, 942, 0, 1239, + + 1222, 937, 941, 943, 943, 943, 943, 938, 1051, 937, + 944, 944, 944, 944, 1229, 938, 0, 1051, 1240, 943, + 1237, 1279, 942, 1239, 1254, 0, 944, 0, 943, 945, + 945, 945, 945, 948, 948, 948, 948, 954, 949, 949, + 949, 949, 1240, 954, 1283, 945, 0, 1116, 1254, 948, + 1258, 944, 954, 943, 949, 950, 950, 950, 950, 1116, + 948, 953, 954, 949, 951, 951, 951, 951, 954, 1283, + 953, 950, 1116, 953, 1258, 944, 954, 0, 0, 1297, + 951, 1259, 0, 1116, 0, 948, 953, 0, 949, 0, + 955, 955, 955, 955, 953, 0, 950, 953, 1273, 1310, + + 956, 956, 956, 956, 1297, 1259, 955, 957, 957, 957, + 957, 958, 958, 958, 958, 1298, 956, 0, 0, 1057, + 950, 955, 1273, 957, 1310, 1311, 0, 958, 0, 1057, + 955, 956, 966, 966, 966, 966, 1045, 966, 957, 1298, + 956, 1058, 958, 966, 1057, 1045, 955, 957, 1045, 1311, + 1058, 958, 1319, 1057, 955, 0, 956, 959, 959, 959, + 959, 1045, 0, 957, 956, 0, 1058, 958, 1320, 1045, + 1332, 957, 1045, 959, 1058, 958, 0, 1319, 961, 961, + 961, 961, 967, 967, 967, 967, 959, 1115, 959, 961, + 961, 0, 1320, 967, 961, 1332, 1115, 959, 962, 962, + + 962, 962, 0, 1121, 963, 963, 963, 963, 0, 961, + 0, 959, 1115, 959, 962, 1121, 1338, 0, 961, 1344, + 1115, 959, 0, 0, 964, 964, 964, 964, 1121, 962, + 965, 965, 965, 965, 961, 963, 0, 0, 962, 1121, + 1338, 1068, 961, 1344, 963, 969, 969, 969, 969, 0, + 969, 1068, 0, 964, 962, 964, 969, 1347, 1343, 1346, + 963, 965, 962, 0, 964, 969, 1068, 1114, 963, 965, + 965, 970, 970, 970, 970, 1068, 970, 1114, 964, 0, + 964, 1347, 970, 1343, 1346, 0, 965, 1348, 964, 0, + 0, 970, 1114, 965, 965, 972, 972, 972, 972, 1351, + + 972, 1114, 973, 973, 973, 973, 972, 973, 974, 974, + 974, 974, 1348, 973, 975, 975, 975, 975, 0, 974, + 976, 976, 976, 976, 1351, 975, 1337, 1337, 974, 0, + 1349, 976, 1352, 0, 975, 0, 976, 977, 977, 977, + 977, 978, 978, 978, 978, 1119, 0, 0, 977, 0, + 1337, 1337, 978, 977, 1349, 1119, 1352, 978, 979, 979, + 979, 979, 980, 980, 980, 980, 1120, 1133, 977, 979, + 1119, 1138, 978, 980, 1391, 1120, 1133, 977, 980, 1119, + 1138, 978, 982, 982, 982, 982, 985, 985, 985, 985, + 0, 1120, 1133, 977, 0, 0, 1138, 978, 1391, 1120, + + 1133, 977, 982, 1406, 1138, 978, 989, 989, 989, 989, + 0, 990, 990, 990, 990, 985, 990, 1417, 991, 991, + 991, 991, 1430, 1432, 982, 0, 989, 1406, 990, 991, + 990, 990, 1437, 993, 993, 993, 993, 1438, 0, 1304, + 985, 1417, 0, 1304, 993, 1134, 1430, 1432, 982, 986, + 986, 986, 986, 993, 986, 1433, 1437, 1134, 1443, 0, + 986, 1438, 986, 986, 1304, 986, 986, 986, 1304, 986, + 1134, 986, 986, 986, 987, 987, 987, 987, 0, 987, + 1433, 1134, 1443, 1000, 1000, 1000, 1000, 987, 987, 1434, + 987, 987, 987, 987, 987, 1181, 987, 987, 987, 992, + + 992, 992, 992, 1000, 992, 1156, 1156, 1156, 1156, 1181, + 992, 1000, 992, 992, 1434, 992, 992, 992, 0, 992, + 1181, 992, 992, 992, 994, 994, 994, 994, 996, 996, + 996, 996, 1456, 1181, 1156, 994, 1000, 0, 0, 996, + 997, 997, 997, 997, 994, 0, 0, 1444, 996, 0, + 0, 997, 1445, 1004, 1004, 1004, 1004, 1456, 0, 1156, + 997, 998, 998, 998, 998, 0, 998, 1005, 1005, 1005, + 1005, 1444, 998, 1004, 998, 998, 1445, 998, 998, 998, + 1477, 998, 1004, 998, 998, 998, 1446, 1005, 1009, 1009, + 1009, 1009, 1011, 1011, 1011, 1011, 1008, 1008, 1008, 1008, + + 0, 1015, 1015, 1015, 1015, 1477, 1451, 1004, 1452, 1009, + 1446, 1005, 1015, 1011, 0, 0, 0, 1008, 0, 0, + 0, 1015, 1087, 1087, 1087, 1087, 0, 0, 0, 1008, + 1451, 0, 1452, 1087, 0, 1005, 1006, 1006, 1006, 1006, + 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, + 1006, 1006, 1006, 1006, 1008, 1006, 1479, 1006, 1006, 1006, + 1006, 1006, 1010, 1010, 1010, 1010, 0, 1479, 1016, 1016, + 1016, 1016, 1017, 1017, 1017, 1017, 1018, 1018, 1018, 1018, + 1480, 1479, 0, 1010, 1016, 1006, 0, 1482, 1017, 0, + 1491, 1479, 1018, 1076, 1076, 1076, 1076, 1017, 1019, 1019, + + 1019, 1019, 0, 1010, 1076, 1480, 1499, 1018, 0, 1006, + 1006, 1016, 1482, 1076, 1019, 1491, 1018, 1020, 1020, 1020, + 1020, 0, 1017, 1029, 1029, 1029, 1029, 1010, 1131, 1019, + 1131, 1499, 1018, 1020, 0, 1016, 1506, 1131, 1019, 1029, + 1018, 0, 0, 1023, 1023, 1023, 1023, 1487, 1020, 1024, + 1024, 1024, 1024, 1131, 1019, 1131, 0, 1020, 1487, 1023, + 1506, 1131, 1019, 0, 0, 1024, 1026, 1026, 1026, 1026, + 0, 0, 1487, 1020, 1023, 0, 1185, 1065, 1024, 1065, + 1024, 1020, 1487, 1023, 1030, 1030, 1030, 1030, 1065, 1024, + 1185, 0, 1031, 1031, 1031, 1031, 1399, 1026, 1399, 1023, + + 1030, 1185, 1065, 1024, 1065, 1024, 1026, 1023, 1031, 0, + 0, 0, 1065, 1024, 1185, 1032, 1032, 1032, 1032, 0, + 0, 1399, 1026, 1399, 1030, 1031, 1033, 1033, 1033, 1033, + 1026, 1032, 0, 1034, 1034, 1034, 1034, 1037, 1037, 1037, + 1037, 1508, 1081, 1081, 1081, 1081, 1032, 1504, 1030, 1034, + 1031, 0, 1032, 1037, 1510, 1032, 1139, 1033, 1038, 1038, + 1038, 1038, 1081, 1033, 1034, 1508, 1033, 1514, 1139, 1519, + 1034, 1032, 1504, 1034, 1038, 1509, 1032, 1521, 1510, 1032, + 0, 1139, 1033, 1039, 1039, 1039, 1039, 1033, 0, 1034, + 1033, 1514, 1139, 1519, 1034, 1513, 0, 1034, 1038, 1039, + + 1509, 1521, 1040, 1040, 1040, 1040, 1041, 1041, 1041, 1041, + 1088, 1088, 1088, 1088, 1526, 0, 1039, 0, 1040, 1518, + 1513, 1088, 1038, 1147, 1042, 1042, 1042, 1042, 1044, 1044, + 1044, 1044, 1147, 1040, 0, 0, 0, 1041, 1526, 1040, + 1042, 1039, 1040, 1041, 1518, 0, 1041, 0, 1147, 1089, + 1089, 1089, 1089, 0, 0, 1042, 1147, 1520, 1040, 1044, + 1089, 1042, 1041, 1040, 1042, 1212, 1040, 1041, 1044, 1089, + 1041, 1046, 1046, 1046, 1046, 1047, 1047, 1047, 1047, 1212, + 1042, 1530, 1520, 1525, 1044, 1042, 1548, 1046, 1042, 1148, + 1212, 1047, 1044, 1048, 1048, 1048, 1048, 1052, 1052, 1052, + + 1052, 1148, 1046, 1212, 1532, 1530, 1047, 0, 1525, 1048, + 1548, 1046, 1552, 1052, 1148, 1047, 1053, 1053, 1053, 1053, + 1062, 1062, 1062, 1062, 1048, 1148, 0, 1046, 1052, 1532, + 1551, 1047, 1053, 1048, 1580, 1046, 1552, 1052, 0, 1047, + 0, 0, 1061, 1061, 1061, 1061, 0, 1053, 0, 1048, + 1563, 1062, 0, 1052, 0, 1551, 1053, 1048, 1580, 1062, + 1062, 1052, 1063, 1063, 1063, 1063, 1122, 1122, 1122, 1122, + 1178, 1061, 1053, 1061, 0, 1563, 1062, 1122, 1063, 1178, + 1053, 0, 1061, 1062, 1062, 1064, 1064, 1064, 1064, 1069, + 1069, 1069, 1069, 1063, 0, 1178, 1061, 1464, 1061, 1464, + + 0, 1064, 1063, 1178, 0, 1069, 1061, 1070, 1070, 1070, + 1070, 1072, 1072, 1072, 1072, 0, 1064, 0, 1063, 1182, + 1069, 1573, 1464, 1070, 1464, 1064, 1063, 0, 1182, 1069, + 1073, 1073, 1073, 1073, 1099, 1099, 1099, 1099, 1070, 1266, + 1072, 1064, 1072, 1581, 1182, 1069, 1573, 1070, 1266, 1064, + 1582, 1072, 1182, 1069, 1099, 0, 0, 1074, 1074, 1074, + 1074, 1073, 1619, 1070, 1266, 1072, 1585, 1072, 1581, 1073, + 1073, 1070, 1266, 0, 1582, 1072, 1075, 1075, 1075, 1075, + 1077, 1077, 1077, 1077, 1589, 0, 1073, 1619, 1074, 0, + 1585, 1077, 0, 1073, 1073, 1074, 1077, 1074, 1078, 1078, + + 1078, 1078, 1108, 1108, 1108, 1108, 1363, 1075, 1589, 1078, + 1363, 1077, 1627, 1074, 1078, 1591, 1075, 1075, 1108, 1074, + 1077, 1074, 1090, 1090, 1090, 1090, 0, 0, 1470, 1078, + 1470, 1363, 1075, 1090, 0, 1363, 1077, 1627, 1078, 1591, + 1075, 1075, 1090, 0, 1077, 1079, 1079, 1079, 1079, 1093, + 1093, 1093, 1093, 1470, 1078, 1470, 1079, 1097, 1097, 1097, + 1097, 1079, 1078, 0, 1098, 1098, 1098, 1098, 1595, 1093, + 0, 0, 1105, 1105, 1105, 1105, 1079, 1097, 1104, 1104, + 1104, 1104, 1179, 1632, 1098, 1079, 0, 1124, 1124, 1124, + 1124, 1647, 1595, 1105, 1179, 1097, 1093, 1105, 1124, 1104, + + 1656, 1079, 0, 1124, 0, 1098, 1663, 1179, 1632, 1079, + 1083, 1083, 1083, 1083, 1669, 1083, 1647, 1104, 1179, 1097, + 1093, 1083, 1105, 1083, 1083, 1656, 1083, 1083, 1083, 1098, + 1083, 1663, 1083, 1083, 1083, 1086, 1086, 1086, 1086, 1669, + 1086, 1104, 0, 1127, 1127, 1127, 1127, 1671, 1086, 1086, + 1677, 1086, 1086, 1086, 1127, 1086, 0, 1086, 1086, 1086, + 1091, 1091, 1091, 1091, 0, 1091, 1248, 1248, 1248, 1248, + 0, 1091, 1671, 1091, 1091, 1677, 1091, 1091, 1091, 1600, + 1091, 1602, 1091, 1091, 1091, 1100, 1100, 1100, 1100, 1100, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, + + 1100, 1100, 1100, 1600, 1100, 1602, 1100, 1100, 1100, 1100, + 1100, 1128, 1128, 1128, 1128, 0, 1160, 1160, 1160, 1160, + 1183, 1160, 1128, 1167, 1167, 1167, 1167, 1128, 1191, 1191, + 1191, 1191, 1183, 1160, 1100, 1160, 1160, 0, 0, 1167, + 1186, 1186, 1186, 1186, 1191, 1183, 1190, 1190, 1190, 1190, + 0, 1186, 1276, 1276, 1276, 1276, 1183, 1190, 1100, 1100, + 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, + 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, + 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, + 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, + + 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, + 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, + 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, + 1102, 1102, 1102, 1102, 1102, 1109, 1109, 1109, 1109, 1110, + 1110, 1110, 1110, 1111, 1111, 1111, 1111, 1197, 1197, 1197, + 1197, 1109, 0, 1657, 0, 1110, 1725, 1224, 1197, 1111, + 1112, 1112, 1112, 1112, 0, 1117, 1117, 1117, 1117, 1224, + 1110, 0, 0, 1498, 1111, 0, 1112, 1657, 1109, 1110, + 1725, 1117, 1224, 1111, 1498, 0, 1123, 1123, 1123, 1123, + 1684, 1112, 0, 1224, 0, 1110, 1117, 1123, 1498, 1111, + + 1112, 0, 1109, 1110, 0, 1117, 0, 1111, 1498, 1125, + 1125, 1125, 1125, 0, 0, 1684, 1112, 1123, 1369, 1203, + 1703, 1117, 1369, 1711, 1112, 1125, 1123, 1203, 1203, 1117, + 1126, 1126, 1126, 1126, 0, 1223, 1125, 1129, 1129, 1129, + 1129, 1726, 1123, 1369, 1203, 1703, 1126, 1369, 1711, 1223, + 1123, 1203, 1203, 1129, 1731, 1126, 1130, 1130, 1130, 1130, + 1223, 1125, 0, 1733, 1129, 1726, 1734, 1132, 1132, 1132, + 1132, 0, 1130, 1223, 1137, 1137, 1137, 1137, 0, 1731, + 1126, 1130, 0, 1132, 1142, 1142, 1142, 1142, 1733, 1129, + 1137, 1734, 1784, 0, 1143, 1143, 1143, 1143, 1132, 0, + + 0, 1146, 1146, 1146, 1146, 1137, 1130, 1132, 1737, 0, + 1195, 1195, 1195, 1195, 1137, 1142, 1784, 1146, 1274, 1274, + 1274, 1274, 1142, 1132, 1142, 1143, 1195, 1785, 0, 0, + 1137, 1132, 1146, 1737, 1143, 1143, 0, 0, 1137, 1274, + 1142, 1146, 1151, 1151, 1151, 1151, 1142, 0, 1142, 0, + 1143, 1785, 1152, 1152, 1152, 1152, 0, 1146, 1143, 1143, + 1738, 1164, 1164, 1164, 1164, 1146, 1739, 0, 0, 1154, + 1154, 1154, 1154, 1151, 1153, 1153, 1153, 1153, 0, 0, + 1151, 1164, 1151, 1152, 0, 1738, 1164, 0, 1238, 0, + 1740, 1739, 1152, 1152, 1201, 1201, 1201, 1201, 1151, 1743, + + 1154, 0, 1238, 1153, 1151, 1153, 1151, 1757, 1152, 1154, + 1201, 1164, 1154, 1238, 1153, 1740, 1152, 1152, 1177, 1177, + 1177, 1177, 0, 0, 1743, 1154, 1238, 0, 1153, 1280, + 1153, 0, 1757, 1154, 1177, 1800, 1154, 0, 1153, 1155, + 1155, 1155, 1155, 1280, 1155, 1799, 1163, 1163, 1163, 1163, + 1284, 1177, 1155, 1155, 1280, 1155, 1155, 1155, 0, 1155, + 1800, 1155, 1155, 1155, 1284, 0, 1163, 1280, 1155, 1799, + 1246, 1246, 1246, 1246, 0, 1284, 1177, 1173, 1173, 1173, + 1173, 1249, 1249, 1249, 1249, 1808, 0, 0, 1284, 1163, + 1246, 0, 0, 1155, 1158, 1158, 1158, 1158, 1173, 1158, + + 0, 1249, 1225, 1225, 1225, 1225, 0, 1158, 1158, 1808, + 1158, 1158, 1158, 1163, 1158, 1173, 1158, 1158, 1158, 1166, + 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166, + 1166, 1225, 1807, 1166, 1166, 1166, 1166, 0, 1166, 1173, + 1166, 1166, 1166, 1166, 1166, 1810, 1281, 1166, 0, 1166, + 1792, 0, 1275, 1275, 1275, 1275, 1225, 1807, 1281, 1792, + 1169, 1169, 1169, 1169, 1174, 1174, 1174, 1174, 1166, 1810, + 0, 1281, 1166, 1275, 1166, 1792, 1169, 1327, 1327, 1327, + 1327, 1275, 1281, 1792, 0, 1174, 0, 1169, 0, 1169, + 0, 0, 1166, 1166, 1168, 1168, 1168, 1168, 1168, 1168, + + 1168, 1168, 1168, 1168, 1168, 1168, 1275, 1174, 1168, 1168, + 1168, 1168, 1169, 1168, 1169, 1168, 1168, 1168, 1168, 1168, + 1170, 1170, 1170, 1170, 1171, 1171, 1171, 1171, 0, 0, + 0, 1174, 0, 1285, 0, 0, 1170, 1813, 0, 1476, + 1171, 1476, 0, 1168, 0, 1285, 1386, 1170, 1295, 1170, + 1386, 1171, 1535, 1171, 1188, 1188, 1188, 1188, 1285, 1170, + 1295, 1813, 1171, 1535, 1476, 1188, 1476, 1168, 1168, 1285, + 1188, 1386, 1170, 1295, 1170, 1386, 1171, 1535, 1171, 1329, + 1329, 1329, 1329, 1170, 1295, 1188, 1171, 1535, 1189, 1189, + 1189, 1189, 0, 0, 1188, 1192, 1192, 1192, 1192, 1189, + + 1426, 1426, 1426, 1426, 1189, 1818, 1192, 0, 0, 0, + 1188, 1192, 0, 0, 1193, 1193, 1193, 1193, 1188, 1189, + 1196, 1196, 1196, 1196, 1848, 1193, 1192, 0, 1189, 1818, + 1193, 1194, 1194, 1194, 1194, 1192, 1196, 1198, 1198, 1198, + 1198, 0, 1194, 1820, 1189, 1193, 0, 1194, 1198, 1848, + 1539, 1192, 1189, 1198, 1193, 1357, 1357, 1357, 1357, 1192, + 1196, 1539, 1194, 1199, 1199, 1199, 1199, 1820, 1198, 0, + 1193, 1194, 0, 0, 1199, 1539, 1357, 1198, 1193, 1199, + 1200, 1200, 1200, 1200, 1196, 1539, 0, 1194, 1849, 0, + 0, 1200, 0, 1198, 1199, 1194, 1200, 1202, 1202, 1202, + + 1202, 1198, 1864, 1199, 1857, 0, 1302, 1204, 1204, 1204, + 1204, 1200, 1849, 1202, 1205, 1205, 1205, 1205, 1302, 1199, + 1200, 1869, 0, 1204, 0, 0, 1864, 1199, 1317, 1857, + 1205, 1302, 1326, 1326, 1326, 1326, 1200, 1202, 1204, 0, + 1317, 0, 1302, 0, 1200, 1205, 1869, 1204, 1206, 1206, + 1206, 1206, 1870, 1317, 1205, 1247, 1247, 1247, 1247, 0, + 1247, 1202, 1549, 1204, 1317, 1207, 1207, 1207, 1207, 1326, + 1205, 1204, 1247, 1549, 1247, 1247, 1870, 0, 1205, 1206, + 0, 1207, 1208, 1208, 1208, 1208, 1872, 1549, 1206, 1250, + 1250, 1250, 1250, 1326, 1250, 0, 1207, 1549, 1208, 1209, + + 1209, 1209, 1209, 1873, 1206, 1207, 1250, 1874, 1250, 1250, + 0, 1872, 1206, 1208, 0, 1209, 1289, 1210, 1210, 1210, + 1210, 1207, 1208, 1289, 0, 1289, 1877, 1873, 1209, 1207, + 1209, 0, 1874, 1210, 1215, 1215, 1215, 1215, 1208, 1209, + 1875, 1289, 1576, 1576, 1576, 1576, 1208, 1289, 1210, 1289, + 1215, 1877, 0, 1209, 0, 1209, 1210, 1210, 1282, 1282, + 1282, 1282, 0, 1209, 1875, 1215, 1216, 1216, 1216, 1216, + 0, 0, 0, 1210, 1215, 0, 1217, 1217, 1217, 1217, + 1210, 1210, 1216, 1218, 1218, 1218, 1218, 1282, 0, 1878, + 1215, 1883, 0, 1219, 1219, 1219, 1219, 1216, 1215, 1218, + + 1256, 1256, 1256, 1256, 0, 0, 1216, 1217, 0, 1219, + 1893, 0, 1282, 1878, 1218, 1883, 1217, 1361, 0, 1367, + 1256, 1892, 1216, 1218, 1219, 1220, 1220, 1220, 1220, 1361, + 1216, 1367, 1217, 1219, 1893, 1221, 1221, 1221, 1221, 1218, + 1217, 1220, 1361, 1256, 1367, 0, 1892, 1218, 1390, 1219, + 0, 1221, 1390, 1361, 1220, 1367, 1220, 1219, 1894, 0, + 0, 1226, 1226, 1226, 1226, 1220, 1221, 1256, 1286, 1286, + 1286, 1286, 0, 1390, 1221, 1221, 1895, 1390, 0, 1220, + 0, 1220, 1894, 1227, 1227, 1227, 1227, 0, 0, 1220, + 1226, 1221, 1226, 1230, 1230, 1230, 1230, 1286, 1221, 1221, + + 1895, 1226, 1909, 1231, 1231, 1231, 1231, 0, 0, 1230, + 1575, 1575, 1575, 1575, 1227, 1226, 1395, 1226, 1910, 1231, + 1395, 1575, 1286, 1227, 1230, 1226, 1227, 1909, 0, 1232, + 1232, 1232, 1232, 1230, 1231, 1233, 1233, 1233, 1233, 1227, + 1918, 1395, 1910, 1231, 0, 1395, 1919, 1227, 0, 1230, + 1227, 1233, 1234, 1234, 1234, 1234, 0, 1230, 1921, 1231, + 1232, 1345, 1345, 1345, 1345, 1918, 1233, 1231, 1234, 1232, + 1919, 1235, 1235, 1235, 1235, 1233, 1923, 1345, 1236, 1236, + 1236, 1236, 1921, 1234, 0, 1232, 1922, 1235, 0, 0, + 0, 1233, 1234, 1232, 1236, 1586, 1586, 1586, 1586, 1233, + + 1235, 1923, 1235, 1358, 1358, 1358, 1358, 0, 1234, 1236, + 1922, 1235, 1242, 1242, 1242, 1242, 1234, 1236, 1236, 1241, + 1241, 1241, 1241, 0, 1358, 1235, 1939, 1235, 0, 1243, + 1243, 1243, 1243, 1924, 1236, 1235, 0, 1350, 1350, 1350, + 1350, 1236, 1236, 1242, 1359, 1359, 1359, 1359, 1241, 1846, + 1241, 1939, 1242, 1350, 1929, 1242, 1603, 1924, 1846, 1241, + 1243, 1244, 1244, 1244, 1244, 1359, 1938, 1603, 1242, 1243, + 1243, 0, 0, 1241, 1846, 1241, 1242, 0, 1929, 1242, + 0, 1603, 1846, 1241, 0, 1243, 1376, 1376, 1376, 1376, + 1938, 1603, 1244, 1243, 1243, 1278, 1278, 1278, 1278, 1940, + + 0, 1244, 1376, 1257, 1257, 1257, 1257, 1287, 1287, 1287, + 1287, 1278, 1400, 0, 1943, 0, 1400, 1244, 1287, 1380, + 1380, 1380, 1380, 1287, 1940, 1244, 1245, 1245, 1245, 1245, + 1257, 1245, 1257, 0, 1278, 1380, 0, 1400, 1943, 1245, + 1245, 1400, 1245, 1245, 1245, 1485, 1245, 1485, 1245, 1245, + 1245, 1252, 1252, 1252, 1252, 1257, 1252, 1257, 1278, 1392, + 1392, 1392, 1392, 0, 1252, 1252, 0, 1252, 1252, 1252, + 1485, 1252, 1485, 1252, 1252, 1252, 1255, 1255, 1255, 1255, + 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, + 1255, 1255, 1255, 1255, 0, 1255, 1392, 1255, 1255, 1255, + + 1255, 1255, 1260, 1260, 1260, 1260, 0, 1262, 1262, 1262, + 1262, 1288, 1288, 1288, 1288, 1412, 0, 1944, 1260, 1412, + 1392, 1949, 1288, 1262, 1950, 1255, 1416, 1288, 1460, 1962, + 1416, 1465, 1460, 1260, 1497, 1465, 1497, 1531, 1262, 1531, + 1412, 1944, 1260, 0, 1412, 1949, 0, 1262, 1950, 1255, + 1255, 1416, 1951, 1460, 1962, 1416, 1465, 1460, 1260, 1497, + 1465, 1497, 1531, 1262, 1531, 0, 1260, 1261, 1261, 1261, + 1261, 1262, 1264, 1264, 1264, 1264, 1951, 1265, 1265, 1265, + 1265, 0, 1952, 1261, 1268, 1268, 1268, 1268, 1264, 1269, + 1269, 1269, 1269, 1265, 1261, 0, 1261, 1466, 1261, 0, + + 1268, 1466, 1969, 1264, 0, 1269, 1952, 1261, 1265, 1471, + 1478, 0, 1264, 1471, 1478, 1268, 0, 1265, 1957, 1261, + 1269, 1261, 1466, 1261, 1268, 0, 1466, 1969, 1264, 1269, + 0, 1261, 0, 1265, 1471, 1478, 1264, 0, 1471, 1478, + 1268, 1265, 1957, 0, 0, 1269, 0, 0, 1268, 1272, + 1272, 1272, 1272, 1269, 1270, 1270, 1270, 1270, 0, 1290, + 1290, 1290, 1290, 0, 0, 1272, 1439, 1439, 1439, 1439, + 1270, 1442, 1442, 1442, 1442, 1290, 1272, 1536, 1272, 1536, + 1533, 1270, 1439, 1270, 1533, 1270, 0, 1442, 1290, 1606, + 1290, 0, 1272, 1958, 1270, 1447, 1447, 1447, 1447, 1290, + + 1606, 1272, 1536, 1272, 1536, 1533, 1270, 0, 1270, 1533, + 1270, 1447, 1967, 1290, 1606, 1290, 1272, 1958, 1270, 1271, + 1271, 1271, 1271, 1290, 1606, 0, 1968, 1291, 1291, 1291, + 1291, 1333, 1333, 1333, 1333, 1271, 1967, 1292, 1292, 1292, + 1292, 1970, 0, 1291, 2019, 1537, 1271, 2029, 1271, 1537, + 1968, 1333, 1997, 1292, 1863, 1863, 1271, 1271, 1291, 0, + 1425, 1425, 1425, 1425, 1333, 1970, 1291, 1291, 1292, 2019, + 1537, 1271, 2029, 1271, 1537, 0, 1997, 1292, 1863, 1863, + 1271, 1271, 0, 1291, 1293, 1293, 1293, 1293, 0, 1333, + 1291, 1291, 1998, 1292, 1294, 1294, 1294, 1294, 0, 1425, + + 1293, 1292, 1296, 1296, 1296, 1296, 1505, 1505, 1505, 1505, + 1294, 1299, 1299, 1299, 1299, 1293, 1998, 2011, 1427, 1427, + 1427, 1427, 1293, 1425, 1293, 1294, 1505, 1299, 0, 0, + 0, 1296, 0, 0, 1294, 1294, 1505, 2033, 1427, 1296, + 1293, 2011, 1299, 0, 0, 0, 1293, 0, 1293, 2012, + 1294, 1299, 1300, 1300, 1300, 1300, 1296, 1427, 1294, 1294, + 2020, 1505, 2033, 1296, 0, 0, 0, 1299, 1300, 1301, + 1301, 1301, 1301, 2012, 2038, 1299, 1303, 1303, 1303, 1303, + 2021, 1427, 2022, 1300, 2020, 1301, 1305, 1305, 1305, 1305, + 1300, 2027, 1300, 0, 2028, 1307, 1307, 1307, 1307, 2038, + + 1301, 0, 1305, 2030, 2021, 1303, 2022, 2034, 1300, 1301, + 1301, 0, 2039, 1303, 1300, 2027, 1300, 1305, 2028, 1339, + 1339, 1339, 1339, 1305, 1307, 1301, 1305, 2030, 2040, 0, + 1303, 2034, 1307, 1301, 1301, 1339, 2039, 1303, 1306, 1306, + 1306, 1306, 1305, 0, 2041, 2045, 1339, 1305, 1339, 1307, + 1305, 0, 2046, 2040, 1306, 2050, 1307, 1308, 1308, 1308, + 1308, 0, 0, 0, 1309, 1309, 1309, 1309, 2041, 1306, + 2045, 1339, 0, 1339, 0, 1306, 2046, 0, 1306, 2050, + 1450, 1450, 1450, 1450, 1457, 1457, 1457, 1457, 1308, 0, + 1458, 1458, 1458, 1458, 1306, 1309, 1450, 1308, 1308, 1306, + + 2056, 1309, 1306, 2057, 1309, 1457, 2055, 1312, 1312, 1312, + 1312, 1458, 2069, 1308, 1313, 1313, 1313, 1313, 0, 0, + 1309, 1308, 1308, 1312, 2056, 1309, 0, 2057, 1309, 0, + 1313, 2055, 1404, 1404, 1404, 1404, 1312, 2069, 1312, 0, + 0, 1314, 1314, 1314, 1314, 1313, 0, 1312, 1315, 1315, + 1315, 1315, 0, 1313, 1313, 0, 2070, 1314, 0, 0, + 0, 1312, 2082, 1312, 1315, 1318, 1318, 1318, 1318, 1404, + 1313, 1312, 1314, 1590, 1590, 1590, 1590, 1313, 1313, 1315, + 2070, 1314, 1316, 1316, 1316, 1316, 1315, 2082, 1315, 1321, + 1321, 1321, 1321, 1404, 1318, 0, 2091, 1314, 1316, 0, + + 2083, 2089, 1318, 2092, 1315, 1314, 1592, 1592, 1592, 1592, + 1315, 2099, 1315, 1316, 0, 1407, 1407, 1407, 1407, 1318, + 1321, 2091, 1316, 1316, 2083, 2089, 1318, 2092, 0, 1321, + 1321, 1322, 1322, 1322, 1322, 0, 2099, 0, 1316, 2100, + 2101, 1323, 1323, 1323, 1323, 1321, 1316, 1316, 1324, 1324, + 1324, 1324, 1407, 1321, 1321, 0, 2102, 0, 1374, 1374, + 1374, 1374, 1322, 2100, 1324, 2101, 2105, 2109, 1322, 1374, + 2111, 1322, 1323, 0, 1323, 0, 1407, 0, 0, 1324, + 2102, 1323, 2115, 2120, 2127, 1324, 2129, 1322, 1324, 1374, + 2105, 2109, 1322, 0, 2111, 1322, 0, 1323, 1374, 1323, + + 1325, 1325, 1325, 1325, 1324, 1323, 2115, 2120, 2127, 1324, + 2149, 2129, 1324, 2170, 1374, 0, 1325, 1354, 1354, 1354, + 1354, 2164, 1374, 1340, 1340, 1340, 1340, 1459, 1459, 1459, + 1459, 1325, 0, 1354, 2149, 0, 0, 1325, 2170, 1340, + 1325, 0, 0, 1459, 1354, 2164, 1354, 1354, 0, 2174, + 1340, 2184, 1340, 0, 0, 2191, 1325, 1517, 1517, 1517, + 1517, 1325, 1340, 0, 1325, 1328, 1328, 1328, 1328, 1354, + 1328, 1354, 1354, 1517, 2174, 1340, 2184, 1340, 1328, 1328, + 2191, 1328, 1328, 1328, 2197, 1328, 1340, 1328, 1328, 1328, + 1331, 1331, 1331, 1331, 0, 1331, 0, 0, 0, 1577, + + 1577, 1577, 1577, 1331, 1331, 2175, 1331, 1331, 1331, 2197, + 1331, 2183, 1331, 1331, 1331, 1334, 1334, 1334, 1334, 1577, + 1353, 1353, 1353, 1353, 2185, 1360, 1360, 1360, 1360, 2175, + 2251, 1415, 1415, 1415, 1415, 2183, 1353, 1355, 1355, 1355, + 1355, 1360, 1334, 0, 1334, 0, 1334, 1353, 2185, 1353, + 0, 0, 0, 1355, 2251, 1334, 1362, 1362, 1362, 1362, + 1353, 2199, 0, 1360, 1355, 2205, 1355, 1334, 1415, 1334, + 1355, 1334, 1353, 0, 1353, 1596, 1596, 1596, 1596, 1334, + 1335, 1335, 1335, 1335, 1353, 1362, 2199, 1360, 2219, 1355, + 2205, 1355, 1415, 1362, 2223, 1355, 2224, 2230, 1364, 1364, + + 1364, 1364, 1365, 1365, 1365, 1365, 0, 1335, 0, 1335, + 1362, 1335, 0, 2219, 1364, 0, 2233, 1362, 1365, 2223, + 1335, 2224, 2230, 1366, 1366, 1366, 1366, 2258, 2235, 1364, + 2244, 1809, 1335, 1365, 1335, 1364, 1335, 1809, 1364, 1365, + 1809, 2233, 1365, 0, 1335, 1336, 1336, 1336, 1336, 0, + 2250, 2258, 1366, 2235, 1364, 2244, 1809, 2252, 1365, 1364, + 1366, 1809, 1364, 1365, 1809, 0, 1365, 1368, 1368, 1368, + 1368, 2259, 1336, 2257, 1336, 2250, 1336, 1366, 1524, 1524, + 1524, 1524, 2252, 0, 1366, 1336, 0, 1370, 1370, 1370, + 1370, 2298, 2264, 0, 1524, 2259, 1368, 1336, 2257, 1336, + + 2266, 1336, 0, 1370, 1368, 1614, 1614, 1614, 1614, 1336, + 1341, 1341, 1341, 1341, 0, 2298, 1614, 2264, 1370, 2267, + 0, 1368, 2270, 0, 1370, 2266, 1341, 1370, 1368, 1373, + 1373, 1373, 1373, 1418, 1418, 1418, 1418, 1341, 2271, 1341, + 1373, 1341, 0, 1370, 2267, 1373, 2272, 2270, 1370, 2306, + 1341, 1370, 1371, 1371, 1371, 1371, 1375, 1375, 1375, 1375, + 1373, 2273, 1341, 2271, 1341, 0, 1341, 1375, 1371, 1373, + 1418, 2272, 1375, 2306, 1341, 1342, 1342, 1342, 1342, 1621, + 1621, 1621, 1621, 1371, 2276, 1373, 2273, 1375, 0, 1371, + 1621, 1342, 1371, 1373, 1418, 0, 1375, 1486, 1486, 1486, + + 1486, 0, 1342, 2291, 1342, 2295, 1342, 2296, 1371, 2276, + 0, 0, 1375, 1371, 0, 1342, 1371, 0, 0, 2309, + 1375, 0, 1377, 1377, 1377, 1377, 1486, 1342, 2291, 1342, + 2295, 1342, 2296, 1377, 1378, 1378, 1378, 1378, 1377, 1342, + 1372, 1372, 1372, 1372, 2309, 1378, 1534, 1534, 1534, 1534, + 0, 1486, 2310, 1377, 2320, 0, 2329, 1379, 1379, 1379, + 1379, 0, 1377, 2332, 2334, 1378, 0, 2333, 1379, 1372, + 2341, 1372, 0, 1379, 1378, 1534, 2310, 1372, 1377, 2320, + 1372, 2329, 1422, 1422, 1422, 1422, 1377, 2332, 1379, 2334, + 1378, 2333, 0, 0, 1372, 2341, 1372, 1379, 1378, 2342, + + 1534, 1372, 0, 0, 1372, 1381, 1381, 1381, 1381, 1382, + 1382, 1382, 1382, 1379, 2344, 1588, 1588, 1588, 1588, 1422, + 2347, 1379, 2352, 2342, 0, 1382, 1383, 1383, 1383, 1383, + 0, 1588, 1385, 1385, 1385, 1385, 1381, 2382, 2344, 2447, + 1382, 0, 1383, 1422, 2347, 1381, 2352, 1382, 1385, 1382, + 2354, 0, 1384, 1384, 1384, 1384, 1588, 1383, 0, 0, + 0, 1381, 2382, 1385, 2447, 1382, 1383, 1383, 1384, 1381, + 2383, 1382, 1385, 1382, 2354, 1385, 1389, 1389, 1389, 1389, + 1588, 1384, 1383, 1384, 1387, 1387, 1387, 1387, 1385, 2343, + 1383, 1383, 1384, 2464, 2383, 2343, 1385, 0, 2343, 1385, + + 1387, 1388, 1388, 1388, 1388, 1389, 1384, 2392, 1384, 1628, + 1628, 1628, 1628, 1389, 2343, 1387, 1384, 1388, 2464, 2343, + 1628, 1387, 2343, 2396, 1387, 0, 1515, 1515, 1515, 1515, + 1389, 2392, 1388, 1394, 1394, 1394, 1394, 1389, 1388, 2436, + 1387, 1388, 1515, 2438, 0, 1387, 0, 2396, 1387, 1394, + 1393, 1393, 1393, 1393, 2448, 1515, 0, 1388, 1469, 1469, + 1469, 1469, 1388, 2436, 1394, 1388, 1393, 2438, 1396, 1396, + 1396, 1396, 2449, 1394, 0, 0, 1394, 0, 2448, 1393, + 1515, 1393, 0, 0, 1396, 1397, 1397, 1397, 1397, 1394, + 1393, 1398, 1398, 1398, 1398, 1469, 2449, 1394, 2380, 1396, + + 1394, 1397, 2450, 2465, 1393, 1396, 1393, 2380, 1396, 0, + 1507, 1507, 1507, 1507, 1393, 0, 1397, 2473, 0, 1469, + 1398, 0, 1397, 2380, 1396, 1397, 2450, 2465, 1398, 1396, + 1507, 2380, 1396, 1401, 1401, 1401, 1401, 1402, 1402, 1402, + 1402, 1397, 2473, 2474, 2478, 1398, 1397, 0, 1507, 1397, + 0, 2476, 1398, 1402, 2477, 1403, 1403, 1403, 1403, 1405, + 1405, 1405, 1405, 2479, 1401, 0, 1401, 2474, 1402, 2478, + 2521, 1403, 1507, 1401, 1402, 2476, 2522, 1402, 2477, 0, + 1481, 1481, 1481, 1481, 1405, 2516, 1403, 2479, 2523, 1401, + 1405, 1401, 1403, 1402, 2521, 1403, 2524, 1401, 1402, 1405, + + 2522, 1402, 1408, 1408, 1408, 1408, 0, 0, 2551, 1405, + 2516, 1403, 0, 2523, 2552, 1405, 1403, 1481, 1408, 1403, + 2524, 2565, 0, 1405, 1492, 1492, 1492, 1492, 1409, 1409, + 1409, 1409, 2551, 1408, 1410, 1410, 1410, 1410, 2552, 0, + 1408, 1481, 1408, 2566, 1409, 2565, 1411, 1411, 1411, 1411, + 1410, 2573, 0, 0, 1522, 1522, 1522, 1522, 1408, 1409, + 0, 1492, 1411, 1410, 1408, 1410, 1408, 2566, 1409, 1409, + 1522, 2574, 2575, 2576, 1410, 2601, 2573, 1411, 1413, 1413, + 1413, 1413, 0, 1522, 1409, 1492, 1411, 2606, 1410, 1411, + 1410, 2620, 1409, 1409, 1413, 2574, 2575, 2576, 1410, 2601, + + 0, 2607, 1411, 0, 1414, 1414, 1414, 1414, 1522, 1413, + 1411, 2633, 2606, 1411, 2608, 1413, 2620, 0, 1413, 0, + 1414, 1419, 1419, 1419, 1419, 2607, 2642, 1420, 1420, 1420, + 1420, 2621, 2634, 2640, 1413, 1414, 2633, 0, 2608, 1413, + 0, 1414, 1413, 1420, 1414, 0, 0, 1421, 1421, 1421, + 1421, 2642, 1419, 0, 1419, 2621, 2634, 2640, 1420, 0, + 1414, 1419, 2643, 1421, 1420, 1414, 2652, 1420, 1414, 1423, + 1423, 1423, 1423, 1424, 1424, 1424, 1424, 1419, 1421, 1419, + 0, 2659, 2661, 1420, 1421, 1419, 2643, 1421, 1420, 0, + 2652, 1420, 1428, 1428, 1428, 1428, 1423, 2702, 1424, 2706, + + 1423, 0, 2681, 1421, 1424, 2659, 2696, 2661, 1421, 1423, + 2728, 1421, 1428, 1424, 1431, 1431, 1431, 1431, 0, 0, + 0, 1423, 2702, 1424, 2706, 1423, 2681, 0, 0, 1424, + 2696, 1428, 0, 1423, 1431, 2728, 2707, 1424, 1648, 1648, + 1648, 1648, 1538, 1538, 1538, 1538, 0, 0, 0, 1500, + 1500, 1500, 1500, 1431, 0, 1428, 1429, 1429, 1429, 1429, + 2707, 1429, 0, 0, 0, 1435, 1435, 1435, 1435, 1429, + 1429, 1538, 1429, 1429, 1429, 0, 1429, 1431, 1429, 1429, + 1429, 1435, 1436, 1436, 1436, 1436, 1500, 1620, 1620, 1620, + 1620, 2732, 1435, 2733, 1435, 0, 1538, 2739, 1436, 1440, + + 1440, 1440, 1440, 1435, 1441, 1441, 1441, 1441, 2742, 1436, + 1500, 1436, 2744, 2753, 0, 1440, 2732, 1435, 2733, 1435, + 1441, 2759, 2739, 1436, 1620, 2760, 0, 1435, 0, 2761, + 1440, 0, 2767, 2742, 1436, 1441, 1436, 2744, 2753, 1440, + 1448, 1448, 1448, 1448, 1441, 2771, 2759, 1436, 1620, 2760, + 1449, 1449, 1449, 1449, 2761, 1440, 1448, 2767, 0, 0, + 1441, 2772, 2785, 1440, 0, 2774, 1449, 2782, 1441, 2786, + 2771, 1448, 1453, 1453, 1453, 1453, 1454, 1454, 1454, 1454, + 1448, 1449, 1461, 1461, 1461, 1461, 2772, 2785, 1453, 2774, + 1449, 2782, 1454, 2786, 0, 2796, 1448, 2809, 1461, 1453, + + 2805, 1453, 0, 1454, 1448, 1454, 1449, 0, 2813, 1454, + 0, 1453, 0, 1461, 1449, 1455, 1455, 1455, 1455, 1461, + 2796, 2809, 1461, 0, 1453, 2805, 1453, 0, 1454, 0, + 1454, 1455, 2813, 0, 1454, 1453, 0, 0, 1461, 0, + 0, 0, 1455, 1461, 1455, 0, 1461, 1462, 1462, 1462, + 1462, 1463, 1463, 1463, 1463, 0, 0, 0, 1455, 1467, + 1467, 1467, 1467, 1462, 0, 0, 0, 1455, 0, 1455, + 1468, 1468, 1468, 1468, 0, 1467, 0, 0, 1462, 0, + 1463, 0, 1455, 0, 1462, 0, 1468, 1462, 1463, 0, + 1467, 1631, 1631, 1631, 1631, 0, 1467, 0, 0, 1467, + + 0, 1468, 1631, 1462, 0, 1463, 0, 1468, 1462, 0, + 1468, 1462, 1463, 0, 0, 1467, 1472, 1472, 1472, 1472, + 1467, 0, 0, 1467, 0, 0, 1468, 1587, 1587, 1587, + 1587, 1468, 1472, 0, 1468, 1473, 1473, 1473, 1473, 1646, + 1646, 1646, 1646, 1587, 0, 1472, 0, 1472, 0, 0, + 1646, 1473, 1474, 1474, 1474, 1474, 1472, 1475, 1475, 1475, + 1475, 1633, 1633, 1633, 1633, 1587, 1473, 0, 1474, 0, + 1472, 0, 1472, 1475, 0, 1473, 0, 0, 1473, 0, + 1472, 0, 0, 1474, 1483, 1483, 1483, 1483, 1475, 1587, + 0, 1473, 1474, 1474, 1475, 0, 0, 1475, 1633, 1473, + + 1483, 0, 1473, 0, 1484, 1484, 1484, 1484, 1474, 1658, + 1658, 1658, 1658, 1475, 0, 1483, 1474, 1474, 1475, 0, + 1484, 1475, 1633, 0, 1483, 1483, 1488, 1488, 1488, 1488, + 1489, 1489, 1489, 1489, 0, 1484, 1490, 1490, 1490, 1490, + 1483, 1484, 0, 0, 1484, 0, 0, 0, 1483, 1483, + 0, 0, 0, 1488, 0, 1489, 0, 1488, 0, 0, + 1484, 1489, 0, 0, 0, 1484, 1488, 1490, 1484, 0, + 1489, 0, 1493, 1493, 1493, 1493, 1490, 0, 1488, 0, + 1489, 0, 1488, 0, 0, 0, 1489, 0, 1493, 0, + 1488, 0, 1490, 0, 1489, 1812, 1812, 1812, 1812, 0, + + 1490, 1493, 0, 1493, 1494, 1494, 1494, 1494, 1495, 1495, + 1495, 1495, 1493, 0, 1496, 1496, 1496, 1496, 0, 0, + 1494, 0, 0, 0, 1495, 0, 1493, 0, 1493, 0, + 1496, 1685, 1685, 1685, 1685, 1494, 1493, 0, 0, 1495, + 0, 0, 1685, 0, 1494, 1496, 0, 1494, 1495, 1495, + 0, 1496, 0, 0, 1496, 1501, 1501, 1501, 1501, 0, + 1494, 0, 0, 0, 1495, 0, 0, 0, 1494, 0, + 1496, 1494, 1495, 1495, 0, 1496, 0, 0, 1496, 0, + 0, 0, 1501, 0, 0, 0, 1501, 1502, 1502, 1502, + 1502, 1503, 1503, 1503, 1503, 1501, 1511, 1511, 1511, 1511, + + 0, 1593, 1593, 1593, 1593, 0, 0, 1501, 0, 0, + 0, 1501, 1511, 1512, 1512, 1512, 1512, 1593, 1502, 1501, + 0, 0, 1503, 1511, 0, 1511, 0, 1502, 0, 1512, + 0, 1503, 0, 1516, 1516, 1516, 1516, 0, 0, 1593, + 1512, 0, 1512, 1502, 0, 0, 0, 1503, 1511, 1516, + 1511, 1502, 0, 0, 0, 1503, 1512, 0, 1523, 1523, + 1523, 1523, 0, 1593, 0, 1512, 0, 1512, 1698, 1698, + 1698, 1698, 1516, 0, 1523, 1527, 1527, 1527, 1527, 1698, + 1512, 0, 1618, 1618, 1618, 1618, 0, 1528, 1528, 1528, + 1528, 1527, 0, 1618, 0, 0, 1516, 1523, 1817, 1817, + + 1817, 1817, 1527, 1528, 1527, 0, 1529, 1529, 1529, 1529, + 0, 1618, 0, 1527, 1528, 0, 1528, 0, 1528, 0, + 0, 1523, 1529, 1705, 1705, 1705, 1705, 1527, 0, 1527, + 0, 0, 0, 1529, 1705, 1529, 1618, 1527, 0, 1528, + 0, 1528, 0, 1528, 0, 1540, 1540, 1540, 1540, 1819, + 1819, 1819, 1819, 1529, 1824, 1824, 1824, 1824, 1529, 0, + 1529, 1540, 1541, 1541, 1541, 1541, 0, 0, 1584, 1584, + 1584, 1584, 1542, 1542, 1542, 1542, 1540, 1529, 1541, 0, + 1574, 1574, 1574, 1574, 1584, 1540, 1540, 0, 1542, 0, + 0, 1574, 0, 1541, 0, 1584, 0, 1584, 0, 1541, + + 0, 1540, 1541, 1542, 0, 1542, 0, 0, 0, 1540, + 1540, 0, 1542, 1543, 1543, 1543, 1543, 1574, 1541, 1574, + 1584, 0, 1584, 1541, 0, 0, 1541, 0, 1542, 1543, + 1542, 1544, 1544, 1544, 1544, 0, 1542, 1882, 1882, 1882, + 1882, 1574, 0, 1574, 1543, 1545, 1545, 1545, 1545, 0, + 1543, 0, 0, 1543, 1547, 1547, 1547, 1547, 0, 0, + 0, 1545, 1544, 1546, 1546, 1546, 1546, 0, 1544, 1543, + 0, 1544, 0, 0, 1543, 0, 1545, 1543, 0, 1546, + 0, 0, 1545, 1547, 0, 1545, 0, 1544, 1546, 0, + 0, 1547, 1544, 0, 1546, 1544, 1550, 1550, 1550, 1550, + + 0, 1545, 0, 1546, 0, 0, 1545, 1550, 1547, 1545, + 0, 0, 0, 1546, 0, 1547, 0, 0, 0, 1546, + 1553, 1553, 1553, 1553, 0, 1550, 0, 1546, 0, 0, + 1554, 1554, 1554, 1554, 0, 1550, 1553, 1555, 1555, 1555, + 1555, 0, 1594, 1594, 1594, 1594, 1554, 0, 0, 0, + 1550, 1553, 0, 1553, 2058, 2058, 2058, 2058, 1594, 1550, + 1553, 1554, 0, 1558, 1558, 1558, 1558, 1554, 1555, 0, + 1554, 0, 0, 0, 1555, 0, 1553, 1555, 1553, 1556, + 1556, 1556, 1556, 1594, 1553, 0, 1554, 2106, 2106, 2106, + 2106, 1554, 1558, 1555, 1554, 1556, 0, 0, 1555, 0, + + 1558, 1555, 1557, 1557, 1557, 1557, 0, 1594, 0, 0, + 1556, 0, 1649, 1649, 1649, 1649, 1556, 1558, 1557, 1556, + 1559, 1559, 1559, 1559, 1558, 0, 0, 1557, 0, 0, + 0, 1559, 1649, 1557, 0, 1556, 1560, 1560, 1560, 1560, + 1556, 0, 1557, 1556, 0, 1643, 1643, 1643, 1643, 1559, + 0, 0, 1557, 1561, 1561, 1561, 1561, 0, 1557, 1559, + 0, 1642, 1642, 1642, 1642, 0, 1557, 1560, 1562, 1562, + 1562, 1562, 1642, 1560, 1559, 0, 1560, 0, 0, 1562, + 0, 0, 1643, 1559, 1561, 1564, 1564, 1564, 1564, 0, + 0, 0, 1560, 1561, 0, 0, 0, 1560, 1642, 1562, + + 1560, 1564, 1565, 1565, 1565, 1565, 1643, 1562, 1562, 1561, + 0, 0, 1566, 1566, 1566, 1566, 1564, 1561, 1565, 0, + 0, 0, 1642, 0, 1562, 1564, 1564, 0, 1566, 0, + 0, 1562, 1562, 1565, 0, 1626, 1626, 1626, 1626, 1565, + 0, 1564, 1565, 1566, 0, 1566, 1626, 0, 0, 1564, + 1564, 0, 1566, 1567, 1567, 1567, 1567, 0, 1565, 1652, + 1652, 1652, 1652, 1565, 1626, 0, 1565, 0, 1566, 1567, + 1566, 1568, 1568, 1568, 1568, 0, 1566, 0, 0, 1652, + 1710, 1710, 1710, 1710, 1567, 1569, 1569, 1569, 1569, 1626, + 1567, 1710, 0, 1567, 1571, 1571, 1571, 1571, 0, 0, + + 0, 1569, 1568, 1570, 1570, 1570, 1570, 0, 1568, 1567, + 0, 1568, 0, 0, 1567, 0, 1569, 1567, 0, 1570, + 0, 0, 1569, 1571, 0, 1569, 0, 1568, 1570, 0, + 0, 1571, 1568, 0, 1570, 1568, 1572, 1572, 1572, 1572, + 0, 1569, 0, 1570, 0, 0, 1569, 1572, 1571, 1569, + 0, 0, 0, 1570, 0, 1571, 0, 0, 0, 1570, + 0, 1650, 1650, 1650, 1650, 1572, 1650, 1570, 0, 0, + 0, 1720, 1720, 1720, 1720, 1572, 0, 0, 1650, 0, + 1650, 1650, 0, 1670, 1670, 1670, 1670, 1720, 0, 0, + 1572, 2110, 2110, 2110, 2110, 2112, 2112, 2112, 2112, 1572, + + 1579, 1579, 1579, 1579, 1579, 1579, 1579, 1579, 1579, 1579, + 1579, 1579, 1579, 1579, 1579, 1579, 1579, 1579, 0, 1579, + 1670, 1579, 1579, 1579, 1579, 1579, 1583, 1583, 1583, 1583, + 1597, 1597, 1597, 1597, 0, 1598, 1598, 1598, 1598, 0, + 0, 0, 1583, 0, 1670, 0, 1597, 0, 0, 1579, + 0, 1598, 0, 1583, 0, 1583, 0, 1597, 0, 1597, + 0, 0, 1598, 0, 1598, 0, 0, 1583, 0, 1599, + 1599, 1599, 1599, 1579, 1579, 0, 0, 0, 1583, 1598, + 1583, 0, 1597, 0, 1597, 1599, 0, 1598, 0, 1598, + 0, 1583, 2116, 2116, 2116, 2116, 1599, 0, 1599, 1601, + + 1601, 1601, 1601, 1598, 1604, 1604, 1604, 1604, 1605, 1605, + 1605, 1605, 0, 0, 0, 1604, 1608, 1608, 1608, 1608, + 0, 1599, 0, 1599, 1758, 1758, 1758, 1758, 1601, 0, + 0, 0, 1608, 1604, 0, 1758, 1601, 1605, 0, 1607, + 1607, 1607, 1607, 1604, 0, 1605, 0, 1608, 0, 1608, + 1607, 0, 0, 1601, 0, 0, 1608, 0, 1604, 0, + 1601, 0, 1605, 1609, 1609, 1609, 1609, 1604, 1607, 1605, + 0, 0, 1608, 0, 1608, 0, 0, 0, 1607, 1609, + 1608, 1610, 1610, 1610, 1610, 1611, 1611, 1611, 1611, 2186, + 2186, 2186, 2186, 1607, 1609, 0, 1678, 1678, 1678, 1678, + + 1609, 1611, 1607, 1609, 1612, 1612, 1612, 1612, 2212, 2212, + 2212, 2212, 1610, 0, 0, 0, 1611, 0, 1610, 1609, + 1612, 1610, 1611, 0, 1609, 1611, 0, 1609, 0, 0, + 0, 1612, 0, 1678, 0, 1612, 0, 1610, 0, 0, + 0, 1611, 1610, 0, 1612, 1610, 1611, 0, 0, 1611, + 1613, 1613, 1613, 1613, 0, 0, 1612, 1678, 0, 0, + 1612, 0, 1615, 1615, 1615, 1615, 1613, 0, 1612, 2297, + 2297, 2297, 2297, 1615, 0, 0, 0, 1616, 1616, 1616, + 1616, 1613, 0, 0, 1617, 1617, 1617, 1617, 1616, 0, + 1613, 1615, 0, 1616, 0, 1617, 1623, 1623, 1623, 1623, + + 1617, 1615, 1896, 1896, 1896, 1896, 1613, 0, 1616, 0, + 0, 0, 1623, 1896, 1613, 1617, 1615, 1616, 1622, 1622, + 1622, 1622, 0, 0, 1617, 1615, 0, 1623, 1624, 1624, + 1624, 1624, 0, 1616, 1622, 0, 1623, 0, 0, 1624, + 1617, 1616, 0, 0, 1624, 1622, 0, 0, 1617, 1622, + 0, 0, 1623, 1736, 1736, 1736, 1736, 0, 1622, 1624, + 1623, 0, 1625, 1625, 1625, 1625, 0, 0, 1624, 1736, + 1622, 0, 0, 1625, 1622, 0, 0, 0, 1625, 0, + 0, 0, 1622, 0, 1624, 1629, 1629, 1629, 1629, 0, + 0, 0, 1624, 1625, 0, 0, 1629, 1630, 1630, 1630, + + 1630, 1629, 1625, 1693, 1693, 1693, 1693, 0, 1630, 2090, + 2090, 2090, 2090, 1630, 1693, 0, 1629, 0, 1625, 1634, + 1634, 1634, 1634, 0, 0, 1629, 1625, 0, 1630, 1635, + 1635, 1635, 1635, 0, 0, 1634, 0, 1630, 0, 0, + 1693, 1629, 0, 0, 0, 1635, 2090, 0, 0, 1629, + 1634, 0, 1634, 1630, 0, 1636, 1636, 1636, 1636, 1634, + 1635, 1630, 0, 0, 1693, 0, 1635, 0, 0, 1635, + 2090, 1667, 1667, 1667, 1667, 1634, 0, 1634, 1637, 1637, + 1637, 1637, 0, 1634, 0, 1635, 1636, 1667, 0, 0, + 1635, 0, 1636, 1635, 1637, 1636, 1638, 1638, 1638, 1638, + + 1667, 1639, 1639, 1639, 1639, 1742, 1742, 1742, 1742, 1637, + 0, 1636, 1638, 0, 0, 1637, 1636, 1639, 1637, 1636, + 0, 1742, 0, 1638, 0, 1667, 0, 1638, 2346, 2346, + 2346, 2346, 1639, 0, 1637, 0, 1638, 0, 0, 1637, + 0, 1639, 1637, 1640, 1640, 1640, 1640, 0, 1638, 0, + 0, 0, 1638, 0, 1640, 0, 0, 1639, 0, 1640, + 1638, 1641, 1641, 1641, 1641, 1639, 1660, 1660, 1660, 1660, + 0, 0, 1641, 0, 1640, 0, 0, 1641, 1644, 1644, + 1644, 1644, 1660, 1640, 1645, 1645, 1645, 1645, 0, 1644, + 0, 0, 1641, 0, 1644, 1645, 0, 1660, 0, 1640, + + 1645, 1641, 0, 1660, 0, 0, 1660, 1640, 0, 1644, + 1871, 1871, 1871, 1871, 0, 1645, 0, 1641, 1644, 0, + 0, 0, 1660, 0, 1645, 1641, 1871, 1660, 0, 0, + 1660, 0, 0, 0, 1644, 2351, 2351, 2351, 2351, 0, + 1645, 0, 1644, 0, 1666, 1666, 1666, 1666, 1645, 1653, + 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, + 1653, 1653, 1653, 1653, 1653, 1653, 1653, 0, 1653, 0, + 1653, 1653, 1653, 1653, 1653, 1666, 1876, 1876, 1876, 1876, + 0, 1666, 0, 0, 1666, 1898, 1898, 1898, 1898, 0, + 0, 0, 1876, 0, 0, 0, 1898, 0, 1653, 0, + + 1666, 1901, 1901, 1901, 1901, 1666, 0, 0, 1666, 0, + 0, 0, 1901, 2353, 2353, 2353, 2353, 2358, 2358, 2358, + 2358, 0, 1653, 1653, 1655, 1655, 1655, 1655, 1655, 1655, + 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, + 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, + 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, + 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, + 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, + 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, + 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1659, + + 1659, 1659, 1659, 1661, 1661, 1661, 1661, 1902, 1902, 1902, + 1902, 1668, 1668, 1668, 1668, 1659, 0, 0, 1902, 1661, + 0, 1664, 1664, 1664, 1664, 0, 1659, 1668, 1659, 0, + 0, 0, 1659, 0, 1661, 0, 0, 1664, 0, 0, + 1661, 0, 0, 1661, 0, 0, 0, 1675, 1675, 1675, + 1675, 1659, 1664, 1659, 1668, 0, 0, 1659, 1664, 1661, + 0, 1664, 0, 1675, 1661, 0, 0, 1661, 1662, 1662, + 1662, 1662, 1665, 1665, 1665, 1665, 1675, 1664, 1668, 0, + 0, 0, 1664, 0, 1662, 1664, 0, 0, 1665, 0, + 1672, 1672, 1672, 1672, 0, 1662, 0, 1662, 0, 1662, + + 0, 1675, 0, 1665, 0, 1662, 1672, 0, 1662, 1665, + 0, 0, 1665, 0, 0, 1676, 1676, 1676, 1676, 0, + 1662, 1672, 1662, 0, 1662, 0, 0, 1672, 1665, 1662, + 1672, 1676, 1662, 1665, 0, 0, 1665, 1673, 1673, 1673, + 1673, 1674, 1674, 1674, 1674, 0, 1672, 2437, 2437, 2437, + 2437, 1672, 0, 1673, 1672, 0, 0, 0, 1676, 1689, + 1689, 1689, 1689, 1680, 1680, 1680, 1680, 0, 1673, 0, + 1689, 0, 1674, 0, 1673, 0, 0, 1673, 1674, 1680, + 0, 1674, 1676, 1679, 1679, 1679, 1679, 0, 1689, 0, + 1680, 0, 1680, 1673, 0, 0, 0, 1674, 1673, 1679, + + 0, 1673, 1674, 0, 1680, 1674, 1945, 1945, 1945, 1945, + 1679, 0, 1679, 1689, 0, 1680, 0, 1680, 0, 0, + 0, 1679, 1945, 1735, 1735, 1735, 1735, 0, 1680, 1702, + 1702, 1702, 1702, 0, 0, 1679, 0, 1679, 0, 1735, + 1702, 2609, 2609, 2609, 2609, 1679, 1681, 1681, 1681, 1681, + 1681, 1681, 1681, 1681, 1681, 1681, 1681, 1681, 1702, 0, + 1681, 1681, 1681, 1681, 1735, 1681, 0, 1681, 1681, 1681, + 1681, 1681, 0, 0, 1741, 1741, 1741, 1741, 1681, 2721, + 2721, 2721, 2721, 1702, 0, 0, 0, 1681, 1735, 0, + 1741, 1971, 1971, 1971, 1971, 1681, 1948, 1948, 1948, 1948, + + 0, 0, 1971, 1681, 0, 1761, 1761, 1761, 1761, 0, + 0, 1681, 1948, 0, 0, 1741, 1761, 0, 0, 1681, + 1681, 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682, + 1682, 1682, 1682, 0, 1761, 1682, 1682, 1682, 1682, 1741, + 1682, 0, 1682, 1682, 1682, 1682, 1682, 1953, 1953, 1953, + 1953, 0, 0, 1682, 0, 1956, 1956, 1956, 1956, 1761, + 0, 0, 1682, 1953, 1980, 1980, 1980, 1980, 0, 0, + 1682, 1956, 1982, 1982, 1982, 1982, 0, 0, 1682, 0, + 1980, 0, 0, 1982, 0, 0, 1682, 2773, 2773, 2773, + 2773, 0, 0, 0, 1682, 1682, 1683, 1683, 1683, 1683, + + 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, + 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, + 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, + 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, + 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, + 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, + 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683, + 1683, 1686, 1686, 1686, 1686, 1687, 1687, 1687, 1687, 0, + 0, 0, 1686, 0, 0, 0, 1687, 1688, 1688, 1688, + 1688, 1687, 0, 1690, 1690, 1690, 1690, 0, 1688, 0, + + 1686, 0, 0, 1688, 1690, 0, 1687, 0, 0, 0, + 1686, 0, 0, 0, 0, 1687, 0, 0, 1688, 0, + 0, 0, 1690, 0, 0, 1686, 0, 1688, 0, 0, + 0, 1687, 1690, 0, 1686, 2403, 2403, 2403, 2403, 1687, + 0, 0, 0, 1688, 0, 0, 2403, 1690, 0, 0, + 0, 1688, 1691, 1691, 1691, 1691, 1690, 0, 1692, 1692, + 1692, 1692, 0, 1691, 1981, 1981, 1981, 1981, 1691, 1692, + 1695, 1695, 1695, 1695, 1692, 1694, 1694, 1694, 1694, 0, + 1981, 0, 0, 1691, 0, 0, 1695, 0, 0, 1692, + 0, 1694, 1691, 0, 0, 1695, 0, 0, 1692, 0, + + 0, 1695, 1694, 0, 1981, 0, 1694, 0, 1691, 0, + 1695, 0, 0, 0, 1692, 1694, 1691, 0, 0, 0, + 1695, 0, 1692, 0, 0, 0, 1695, 1694, 1981, 0, + 0, 1694, 0, 0, 1695, 1696, 1696, 1696, 1696, 1694, + 0, 0, 1700, 1700, 1700, 1700, 1986, 1986, 1986, 1986, + 0, 1696, 0, 1700, 1701, 1701, 1701, 1701, 1700, 0, + 0, 0, 1986, 0, 0, 1701, 1696, 0, 0, 0, + 1701, 0, 1696, 1700, 0, 1696, 0, 1706, 1706, 1706, + 1706, 0, 1700, 0, 0, 1701, 1764, 1764, 1764, 1764, + 0, 1696, 0, 1706, 1701, 0, 1696, 1764, 1700, 1696, + + 1697, 1697, 1697, 1697, 0, 0, 1700, 0, 1706, 0, + 1701, 1697, 0, 0, 1706, 0, 1697, 1706, 1701, 1708, + 1708, 1708, 1708, 1764, 0, 2410, 2410, 2410, 2410, 0, + 1708, 1697, 0, 1706, 0, 1708, 2410, 0, 1706, 1697, + 1697, 1706, 1709, 1709, 1709, 1709, 0, 1764, 0, 0, + 1708, 0, 0, 1709, 0, 0, 1697, 0, 1709, 1708, + 0, 0, 0, 1697, 1697, 1707, 1707, 1707, 1707, 0, + 0, 0, 0, 1709, 0, 1708, 1707, 1713, 1713, 1713, + 1713, 1707, 1709, 1708, 1712, 1712, 1712, 1712, 1975, 1975, + 1975, 1975, 0, 1713, 0, 0, 1707, 0, 1709, 1975, + + 1712, 0, 1713, 0, 1707, 1707, 1709, 0, 1713, 0, + 0, 1712, 0, 0, 0, 1712, 0, 1713, 0, 0, + 0, 1707, 0, 0, 1712, 1975, 0, 1713, 1707, 1707, + 0, 0, 0, 1713, 0, 0, 1712, 0, 0, 0, + 1712, 1713, 1714, 1714, 1714, 1714, 0, 0, 1712, 1975, + 0, 0, 0, 0, 1814, 1814, 1814, 1814, 1714, 1722, + 1722, 1722, 1722, 0, 0, 1723, 1723, 1723, 1723, 0, + 1814, 0, 0, 1714, 0, 1722, 0, 0, 0, 1714, + 0, 1723, 1714, 0, 0, 0, 1722, 1814, 1722, 0, + 0, 0, 1723, 0, 1723, 0, 0, 0, 1714, 2037, + + 2037, 2037, 2037, 1714, 1723, 0, 1714, 1715, 1715, 1715, + 1715, 1722, 1814, 1722, 0, 2037, 0, 1723, 1715, 1723, + 0, 0, 0, 1715, 1730, 1730, 1730, 1730, 1723, 1724, + 1724, 1724, 1724, 0, 1900, 1900, 1900, 1900, 1715, 0, + 1730, 1899, 1899, 1899, 1899, 1724, 1715, 1715, 0, 0, + 1900, 1730, 0, 1730, 0, 0, 1724, 1899, 1724, 1900, + 0, 0, 0, 1715, 0, 0, 0, 1724, 1899, 0, + 1715, 1715, 1717, 1717, 1717, 1717, 1730, 1717, 1730, 0, + 0, 1724, 0, 1724, 1900, 1717, 1717, 0, 1717, 1717, + 1717, 1724, 1717, 1899, 1717, 1717, 1717, 1719, 1719, 1719, + + 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 0, + 0, 1719, 1719, 1719, 1719, 0, 1719, 0, 1719, 1719, + 1719, 1719, 1719, 0, 0, 1719, 0, 1719, 1727, 1727, + 1727, 1727, 1821, 1821, 1821, 1821, 0, 2044, 2044, 2044, + 2044, 0, 0, 0, 1727, 0, 1719, 0, 1821, 0, + 1719, 0, 1719, 2044, 0, 2451, 2451, 2451, 2451, 1727, + 0, 0, 0, 0, 0, 1821, 2451, 0, 1727, 0, + 1719, 1719, 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721, + 1721, 1721, 1721, 1721, 1727, 0, 1721, 1721, 1721, 1721, + 1821, 1721, 1727, 1721, 1721, 1721, 1721, 1721, 1728, 1728, + + 1728, 1728, 0, 1732, 1732, 1732, 1732, 1783, 1783, 1783, + 1783, 0, 0, 0, 1728, 2128, 2128, 2128, 2128, 1732, + 0, 1721, 0, 1903, 1903, 1903, 1903, 0, 1732, 1728, + 1732, 0, 1732, 0, 1783, 0, 1783, 0, 1728, 1903, + 2059, 2059, 2059, 2059, 0, 1721, 1721, 0, 0, 0, + 1903, 2059, 2128, 1732, 1728, 1732, 2059, 1732, 0, 1783, + 0, 1783, 1728, 1729, 1729, 1729, 1729, 1729, 1729, 1729, + 1729, 1729, 1729, 1729, 1729, 1903, 2128, 1729, 1729, 1729, + 1729, 0, 1729, 0, 1729, 1729, 1729, 1729, 1729, 1744, + 1744, 1744, 1744, 0, 0, 1729, 0, 1745, 1745, 1745, + + 1745, 0, 0, 0, 1729, 1744, 0, 2135, 2135, 2135, + 2135, 0, 1729, 1745, 0, 0, 1744, 0, 1744, 0, + 1729, 0, 1745, 2135, 1745, 0, 1745, 0, 1729, 0, + 0, 0, 1744, 0, 0, 0, 1729, 1729, 0, 0, + 0, 1744, 0, 1744, 0, 0, 0, 1745, 0, 1745, + 0, 1745, 1748, 1748, 1748, 1748, 1744, 1749, 1749, 1749, + 1749, 0, 0, 0, 1750, 1750, 1750, 1750, 1748, 1752, + 1752, 1752, 1752, 1749, 0, 1751, 1751, 1751, 1751, 0, + 1750, 0, 0, 1748, 0, 1752, 0, 0, 1749, 0, + 0, 1751, 1748, 1750, 0, 1750, 0, 1749, 0, 0, + + 1752, 0, 0, 0, 1750, 0, 1751, 0, 1748, 1752, + 0, 0, 0, 1749, 1751, 1751, 1748, 0, 1750, 0, + 1750, 1749, 0, 0, 0, 1752, 0, 0, 1750, 0, + 0, 1751, 0, 1752, 2150, 2150, 2150, 2150, 1751, 1751, + 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + 1753, 1753, 0, 0, 1753, 1753, 1753, 1753, 0, 1753, + 0, 1753, 1753, 1753, 1753, 1753, 0, 1754, 1754, 1754, + 1754, 2150, 1753, 2165, 2165, 2165, 2165, 0, 0, 0, + 0, 1753, 0, 1754, 0, 1756, 1756, 1756, 1756, 1753, + 1755, 1755, 1755, 1755, 0, 2150, 0, 1753, 1754, 0, + + 0, 1756, 0, 0, 0, 1753, 1755, 1754, 0, 0, + 2165, 0, 0, 1753, 1753, 0, 1756, 0, 0, 1755, + 0, 1755, 0, 1754, 1756, 1756, 1759, 1759, 1759, 1759, + 1755, 1754, 0, 0, 2165, 0, 0, 1759, 0, 0, + 0, 1756, 1759, 0, 1755, 0, 1755, 0, 1756, 1756, + 0, 0, 0, 0, 1755, 0, 0, 1759, 1760, 1760, + 1760, 1760, 1762, 1762, 1762, 1762, 1759, 0, 0, 1760, + 0, 0, 0, 1762, 1760, 0, 0, 0, 1762, 0, + 0, 0, 1759, 0, 1763, 1763, 1763, 1763, 0, 1760, + 1759, 0, 0, 1762, 0, 1763, 0, 0, 1760, 0, + + 1763, 0, 1762, 0, 1765, 1765, 1765, 1765, 0, 2035, + 2035, 2035, 2035, 0, 1760, 1763, 0, 0, 1762, 0, + 1765, 0, 1760, 0, 1763, 2035, 1762, 1766, 1766, 1766, + 1766, 1767, 1767, 1767, 1767, 1765, 0, 0, 2035, 0, + 1763, 1765, 1767, 1766, 1765, 0, 0, 1767, 1763, 0, + 1768, 1768, 1768, 1768, 1770, 1770, 1770, 1770, 1766, 0, + 1765, 1768, 1767, 2035, 0, 1765, 0, 1766, 1765, 0, + 1770, 1767, 0, 1769, 1769, 1769, 1769, 1771, 1771, 1771, + 1771, 1768, 0, 1766, 1769, 1770, 0, 1767, 1771, 1769, + 1768, 1766, 0, 1771, 1770, 1767, 1772, 1772, 1772, 1772, + + 1773, 1773, 1773, 1773, 1769, 0, 1768, 1772, 1771, 0, + 1770, 1773, 0, 1769, 1768, 0, 1773, 1771, 1770, 1774, + 1774, 1774, 1774, 1987, 1987, 1987, 1987, 1772, 0, 1769, + 0, 1773, 0, 1771, 0, 1774, 1772, 1769, 0, 1987, + 1773, 1771, 1775, 1775, 1775, 1775, 1776, 1776, 1776, 1776, + 1774, 0, 1772, 0, 0, 0, 1773, 0, 1775, 1774, + 1772, 0, 1776, 1987, 1773, 1777, 1777, 1777, 1777, 1778, + 1778, 1778, 1778, 1775, 0, 1774, 1777, 1776, 0, 1775, + 1778, 1777, 1775, 1774, 0, 0, 1776, 1987, 1779, 1779, + 1779, 1779, 1780, 1780, 1780, 1780, 1777, 0, 1775, 1779, + + 1778, 0, 1776, 1775, 1779, 1777, 1775, 0, 1780, 1778, + 1776, 0, 0, 0, 2042, 2042, 2042, 2042, 0, 1779, + 0, 1777, 0, 1780, 0, 1778, 0, 0, 1779, 1777, + 2042, 0, 1780, 1778, 1825, 1825, 1825, 1825, 1786, 1786, + 1786, 1786, 0, 2042, 1779, 0, 0, 0, 1780, 0, + 1825, 0, 1779, 0, 1786, 0, 1780, 1782, 1782, 1782, + 1782, 1825, 1782, 1825, 0, 0, 0, 0, 2042, 1786, + 1782, 1782, 0, 1782, 1782, 1782, 0, 1782, 1786, 1782, + 1782, 1782, 1788, 1788, 1788, 1788, 1825, 0, 1825, 1806, + 1806, 1806, 1806, 0, 1786, 0, 0, 0, 1788, 0, + + 0, 0, 1786, 1787, 1787, 1787, 1787, 0, 1790, 1790, + 1790, 1790, 0, 1788, 0, 2138, 2138, 2138, 2138, 1787, + 1806, 0, 1788, 0, 1790, 1791, 1791, 1791, 1791, 1806, + 1787, 2138, 1787, 0, 1787, 0, 0, 0, 1788, 1790, + 0, 1791, 0, 1787, 0, 1806, 1788, 0, 1790, 0, + 0, 0, 0, 1806, 0, 1787, 1791, 1787, 0, 1787, + 1794, 1794, 1794, 1794, 1790, 1791, 0, 1787, 1798, 1798, + 1798, 1798, 1790, 0, 0, 0, 1794, 1795, 1795, 1795, + 1795, 1791, 0, 0, 1798, 2060, 2060, 2060, 2060, 1791, + 0, 1794, 0, 1795, 0, 1798, 2060, 1798, 0, 0, + + 1794, 2060, 0, 1826, 1826, 1826, 1826, 0, 1795, 0, + 0, 1798, 2328, 2328, 2328, 2328, 1794, 1795, 0, 1826, + 1798, 0, 1798, 2328, 1794, 1811, 1811, 1811, 1811, 0, + 1826, 0, 1826, 1795, 0, 1798, 1801, 1801, 1801, 1801, + 0, 1795, 1796, 1796, 1796, 1796, 1826, 1802, 1802, 1802, + 1802, 2328, 1801, 0, 0, 1826, 1811, 1826, 1796, 0, + 0, 0, 1811, 1802, 0, 1811, 0, 1801, 0, 1796, + 1826, 1796, 0, 1796, 0, 2328, 1801, 0, 1802, 0, + 0, 1811, 1796, 0, 0, 0, 1811, 1802, 0, 1811, + 0, 0, 1801, 0, 1796, 0, 1796, 0, 1796, 0, + + 1801, 0, 0, 1802, 0, 0, 1796, 1797, 1797, 1797, + 1797, 1802, 0, 0, 0, 1803, 1803, 1803, 1803, 2108, + 2108, 2108, 2108, 1797, 0, 0, 0, 1804, 1804, 1804, + 1804, 1803, 0, 0, 1797, 2108, 1797, 2036, 2036, 2036, + 2036, 0, 0, 1804, 1797, 1797, 1803, 1805, 1805, 1805, + 1805, 0, 0, 2036, 0, 1803, 1804, 0, 1804, 1797, + 2108, 1797, 0, 1805, 0, 0, 0, 1804, 1797, 1797, + 0, 1803, 2114, 2114, 2114, 2114, 2036, 0, 1805, 1803, + 0, 1804, 0, 1804, 2108, 0, 1805, 1805, 2114, 0, + 0, 1804, 1815, 1815, 1815, 1815, 1816, 1816, 1816, 1816, + + 2036, 0, 0, 1805, 0, 0, 0, 0, 1815, 0, + 1805, 1805, 1816, 2114, 1822, 1822, 1822, 1822, 1823, 1823, + 1823, 1823, 0, 1815, 0, 0, 0, 1816, 0, 1815, + 1822, 0, 1815, 1816, 1823, 0, 1816, 2114, 0, 2176, + 2176, 2176, 2176, 0, 0, 1822, 0, 0, 1815, 1823, + 0, 1822, 1816, 1815, 1822, 1823, 1815, 1816, 1823, 0, + 1816, 1827, 1827, 1827, 1827, 1828, 1828, 1828, 1828, 0, + 1822, 0, 0, 0, 1823, 1822, 2176, 1827, 1822, 1823, + 0, 1828, 1823, 1829, 1829, 1829, 1829, 1831, 1831, 1831, + 1831, 0, 1827, 0, 0, 0, 1828, 0, 0, 1829, + + 2176, 1827, 0, 1831, 0, 1828, 1832, 1832, 1832, 1832, + 2043, 2043, 2043, 2043, 1829, 0, 1831, 1827, 1831, 0, + 0, 1828, 1832, 1829, 0, 1827, 2043, 1831, 0, 1828, + 0, 0, 1833, 1833, 1833, 1833, 0, 1832, 0, 1829, + 0, 1831, 0, 1831, 0, 1832, 1832, 1829, 1833, 2043, + 0, 1831, 1834, 1834, 1834, 1834, 0, 0, 1835, 1835, + 1835, 1835, 1832, 1833, 1837, 1837, 1837, 1837, 1834, 1832, + 1832, 0, 1833, 2043, 1835, 2269, 2269, 2269, 2269, 0, + 1837, 0, 0, 1834, 1838, 1838, 1838, 1838, 1833, 1835, + 0, 2269, 1834, 1837, 0, 1837, 1833, 0, 1835, 0, + + 1838, 0, 0, 0, 1837, 0, 0, 0, 1834, 0, + 1840, 1840, 1840, 1840, 1835, 1838, 1834, 0, 1837, 0, + 1837, 0, 1835, 1838, 1838, 0, 1840, 0, 1837, 1839, + 1839, 1839, 1839, 1841, 1841, 1841, 1841, 0, 0, 0, + 1838, 1840, 0, 0, 0, 1839, 0, 1838, 1838, 1841, + 1840, 1840, 1842, 1842, 1842, 1842, 1843, 1843, 1843, 1843, + 1839, 0, 0, 0, 1841, 0, 1840, 1839, 1842, 1839, + 0, 0, 1843, 1841, 1840, 1840, 0, 2453, 2453, 2453, + 2453, 1842, 0, 1842, 0, 1839, 0, 1843, 2453, 1841, + 0, 1839, 1842, 1839, 0, 1843, 1843, 1841, 1844, 1844, + + 1844, 1844, 1845, 1845, 1845, 1845, 1842, 0, 1842, 0, + 0, 0, 1843, 0, 1844, 0, 1842, 0, 1845, 1843, + 1843, 1850, 1850, 1850, 1850, 1851, 1851, 1851, 1851, 1844, + 0, 0, 0, 1845, 0, 0, 0, 1850, 1844, 0, + 0, 1851, 1845, 1852, 1852, 1852, 1852, 1853, 1853, 1853, + 1853, 0, 1850, 0, 1844, 0, 1851, 0, 1845, 1852, + 0, 1850, 1844, 1853, 0, 1851, 1845, 2198, 2198, 2198, + 2198, 0, 0, 0, 1852, 0, 1853, 1850, 1853, 0, + 0, 1851, 0, 1852, 0, 1850, 0, 1853, 0, 1851, + 1854, 1854, 1854, 1854, 1855, 1855, 1855, 1855, 0, 1852, + + 0, 1853, 0, 1853, 2198, 0, 1854, 1852, 0, 0, + 1855, 1853, 0, 0, 0, 1865, 1865, 1865, 1865, 0, + 0, 1854, 0, 0, 0, 1855, 0, 0, 2198, 1854, + 1854, 1865, 1855, 0, 1855, 1856, 1856, 1856, 1856, 0, + 0, 0, 1865, 0, 1865, 0, 1854, 0, 0, 0, + 1855, 1856, 0, 1854, 1854, 0, 1855, 0, 1855, 0, + 0, 1897, 1897, 1897, 1897, 0, 1856, 1865, 0, 1865, + 0, 0, 1897, 0, 0, 1856, 1856, 1897, 0, 1866, + 1866, 1866, 1866, 1891, 1891, 1891, 1891, 0, 1897, 0, + 1897, 1856, 0, 0, 0, 1866, 0, 0, 0, 1856, + + 1856, 1858, 1858, 1858, 1858, 0, 1866, 0, 1866, 0, + 0, 0, 1858, 1897, 1891, 1897, 0, 1858, 1866, 1879, + 1879, 1879, 1879, 1891, 0, 0, 0, 2031, 2031, 2031, + 2031, 1866, 1858, 1866, 0, 1879, 0, 0, 0, 1891, + 1858, 1858, 1866, 2031, 0, 0, 1879, 1891, 1879, 2206, + 2206, 2206, 2206, 0, 2031, 0, 2031, 1858, 0, 1879, + 1880, 1880, 1880, 1880, 1858, 1858, 1859, 1859, 1859, 1859, + 0, 1879, 0, 1879, 0, 0, 1880, 1859, 0, 2031, + 0, 2031, 1859, 1879, 0, 0, 2206, 1880, 0, 1880, + 1880, 1881, 1881, 1881, 1881, 0, 0, 1859, 0, 0, + + 0, 2196, 2196, 2196, 2196, 1859, 1859, 1881, 0, 0, + 2206, 0, 1880, 0, 1880, 1880, 0, 2196, 1881, 0, + 1881, 0, 1859, 0, 1881, 1884, 1884, 1884, 1884, 1859, + 1859, 1860, 1860, 1860, 1860, 0, 1885, 1885, 1885, 1885, + 0, 1884, 0, 1881, 2196, 1881, 0, 0, 0, 1881, + 0, 0, 1885, 0, 0, 0, 1884, 0, 1860, 0, + 1860, 0, 1860, 0, 0, 1884, 0, 1885, 2196, 0, + 0, 1860, 2195, 2195, 2195, 2195, 1885, 1886, 1886, 1886, + 1886, 1884, 0, 1860, 0, 1860, 0, 1860, 2195, 1884, + 0, 0, 1885, 1886, 0, 1860, 1861, 1861, 1861, 1861, + + 1885, 2195, 0, 1887, 1887, 1887, 1887, 0, 1886, 1931, + 1931, 1931, 1931, 2456, 2456, 2456, 2456, 1886, 0, 1887, + 1931, 0, 0, 1861, 2456, 1861, 2195, 1861, 1904, 1904, + 1904, 1904, 1887, 1886, 1887, 0, 1861, 0, 0, 0, + 1931, 1886, 0, 1887, 1904, 0, 0, 0, 1861, 1931, + 1861, 0, 1861, 1904, 0, 0, 0, 1887, 0, 1887, + 1861, 1862, 1862, 1862, 1862, 1931, 0, 1887, 1888, 1888, + 1888, 1888, 0, 1931, 2457, 2457, 2457, 2457, 1904, 0, + 1890, 1890, 1890, 1890, 1888, 2457, 0, 0, 1862, 0, + 1862, 0, 1862, 0, 0, 0, 1890, 0, 0, 1888, + + 0, 1862, 0, 1889, 1889, 1889, 1889, 1888, 1888, 0, + 0, 1890, 0, 1862, 0, 1862, 0, 1862, 0, 1889, + 1890, 1890, 0, 0, 1888, 1862, 1867, 1867, 1867, 1867, + 0, 1888, 1888, 0, 1889, 0, 1890, 0, 0, 0, + 0, 1889, 1867, 1889, 1890, 1890, 1905, 1905, 1905, 1905, + 0, 0, 0, 1867, 0, 1867, 0, 1867, 0, 1889, + 0, 0, 1905, 0, 0, 1889, 1867, 1889, 1906, 1906, + 1906, 1906, 0, 1905, 0, 1905, 0, 0, 1867, 1905, + 1867, 0, 1867, 0, 1906, 0, 2203, 2203, 2203, 2203, + 1867, 1868, 1868, 1868, 1868, 0, 0, 0, 1905, 1906, + + 1905, 0, 2203, 0, 1905, 0, 0, 1868, 1906, 0, + 1907, 1907, 1907, 1907, 0, 2203, 0, 0, 1868, 0, + 1868, 0, 1868, 0, 1906, 0, 1907, 0, 0, 0, + 0, 1868, 1906, 0, 0, 0, 1908, 1908, 1908, 1908, + 2203, 1907, 0, 1868, 0, 1868, 0, 1868, 1907, 0, + 1907, 0, 1908, 0, 0, 1868, 0, 1911, 1911, 1911, + 1911, 0, 1913, 1913, 1913, 1913, 1907, 1908, 1912, 1912, + 1912, 1912, 1907, 1911, 1907, 0, 1908, 1908, 1913, 0, + 1914, 1914, 1914, 1914, 1912, 0, 0, 0, 1911, 0, + 0, 0, 1908, 1913, 0, 0, 1914, 1911, 0, 1912, + + 1908, 1908, 1913, 1913, 0, 0, 1912, 0, 1912, 1914, + 0, 1914, 0, 1911, 2234, 2234, 2234, 2234, 1913, 0, + 1914, 1911, 0, 0, 1912, 0, 1913, 1913, 0, 0, + 1912, 0, 1912, 0, 1914, 0, 1914, 1915, 1915, 1915, + 1915, 0, 0, 0, 1914, 0, 0, 1916, 1916, 1916, + 1916, 2234, 0, 1915, 0, 0, 0, 1917, 1917, 1917, + 1917, 0, 0, 1916, 0, 0, 0, 0, 1915, 2245, + 2245, 2245, 2245, 1917, 0, 2234, 0, 1915, 1916, 0, + 1915, 0, 0, 0, 0, 1916, 0, 1916, 1917, 1920, + 1920, 1920, 1920, 1915, 0, 0, 0, 1917, 1917, 0, + + 0, 1915, 0, 1916, 1915, 1920, 2245, 0, 0, 1916, + 0, 1916, 0, 1917, 0, 0, 1925, 1925, 1925, 1925, + 1920, 1917, 1917, 0, 0, 0, 0, 0, 0, 1920, + 2245, 0, 1925, 1926, 1926, 1926, 1926, 0, 0, 1927, + 1927, 1927, 1927, 0, 0, 1920, 0, 1925, 0, 1926, + 0, 0, 0, 1920, 1925, 1927, 1925, 0, 0, 1928, + 1928, 1928, 1928, 0, 1926, 0, 0, 0, 1927, 0, + 1927, 0, 1925, 1926, 1926, 1928, 0, 0, 1925, 1927, + 1925, 2484, 2484, 2484, 2484, 1930, 1930, 1930, 1930, 1926, + 1928, 0, 2484, 1927, 0, 1927, 1930, 1926, 1926, 1928, + + 0, 1930, 1928, 1927, 0, 0, 1932, 1932, 1932, 1932, + 0, 1933, 1933, 1933, 1933, 1928, 1930, 1932, 0, 0, + 0, 0, 1932, 1928, 0, 1930, 1928, 1933, 1934, 1934, + 1934, 1934, 1935, 1935, 1935, 1935, 0, 1932, 0, 1934, + 0, 1930, 1933, 1935, 1934, 0, 1932, 0, 0, 1930, + 0, 1933, 0, 0, 0, 1936, 1936, 1936, 1936, 1934, + 0, 0, 1932, 1935, 0, 0, 1936, 1933, 1934, 0, + 1932, 1936, 1935, 0, 0, 1933, 0, 1937, 1937, 1937, + 1937, 0, 0, 0, 1934, 0, 1936, 0, 1935, 0, + 0, 0, 1934, 1937, 0, 1936, 1935, 1941, 1941, 1941, + + 1941, 0, 1942, 1942, 1942, 1942, 0, 0, 1937, 0, + 0, 1936, 0, 1941, 0, 0, 0, 1937, 1942, 1936, + 2268, 2268, 2268, 2268, 1941, 0, 1941, 0, 0, 1942, + 0, 1942, 0, 1937, 0, 1941, 2268, 1946, 1946, 1946, + 1946, 1937, 0, 1942, 1947, 1947, 1947, 1947, 0, 1941, + 0, 1941, 0, 1946, 1942, 0, 1942, 0, 0, 1941, + 1947, 2268, 0, 1954, 1954, 1954, 1954, 1942, 1946, 0, + 1959, 1959, 1959, 1959, 0, 1947, 0, 1946, 0, 1954, + 1955, 1955, 1955, 1955, 1947, 2268, 1959, 0, 1960, 1960, + 1960, 1960, 0, 1946, 1954, 0, 1955, 1959, 0, 1959, + + 1947, 1946, 0, 1954, 1960, 0, 0, 0, 1947, 1959, + 0, 1955, 0, 0, 0, 1960, 0, 1960, 0, 1954, + 1955, 1960, 1959, 0, 1959, 0, 0, 1954, 0, 1961, + 1961, 1961, 1961, 1959, 0, 0, 1955, 0, 0, 0, + 1960, 0, 1960, 0, 1955, 1961, 1960, 1963, 1963, 1963, + 1963, 1964, 1964, 1964, 1964, 0, 1961, 0, 1961, 0, + 0, 0, 0, 1963, 0, 0, 0, 1964, 1965, 1965, + 1965, 1965, 1961, 0, 1966, 1966, 1966, 1966, 1963, 0, + 0, 1961, 1964, 1961, 1965, 1963, 0, 1963, 0, 0, + 1966, 1964, 1964, 0, 0, 0, 1961, 1965, 0, 1965, + + 0, 0, 0, 1963, 0, 1966, 0, 1964, 1965, 1963, + 0, 1963, 0, 0, 1966, 1964, 1964, 1966, 1973, 1973, + 1973, 1973, 1965, 0, 1965, 2497, 2497, 2497, 2497, 1973, + 1966, 0, 1965, 0, 1973, 0, 2497, 0, 1966, 0, + 0, 1966, 0, 0, 1974, 1974, 1974, 1974, 0, 1973, + 1977, 1977, 1977, 1977, 0, 1974, 0, 0, 1973, 0, + 1974, 1977, 1978, 1978, 1978, 1978, 1977, 2107, 2107, 2107, + 2107, 0, 0, 1978, 1973, 1974, 0, 0, 1978, 0, + 0, 1977, 1973, 2107, 1974, 1979, 1979, 1979, 1979, 0, + 1977, 0, 0, 1978, 0, 0, 1979, 0, 0, 0, + + 1974, 0, 1978, 0, 0, 2107, 1977, 0, 1974, 2253, + 2253, 2253, 2253, 0, 1977, 0, 1979, 0, 1978, 1983, + 1983, 1983, 1983, 0, 0, 1979, 1978, 0, 0, 2107, + 1983, 1984, 1984, 1984, 1984, 1983, 0, 1985, 1985, 1985, + 1985, 1979, 1984, 0, 0, 0, 2253, 1984, 1985, 1979, + 1983, 1988, 1988, 1988, 1988, 0, 0, 0, 0, 1983, + 0, 0, 1984, 2275, 2275, 2275, 2275, 1988, 1985, 0, + 2253, 1984, 0, 0, 0, 1983, 0, 1985, 1988, 2275, + 1988, 0, 0, 1983, 0, 0, 0, 1984, 0, 0, + 1988, 0, 0, 1985, 0, 1984, 1989, 1989, 1989, 1989, + + 0, 1985, 0, 1988, 0, 1988, 1990, 1990, 1990, 1990, + 0, 0, 1989, 0, 1988, 0, 1991, 1991, 1991, 1991, + 0, 0, 1990, 1992, 1992, 1992, 1992, 1989, 1993, 1993, + 1993, 1993, 1991, 0, 0, 0, 1989, 1990, 0, 1992, + 0, 0, 0, 0, 1993, 0, 1990, 1991, 2113, 2113, + 2113, 2113, 1989, 0, 1992, 0, 1991, 1993, 0, 1993, + 1989, 0, 1990, 1992, 2113, 0, 0, 0, 1993, 0, + 1990, 0, 1991, 1994, 1994, 1994, 1994, 0, 0, 1992, + 1991, 0, 1993, 0, 1993, 0, 2113, 1992, 0, 1994, + 0, 0, 1993, 1995, 1995, 1995, 1995, 0, 0, 1996, + + 1996, 1996, 1996, 0, 1994, 2504, 2504, 2504, 2504, 1995, + 2113, 0, 1994, 1994, 0, 1996, 2504, 0, 2534, 2534, + 2534, 2534, 1995, 0, 1995, 1999, 1999, 1999, 1999, 1994, + 1996, 0, 0, 1995, 2534, 0, 1994, 1994, 0, 1996, + 0, 1999, 1996, 2000, 2000, 2000, 2000, 1995, 0, 1995, + 0, 2397, 2397, 2397, 2397, 1996, 1999, 1995, 0, 2000, + 0, 0, 2397, 1996, 0, 1999, 1996, 0, 0, 2001, + 2001, 2001, 2001, 0, 2000, 2002, 2002, 2002, 2002, 0, + 0, 1999, 0, 2000, 0, 2001, 0, 0, 0, 1999, + 2397, 2002, 2003, 2003, 2003, 2003, 0, 0, 0, 2000, + + 2001, 2348, 2348, 2348, 2348, 0, 2002, 2000, 2003, 2001, + 2004, 2004, 2004, 2004, 2397, 2002, 0, 2348, 0, 0, + 0, 2003, 0, 2003, 0, 2001, 2004, 2355, 2355, 2355, + 2355, 2002, 2003, 2001, 2348, 2327, 2327, 2327, 2327, 2002, + 0, 2004, 0, 2355, 0, 0, 2003, 0, 2003, 2004, + 2004, 2005, 2005, 2005, 2005, 0, 2003, 0, 0, 2348, + 2355, 2006, 2006, 2006, 2006, 0, 2004, 2005, 2007, 2007, + 2007, 2007, 2327, 2004, 2004, 0, 0, 2006, 0, 0, + 2005, 0, 2005, 0, 2007, 2355, 0, 2008, 2008, 2008, + 2008, 2005, 2006, 0, 0, 0, 2327, 0, 0, 2007, + + 0, 2006, 0, 2008, 2006, 2005, 0, 2005, 2007, 2007, + 2009, 2009, 2009, 2009, 0, 2005, 0, 2006, 2008, 2204, + 2204, 2204, 2204, 0, 2007, 2006, 2009, 2008, 2006, 0, + 0, 0, 2007, 2007, 0, 2204, 0, 0, 0, 2009, + 0, 2009, 0, 2008, 2010, 2010, 2010, 2010, 0, 0, + 2009, 2008, 0, 0, 2013, 2013, 2013, 2013, 0, 0, + 2010, 0, 2204, 0, 2009, 0, 2009, 0, 0, 0, + 2013, 0, 0, 0, 2009, 2010, 2014, 2014, 2014, 2014, + 2395, 2395, 2395, 2395, 2010, 2013, 2204, 2010, 2015, 2015, + 2015, 2015, 2014, 0, 2013, 0, 2274, 2274, 2274, 2274, + + 2010, 0, 0, 0, 2015, 0, 0, 2014, 2010, 0, + 2013, 2010, 2274, 0, 0, 0, 2014, 2395, 2013, 2015, + 2016, 2016, 2016, 2016, 2525, 2525, 2525, 2525, 2015, 0, + 0, 0, 2014, 0, 0, 2525, 2016, 2274, 0, 0, + 2014, 2395, 0, 0, 2015, 0, 2017, 2017, 2017, 2017, + 0, 2016, 2015, 0, 0, 0, 2018, 2018, 2018, 2018, + 2016, 2274, 2017, 0, 0, 0, 2409, 2409, 2409, 2409, + 0, 0, 2018, 0, 0, 2017, 2016, 2017, 2023, 2023, + 2023, 2023, 0, 0, 2016, 0, 2017, 2018, 0, 0, + 2024, 2024, 2024, 2024, 2023, 2018, 2018, 0, 0, 0, + + 2017, 0, 2017, 2409, 0, 0, 2024, 2023, 0, 2023, + 2017, 0, 2018, 2540, 2540, 2540, 2540, 0, 2023, 2018, + 2018, 2024, 2025, 2025, 2025, 2025, 0, 2409, 0, 2540, + 2024, 0, 2023, 2024, 2023, 0, 0, 0, 2025, 0, + 0, 0, 2023, 0, 0, 0, 2024, 0, 2026, 2026, + 2026, 2026, 0, 2025, 2024, 0, 0, 2024, 0, 0, + 0, 0, 2025, 2025, 2026, 2032, 2032, 2032, 2032, 2047, + 2047, 2047, 2047, 0, 2048, 2048, 2048, 2048, 2025, 2026, + 0, 2032, 0, 0, 0, 2047, 2025, 2025, 2026, 0, + 2048, 0, 2032, 0, 2032, 0, 2047, 0, 2047, 0, + + 0, 2048, 0, 2048, 2026, 2048, 0, 2047, 2032, 0, + 0, 0, 2026, 2049, 2049, 2049, 2049, 2032, 0, 2032, + 0, 2047, 0, 2047, 0, 0, 2048, 0, 2048, 2049, + 2048, 2047, 2032, 2051, 2051, 2051, 2051, 0, 0, 0, + 2049, 0, 2049, 2052, 2052, 2052, 2052, 0, 0, 2051, + 2053, 2053, 2053, 2053, 0, 0, 0, 0, 0, 2052, + 2049, 0, 2051, 0, 2051, 2049, 2053, 2049, 0, 2054, + 2054, 2054, 2054, 2051, 2052, 0, 0, 2489, 2489, 2489, + 2489, 2053, 0, 2052, 2049, 2054, 2052, 2051, 2489, 2051, + 2053, 2053, 2061, 2061, 2061, 2061, 0, 2051, 0, 2052, + + 2054, 2535, 2535, 2535, 2535, 0, 2053, 2052, 2061, 2054, + 2052, 0, 0, 0, 2053, 2053, 2489, 2535, 0, 2061, + 0, 2061, 0, 0, 0, 2054, 2062, 2062, 2062, 2062, + 2061, 0, 0, 2054, 0, 0, 2063, 2063, 2063, 2063, + 2489, 2535, 2062, 0, 2061, 0, 2061, 2064, 2064, 2064, + 2064, 0, 2063, 0, 2061, 2062, 0, 2062, 2065, 2065, + 2065, 2065, 0, 2064, 0, 2535, 2062, 2063, 2536, 2536, + 2536, 2536, 0, 0, 2065, 2063, 2063, 0, 2064, 2536, + 2062, 0, 2062, 2581, 2581, 2581, 2581, 2064, 0, 2065, + 2062, 0, 2063, 0, 2581, 0, 2065, 0, 2065, 2063, + + 2063, 0, 0, 2064, 0, 2066, 2066, 2066, 2066, 0, + 0, 2064, 0, 0, 2065, 0, 2067, 2067, 2067, 2067, + 2065, 2066, 2065, 2068, 2068, 2068, 2068, 2071, 2071, 2071, + 2071, 0, 2067, 0, 0, 0, 2066, 0, 0, 2068, + 0, 0, 0, 2071, 0, 2066, 2066, 2067, 2422, 2422, + 2422, 2422, 0, 0, 2068, 0, 2067, 2067, 2071, 0, + 2068, 2066, 0, 2068, 0, 0, 0, 2071, 0, 2066, + 2066, 0, 2067, 2072, 2072, 2072, 2072, 0, 0, 2068, + 2067, 2067, 0, 2071, 2068, 2422, 0, 2068, 0, 2072, + 0, 2071, 2073, 2073, 2073, 2073, 0, 0, 0, 2074, + + 2074, 2074, 2074, 0, 2072, 0, 0, 0, 2073, 2422, + 0, 2072, 0, 2072, 0, 2074, 2431, 2431, 2431, 2431, + 0, 0, 0, 2073, 0, 2610, 2610, 2610, 2610, 2072, + 2074, 0, 2073, 2073, 0, 2072, 2610, 2072, 0, 2074, + 2074, 2610, 2075, 2075, 2075, 2075, 0, 0, 2073, 2077, + 2077, 2077, 2077, 2431, 0, 2074, 2073, 2073, 2075, 2076, + 2076, 2076, 2076, 2074, 2074, 2077, 0, 2529, 2529, 2529, + 2529, 0, 0, 2075, 0, 2076, 0, 2431, 2529, 2075, + 2077, 0, 2075, 0, 0, 0, 2077, 0, 0, 2077, + 2076, 0, 2076, 2078, 2078, 2078, 2078, 0, 2075, 2076, + + 0, 0, 0, 2075, 2529, 2077, 2075, 0, 0, 2078, + 2077, 0, 0, 2077, 0, 2076, 0, 2076, 0, 2079, + 2079, 2079, 2079, 2076, 2078, 0, 0, 0, 2529, 0, + 2078, 0, 0, 2078, 0, 2079, 2080, 2080, 2080, 2080, + 0, 0, 2081, 2081, 2081, 2081, 0, 0, 0, 2078, + 2079, 0, 2080, 0, 2078, 0, 2079, 2078, 2081, 2079, + 0, 0, 2084, 2084, 2084, 2084, 0, 2080, 2085, 2085, + 2085, 2085, 0, 2081, 0, 2079, 2080, 2080, 2084, 2081, + 2079, 0, 2081, 2079, 2085, 0, 0, 0, 0, 0, + 0, 2084, 2080, 2084, 2086, 2086, 2086, 2086, 2081, 2085, + + 2080, 2080, 2084, 2081, 0, 0, 2081, 2085, 2085, 0, + 2086, 2087, 2087, 2087, 2087, 0, 2084, 0, 2084, 0, + 2454, 2454, 2454, 2454, 2085, 2086, 2084, 2087, 0, 0, + 0, 2085, 2085, 0, 2086, 0, 2454, 2088, 2088, 2088, + 2088, 0, 2087, 2093, 2093, 2093, 2093, 2454, 0, 2087, + 2086, 2087, 0, 2088, 2094, 2094, 2094, 2094, 2086, 2093, + 2104, 2104, 2104, 2104, 0, 0, 0, 2087, 2088, 0, + 2094, 0, 2454, 2087, 2093, 2087, 2104, 2088, 2088, 2820, + 2820, 2820, 2820, 2093, 2093, 2094, 0, 2104, 0, 2104, + 2820, 2094, 0, 2088, 2094, 2095, 2095, 2095, 2095, 2093, + + 0, 2088, 2088, 2458, 2458, 2458, 2458, 2093, 2093, 0, + 2094, 2095, 2104, 0, 2104, 2094, 0, 0, 2094, 2458, + 0, 2096, 2096, 2096, 2096, 0, 2095, 0, 2095, 0, + 2458, 2097, 2097, 2097, 2097, 2095, 0, 2096, 2098, 2098, + 2098, 2098, 2641, 2641, 2641, 2641, 0, 2097, 0, 0, + 0, 2095, 2096, 2095, 2098, 2458, 0, 0, 2096, 2095, + 0, 2096, 2097, 0, 2103, 2103, 2103, 2103, 2097, 2098, + 0, 2097, 0, 0, 0, 2098, 0, 2096, 2098, 2641, + 2103, 0, 2096, 0, 0, 2096, 0, 2097, 0, 0, + 0, 2103, 2097, 2103, 2098, 2097, 0, 0, 0, 2098, + + 0, 0, 2098, 2641, 0, 2103, 2117, 2117, 2117, 2117, + 2118, 2118, 2118, 2118, 0, 0, 2103, 0, 2103, 0, + 0, 0, 2117, 0, 0, 0, 2118, 0, 0, 2103, + 0, 0, 0, 2117, 0, 2117, 0, 2118, 0, 2118, + 2119, 2119, 2119, 2119, 0, 2121, 2121, 2121, 2121, 0, + 2122, 2122, 2122, 2122, 2118, 0, 2119, 0, 2117, 0, + 2117, 2121, 2118, 0, 2118, 0, 2122, 2119, 0, 2119, + 0, 0, 2123, 2123, 2123, 2123, 2121, 0, 2118, 0, + 0, 2122, 0, 0, 0, 2121, 2121, 2122, 2123, 0, + 2122, 0, 2119, 0, 2119, 0, 0, 2139, 2139, 2139, + + 2139, 2121, 0, 2123, 0, 2123, 2122, 0, 0, 2121, + 2121, 2122, 2123, 2139, 2122, 2124, 2124, 2124, 2124, 2125, + 2125, 2125, 2125, 0, 2139, 0, 2139, 0, 2123, 0, + 2123, 2124, 0, 0, 0, 2125, 2123, 2126, 2126, 2126, + 2126, 2130, 2130, 2130, 2130, 0, 2124, 0, 0, 2139, + 2125, 2139, 2124, 2126, 0, 2124, 2125, 2130, 0, 2125, + 0, 0, 2660, 2660, 2660, 2660, 0, 0, 2126, 0, + 0, 2124, 2130, 0, 2126, 2125, 2124, 2126, 2130, 2124, + 2125, 2130, 0, 2125, 2131, 2131, 2131, 2131, 2132, 2132, + 2132, 2132, 0, 2126, 0, 0, 0, 2130, 2126, 2660, + + 2131, 2126, 2130, 0, 0, 2130, 2133, 2133, 2133, 2133, + 0, 2455, 2455, 2455, 2455, 2131, 0, 2133, 0, 2132, + 0, 2131, 2133, 2660, 2131, 2132, 0, 2455, 2132, 0, + 0, 2541, 2541, 2541, 2541, 0, 2455, 2133, 0, 0, + 2131, 0, 0, 0, 2132, 2131, 2133, 2541, 2131, 2132, + 0, 0, 2132, 2134, 2134, 2134, 2134, 2136, 2136, 2136, + 2136, 2455, 2133, 0, 2134, 0, 0, 0, 2136, 2134, + 2133, 2541, 0, 2136, 2137, 2137, 2137, 2137, 0, 0, + 2140, 2140, 2140, 2140, 2134, 2137, 0, 0, 2136, 0, + 2137, 0, 0, 2134, 0, 2541, 2140, 2136, 0, 0, + + 2141, 2141, 2141, 2141, 0, 2137, 0, 0, 0, 2134, + 0, 2140, 0, 2136, 2137, 0, 2141, 2134, 2140, 0, + 2140, 2136, 0, 2142, 2142, 2142, 2142, 0, 0, 0, + 2137, 2141, 2827, 2827, 2827, 2827, 2140, 0, 2137, 2142, + 2141, 2141, 2140, 2827, 2140, 2143, 2143, 2143, 2143, 0, + 0, 0, 2142, 0, 2142, 0, 2141, 0, 0, 0, + 0, 2143, 0, 2142, 2141, 2141, 2144, 2144, 2144, 2144, + 2611, 2611, 2611, 2611, 0, 0, 2143, 2142, 0, 2142, + 0, 2611, 2144, 0, 0, 2143, 2611, 2142, 2143, 2145, + 2145, 2145, 2145, 2853, 2853, 2853, 2853, 2144, 0, 2144, + + 0, 2143, 0, 0, 2853, 2145, 2144, 0, 0, 2143, + 0, 0, 2143, 0, 0, 2146, 2146, 2146, 2146, 0, + 2145, 0, 2144, 0, 2144, 0, 2145, 0, 0, 2145, + 2144, 2146, 2147, 2147, 2147, 2147, 0, 0, 2667, 2667, + 2667, 2667, 0, 0, 0, 2145, 2146, 0, 2147, 0, + 2145, 0, 2146, 2145, 2667, 2146, 0, 0, 2148, 2148, + 2148, 2148, 0, 2147, 2152, 2152, 2152, 2152, 0, 2147, + 0, 2146, 2147, 0, 2148, 0, 2146, 0, 0, 2146, + 2152, 0, 0, 2148, 2151, 2151, 2151, 2151, 2147, 2148, + 0, 0, 0, 2147, 0, 2152, 2147, 0, 2148, 0, + + 2151, 0, 0, 0, 2152, 0, 0, 2152, 2148, 2670, + 2670, 2670, 2670, 2151, 2148, 2151, 2153, 2153, 2153, 2153, + 2152, 0, 2148, 0, 2151, 2670, 0, 0, 2152, 0, + 0, 2152, 2153, 2682, 2682, 2682, 2682, 0, 2151, 0, + 2151, 0, 2154, 2154, 2154, 2154, 0, 2153, 2151, 2153, + 0, 0, 2155, 2155, 2155, 2155, 2153, 0, 2154, 2156, + 2156, 2156, 2156, 2697, 2697, 2697, 2697, 0, 2155, 0, + 2682, 0, 2153, 2154, 2153, 2156, 0, 0, 0, 2154, + 2153, 0, 2154, 2155, 2866, 2866, 2866, 2866, 0, 2155, + 2156, 0, 2155, 0, 2682, 2866, 2156, 0, 2154, 2156, + + 2697, 0, 0, 2154, 0, 0, 2154, 0, 2155, 2157, + 2157, 2157, 2157, 2155, 0, 2156, 2155, 0, 0, 0, + 2156, 0, 0, 2156, 2697, 2157, 2158, 2158, 2158, 2158, + 0, 2159, 2159, 2159, 2159, 0, 2157, 0, 0, 0, + 2157, 0, 2158, 2160, 2160, 2160, 2160, 2159, 0, 2157, + 0, 2158, 2873, 2873, 2873, 2873, 0, 2158, 0, 2160, + 0, 2157, 2159, 2873, 2159, 2157, 2158, 2804, 2804, 2804, + 2804, 2159, 0, 2157, 2160, 0, 2158, 0, 2804, 0, + 2160, 0, 2158, 2160, 0, 0, 0, 2159, 0, 2159, + 2158, 2708, 2708, 2708, 2708, 2159, 0, 0, 0, 2160, + + 2161, 2161, 2161, 2161, 2160, 0, 2804, 2160, 0, 0, + 2162, 2162, 2162, 2162, 0, 0, 2161, 2163, 2163, 2163, + 2163, 0, 2166, 2166, 2166, 2166, 2162, 0, 2708, 0, + 2804, 2161, 0, 2163, 0, 0, 0, 2161, 2166, 0, + 2161, 2162, 2163, 2263, 2263, 2263, 2263, 2162, 2163, 0, + 2162, 0, 2708, 2166, 0, 0, 2161, 2163, 0, 2263, + 2166, 2161, 2166, 0, 2161, 0, 2162, 2163, 0, 0, + 2263, 2162, 2263, 2163, 2162, 0, 0, 0, 2166, 0, + 0, 2163, 0, 0, 2166, 0, 2166, 2167, 2167, 2167, + 2167, 2168, 2168, 2168, 2168, 2263, 0, 2263, 2169, 2169, + + 2169, 2169, 0, 2167, 0, 0, 0, 2168, 0, 2743, + 2743, 2743, 2743, 0, 2169, 0, 0, 0, 2167, 0, + 2168, 0, 2168, 0, 0, 0, 0, 2167, 2167, 2169, + 0, 2168, 2171, 2171, 2171, 2171, 0, 0, 2169, 0, + 0, 2169, 0, 2167, 0, 2168, 2743, 2168, 2171, 0, + 0, 2167, 2167, 0, 2169, 2168, 0, 0, 2172, 2172, + 2172, 2172, 2169, 2171, 0, 2169, 0, 0, 0, 2171, + 2743, 0, 2171, 0, 2172, 2173, 2173, 2173, 2173, 0, + 0, 2754, 2754, 2754, 2754, 0, 0, 0, 2171, 2172, + 0, 0, 0, 2171, 0, 2172, 2171, 0, 2172, 0, + + 0, 2177, 2177, 2177, 2177, 0, 2173, 2178, 2178, 2178, + 2178, 0, 2173, 0, 2172, 2173, 0, 2177, 2754, 2172, + 0, 0, 2172, 2178, 2179, 2179, 2179, 2179, 0, 0, + 0, 2173, 2177, 0, 2177, 0, 2173, 0, 2178, 2173, + 2179, 2177, 2754, 0, 2178, 0, 0, 2178, 0, 0, + 2180, 2180, 2180, 2180, 0, 2179, 0, 2177, 0, 2177, + 0, 2179, 0, 2178, 2179, 2177, 2180, 0, 2178, 0, + 0, 2178, 0, 2181, 2181, 2181, 2181, 0, 0, 0, + 2179, 2180, 0, 0, 0, 2179, 0, 2180, 2179, 2181, + 2180, 2182, 2182, 2182, 2182, 2762, 2762, 2762, 2762, 0, + + 2181, 0, 0, 0, 2181, 0, 2180, 2182, 0, 0, + 0, 2180, 0, 2181, 2180, 0, 2182, 2187, 2187, 2187, + 2187, 0, 2182, 0, 0, 2181, 0, 0, 0, 2181, + 0, 2182, 2762, 2187, 0, 0, 0, 2181, 0, 0, + 0, 2182, 0, 0, 2187, 0, 2187, 2182, 0, 0, + 2187, 2188, 2188, 2188, 2188, 2182, 2762, 0, 2189, 2189, + 2189, 2189, 2884, 2884, 2884, 2884, 0, 2188, 0, 2187, + 0, 2187, 0, 2884, 2189, 2187, 0, 0, 0, 0, + 0, 0, 2188, 2459, 2459, 2459, 2459, 0, 2188, 2189, + 0, 2188, 0, 0, 0, 2189, 0, 0, 2189, 2459, + + 2192, 2192, 2192, 2192, 0, 0, 0, 2188, 2459, 0, + 0, 0, 2188, 0, 2189, 2188, 2192, 0, 0, 2189, + 0, 0, 2189, 2190, 2190, 2190, 2190, 0, 0, 0, + 0, 2192, 0, 2459, 0, 0, 0, 2192, 0, 2190, + 2192, 2193, 2193, 2193, 2193, 2194, 2194, 2194, 2194, 0, + 2190, 0, 2190, 0, 2190, 0, 2192, 2193, 0, 0, + 2190, 2192, 0, 2190, 2192, 0, 0, 2200, 2200, 2200, + 2200, 0, 2193, 0, 0, 2190, 2194, 2190, 2193, 2190, + 0, 2193, 2194, 2200, 2190, 2194, 0, 2190, 0, 0, + 2202, 2202, 2202, 2202, 0, 0, 0, 2193, 2200, 0, + + 0, 2194, 2193, 0, 2200, 2193, 2194, 2200, 0, 2194, + 2201, 2201, 2201, 2201, 0, 0, 0, 0, 0, 0, + 0, 2202, 0, 2200, 0, 0, 2201, 2202, 2200, 0, + 2202, 2200, 2207, 2207, 2207, 2207, 2208, 2208, 2208, 2208, + 0, 2201, 0, 0, 0, 0, 2202, 2201, 2207, 0, + 2201, 2202, 2208, 0, 2202, 0, 0, 0, 0, 2207, + 0, 2207, 0, 2208, 0, 2208, 2201, 0, 0, 0, + 2207, 2201, 0, 0, 2201, 0, 0, 2208, 2803, 2803, + 2803, 2803, 0, 0, 2207, 0, 2207, 0, 2208, 0, + 2208, 0, 0, 0, 2207, 0, 0, 2340, 2340, 2340, + + 2340, 2208, 2209, 2209, 2209, 2209, 2209, 2209, 2209, 2209, + 2209, 2209, 2209, 2209, 0, 2803, 2209, 2209, 2209, 2209, + 0, 2209, 0, 2209, 2209, 2209, 2209, 2209, 2340, 2812, + 2812, 2812, 2812, 0, 2209, 0, 0, 2340, 0, 2803, + 0, 0, 0, 2209, 0, 0, 0, 0, 0, 0, + 0, 2209, 0, 2340, 0, 0, 0, 0, 0, 2209, + 0, 2340, 0, 0, 0, 0, 2812, 2209, 2826, 2826, + 2826, 2826, 0, 0, 0, 2209, 2209, 2210, 2210, 2210, + 2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210, 2210, 0, + 2812, 2210, 2210, 2210, 2210, 0, 2210, 0, 2210, 2210, + + 2210, 2210, 2210, 0, 0, 2826, 0, 0, 0, 2210, + 0, 0, 0, 0, 0, 0, 0, 0, 2210, 0, + 0, 0, 0, 0, 0, 0, 2210, 0, 0, 2826, + 0, 0, 0, 0, 2210, 0, 0, 0, 0, 0, + 0, 0, 2210, 0, 0, 0, 0, 0, 0, 0, + 2210, 2210, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, + 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, + 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, + 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, + 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, + + 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, + 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211, + 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2213, 2213, 2213, + 2213, 2214, 2214, 2214, 2214, 0, 0, 0, 2215, 2215, + 2215, 2215, 0, 2213, 0, 0, 0, 2214, 0, 2216, + 2216, 2216, 2216, 0, 2215, 0, 0, 0, 2213, 0, + 2213, 0, 2214, 0, 0, 2216, 0, 2213, 2214, 2215, + 0, 2214, 0, 0, 0, 2215, 0, 0, 2215, 0, + 2216, 0, 0, 2213, 0, 2213, 2216, 2214, 0, 2216, + 0, 2213, 2214, 0, 2215, 2214, 0, 0, 0, 2215, + + 0, 0, 2215, 0, 0, 2216, 2217, 2217, 2217, 2217, + 2216, 0, 0, 2216, 0, 0, 2218, 2218, 2218, 2218, + 0, 0, 2217, 2220, 2220, 2220, 2220, 2839, 2839, 2839, + 2839, 0, 2218, 2217, 0, 0, 0, 2217, 0, 2220, + 0, 2218, 2814, 2814, 2814, 2814, 2217, 2218, 2848, 2848, + 2848, 2848, 0, 2814, 2220, 0, 2218, 0, 2217, 0, + 2220, 0, 2217, 2220, 2839, 0, 2218, 0, 0, 0, + 2217, 0, 2218, 2221, 2221, 2221, 2221, 0, 0, 2220, + 2218, 2814, 0, 0, 2220, 2848, 0, 2220, 2839, 2221, + 2222, 2222, 2222, 2222, 0, 0, 0, 0, 0, 0, + + 2858, 2858, 2858, 2858, 2221, 2814, 0, 0, 0, 2848, + 2221, 2858, 0, 2221, 0, 0, 2225, 2225, 2225, 2225, + 0, 2222, 2226, 2226, 2226, 2226, 0, 2222, 0, 2221, + 2222, 0, 2225, 0, 2221, 0, 0, 2221, 2226, 2858, + 0, 0, 0, 0, 0, 2225, 2222, 2225, 0, 0, + 0, 2222, 0, 2226, 2222, 0, 2225, 2227, 2227, 2227, + 2227, 0, 2226, 2858, 0, 2226, 0, 0, 0, 0, + 2225, 0, 2225, 2227, 2228, 2228, 2228, 2228, 2226, 0, + 2225, 0, 0, 0, 0, 0, 2226, 0, 2227, 2226, + 2228, 0, 2229, 2229, 2229, 2229, 0, 2227, 2227, 0, + + 0, 0, 0, 0, 0, 2228, 0, 0, 2229, 0, + 0, 2228, 0, 2227, 2228, 2231, 2231, 2231, 2231, 2229, + 0, 2227, 2227, 2229, 0, 0, 2232, 2232, 2232, 2232, + 2228, 2231, 2229, 0, 0, 2228, 0, 0, 2228, 0, + 2231, 0, 2232, 0, 2229, 0, 2231, 0, 2229, 0, + 0, 0, 0, 0, 0, 2231, 2229, 2232, 2236, 2236, + 2236, 2236, 0, 0, 0, 2231, 2232, 0, 0, 0, + 0, 2231, 0, 0, 2236, 2237, 2237, 2237, 2237, 2231, + 0, 0, 2232, 0, 0, 0, 0, 0, 0, 2236, + 2232, 2237, 0, 2238, 2238, 2238, 2238, 0, 2236, 2236, + + 0, 0, 0, 0, 0, 0, 2237, 0, 0, 2238, + 0, 0, 2237, 0, 2236, 2237, 2239, 2239, 2239, 2239, + 2238, 0, 2236, 2236, 2238, 0, 0, 2240, 2240, 2240, + 2240, 2237, 2239, 2238, 0, 0, 2237, 0, 0, 2237, + 0, 0, 0, 2240, 0, 2238, 0, 2239, 0, 2238, + 2241, 2241, 2241, 2241, 0, 0, 2239, 2238, 2240, 0, + 0, 0, 0, 0, 0, 0, 2241, 2240, 2242, 2242, + 2242, 2242, 2239, 2243, 2243, 2243, 2243, 2241, 0, 0, + 2239, 2241, 0, 2240, 2242, 0, 0, 0, 0, 2243, + 2241, 2240, 0, 2242, 2246, 2246, 2246, 2246, 0, 2242, + + 0, 0, 2241, 0, 2243, 0, 2241, 0, 2242, 0, + 2246, 0, 0, 2243, 2241, 0, 0, 0, 2242, 0, + 0, 0, 0, 2246, 2242, 2246, 0, 0, 0, 2243, + 0, 0, 2242, 0, 2246, 0, 0, 2243, 2247, 2247, + 2247, 2247, 0, 2248, 2248, 2248, 2248, 0, 2246, 0, + 2246, 0, 0, 0, 2247, 0, 0, 0, 2246, 2248, + 2249, 2249, 2249, 2249, 2255, 2255, 2255, 2255, 0, 2247, + 2256, 2256, 2256, 2256, 2248, 0, 2249, 0, 2247, 0, + 2255, 2247, 0, 2248, 2248, 0, 2256, 2254, 2254, 2254, + 2254, 2249, 0, 0, 2247, 2255, 0, 2249, 0, 2248, + + 2249, 2256, 2247, 2254, 2255, 2247, 0, 2248, 2248, 0, + 2256, 0, 0, 0, 2254, 0, 2249, 0, 2254, 0, + 2255, 2249, 0, 0, 2249, 0, 2256, 2254, 2255, 2260, + 2260, 2260, 2260, 0, 2256, 2345, 2345, 2345, 2345, 2254, + 0, 0, 0, 2254, 0, 2260, 2261, 2261, 2261, 2261, + 0, 2254, 0, 0, 2265, 2265, 2265, 2265, 0, 0, + 2260, 0, 2261, 0, 0, 0, 2345, 0, 0, 2260, + 2265, 0, 2345, 0, 0, 2345, 0, 2261, 0, 2265, + 0, 2265, 0, 2265, 0, 2260, 2261, 0, 0, 0, + 0, 2345, 0, 2260, 0, 0, 2345, 0, 0, 2345, + + 0, 0, 2261, 0, 2265, 0, 2265, 0, 2265, 0, + 2261, 2262, 2262, 2262, 2262, 2262, 2262, 2262, 2262, 2262, + 2262, 2262, 2262, 0, 0, 2262, 2262, 2262, 2262, 0, + 2262, 0, 2262, 2262, 2262, 2262, 2262, 2277, 2277, 2277, + 2277, 0, 0, 2262, 0, 2278, 2278, 2278, 2278, 0, + 0, 0, 2262, 2277, 0, 0, 0, 0, 0, 0, + 2262, 2278, 0, 0, 2277, 0, 2277, 0, 2262, 0, + 2278, 0, 2278, 0, 2278, 0, 2262, 0, 0, 0, + 2277, 0, 0, 0, 2262, 2262, 0, 0, 0, 2277, + 0, 2277, 0, 0, 0, 2278, 0, 2278, 0, 2278, + + 2281, 2281, 2281, 2281, 2277, 2282, 2282, 2282, 2282, 0, + 0, 0, 2283, 2283, 2283, 2283, 2281, 2285, 2285, 2285, + 2285, 2282, 0, 2284, 2284, 2284, 2284, 0, 2283, 0, + 0, 2281, 0, 2285, 0, 0, 2282, 0, 0, 2284, + 2281, 2283, 0, 2283, 0, 2282, 0, 0, 2285, 0, + 0, 0, 2283, 0, 2284, 0, 2281, 2285, 0, 0, + 0, 2282, 2284, 2284, 2281, 0, 2283, 0, 2283, 2282, + 0, 0, 0, 2285, 0, 0, 2283, 0, 0, 2284, + 0, 2285, 0, 0, 0, 0, 2284, 2284, 2286, 2286, + 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, + + 0, 0, 2286, 2286, 2286, 2286, 0, 2286, 0, 2286, + 2286, 2286, 2286, 2286, 0, 2287, 2287, 2287, 2287, 0, + 2286, 0, 0, 0, 0, 0, 0, 0, 0, 2286, + 0, 2287, 0, 2289, 2289, 2289, 2289, 2286, 2288, 2288, + 2288, 2288, 0, 0, 0, 2286, 2287, 0, 0, 2289, + 0, 0, 0, 2286, 2288, 2287, 0, 0, 0, 0, + 0, 2286, 2286, 0, 2289, 0, 0, 2288, 0, 2288, + 0, 2287, 2289, 2289, 2290, 2290, 2290, 2290, 2288, 2287, + 0, 0, 0, 0, 2292, 2292, 2292, 2292, 0, 2289, + 2290, 0, 2288, 0, 2288, 0, 2289, 2289, 0, 0, + + 2292, 2290, 2288, 0, 0, 2290, 0, 0, 0, 2292, + 2446, 2446, 2446, 2446, 2290, 2292, 2293, 2293, 2293, 2293, + 2294, 2294, 2294, 2294, 2292, 0, 2290, 0, 0, 0, + 2290, 0, 2293, 0, 2292, 0, 2294, 0, 2290, 0, + 2292, 2446, 2299, 2299, 2299, 2299, 0, 2293, 2292, 0, + 2446, 2294, 0, 0, 0, 0, 2293, 0, 2299, 0, + 2294, 0, 2300, 2300, 2300, 2300, 2446, 0, 0, 0, + 0, 0, 2293, 2299, 2446, 0, 2294, 0, 2300, 0, + 2293, 0, 2299, 2299, 2294, 0, 0, 0, 2301, 2301, + 2301, 2301, 0, 2300, 2302, 2302, 2302, 2302, 2299, 2300, + + 0, 0, 2300, 0, 2301, 0, 2299, 2299, 0, 0, + 2302, 2303, 2303, 2303, 2303, 0, 0, 0, 2300, 2301, + 0, 2301, 0, 2300, 0, 2302, 2300, 2303, 2301, 0, + 0, 2302, 0, 0, 2302, 0, 0, 2304, 2304, 2304, + 2304, 0, 2303, 0, 2301, 0, 2301, 0, 2303, 0, + 2302, 2303, 2301, 2304, 0, 2302, 0, 0, 2302, 0, + 0, 0, 2304, 2305, 2305, 2305, 2305, 2303, 2304, 0, + 0, 0, 2303, 0, 0, 2303, 0, 2304, 0, 2305, + 2307, 2307, 2307, 2307, 0, 0, 0, 2304, 0, 0, + 0, 0, 0, 2304, 2305, 0, 2307, 0, 0, 0, + + 2305, 2304, 0, 2305, 0, 2359, 2359, 2359, 2359, 0, + 0, 2307, 0, 0, 0, 0, 0, 0, 0, 2305, + 2307, 2359, 0, 0, 2305, 0, 0, 2305, 0, 0, + 0, 0, 2359, 0, 2359, 0, 2307, 0, 2311, 2311, + 2311, 2311, 0, 0, 2307, 2308, 2308, 2308, 2308, 2312, + 2312, 2312, 2312, 0, 2311, 0, 2308, 2359, 0, 2359, + 0, 2308, 0, 0, 0, 2312, 0, 0, 0, 2311, + 0, 2311, 2314, 2314, 2314, 2314, 2308, 0, 2311, 0, + 2312, 0, 0, 0, 2308, 2308, 2312, 0, 2314, 2312, + 2313, 2313, 2313, 2313, 2311, 0, 2311, 2314, 0, 0, + + 0, 2308, 2311, 2314, 0, 2312, 2313, 0, 2308, 2308, + 2312, 0, 2314, 2312, 0, 0, 2315, 2315, 2315, 2315, + 0, 2313, 2314, 0, 0, 0, 0, 2313, 2314, 0, + 2313, 0, 2315, 0, 0, 0, 2314, 0, 0, 2317, + 2317, 2317, 2317, 0, 0, 0, 2313, 2315, 0, 0, + 0, 2313, 0, 2315, 2313, 2317, 2315, 0, 2318, 2318, + 2318, 2318, 0, 0, 0, 0, 0, 0, 0, 0, + 2317, 0, 2315, 0, 2318, 0, 2317, 2315, 0, 2317, + 2315, 2316, 2316, 2316, 2316, 0, 0, 0, 0, 2318, + 0, 0, 2316, 0, 0, 2317, 0, 2316, 2318, 0, + + 2317, 0, 0, 2317, 0, 0, 0, 0, 0, 0, + 0, 0, 2316, 0, 2318, 0, 0, 0, 0, 0, + 2316, 2316, 2318, 2321, 2321, 2321, 2321, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2316, 0, 2321, + 0, 0, 0, 0, 2316, 2316, 2319, 2319, 2319, 2319, + 0, 0, 0, 0, 2321, 0, 0, 2319, 2322, 2322, + 2322, 2322, 2319, 2321, 2321, 0, 0, 0, 2323, 2323, + 2323, 2323, 0, 0, 2322, 0, 0, 2319, 0, 2321, + 2324, 2324, 2324, 2324, 2323, 2319, 2319, 2321, 2321, 2322, + 2325, 2325, 2325, 2325, 0, 2322, 2324, 0, 2322, 2323, + + 0, 2323, 2319, 0, 0, 0, 2325, 0, 2323, 2319, + 2319, 2324, 0, 0, 2322, 0, 0, 2324, 0, 2322, + 2324, 2325, 2322, 0, 2323, 0, 2323, 2325, 0, 0, + 2325, 0, 2323, 0, 0, 0, 2324, 2326, 2326, 2326, + 2326, 2324, 0, 0, 2324, 0, 2325, 0, 0, 0, + 0, 2325, 0, 2326, 2325, 2330, 2330, 2330, 2330, 0, + 0, 0, 2326, 0, 0, 0, 0, 0, 2326, 0, + 0, 2330, 0, 2335, 2335, 2335, 2335, 2326, 2336, 2336, + 2336, 2336, 0, 0, 0, 0, 2330, 2326, 0, 2335, + 0, 0, 2330, 2326, 2336, 2330, 0, 0, 0, 0, + + 0, 2326, 0, 0, 2335, 0, 0, 0, 0, 2336, + 0, 2330, 0, 2335, 0, 0, 2330, 0, 2336, 2330, + 2331, 2331, 2331, 2331, 2337, 2337, 2337, 2337, 0, 2335, + 0, 2331, 0, 0, 2336, 0, 2331, 2335, 0, 0, + 2337, 0, 2336, 0, 0, 0, 2338, 2338, 2338, 2338, + 0, 2331, 0, 0, 0, 2337, 0, 0, 0, 2331, + 2331, 0, 2338, 0, 2337, 2339, 2339, 2339, 2339, 0, + 0, 0, 0, 0, 0, 2338, 2331, 2338, 0, 0, + 2337, 2339, 0, 2331, 2331, 0, 2338, 0, 2337, 0, + 0, 0, 0, 0, 0, 0, 2339, 0, 0, 0, + + 2338, 0, 2338, 0, 2339, 2339, 2349, 2349, 2349, 2349, + 2338, 0, 0, 0, 0, 0, 2350, 2350, 2350, 2350, + 0, 2339, 2349, 2356, 2356, 2356, 2356, 0, 2339, 2339, + 0, 0, 2350, 0, 0, 0, 0, 2349, 0, 2356, + 0, 0, 0, 2349, 0, 0, 2349, 2350, 0, 0, + 0, 0, 0, 2350, 2356, 0, 2350, 0, 0, 0, + 2356, 0, 2349, 2356, 0, 0, 0, 2349, 0, 0, + 2349, 0, 2350, 2357, 2357, 2357, 2357, 2350, 0, 2356, + 2350, 0, 0, 0, 2356, 0, 0, 2356, 0, 2357, + 2360, 2360, 2360, 2360, 0, 2361, 2361, 2361, 2361, 2362, + + 2362, 2362, 2362, 0, 2357, 0, 2360, 0, 0, 0, + 2357, 2361, 0, 2357, 0, 2362, 0, 2360, 0, 2360, + 0, 0, 2363, 2363, 2363, 2363, 2361, 0, 0, 2357, + 2362, 0, 0, 2360, 2357, 2361, 0, 2357, 2363, 2362, + 0, 0, 2360, 0, 2360, 2365, 2365, 2365, 2365, 0, + 0, 2361, 0, 2363, 0, 2362, 0, 2360, 0, 2361, + 0, 2365, 2363, 2362, 2366, 2366, 2366, 2366, 0, 0, + 0, 0, 0, 0, 2365, 0, 2365, 0, 2363, 0, + 2366, 2367, 2367, 2367, 2367, 2365, 2363, 0, 0, 0, + 0, 2368, 2368, 2368, 2368, 2366, 0, 2367, 0, 2365, + + 0, 2365, 0, 2366, 2366, 0, 0, 2368, 0, 2365, + 0, 0, 2367, 2369, 2369, 2369, 2369, 0, 0, 0, + 2366, 2367, 2368, 0, 0, 0, 0, 2366, 2366, 2369, + 0, 2368, 2371, 2371, 2371, 2371, 0, 2367, 0, 0, + 0, 0, 0, 0, 2369, 2367, 0, 2368, 2371, 0, + 0, 0, 0, 2369, 0, 2368, 0, 0, 0, 0, + 0, 2371, 0, 2371, 2372, 2372, 2372, 2372, 0, 2369, + 0, 0, 2371, 0, 0, 0, 0, 2369, 0, 0, + 2372, 2373, 2373, 2373, 2373, 0, 2371, 0, 2371, 0, + 0, 2374, 2374, 2374, 2374, 2372, 2371, 2373, 2375, 2375, + + 2375, 2375, 0, 2372, 2372, 0, 0, 2374, 0, 0, + 0, 0, 2373, 0, 2375, 0, 0, 0, 0, 2373, + 2372, 2373, 2374, 0, 0, 0, 0, 2372, 2372, 2375, + 0, 2374, 2374, 0, 0, 0, 0, 2373, 2375, 0, + 0, 0, 0, 2373, 0, 2373, 0, 2374, 2376, 2376, + 2376, 2376, 0, 0, 2375, 2374, 2374, 0, 2377, 2377, + 2377, 2377, 2375, 0, 2376, 0, 0, 0, 2378, 2378, + 2378, 2378, 0, 0, 2377, 0, 0, 2376, 0, 2376, + 2379, 2379, 2379, 2379, 2378, 0, 0, 0, 2376, 2377, + 0, 0, 0, 0, 0, 0, 2379, 2377, 2377, 2378, + + 0, 0, 2376, 0, 2376, 0, 0, 0, 2378, 0, + 0, 2379, 2376, 0, 2377, 2384, 2384, 2384, 2384, 0, + 2379, 2377, 2377, 0, 2378, 2385, 2385, 2385, 2385, 0, + 0, 2384, 2378, 0, 0, 0, 2379, 2386, 2386, 2386, + 2386, 2385, 0, 0, 2379, 0, 2384, 0, 0, 0, + 0, 0, 0, 2386, 0, 2384, 2385, 2387, 2387, 2387, + 2387, 0, 0, 0, 0, 2385, 0, 0, 2386, 0, + 0, 2384, 0, 2387, 0, 0, 0, 2386, 0, 2384, + 0, 2385, 0, 0, 0, 0, 2387, 0, 2387, 2385, + 0, 0, 0, 2386, 0, 0, 0, 2387, 0, 0, + + 0, 2386, 2388, 2388, 2388, 2388, 2389, 2389, 2389, 2389, + 0, 2387, 0, 2387, 0, 0, 0, 0, 2388, 0, + 0, 2387, 2389, 2390, 2390, 2390, 2390, 0, 0, 2393, + 2393, 2393, 2393, 2388, 0, 0, 0, 2389, 0, 2390, + 0, 2388, 2388, 0, 2389, 2393, 2389, 0, 0, 0, + 2430, 2430, 2430, 2430, 2390, 0, 0, 0, 2388, 0, + 2393, 2430, 2389, 2390, 2390, 2388, 2388, 0, 2389, 2393, + 2389, 0, 0, 2391, 2391, 2391, 2391, 0, 0, 2390, + 0, 2430, 0, 0, 0, 2393, 0, 2390, 2390, 2391, + 2430, 0, 0, 2393, 0, 2398, 2398, 2398, 2398, 0, + + 0, 0, 0, 0, 2391, 0, 2430, 0, 0, 0, + 2391, 2398, 0, 2391, 2430, 2399, 2399, 2399, 2399, 0, + 0, 0, 0, 0, 0, 0, 2398, 0, 2398, 2391, + 0, 2399, 0, 0, 2391, 2398, 0, 2391, 2394, 2394, + 2394, 2394, 0, 0, 0, 0, 2399, 0, 0, 2394, + 0, 2398, 2399, 2398, 2394, 2399, 0, 0, 0, 2398, + 0, 0, 0, 0, 0, 2401, 2401, 2401, 2401, 2394, + 0, 2399, 2400, 2400, 2400, 2400, 2399, 2394, 2394, 2399, + 0, 2401, 2402, 2402, 2402, 2402, 0, 0, 2400, 0, + 0, 0, 2401, 0, 2394, 0, 2401, 0, 2402, 0, + + 0, 2394, 2394, 2400, 0, 2401, 0, 0, 0, 2400, + 0, 0, 2400, 2402, 0, 0, 0, 2401, 0, 0, + 0, 2401, 2402, 0, 2405, 2405, 2405, 2405, 2400, 2401, + 0, 0, 0, 2400, 0, 2405, 2400, 0, 2402, 0, + 2405, 2406, 2406, 2406, 2406, 0, 2402, 2404, 2404, 2404, + 2404, 0, 2406, 0, 0, 2405, 0, 2406, 2404, 2407, + 2407, 2407, 2407, 2404, 2405, 0, 0, 0, 0, 0, + 2407, 0, 2406, 0, 0, 2407, 0, 0, 2404, 0, + 2405, 2406, 2408, 2408, 2408, 2408, 2404, 2404, 2405, 0, + 2407, 0, 0, 2411, 2411, 2411, 2411, 2406, 2408, 2407, + + 0, 0, 0, 2404, 0, 2406, 0, 0, 0, 2411, + 2404, 2404, 0, 2408, 0, 2407, 2412, 2412, 2412, 2412, + 2411, 0, 2408, 2407, 2411, 0, 0, 0, 2413, 2413, + 2413, 2413, 2412, 2411, 0, 0, 0, 0, 2408, 2413, + 0, 0, 0, 0, 2413, 2411, 2408, 2412, 0, 2411, + 2414, 2414, 2414, 2414, 0, 0, 2412, 2411, 0, 2413, + 0, 2414, 2415, 2415, 2415, 2415, 2414, 0, 2413, 0, + 0, 0, 2412, 2415, 0, 0, 0, 0, 2415, 0, + 2412, 2414, 0, 0, 2413, 2416, 2416, 2416, 2416, 0, + 2414, 0, 2413, 2415, 0, 0, 0, 0, 0, 0, + + 0, 2416, 2415, 0, 0, 0, 2414, 0, 2418, 2418, + 2418, 2418, 0, 0, 2414, 0, 2416, 0, 2415, 2418, + 0, 0, 0, 0, 2418, 2416, 2415, 2419, 2419, 2419, + 2419, 2420, 2420, 2420, 2420, 0, 0, 0, 2419, 2418, + 0, 2416, 2420, 2419, 0, 0, 0, 2420, 2418, 2416, + 2417, 2417, 2417, 2417, 2427, 2427, 2427, 2427, 2419, 0, + 0, 2417, 2420, 0, 2418, 0, 2417, 2419, 0, 0, + 2427, 2420, 2418, 0, 0, 0, 2423, 2423, 2423, 2423, + 0, 2417, 0, 2419, 0, 2427, 0, 2420, 0, 2417, + 2417, 2419, 2423, 0, 2427, 2420, 2424, 2424, 2424, 2424, + + 0, 2671, 2671, 2671, 2671, 0, 2417, 2423, 0, 2423, + 2427, 0, 2424, 2417, 2417, 0, 2423, 2671, 2427, 2425, + 2425, 2425, 2425, 0, 0, 0, 0, 2424, 2671, 0, + 2671, 0, 2423, 2424, 2423, 2425, 2424, 0, 0, 0, + 2423, 0, 2426, 2426, 2426, 2426, 0, 0, 0, 0, + 2425, 0, 2424, 2671, 0, 2671, 2425, 2424, 2426, 2425, + 2424, 2428, 2428, 2428, 2428, 2429, 2429, 2429, 2429, 2426, + 0, 0, 2428, 2426, 0, 2425, 2429, 2428, 0, 0, + 2425, 2429, 2426, 2425, 2432, 2432, 2432, 2432, 2433, 2433, + 2433, 2433, 2428, 0, 2426, 2432, 2429, 0, 2426, 2433, + + 2432, 2428, 0, 0, 2433, 2429, 2426, 2434, 2434, 2434, + 2434, 2439, 2439, 2439, 2439, 2432, 0, 2428, 2434, 2433, + 0, 2429, 0, 2434, 2432, 2428, 0, 2439, 2433, 2429, + 2440, 2440, 2440, 2440, 2441, 2441, 2441, 2441, 2434, 0, + 2432, 0, 2439, 0, 2433, 0, 2440, 2434, 2432, 0, + 2441, 2439, 2433, 2442, 2442, 2442, 2442, 2443, 2443, 2443, + 2443, 2440, 0, 2434, 0, 2441, 0, 2439, 0, 2442, + 2440, 2434, 0, 2443, 2441, 2439, 0, 0, 0, 0, + 0, 0, 2442, 0, 2442, 0, 2440, 0, 2443, 0, + 2441, 0, 0, 2442, 2440, 0, 2443, 2443, 2441, 2444, + + 2444, 2444, 2444, 2445, 2445, 2445, 2445, 2442, 0, 2442, + 0, 0, 0, 2443, 0, 2444, 0, 2442, 0, 2445, + 2443, 2443, 2452, 2452, 2452, 2452, 2461, 2461, 2461, 2461, + 2444, 0, 0, 2452, 2445, 0, 0, 2444, 2452, 2444, + 0, 0, 2461, 2445, 2445, 0, 0, 0, 0, 2452, + 0, 2452, 0, 0, 0, 2444, 0, 2461, 0, 2445, + 0, 2444, 0, 2444, 0, 0, 2461, 2445, 2445, 2460, + 2460, 2460, 2460, 0, 2452, 0, 2452, 2462, 2462, 2462, + 2462, 0, 2461, 0, 0, 2460, 0, 0, 0, 0, + 2461, 0, 0, 2462, 0, 0, 2460, 0, 2460, 0, + + 0, 0, 2460, 2463, 2463, 2463, 2463, 0, 2462, 2466, + 2466, 2466, 2466, 0, 0, 2462, 0, 2462, 0, 2463, + 0, 2460, 0, 2460, 0, 2466, 0, 2460, 0, 0, + 0, 0, 0, 2462, 2463, 0, 0, 0, 0, 2462, + 2466, 2462, 0, 2463, 2463, 2467, 2467, 2467, 2467, 2466, + 2468, 2468, 2468, 2468, 0, 0, 0, 0, 0, 2463, + 0, 2467, 0, 0, 0, 2466, 2468, 2463, 2463, 0, + 0, 0, 0, 2466, 0, 0, 2467, 0, 0, 0, + 0, 2468, 0, 2467, 0, 2467, 2470, 2470, 2470, 2470, + 2468, 2468, 2469, 2469, 2469, 2469, 2471, 2471, 2471, 2471, + + 0, 2467, 2470, 0, 0, 0, 2468, 2467, 2469, 2467, + 0, 0, 2471, 0, 2468, 2468, 0, 2470, 0, 0, + 0, 2469, 0, 2469, 0, 0, 2470, 2471, 0, 2470, + 0, 0, 2469, 0, 2471, 0, 2471, 0, 2472, 2472, + 2472, 2472, 2470, 0, 0, 0, 2469, 0, 2469, 0, + 2470, 0, 2471, 2470, 2472, 0, 2469, 0, 2471, 0, + 2471, 2475, 2475, 2475, 2475, 0, 0, 0, 0, 2472, + 0, 0, 0, 2480, 2480, 2480, 2480, 2475, 2472, 2472, + 0, 0, 0, 2481, 2481, 2481, 2481, 0, 0, 2480, + 0, 0, 2475, 0, 2472, 0, 0, 0, 0, 2481, + + 0, 2475, 2472, 2472, 2480, 2482, 2482, 2482, 2482, 0, + 0, 2480, 0, 2480, 2481, 0, 0, 2475, 0, 0, + 0, 2482, 0, 2481, 2481, 2475, 0, 0, 0, 2480, + 0, 0, 0, 0, 2482, 2480, 2482, 2480, 0, 2481, + 2483, 2483, 2483, 2483, 0, 2482, 0, 2481, 2481, 0, + 0, 0, 0, 0, 0, 0, 2483, 0, 0, 2482, + 0, 2482, 2486, 2486, 2486, 2486, 0, 0, 0, 2482, + 0, 2483, 0, 2486, 2487, 2487, 2487, 2487, 2486, 0, + 2483, 0, 0, 2483, 0, 2487, 0, 0, 0, 0, + 2487, 0, 0, 2486, 0, 0, 2483, 0, 0, 0, + + 0, 0, 2486, 0, 2483, 2487, 0, 2483, 2485, 2485, + 2485, 2485, 0, 0, 2487, 0, 0, 0, 2486, 2485, + 2488, 2488, 2488, 2488, 2485, 0, 2486, 0, 0, 0, + 2487, 2488, 0, 0, 0, 0, 2488, 0, 2487, 2485, + 0, 0, 2490, 2490, 2490, 2490, 0, 2485, 2485, 0, + 0, 2488, 0, 2490, 2491, 2491, 2491, 2491, 2490, 0, + 2488, 0, 0, 0, 2485, 2491, 0, 0, 0, 0, + 2491, 2485, 2485, 2490, 0, 0, 2488, 2492, 2492, 2492, + 2492, 0, 2490, 0, 2488, 2491, 0, 0, 2492, 0, + 0, 0, 0, 0, 2491, 0, 0, 0, 2490, 2493, + + 2493, 2493, 2493, 0, 0, 0, 2490, 0, 2492, 0, + 2491, 0, 0, 0, 0, 2493, 0, 2492, 2491, 2494, + 2494, 2494, 2494, 0, 0, 0, 2493, 0, 0, 0, + 2493, 0, 0, 2492, 0, 2494, 0, 0, 0, 2493, + 0, 2492, 0, 0, 2494, 2495, 2495, 2495, 2495, 0, + 2494, 2493, 0, 0, 0, 2493, 0, 0, 0, 2494, + 0, 2495, 0, 2493, 2502, 2502, 2502, 2502, 0, 2494, + 0, 0, 0, 0, 0, 2494, 2495, 0, 0, 0, + 2502, 0, 2495, 2494, 0, 2495, 0, 2499, 2499, 2499, + 2499, 2500, 2500, 2500, 2500, 2502, 0, 0, 2499, 0, + + 0, 2495, 2500, 2499, 2502, 0, 2495, 2500, 0, 2495, + 2496, 2496, 2496, 2496, 2501, 2501, 2501, 2501, 2499, 0, + 2502, 2496, 2500, 0, 0, 2501, 2496, 2499, 2502, 0, + 2501, 2500, 2505, 2505, 2505, 2505, 0, 0, 0, 0, + 0, 2496, 0, 2499, 0, 2501, 0, 2500, 2505, 2496, + 2496, 2499, 0, 0, 2501, 2500, 0, 0, 0, 0, + 0, 0, 0, 2505, 0, 0, 2496, 0, 0, 2505, + 2501, 0, 2505, 2496, 2496, 0, 0, 0, 2501, 2507, + 2507, 2507, 2507, 0, 0, 0, 0, 0, 2505, 0, + 2507, 0, 0, 2505, 0, 2507, 2505, 2506, 2506, 2506, + + 2506, 2508, 2508, 2508, 2508, 0, 0, 0, 2506, 0, + 2507, 0, 2508, 2506, 0, 0, 0, 2508, 0, 2507, + 0, 0, 0, 2509, 2509, 2509, 2509, 0, 2506, 0, + 0, 0, 2508, 0, 2509, 2507, 2506, 2506, 0, 2509, + 0, 2508, 0, 2507, 0, 0, 2511, 2511, 2511, 2511, + 0, 0, 0, 2506, 2509, 0, 0, 2508, 0, 0, + 2506, 2506, 2511, 2509, 0, 2508, 2512, 2512, 2512, 2512, + 0, 0, 0, 2511, 0, 0, 0, 2511, 0, 2509, + 0, 0, 2512, 0, 0, 0, 2511, 2509, 0, 0, + 0, 2512, 2513, 2513, 2513, 2513, 0, 2512, 2511, 0, + + 0, 0, 2511, 0, 0, 0, 2512, 0, 2513, 0, + 2511, 0, 0, 0, 0, 0, 2512, 0, 0, 0, + 0, 0, 2512, 2513, 0, 0, 0, 0, 0, 2513, + 2512, 0, 2513, 0, 0, 0, 2517, 2517, 2517, 2517, + 0, 0, 0, 0, 0, 0, 0, 0, 2513, 0, + 0, 0, 2517, 2513, 0, 0, 2513, 2514, 2514, 2514, + 2514, 0, 2518, 2518, 2518, 2518, 0, 2517, 2514, 0, + 0, 0, 0, 2514, 2517, 0, 2517, 0, 2518, 2519, + 2519, 2519, 2519, 0, 0, 0, 0, 0, 2514, 0, + 0, 0, 2517, 2518, 0, 2519, 2514, 2514, 2517, 0, + + 2517, 0, 2518, 2518, 0, 0, 0, 0, 2519, 0, + 2519, 0, 0, 2514, 2520, 2520, 2520, 2520, 2518, 2519, + 2514, 2514, 0, 0, 0, 0, 2518, 2518, 0, 0, + 2520, 0, 0, 2519, 0, 2519, 2527, 2527, 2527, 2527, + 0, 0, 0, 2519, 0, 2520, 0, 2527, 2528, 2528, + 2528, 2528, 2527, 0, 2520, 0, 0, 2520, 0, 2528, + 0, 0, 0, 0, 2528, 0, 0, 2527, 0, 0, + 2520, 2531, 2531, 2531, 2531, 0, 2527, 0, 2520, 2528, + 0, 2520, 2531, 2532, 2532, 2532, 2532, 2531, 2528, 0, + 0, 0, 2527, 0, 2532, 0, 0, 0, 0, 2532, + + 2527, 0, 2531, 0, 2528, 2533, 2533, 2533, 2533, 0, + 0, 2531, 2528, 0, 2532, 0, 2533, 2537, 2537, 2537, + 2537, 0, 0, 2532, 0, 0, 0, 2531, 2537, 0, + 0, 0, 0, 2537, 0, 2531, 2533, 0, 0, 2532, + 2538, 2538, 2538, 2538, 0, 2533, 0, 2532, 2537, 0, + 0, 2538, 2539, 2539, 2539, 2539, 2538, 2537, 0, 0, + 0, 2533, 0, 2539, 0, 0, 0, 0, 0, 2533, + 0, 2538, 0, 2537, 2542, 2542, 2542, 2542, 0, 0, + 2538, 2537, 0, 2539, 2543, 2543, 2543, 2543, 0, 0, + 2542, 0, 2539, 0, 0, 0, 2538, 0, 0, 0, + + 2543, 2542, 0, 2542, 2538, 0, 0, 0, 2539, 0, + 0, 0, 0, 2542, 0, 2543, 2539, 0, 2544, 2544, + 2544, 2544, 0, 0, 2543, 0, 2542, 0, 2542, 2545, + 2545, 2545, 2545, 0, 2544, 0, 0, 2542, 0, 0, + 2543, 2546, 2546, 2546, 2546, 2545, 0, 0, 2543, 2544, + 0, 0, 0, 0, 0, 0, 0, 2546, 2544, 0, + 2545, 2547, 2547, 2547, 2547, 0, 0, 0, 0, 2545, + 0, 0, 2546, 0, 2544, 0, 0, 2547, 0, 0, + 0, 2546, 2544, 0, 0, 2545, 0, 0, 0, 0, + 2547, 0, 2547, 2545, 0, 0, 0, 2546, 0, 0, + + 0, 2547, 0, 0, 0, 2546, 2548, 2548, 2548, 2548, + 2549, 2549, 2549, 2549, 0, 2547, 0, 2547, 0, 0, + 0, 0, 2548, 0, 0, 2547, 2549, 0, 2550, 2550, + 2550, 2550, 2553, 2553, 2553, 2553, 0, 2548, 0, 2549, + 0, 2549, 0, 0, 2550, 2548, 2548, 0, 2553, 0, + 2549, 2554, 2554, 2554, 2554, 0, 0, 0, 0, 2550, + 0, 0, 2548, 2553, 2549, 0, 2549, 2554, 2550, 2548, + 2548, 2550, 2553, 0, 2549, 0, 0, 2555, 2555, 2555, + 2555, 0, 2554, 0, 2550, 0, 0, 0, 2553, 0, + 0, 2554, 2550, 2555, 0, 2550, 2553, 2556, 2556, 2556, + + 2556, 0, 0, 2557, 2557, 2557, 2557, 2554, 2555, 2558, + 2558, 2558, 2558, 2556, 0, 2554, 0, 2555, 0, 2557, + 0, 0, 0, 0, 0, 2558, 0, 0, 2556, 0, + 0, 0, 2557, 2555, 2557, 0, 0, 2556, 0, 0, + 2558, 2555, 0, 2557, 0, 0, 0, 0, 2558, 2558, + 0, 0, 0, 2556, 0, 0, 0, 2557, 0, 2557, + 0, 2556, 0, 0, 0, 2558, 0, 2557, 2559, 2559, + 2559, 2559, 2558, 2558, 2560, 2560, 2560, 2560, 2561, 2561, + 2561, 2561, 0, 0, 2559, 0, 0, 0, 0, 0, + 2560, 0, 0, 0, 2561, 0, 0, 2559, 0, 2559, + + 2562, 2562, 2562, 2562, 0, 2560, 0, 0, 2559, 2561, + 0, 0, 0, 0, 2560, 0, 2562, 2560, 2561, 2561, + 0, 0, 2559, 0, 2559, 0, 0, 0, 0, 0, + 2560, 2562, 2559, 0, 2561, 0, 0, 0, 2560, 0, + 2562, 2560, 2561, 2561, 2563, 2563, 2563, 2563, 0, 2564, + 2564, 2564, 2564, 0, 0, 0, 2562, 0, 0, 0, + 2563, 0, 0, 0, 2562, 2564, 2567, 2567, 2567, 2567, + 0, 0, 0, 2563, 0, 2563, 0, 0, 0, 0, + 2564, 0, 2567, 0, 2563, 0, 0, 0, 0, 2564, + 0, 0, 2564, 2568, 2568, 2568, 2568, 2567, 2563, 0, + + 2563, 0, 0, 0, 0, 2564, 2567, 0, 2563, 2568, + 0, 0, 0, 2564, 0, 0, 2564, 0, 0, 0, + 0, 0, 2567, 0, 2568, 2569, 2569, 2569, 2569, 0, + 2567, 0, 0, 2568, 0, 2570, 2570, 2570, 2570, 0, + 0, 2569, 2571, 2571, 2571, 2571, 0, 0, 0, 2568, + 0, 2570, 0, 0, 0, 0, 2569, 2568, 2571, 0, + 0, 2572, 2572, 2572, 2572, 2569, 2570, 0, 0, 0, + 0, 2571, 0, 2571, 0, 2570, 0, 2572, 0, 0, + 0, 2569, 2571, 0, 0, 0, 0, 0, 0, 2569, + 0, 2570, 2572, 0, 0, 0, 2571, 0, 2571, 2570, + + 2572, 2572, 2577, 2577, 2577, 2577, 2571, 2578, 2578, 2578, + 2578, 0, 2579, 2579, 2579, 2579, 0, 2572, 2577, 0, + 0, 0, 0, 2578, 2572, 2572, 0, 0, 2579, 0, + 0, 2577, 0, 2577, 0, 0, 0, 0, 2578, 0, + 0, 0, 2577, 2579, 0, 0, 0, 2578, 0, 0, + 2578, 0, 2579, 2579, 0, 0, 2577, 0, 2577, 2580, + 2580, 2580, 2580, 2578, 0, 0, 2577, 0, 2579, 0, + 0, 2578, 0, 0, 2578, 2580, 2579, 2579, 2582, 2582, + 2582, 2582, 2583, 2583, 2583, 2583, 0, 0, 0, 2582, + 2580, 0, 0, 2583, 2582, 0, 0, 0, 2583, 2580, + + 2584, 2584, 2584, 2584, 0, 0, 0, 0, 0, 2582, + 0, 2584, 0, 2583, 0, 2580, 2584, 0, 2582, 0, + 0, 0, 2583, 2580, 0, 0, 0, 0, 0, 0, + 0, 2584, 0, 0, 2582, 0, 0, 0, 2583, 0, + 2584, 0, 2582, 0, 0, 0, 2583, 2585, 2585, 2585, + 2585, 2586, 2586, 2586, 2586, 0, 2584, 0, 2585, 0, + 0, 0, 2586, 2585, 2584, 0, 0, 2586, 2587, 2587, + 2587, 2587, 0, 2588, 2588, 2588, 2588, 0, 2585, 2587, + 0, 0, 2586, 0, 0, 0, 0, 2585, 0, 2588, + 0, 2586, 0, 0, 0, 2847, 2847, 2847, 2847, 2587, + + 0, 0, 0, 2585, 2588, 0, 2847, 2586, 2587, 0, + 2588, 2585, 0, 2588, 0, 2586, 0, 2589, 2589, 2589, + 2589, 0, 0, 0, 2587, 0, 2847, 0, 0, 2588, + 0, 0, 2587, 2589, 2588, 2847, 0, 2588, 2590, 2590, + 2590, 2590, 0, 0, 2591, 2591, 2591, 2591, 2589, 2590, + 0, 2847, 0, 0, 2590, 2591, 0, 2589, 0, 2847, + 2591, 2592, 2592, 2592, 2592, 0, 0, 0, 0, 2590, + 0, 0, 0, 2589, 0, 2591, 0, 2592, 2590, 0, + 0, 2589, 0, 0, 2591, 0, 0, 2593, 2593, 2593, + 2593, 0, 2592, 0, 2590, 0, 0, 0, 2593, 0, + + 2591, 2592, 2590, 2593, 2594, 2594, 2594, 2594, 2591, 0, + 2595, 2595, 2595, 2595, 0, 2594, 0, 2592, 2593, 0, + 2594, 2596, 2596, 2596, 2596, 2592, 2595, 2593, 0, 0, + 0, 2597, 2597, 2597, 2597, 2594, 0, 2596, 0, 0, + 0, 2595, 0, 2593, 2594, 0, 0, 2597, 0, 0, + 2595, 2593, 2596, 2598, 2598, 2598, 2598, 0, 2596, 0, + 2594, 2596, 2597, 0, 2598, 0, 2595, 0, 2594, 2598, + 0, 2597, 0, 0, 2595, 0, 0, 2596, 0, 0, + 0, 0, 2596, 0, 2598, 2596, 0, 2597, 2599, 2599, + 2599, 2599, 0, 2598, 0, 2597, 0, 0, 0, 2599, + + 2600, 2600, 2600, 2600, 2599, 2602, 2602, 2602, 2602, 2598, + 2603, 2603, 2603, 2603, 0, 0, 2600, 2598, 0, 2599, + 0, 2602, 0, 0, 0, 0, 2603, 0, 2599, 0, + 0, 2600, 0, 0, 2602, 0, 2602, 0, 0, 0, + 2600, 2603, 0, 0, 2599, 2602, 0, 0, 0, 0, + 2603, 0, 2599, 2603, 0, 0, 2600, 0, 0, 2602, + 0, 2602, 0, 0, 2600, 0, 2603, 0, 0, 2602, + 2604, 2604, 2604, 2604, 2603, 0, 0, 2603, 0, 0, + 0, 2605, 2605, 2605, 2605, 0, 2604, 2612, 2612, 2612, + 2612, 2614, 2614, 2614, 2614, 0, 0, 2605, 0, 0, + + 0, 2604, 0, 2612, 0, 0, 0, 2614, 0, 0, + 2604, 2604, 2605, 0, 2612, 0, 2612, 2613, 2613, 2613, + 2613, 2605, 2614, 0, 0, 2612, 2604, 0, 0, 0, + 2614, 2614, 0, 2613, 2604, 2604, 0, 2605, 0, 2612, + 0, 2612, 0, 0, 0, 2605, 2613, 2614, 2613, 2612, + 0, 0, 0, 0, 2614, 2614, 0, 2613, 2615, 2615, + 2615, 2615, 2616, 2616, 2616, 2616, 0, 0, 0, 0, + 0, 2613, 0, 2613, 2615, 0, 0, 0, 2616, 0, + 0, 2613, 0, 0, 0, 0, 0, 0, 0, 2615, + 0, 0, 0, 2616, 2617, 2617, 2617, 2617, 2615, 0, + + 2616, 0, 2616, 0, 0, 2618, 2618, 2618, 2618, 0, + 2617, 0, 0, 0, 2615, 0, 0, 0, 2616, 0, + 0, 2618, 2615, 0, 2616, 2617, 2616, 0, 0, 0, + 0, 0, 0, 0, 2617, 2617, 2618, 2619, 2619, 2619, + 2619, 2622, 2622, 2622, 2622, 2618, 2618, 0, 0, 0, + 2617, 0, 0, 2619, 0, 0, 0, 2622, 2617, 2617, + 0, 2618, 0, 0, 2623, 2623, 2623, 2623, 2619, 2618, + 2618, 0, 2622, 0, 2619, 0, 0, 2619, 0, 0, + 2623, 2622, 0, 2624, 2624, 2624, 2624, 0, 0, 0, + 0, 0, 0, 2619, 0, 2623, 0, 2622, 2619, 2624, + + 0, 2619, 2623, 0, 2623, 2622, 0, 0, 0, 2625, + 2625, 2625, 2625, 0, 2624, 2626, 2626, 2626, 2626, 0, + 2623, 0, 0, 2624, 2624, 2625, 2623, 0, 2623, 0, + 0, 2626, 0, 0, 0, 2627, 2627, 2627, 2627, 2624, + 2625, 2628, 2628, 2628, 2628, 0, 2626, 2624, 2624, 2625, + 2625, 2627, 2626, 0, 0, 2626, 0, 2628, 0, 0, + 0, 2629, 2629, 2629, 2629, 2625, 2627, 0, 2627, 0, + 0, 2626, 2628, 2625, 2625, 2627, 2626, 2629, 2628, 2626, + 0, 2628, 0, 0, 2630, 2630, 2630, 2630, 0, 0, + 0, 2627, 2629, 2627, 0, 0, 0, 2628, 2629, 2627, + + 2630, 2629, 2628, 0, 0, 2628, 0, 0, 0, 0, + 2631, 2631, 2631, 2631, 0, 2630, 0, 2629, 0, 0, + 0, 2630, 2629, 0, 2630, 2629, 2631, 2632, 2632, 2632, + 2632, 2635, 2635, 2635, 2635, 0, 0, 0, 0, 0, + 2630, 2631, 0, 2632, 0, 2630, 0, 2635, 2630, 0, + 2631, 2631, 0, 2636, 2636, 2636, 2636, 0, 2632, 0, + 2635, 0, 2635, 0, 2632, 0, 2631, 2632, 0, 2636, + 0, 2635, 0, 0, 2631, 2631, 0, 0, 0, 2861, + 2861, 2861, 2861, 2632, 2636, 2635, 0, 2635, 2632, 0, + 2861, 2632, 2636, 2636, 0, 2635, 2637, 2637, 2637, 2637, + + 0, 0, 2638, 2638, 2638, 2638, 0, 0, 0, 2636, + 2861, 0, 2637, 0, 0, 0, 2636, 2636, 2638, 2861, + 0, 0, 2639, 2639, 2639, 2639, 0, 2637, 2644, 2644, + 2644, 2644, 0, 2638, 0, 2861, 2637, 0, 2639, 0, + 2638, 0, 2638, 2861, 2644, 2645, 2645, 2645, 2645, 0, + 0, 0, 2637, 2639, 0, 0, 0, 0, 2638, 2644, + 2637, 2645, 2639, 2639, 2638, 0, 2638, 0, 2644, 2644, + 0, 0, 2646, 2646, 2646, 2646, 2645, 0, 2639, 0, + 0, 0, 2645, 0, 2644, 2645, 2639, 2639, 2646, 0, + 0, 0, 2644, 2644, 2647, 2647, 2647, 2647, 0, 0, + + 0, 2645, 0, 2646, 0, 2646, 2645, 0, 0, 2645, + 2647, 0, 2646, 0, 0, 0, 2648, 2648, 2648, 2648, + 0, 0, 0, 0, 0, 2647, 0, 0, 2646, 0, + 2646, 2647, 2648, 0, 2647, 0, 2646, 0, 2649, 2649, + 2649, 2649, 0, 0, 0, 0, 0, 2648, 0, 0, + 2647, 0, 0, 2648, 2649, 2647, 2648, 0, 2647, 0, + 2653, 2653, 2653, 2653, 0, 0, 0, 0, 0, 2649, + 0, 0, 2648, 0, 0, 2649, 2653, 2648, 2649, 0, + 2648, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2653, 0, 0, 2649, 0, 0, 0, 0, 2649, + + 2653, 2653, 2649, 2650, 2650, 2650, 2650, 0, 0, 0, + 0, 0, 0, 0, 2650, 0, 2653, 0, 0, 2650, + 0, 0, 0, 0, 2653, 2653, 0, 0, 0, 0, + 0, 0, 0, 0, 2650, 0, 0, 0, 0, 0, + 0, 0, 2650, 2650, 0, 2654, 2654, 2654, 2654, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2650, + 0, 2654, 2655, 2655, 2655, 2655, 2650, 2650, 2651, 2651, + 2651, 2651, 0, 0, 0, 0, 2654, 0, 2655, 2651, + 0, 0, 2654, 0, 2651, 2654, 0, 0, 2656, 2656, + 2656, 2656, 0, 2655, 0, 2655, 0, 0, 0, 2651, + + 0, 2654, 2655, 0, 2656, 0, 2654, 2651, 2651, 2654, + 0, 2657, 2657, 2657, 2657, 0, 0, 0, 2655, 2656, + 2655, 0, 0, 0, 2651, 2656, 2655, 2657, 2656, 0, + 0, 2651, 2651, 0, 2658, 2658, 2658, 2658, 0, 0, + 0, 0, 2657, 0, 2656, 0, 0, 0, 2657, 2656, + 2658, 2657, 2656, 0, 2662, 2662, 2662, 2662, 0, 0, + 0, 0, 0, 0, 0, 2658, 0, 2657, 0, 0, + 2662, 2658, 2657, 0, 2658, 2657, 2663, 2663, 2663, 2663, + 2664, 2664, 2664, 2664, 0, 2662, 0, 0, 0, 0, + 2658, 2662, 2663, 0, 2662, 2658, 0, 0, 2658, 0, + + 0, 0, 0, 2665, 2665, 2665, 2665, 2663, 0, 0, + 2662, 2664, 0, 2663, 2665, 2662, 2663, 2664, 2662, 2665, + 2664, 0, 2666, 2666, 2666, 2666, 2672, 2672, 2672, 2672, + 0, 0, 2663, 2666, 2665, 0, 2664, 2663, 2666, 0, + 2663, 2664, 2672, 2665, 2664, 2668, 2668, 2668, 2668, 2669, + 2669, 2669, 2669, 2666, 0, 0, 2668, 2672, 0, 2665, + 2669, 2668, 2666, 0, 2672, 2669, 2672, 2665, 0, 0, + 0, 2673, 2673, 2673, 2673, 0, 2668, 0, 2666, 0, + 2669, 0, 2672, 0, 0, 2668, 2666, 2673, 2672, 2669, + 2672, 2674, 2674, 2674, 2674, 0, 0, 2705, 2705, 2705, + + 2705, 2668, 2673, 0, 0, 2669, 0, 2674, 0, 2668, + 0, 2673, 2673, 2669, 0, 0, 0, 0, 0, 0, + 2674, 0, 2674, 2675, 2675, 2675, 2675, 2673, 2705, 0, + 0, 2674, 0, 0, 2705, 2673, 2673, 2705, 0, 2675, + 2676, 2676, 2676, 2676, 0, 2674, 0, 2674, 0, 0, + 0, 0, 0, 2705, 2675, 2674, 2676, 0, 2705, 0, + 0, 2705, 0, 2675, 0, 0, 2675, 0, 0, 0, + 0, 2676, 0, 2676, 0, 2677, 2677, 2677, 2677, 2675, + 2676, 0, 0, 0, 0, 0, 0, 2675, 0, 0, + 2675, 2677, 2678, 2678, 2678, 2678, 2676, 0, 2676, 0, + + 0, 0, 0, 0, 2676, 0, 2677, 0, 2678, 0, + 0, 0, 2677, 0, 0, 2677, 0, 0, 2679, 2679, + 2679, 2679, 0, 2678, 0, 0, 0, 0, 0, 2678, + 0, 2677, 2678, 0, 2679, 0, 2677, 0, 0, 2677, + 0, 2680, 2680, 2680, 2680, 0, 0, 0, 2678, 2679, + 0, 0, 0, 2678, 0, 2679, 2678, 2680, 2679, 2683, + 2683, 2683, 2683, 0, 0, 0, 2680, 0, 0, 0, + 0, 0, 2680, 0, 2679, 2683, 0, 0, 0, 2679, + 0, 2680, 2679, 0, 0, 0, 0, 0, 2683, 0, + 2683, 2680, 0, 2684, 2684, 2684, 2684, 2680, 0, 2683, + + 2686, 2686, 2686, 2686, 0, 2680, 0, 0, 0, 2684, + 0, 0, 0, 2683, 0, 2683, 2686, 0, 0, 2685, + 2685, 2685, 2685, 2683, 2684, 0, 0, 0, 0, 0, + 0, 2686, 0, 2684, 0, 2685, 2684, 2686, 0, 0, + 2686, 0, 2687, 2687, 2687, 2687, 0, 0, 0, 2684, + 2685, 0, 2685, 0, 0, 0, 2686, 2684, 2687, 2685, + 2684, 2686, 0, 0, 2686, 2688, 2688, 2688, 2688, 0, + 0, 0, 0, 2687, 0, 2685, 0, 2685, 0, 2687, + 0, 2688, 2687, 2685, 2689, 2689, 2689, 2689, 2690, 2690, + 2690, 2690, 0, 0, 0, 0, 2688, 0, 2687, 0, + + 2689, 0, 2688, 2687, 2690, 2688, 2687, 0, 0, 0, + 0, 2689, 0, 2690, 0, 2689, 0, 0, 0, 2690, + 0, 2688, 0, 0, 2689, 0, 2688, 0, 2690, 2688, + 2691, 2691, 2691, 2691, 0, 0, 2689, 0, 2690, 0, + 2689, 0, 0, 0, 2690, 0, 2691, 0, 2689, 0, + 0, 0, 2690, 2692, 2692, 2692, 2692, 0, 0, 0, + 0, 2691, 0, 2691, 2693, 2693, 2693, 2693, 0, 2692, + 2691, 2694, 2694, 2694, 2694, 0, 0, 0, 0, 0, + 2693, 0, 0, 0, 2692, 0, 2691, 2694, 2691, 0, + 2692, 0, 0, 2692, 2691, 2693, 0, 0, 0, 0, + + 0, 2693, 2694, 0, 2693, 0, 0, 0, 2694, 2692, + 0, 2694, 0, 0, 2692, 0, 0, 2692, 0, 0, + 2693, 2695, 2695, 2695, 2695, 2693, 0, 2694, 2693, 0, + 0, 0, 2694, 0, 0, 2694, 0, 2695, 2698, 2698, + 2698, 2698, 2699, 2699, 2699, 2699, 2695, 0, 0, 0, + 0, 0, 2695, 0, 2698, 0, 0, 0, 2699, 0, + 0, 2695, 0, 0, 2700, 2700, 2700, 2700, 0, 2698, + 0, 2695, 0, 2699, 0, 0, 2698, 2695, 2698, 0, + 2700, 0, 2699, 2699, 0, 2695, 0, 0, 0, 0, + 0, 0, 0, 2700, 2698, 2700, 0, 0, 2699, 0, + + 2698, 0, 2698, 0, 2700, 0, 2699, 2699, 2701, 2701, + 2701, 2701, 0, 2703, 2703, 2703, 2703, 0, 2700, 0, + 2700, 0, 0, 0, 2701, 0, 0, 0, 2700, 2703, + 2704, 2704, 2704, 2704, 0, 0, 0, 0, 0, 2701, + 2709, 2709, 2709, 2709, 2703, 0, 2704, 0, 2701, 0, + 2703, 2701, 0, 2703, 0, 0, 2709, 0, 0, 0, + 0, 2704, 0, 0, 2701, 0, 0, 2704, 0, 2703, + 2704, 2709, 2701, 2709, 2703, 2701, 0, 2703, 0, 0, + 2709, 2710, 2710, 2710, 2710, 0, 2704, 0, 0, 0, + 0, 2704, 0, 0, 2704, 0, 2709, 2710, 2709, 2711, + + 2711, 2711, 2711, 0, 2709, 0, 0, 0, 0, 0, + 0, 0, 2710, 0, 0, 2711, 0, 0, 2710, 0, + 0, 2710, 2712, 2712, 2712, 2712, 0, 0, 0, 0, + 2711, 0, 0, 0, 0, 0, 2711, 2710, 2712, 2711, + 0, 0, 2710, 0, 0, 2710, 0, 0, 2713, 2713, + 2713, 2713, 0, 2712, 0, 2711, 0, 0, 0, 2712, + 2711, 0, 2712, 2711, 2713, 2714, 2714, 2714, 2714, 0, + 0, 2715, 2715, 2715, 2715, 2713, 0, 0, 2712, 2713, + 0, 2714, 2715, 2712, 0, 0, 2712, 2715, 2713, 0, + 2714, 0, 2716, 2716, 2716, 2716, 2714, 0, 0, 0, + + 2713, 0, 2715, 2716, 2713, 2714, 0, 0, 2716, 0, + 0, 2715, 2713, 0, 0, 2714, 0, 0, 0, 0, + 0, 2714, 0, 2716, 0, 0, 0, 2715, 0, 2714, + 0, 0, 2716, 0, 0, 2715, 2717, 2717, 2717, 2717, + 0, 0, 2718, 2718, 2718, 2718, 0, 0, 2716, 0, + 0, 0, 2717, 2718, 0, 0, 2716, 0, 2718, 2719, + 2719, 2719, 2719, 2720, 2720, 2720, 2720, 2717, 0, 0, + 2719, 0, 0, 2718, 0, 2719, 2717, 0, 0, 2720, + 0, 0, 2718, 0, 0, 2722, 2722, 2722, 2722, 0, + 2719, 0, 2717, 0, 2720, 0, 0, 0, 2718, 2719, + + 2717, 2722, 0, 2720, 0, 0, 2718, 0, 2723, 2723, + 2723, 2723, 0, 0, 0, 2719, 2722, 0, 2722, 2720, + 0, 0, 0, 2719, 2723, 2722, 0, 2720, 2724, 2724, + 2724, 2724, 0, 0, 0, 0, 0, 0, 0, 2723, + 0, 2722, 0, 2722, 2724, 2723, 0, 0, 2723, 2722, + 2725, 2725, 2725, 2725, 0, 0, 0, 0, 0, 2724, + 2727, 2727, 2727, 2727, 2723, 2724, 2725, 0, 2724, 2723, + 0, 0, 2723, 0, 0, 0, 2727, 2726, 2726, 2726, + 2726, 2725, 0, 0, 2724, 2727, 0, 2725, 0, 2724, + 2725, 2727, 2724, 2726, 0, 0, 0, 0, 0, 0, + + 2727, 0, 0, 0, 2726, 0, 2725, 0, 2726, 0, + 2727, 2725, 0, 0, 2725, 0, 2727, 2726, 2729, 2729, + 2729, 2729, 0, 0, 2727, 2731, 2731, 2731, 2731, 2726, + 0, 0, 0, 2726, 2729, 2730, 2730, 2730, 2730, 0, + 0, 2726, 0, 0, 0, 2735, 2735, 2735, 2735, 2729, + 0, 2730, 0, 0, 0, 2729, 2731, 0, 2729, 0, + 0, 2735, 2731, 0, 0, 2731, 2730, 0, 0, 0, + 0, 0, 2730, 0, 2729, 2730, 2735, 0, 0, 2729, + 0, 2731, 2729, 0, 0, 2735, 2731, 0, 2735, 2731, + 0, 2730, 2734, 2734, 2734, 2734, 2730, 0, 0, 2730, + + 0, 2735, 2736, 2736, 2736, 2736, 0, 0, 2734, 2735, + 0, 0, 2735, 2737, 2737, 2737, 2737, 0, 2736, 0, + 0, 2734, 0, 2734, 2738, 2738, 2738, 2738, 0, 2737, + 0, 0, 2734, 2736, 0, 0, 0, 0, 0, 0, + 2738, 0, 2736, 2736, 2737, 0, 2734, 0, 2734, 0, + 2737, 2738, 0, 2737, 0, 2738, 2734, 0, 2736, 2740, + 2740, 2740, 2740, 0, 2738, 0, 2736, 2736, 0, 2737, + 2741, 2741, 2741, 2741, 2737, 2740, 2738, 2737, 0, 0, + 2738, 0, 0, 0, 2740, 0, 2741, 0, 2738, 0, + 2740, 2745, 2745, 2745, 2745, 0, 0, 0, 0, 2740, + + 0, 2741, 2746, 2746, 2746, 2746, 0, 2745, 0, 2740, + 2741, 0, 0, 0, 0, 2740, 0, 0, 2746, 0, + 0, 0, 2745, 2740, 0, 0, 2741, 0, 0, 0, + 0, 2745, 2745, 2746, 2741, 0, 0, 0, 0, 2746, + 0, 0, 2746, 2747, 2747, 2747, 2747, 2745, 2748, 2748, + 2748, 2748, 0, 0, 0, 2745, 2745, 0, 2746, 2747, + 0, 0, 0, 2746, 2748, 0, 2746, 0, 0, 0, + 2747, 0, 0, 0, 2747, 2749, 2749, 2749, 2749, 2748, + 0, 0, 0, 2747, 0, 0, 0, 0, 2748, 0, + 0, 2749, 0, 0, 0, 2747, 0, 0, 0, 2747, + + 0, 0, 0, 0, 2748, 0, 2749, 2747, 0, 0, + 0, 0, 2748, 0, 0, 2749, 2750, 2750, 2750, 2750, + 2751, 2751, 2751, 2751, 0, 0, 2752, 2752, 2752, 2752, + 0, 2749, 2750, 0, 0, 0, 2751, 0, 0, 2749, + 0, 0, 2752, 2750, 0, 2751, 0, 2750, 0, 0, + 0, 2751, 0, 0, 0, 0, 2750, 2752, 0, 0, + 2751, 0, 2755, 2755, 2755, 2755, 2752, 0, 2750, 0, + 2751, 0, 2750, 0, 0, 0, 2751, 0, 2755, 0, + 2750, 0, 2752, 0, 2751, 0, 0, 0, 0, 0, + 2752, 2755, 0, 2755, 2756, 2756, 2756, 2756, 2757, 2757, + + 2757, 2757, 2755, 0, 2758, 2758, 2758, 2758, 0, 0, + 2756, 0, 0, 0, 2757, 0, 2755, 0, 2755, 0, + 2758, 0, 0, 0, 0, 2756, 2755, 0, 0, 2757, + 0, 0, 0, 0, 2756, 2758, 0, 2756, 2757, 2757, + 0, 2758, 0, 0, 2758, 0, 0, 0, 0, 0, + 2756, 0, 0, 0, 2757, 0, 0, 0, 2756, 0, + 2758, 2756, 2757, 2757, 0, 2758, 0, 0, 2758, 2763, + 2763, 2763, 2763, 2764, 2764, 2764, 2764, 0, 0, 2765, + 2765, 2765, 2765, 0, 0, 2763, 0, 0, 0, 2764, + 0, 0, 0, 0, 0, 2765, 2763, 0, 0, 0, + + 2763, 0, 0, 0, 2764, 0, 0, 0, 0, 2763, + 2765, 0, 0, 2764, 2766, 2766, 2766, 2766, 0, 2765, + 0, 2763, 0, 0, 0, 2763, 0, 0, 0, 2764, + 2766, 0, 0, 2763, 0, 2765, 0, 2764, 0, 0, + 0, 2766, 0, 2765, 0, 2766, 2768, 2768, 2768, 2768, + 0, 0, 0, 0, 2766, 0, 0, 2769, 2769, 2769, + 2769, 0, 2768, 0, 0, 0, 2766, 0, 0, 0, + 2766, 2768, 0, 2769, 0, 0, 0, 2768, 2766, 0, + 0, 0, 0, 0, 0, 0, 2768, 0, 2769, 2770, + 2770, 2770, 2770, 0, 0, 0, 2768, 2769, 0, 0, + + 0, 0, 2768, 0, 0, 2770, 2775, 2775, 2775, 2775, + 2768, 0, 0, 2769, 0, 0, 0, 0, 0, 0, + 2770, 2769, 2775, 2776, 2776, 2776, 2776, 0, 0, 2770, + 0, 0, 0, 2777, 2777, 2777, 2777, 2775, 0, 2776, + 0, 0, 0, 0, 0, 2770, 2775, 2775, 0, 2777, + 0, 0, 0, 2770, 2776, 0, 0, 0, 0, 0, + 2776, 0, 2775, 2776, 2777, 0, 2777, 0, 0, 0, + 2775, 2775, 0, 2777, 2778, 2778, 2778, 2778, 0, 2776, + 0, 0, 0, 0, 2776, 0, 0, 2776, 0, 2777, + 2778, 2777, 2779, 2779, 2779, 2779, 0, 2777, 0, 0, + + 0, 0, 0, 0, 0, 2778, 0, 0, 2779, 0, + 0, 2778, 0, 0, 2778, 2780, 2780, 2780, 2780, 0, + 0, 0, 0, 2779, 0, 0, 0, 0, 0, 2779, + 2778, 2780, 2779, 0, 0, 2778, 0, 0, 2778, 0, + 2780, 2781, 2781, 2781, 2781, 0, 2780, 0, 2779, 0, + 0, 0, 0, 2779, 0, 2780, 2779, 2781, 2783, 2783, + 2783, 2783, 0, 0, 0, 2780, 0, 0, 0, 0, + 0, 2780, 2781, 0, 2783, 0, 0, 0, 2781, 2780, + 0, 2781, 0, 0, 0, 0, 0, 0, 0, 2783, + 0, 0, 0, 0, 0, 0, 0, 2781, 2783, 0, + + 0, 0, 2781, 0, 0, 2781, 0, 0, 0, 0, + 0, 0, 0, 0, 2783, 0, 2787, 2787, 2787, 2787, + 0, 0, 2783, 2784, 2784, 2784, 2784, 2788, 2788, 2788, + 2788, 0, 2787, 0, 2784, 0, 0, 0, 0, 2784, + 0, 0, 0, 2788, 0, 0, 0, 2787, 0, 2787, + 2790, 2790, 2790, 2790, 2784, 0, 2787, 0, 2788, 0, + 0, 0, 2784, 2784, 2788, 0, 2790, 2788, 2789, 2789, + 2789, 2789, 2787, 0, 2787, 2790, 0, 0, 0, 2784, + 2787, 2790, 0, 2788, 2789, 0, 2784, 2784, 2788, 0, + 2790, 2788, 0, 0, 2791, 2791, 2791, 2791, 0, 2789, + + 2790, 0, 0, 0, 0, 2789, 2790, 0, 2789, 0, + 2791, 0, 0, 0, 2790, 0, 0, 2793, 2793, 2793, + 2793, 0, 0, 0, 2789, 2791, 0, 0, 0, 2789, + 0, 2791, 2789, 2793, 2791, 0, 2794, 2794, 2794, 2794, + 0, 0, 0, 0, 0, 0, 0, 0, 2793, 0, + 2791, 0, 2794, 0, 2793, 2791, 0, 2793, 2791, 2792, + 2792, 2792, 2792, 0, 0, 0, 0, 2794, 0, 0, + 2792, 0, 0, 2793, 0, 2792, 2794, 0, 2793, 0, + 0, 2793, 0, 0, 0, 0, 0, 0, 0, 0, + 2792, 0, 2794, 0, 0, 0, 0, 0, 2792, 2792, + + 2794, 2797, 2797, 2797, 2797, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2792, 0, 2797, 0, 0, + 0, 0, 2792, 2792, 2795, 2795, 2795, 2795, 0, 0, + 0, 0, 2797, 0, 0, 2795, 2798, 2798, 2798, 2798, + 2795, 2797, 2797, 0, 0, 0, 2799, 2799, 2799, 2799, + 0, 0, 2798, 0, 0, 2795, 0, 2797, 2800, 2800, + 2800, 2800, 2799, 2795, 2795, 2797, 2797, 2798, 2801, 2801, + 2801, 2801, 0, 2798, 2800, 0, 2798, 2799, 0, 2799, + 2795, 0, 0, 0, 2801, 0, 2799, 2795, 2795, 2800, + 0, 0, 2798, 0, 0, 2800, 0, 2798, 2800, 2801, + + 2798, 0, 2799, 0, 2799, 2801, 0, 0, 2801, 0, + 2799, 0, 0, 0, 2800, 2802, 2802, 2802, 2802, 2800, + 0, 0, 2800, 0, 2801, 0, 0, 0, 0, 2801, + 0, 2802, 2801, 2806, 2806, 2806, 2806, 0, 0, 0, + 2802, 0, 0, 0, 0, 0, 2802, 0, 0, 2806, + 0, 2808, 2808, 2808, 2808, 2802, 0, 0, 0, 0, + 0, 0, 0, 0, 2806, 2802, 0, 2808, 0, 0, + 2806, 2802, 0, 2806, 0, 0, 0, 0, 0, 2802, + 0, 0, 2808, 0, 0, 0, 0, 0, 2808, 2806, + 0, 2808, 0, 0, 2806, 0, 0, 2806, 2807, 2807, + + 2807, 2807, 2810, 2810, 2810, 2810, 0, 2808, 0, 2807, + 0, 0, 2808, 0, 2807, 2808, 0, 0, 2810, 0, + 0, 0, 0, 0, 2815, 2815, 2815, 2815, 0, 2807, + 0, 0, 0, 2810, 0, 0, 0, 2807, 2807, 0, + 2815, 0, 2810, 0, 2816, 2816, 2816, 2816, 0, 0, + 0, 0, 0, 0, 2807, 2815, 0, 2815, 2810, 0, + 2816, 2807, 2807, 0, 2815, 0, 2810, 2811, 2811, 2811, + 2811, 0, 0, 0, 0, 2816, 0, 0, 2811, 0, + 2815, 2816, 2815, 2811, 2816, 0, 0, 0, 2815, 0, + 0, 0, 0, 0, 2818, 2818, 2818, 2818, 2811, 0, + + 2816, 2817, 2817, 2817, 2817, 2816, 2811, 2811, 2816, 0, + 2818, 2819, 2819, 2819, 2819, 0, 0, 2817, 0, 0, + 0, 2818, 0, 2811, 0, 2818, 0, 2819, 0, 0, + 2811, 2811, 2817, 0, 2818, 0, 0, 0, 2817, 0, + 0, 2817, 2819, 0, 0, 0, 2818, 0, 0, 0, + 2818, 2819, 0, 2822, 2822, 2822, 2822, 2817, 2818, 0, + 0, 0, 2817, 0, 2822, 2817, 0, 2819, 0, 2822, + 2823, 2823, 2823, 2823, 0, 2819, 2821, 2821, 2821, 2821, + 0, 2823, 0, 0, 2822, 0, 2823, 2821, 2824, 2824, + 2824, 2824, 2821, 2822, 0, 0, 0, 0, 0, 2824, + + 0, 2823, 0, 0, 2824, 0, 0, 2821, 0, 2822, + 2823, 2825, 2825, 2825, 2825, 2821, 2821, 2822, 0, 2824, + 0, 0, 2828, 2828, 2828, 2828, 2823, 2825, 2824, 0, + 0, 0, 2821, 0, 2823, 0, 0, 0, 2828, 2821, + 2821, 0, 2825, 0, 2824, 2829, 2829, 2829, 2829, 2828, + 0, 2825, 2824, 2828, 0, 0, 0, 2830, 2830, 2830, + 2830, 2829, 2828, 0, 0, 0, 0, 2825, 2830, 0, + 0, 0, 0, 2830, 2828, 2825, 2829, 0, 2828, 2831, + 2831, 2831, 2831, 0, 0, 2829, 2828, 0, 2830, 0, + 2831, 2832, 2832, 2832, 2832, 2831, 0, 2830, 0, 0, + + 0, 2829, 2832, 0, 0, 0, 0, 2832, 0, 2829, + 2831, 0, 0, 2830, 2833, 2833, 2833, 2833, 0, 2831, + 0, 2830, 2832, 0, 0, 0, 0, 0, 0, 0, + 2833, 2832, 0, 0, 0, 2831, 0, 2835, 2835, 2835, + 2835, 0, 0, 2831, 0, 2833, 0, 2832, 2835, 0, + 0, 0, 0, 2835, 2833, 2832, 2836, 2836, 2836, 2836, + 2837, 2837, 2837, 2837, 0, 0, 0, 2836, 2835, 0, + 2833, 2837, 2836, 0, 0, 0, 2837, 2835, 2833, 2834, + 2834, 2834, 2834, 2844, 2844, 2844, 2844, 2836, 0, 0, + 2834, 2837, 0, 2835, 0, 2834, 2836, 0, 0, 2844, + + 2837, 2835, 0, 0, 0, 2840, 2840, 2840, 2840, 0, + 2834, 0, 2836, 0, 2844, 0, 2837, 0, 2834, 2834, + 2836, 2840, 0, 2844, 2837, 2841, 2841, 2841, 2841, 0, + 0, 0, 0, 0, 0, 2834, 2840, 0, 2840, 2844, + 0, 2841, 2834, 2834, 0, 2840, 0, 2844, 2842, 2842, + 2842, 2842, 0, 0, 0, 0, 2841, 0, 0, 0, + 0, 2840, 2841, 2840, 2842, 2841, 0, 0, 0, 2840, + 0, 2843, 2843, 2843, 2843, 0, 0, 0, 0, 2842, + 0, 2841, 0, 0, 0, 2842, 2841, 2843, 2842, 2841, + 2845, 2845, 2845, 2845, 2846, 2846, 2846, 2846, 2843, 0, + + 0, 2845, 2843, 0, 2842, 2846, 2845, 0, 0, 2842, + 2846, 2843, 2842, 2849, 2849, 2849, 2849, 2850, 2850, 2850, + 2850, 2845, 0, 2843, 2849, 2846, 0, 2843, 2850, 2849, + 2845, 0, 0, 2850, 2846, 2843, 2851, 2851, 2851, 2851, + 0, 0, 0, 0, 2849, 0, 2845, 2851, 2850, 0, + 2846, 0, 2851, 2849, 2845, 0, 0, 2850, 2846, 2855, + 2855, 2855, 2855, 0, 0, 0, 0, 2851, 0, 2849, + 2855, 0, 0, 2850, 0, 2855, 2851, 2849, 0, 0, + 0, 2850, 2856, 2856, 2856, 2856, 0, 0, 0, 0, + 2855, 0, 2851, 2856, 2857, 2857, 2857, 2857, 2856, 2855, + + 2851, 2854, 2854, 2854, 2854, 2857, 0, 0, 0, 0, + 2857, 0, 2854, 2856, 0, 2855, 0, 2854, 0, 0, + 0, 0, 2856, 2855, 0, 2857, 0, 0, 2859, 2859, + 2859, 2859, 2854, 0, 2857, 0, 0, 0, 2856, 2859, + 2854, 2854, 0, 0, 2859, 0, 2856, 0, 0, 0, + 2857, 2860, 2860, 2860, 2860, 0, 0, 2854, 2857, 2859, + 0, 0, 2860, 0, 2854, 2854, 0, 2860, 2859, 2862, + 2862, 2862, 2862, 2863, 2863, 2863, 2863, 0, 0, 0, + 0, 0, 2860, 0, 2859, 2862, 0, 0, 0, 2863, + 0, 2860, 2859, 0, 0, 0, 2862, 0, 2863, 0, + + 2862, 0, 0, 0, 2863, 0, 0, 2860, 0, 2862, + 0, 0, 0, 2863, 0, 2860, 2864, 2864, 2864, 2864, + 0, 2862, 0, 2863, 0, 2862, 0, 0, 0, 2863, + 0, 0, 2864, 2862, 0, 0, 0, 2863, 2868, 2868, + 2868, 2868, 0, 0, 0, 0, 0, 2864, 0, 2868, + 0, 0, 0, 2864, 2868, 0, 2864, 0, 0, 2869, + 2869, 2869, 2869, 0, 0, 0, 0, 0, 0, 2868, + 2869, 0, 2864, 0, 0, 2869, 0, 2864, 2868, 0, + 2864, 2865, 2865, 2865, 2865, 2870, 2870, 2870, 2870, 0, + 2869, 0, 2865, 0, 2868, 0, 2870, 2865, 0, 2869, + + 0, 2870, 2868, 2871, 2871, 2871, 2871, 0, 0, 0, + 0, 0, 2865, 0, 0, 2869, 2870, 0, 0, 2871, + 2865, 2865, 0, 2869, 0, 2870, 2874, 2874, 2874, 2874, + 0, 0, 0, 0, 2871, 0, 0, 2865, 0, 0, + 0, 2870, 2874, 2871, 2865, 2865, 0, 0, 0, 2870, + 0, 0, 0, 0, 0, 0, 0, 2874, 0, 2871, + 0, 0, 0, 2874, 0, 0, 2874, 2871, 2876, 2876, + 2876, 2876, 2877, 2877, 2877, 2877, 0, 0, 0, 2876, + 0, 0, 2874, 2877, 2876, 0, 0, 2874, 2877, 0, + 2874, 2875, 2875, 2875, 2875, 2878, 2878, 2878, 2878, 2876, + + 0, 0, 2875, 2877, 0, 0, 2878, 2875, 2876, 0, + 0, 2878, 2877, 2880, 2880, 2880, 2880, 2881, 2881, 2881, + 2881, 0, 2875, 0, 2876, 0, 2878, 0, 2877, 2880, + 2875, 2875, 2876, 2881, 0, 2878, 2877, 0, 0, 0, + 2880, 0, 2881, 0, 2880, 0, 0, 2875, 2881, 0, + 0, 2878, 0, 2880, 2875, 2875, 0, 2881, 0, 2878, + 2882, 2882, 2882, 2882, 0, 2880, 0, 2881, 0, 2880, + 0, 0, 0, 2881, 0, 0, 2882, 2880, 0, 0, + 0, 2881, 2885, 2885, 2885, 2885, 0, 0, 0, 0, + 0, 2882, 0, 2885, 0, 0, 0, 2882, 2885, 0, + + 2882, 0, 0, 2886, 2886, 2886, 2886, 0, 0, 0, + 0, 0, 0, 2885, 2886, 0, 2882, 0, 0, 2886, + 0, 2882, 2885, 0, 2882, 2883, 2883, 2883, 2883, 2887, + 2887, 2887, 2887, 0, 2886, 0, 2883, 0, 2885, 0, + 2887, 2883, 0, 2886, 0, 2887, 2885, 2888, 2888, 2888, + 2888, 2890, 2890, 2890, 2890, 0, 2883, 0, 2888, 2886, + 2887, 0, 2890, 2888, 2883, 2883, 0, 2886, 0, 2887, + 0, 0, 0, 0, 0, 0, 0, 0, 2888, 0, + 0, 2883, 2890, 0, 0, 2887, 0, 2888, 2883, 2883, + 0, 2890, 0, 2887, 2889, 2889, 2889, 2889, 2891, 2891, + + 2891, 2891, 0, 2888, 0, 2889, 0, 2890, 0, 0, + 2889, 2888, 0, 0, 2891, 2890, 2892, 2892, 2892, 2892, + 2893, 2893, 2893, 2893, 0, 2889, 0, 0, 0, 2891, + 0, 2893, 2892, 0, 2889, 2891, 2893, 0, 2891, 0, + 0, 0, 0, 0, 0, 0, 0, 2892, 0, 0, + 2889, 2893, 0, 0, 2891, 0, 2892, 0, 2889, 2891, + 2893, 0, 2891, 2894, 2894, 2894, 2894, 2895, 2895, 2895, + 2895, 0, 2892, 0, 2894, 0, 2893, 0, 0, 2894, + 2892, 0, 0, 2895, 2893, 2896, 2896, 2896, 2896, 2897, + 2897, 2897, 2897, 0, 2894, 0, 2896, 0, 2895, 0, + + 2897, 2896, 0, 2894, 0, 2897, 0, 2895, 2898, 2898, + 2898, 2898, 2900, 2900, 2900, 2900, 2896, 0, 0, 2894, + 2897, 0, 0, 2895, 2898, 2896, 0, 2894, 2900, 2897, + 0, 2895, 0, 0, 2899, 2899, 2899, 2899, 0, 2898, + 0, 2896, 0, 2900, 0, 2897, 0, 0, 2898, 2896, + 2899, 0, 2900, 2897, 2903, 2903, 2903, 2903, 0, 0, + 0, 0, 0, 0, 2898, 2899, 0, 0, 2900, 0, + 2903, 2899, 2898, 0, 2899, 0, 2900, 2901, 2901, 2901, + 2901, 2902, 2902, 2902, 2902, 2903, 0, 0, 2901, 0, + 2899, 0, 2902, 2901, 2903, 2899, 0, 2902, 2899, 0, + + 2906, 2906, 2906, 2906, 2907, 2907, 2907, 2907, 2901, 0, + 2903, 2906, 2902, 0, 0, 2907, 2906, 2901, 2903, 0, + 2907, 2902, 0, 2908, 2908, 2908, 2908, 2909, 2909, 2909, + 2909, 2906, 0, 2901, 0, 2907, 0, 2902, 2909, 2908, + 2906, 2901, 0, 2909, 2907, 2902, 2904, 2904, 2904, 2904, + 0, 0, 0, 0, 2908, 0, 2906, 2904, 2909, 0, + 2907, 0, 2904, 2908, 2906, 0, 0, 2909, 2907, 0, + 0, 0, 0, 0, 0, 0, 0, 2904, 0, 2908, + 0, 0, 0, 2909, 0, 2904, 2904, 2908, 0, 0, + 0, 2909, 2910, 2910, 2910, 2910, 0, 0, 0, 0, + + 0, 0, 2904, 2910, 2911, 2911, 2911, 2911, 2910, 2904, + 2904, 2905, 2905, 2905, 2905, 0, 0, 0, 0, 0, + 2911, 0, 2905, 2910, 0, 0, 0, 2905, 0, 0, + 0, 0, 2910, 0, 0, 2911, 0, 0, 0, 0, + 0, 0, 2905, 0, 2911, 0, 0, 0, 2910, 0, + 2905, 2905, 0, 0, 0, 0, 2910, 0, 0, 0, + 2911, 0, 0, 0, 0, 0, 0, 2905, 2911, 0, + 0, 0, 0, 0, 2905, 2905, 2913, 2913, 2913, 2913, + 2913, 2913, 2913, 2913, 2913, 2913, 2913, 2913, 2913, 2913, + 2913, 2913, 2913, 2913, 2913, 2913, 2913, 2913, 2914, 2914, + + 2914, 2914, 2914, 2914, 2914, 2914, 2914, 2914, 2914, 2914, + 2914, 2914, 2914, 2914, 2914, 2914, 2914, 2914, 2914, 2914, + 2915, 2915, 2915, 2915, 2915, 2915, 2915, 2915, 2915, 2915, + 2915, 2915, 2915, 2915, 2915, 2915, 2915, 2915, 2915, 2915, + 2915, 2915, 2916, 2916, 2916, 2916, 2916, 2916, 2916, 2916, + 2916, 2916, 2916, 2916, 2916, 2916, 2916, 2916, 2916, 2916, + 2916, 2916, 2916, 2916, 2917, 2917, 2917, 2917, 2917, 2917, + 2917, 2917, 2917, 2917, 2917, 2917, 2917, 2917, 2917, 2917, + 2917, 2917, 2917, 2917, 2917, 2917, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2919, 2919, + 2919, 2919, 2919, 2919, 2919, 2919, 2919, 2919, 2919, 2919, + 2919, 2919, 2919, 2919, 2919, 2919, 2919, 2919, 2919, 2919, + 2920, 2920, 2920, 2920, 2920, 0, 0, 0, 0, 0, + 0, 0, 2920, 2920, 2920, 0, 0, 2920, 2920, 2920, + 2920, 2921, 2921, 2921, 2921, 2921, 0, 0, 0, 0, + 0, 0, 0, 2921, 0, 0, 0, 0, 2921, 2921, + 2921, 2921, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, + 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, + 2922, 2922, 2922, 2922, 2923, 2923, 2923, 2923, 2924, 2924, + + 2924, 2924, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2924, 2924, 2924, 0, 2924, 2924, 2924, 2924, 2925, + 2925, 2925, 2925, 2925, 0, 0, 0, 0, 2925, 2925, + 0, 2925, 2925, 2925, 2925, 0, 2925, 2925, 2925, 2925, + 2926, 2926, 0, 2926, 2926, 2926, 2926, 2926, 2926, 2926, + 2926, 2926, 2926, 2926, 2926, 2926, 2926, 2926, 2926, 2926, + 2926, 2926, 2927, 0, 0, 2927, 0, 0, 2927, 0, + 0, 2927, 2927, 2927, 0, 0, 0, 2927, 2927, 0, + 2927, 2928, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2928, 0, 0, 2928, 2928, 2928, 2928, 2929, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2929, + 0, 0, 2929, 2929, 2929, 2929, 2930, 0, 0, 2930, + 0, 0, 2930, 0, 0, 2930, 2930, 2930, 2930, 0, + 0, 2930, 2930, 0, 0, 2930, 2931, 2931, 0, 2931, + 2931, 2931, 2931, 2931, 2931, 2931, 2931, 2931, 2931, 2931, + 2931, 2931, 2931, 2931, 2931, 2931, 2931, 2931, 2932, 0, + 0, 0, 0, 2932, 0, 2932, 2932, 2932, 0, 0, + 2932, 2932, 2933, 0, 0, 2933, 2933, 2933, 2933, 2934, + 2934, 2934, 2934, 2934, 2934, 2934, 2934, 2934, 2934, 2934, + 2934, 2934, 2934, 2934, 2934, 0, 0, 2934, 2934, 2934, + + 2934, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 0, + 0, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, + 2935, 2935, 2935, 2936, 0, 0, 0, 0, 2936, 2936, + 0, 2936, 0, 2936, 0, 0, 2936, 2936, 2936, 2936, + 2937, 2937, 0, 2937, 2937, 2937, 2937, 2937, 0, 0, + 2937, 2937, 0, 0, 2937, 2937, 2937, 2937, 2937, 2937, + 2937, 2937, 2938, 2938, 0, 2938, 2938, 2938, 2938, 2938, + 2938, 2938, 2938, 2938, 2938, 2938, 2938, 2938, 2938, 2938, + 2938, 2938, 2938, 2938, 2939, 2939, 2939, 2939, 2939, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 2939, 2939, 2939, 2939, 2940, 2940, 2940, 2940, 2940, + 0, 0, 0, 0, 2940, 2940, 0, 2940, 0, 2940, + 2940, 0, 2940, 2940, 2940, 2940, 2941, 2941, 2941, 2941, + 2941, 0, 0, 0, 0, 2941, 2941, 0, 2941, 2941, + 2941, 2941, 0, 2941, 2941, 2941, 2941, 2942, 2942, 2942, + 2942, 0, 0, 0, 2942, 2942, 0, 0, 0, 0, + 2942, 2942, 0, 0, 2942, 2942, 2942, 2942, 2943, 2943, + 0, 2943, 2943, 2943, 2943, 2943, 2943, 2943, 2943, 2943, + 2943, 2943, 2943, 2943, 2943, 2943, 2943, 2943, 2943, 2943, + 2944, 2944, 2944, 2944, 2944, 2944, 2944, 2944, 2944, 2944, + + 2944, 2944, 2944, 2944, 2944, 2944, 2944, 2944, 2944, 2944, + 2944, 2944, 2945, 0, 0, 2945, 2945, 2945, 2945, 2946, + 0, 0, 0, 0, 2946, 0, 2946, 2946, 2946, 0, + 0, 2946, 2946, 2947, 2947, 2947, 2947, 2947, 0, 0, + 0, 0, 2947, 2947, 0, 2947, 2947, 2947, 2947, 0, + 2947, 2947, 2947, 2947, 2948, 0, 0, 2948, 0, 0, + 2948, 0, 0, 2948, 2948, 2948, 0, 0, 0, 2948, + 2948, 0, 2948, 2949, 2949, 0, 2949, 2949, 2949, 2949, + 2949, 2949, 2949, 2949, 2949, 2949, 2949, 2949, 2949, 2949, + 2949, 2949, 2949, 2949, 2949, 2950, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 2950, 0, 0, 2950, 2950, + 2950, 2950, 2951, 2951, 0, 2951, 2951, 2951, 2951, 2951, + 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, + 2951, 2951, 2951, 2951, 2952, 2952, 0, 2952, 2952, 2952, + 2952, 2952, 2952, 2952, 2952, 2952, 2952, 2952, 2952, 2952, + 2952, 2952, 2952, 2952, 2952, 2952, 2953, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2953, 0, 0, + 2953, 2953, 2953, 2953, 2954, 0, 0, 2954, 0, 0, + 2954, 0, 0, 2954, 2954, 2954, 2954, 0, 0, 2954, + 2954, 0, 0, 2954, 2955, 2955, 0, 2955, 2955, 2955, + + 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, + 2955, 2955, 2955, 2955, 2955, 2955, 2956, 0, 0, 0, + 0, 2956, 0, 2956, 2956, 2956, 0, 0, 2956, 2956, + 2957, 0, 0, 2957, 2957, 2957, 2957, 2958, 2958, 2958, + 2958, 2958, 2958, 2958, 2958, 2958, 2958, 2958, 2958, 2958, + 2958, 2958, 2958, 0, 0, 2958, 2958, 2958, 2958, 2959, + 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, + 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, + 2959, 2960, 2960, 2960, 2960, 2960, 2960, 2960, 2960, 0, + 0, 2960, 2960, 2960, 2960, 2960, 2960, 2960, 2960, 2960, + + 2960, 2960, 2960, 2961, 2961, 2961, 2961, 2961, 2961, 2961, + 2961, 2961, 2961, 2961, 2961, 2961, 2961, 2961, 2961, 2961, + 2961, 2961, 2961, 2961, 2961, 2962, 0, 0, 0, 0, + 2962, 2962, 0, 2962, 0, 2962, 0, 0, 2962, 2962, + 2962, 2962, 2963, 2963, 0, 2963, 2963, 2963, 2963, 2963, + 0, 0, 2963, 2963, 0, 0, 2963, 2963, 2963, 2963, + 2963, 2963, 2963, 2963, 2964, 2964, 0, 2964, 2964, 2964, + 2964, 2964, 2964, 2964, 2964, 2964, 2964, 2964, 2964, 2964, + 2964, 2964, 2964, 2964, 2964, 2964, 2965, 2965, 0, 2965, + 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, + + 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2966, 2966, + 2966, 2966, 2966, 0, 0, 0, 0, 2966, 2966, 0, + 2966, 0, 2966, 2966, 0, 2966, 2966, 2966, 2966, 2967, + 2967, 2967, 2967, 0, 0, 0, 2967, 2967, 0, 0, + 0, 0, 2967, 2967, 0, 0, 2967, 2967, 2967, 2967, + 2968, 2968, 2968, 2968, 0, 0, 0, 2968, 2968, 0, + 0, 0, 0, 2968, 2968, 0, 0, 2968, 2968, 2968, + 2968, 2969, 2969, 2969, 2969, 2969, 2969, 2969, 2969, 2969, + 2969, 2969, 2969, 2969, 2969, 2969, 2969, 2969, 2969, 2969, + 2969, 2969, 2969, 2970, 2970, 2970, 2970, 2970, 2970, 2970, + + 2970, 2970, 2970, 2970, 2970, 2970, 2970, 2970, 2970, 2970, + 2970, 2970, 2970, 2970, 2970, 2971, 0, 0, 2971, 2971, + 2971, 2971, 2972, 2972, 2972, 2972, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2972, 2972, 2972, 0, 2972, + 2972, 2972, 2972, 2973, 0, 0, 0, 0, 2973, 0, + 2973, 2973, 2973, 0, 0, 2973, 2973, 2974, 2974, 2974, + 2974, 2974, 0, 0, 0, 0, 2974, 2974, 0, 2974, + 2974, 2974, 2974, 0, 2974, 2974, 2974, 2974, 2975, 2975, + 0, 2975, 2975, 2975, 2975, 2975, 2975, 2975, 2975, 2975, + 2975, 2975, 2975, 2975, 2975, 2975, 2975, 2975, 2975, 2975, + + 2976, 2976, 0, 2976, 2976, 2976, 2976, 2976, 2976, 2976, + 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, + 2976, 2976, 2977, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2977, 0, 0, 2977, 2977, 2977, 2977, 2978, + 2978, 2978, 2978, 2978, 2978, 2978, 2978, 2978, 2978, 2978, + 2978, 2978, 2978, 2978, 2978, 2978, 2978, 2978, 2978, 2978, + 2978, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, + 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, + 2979, 2979, 2979, 2980, 2980, 2980, 2980, 2980, 2980, 2980, + 2980, 2980, 2980, 2980, 2980, 2980, 2980, 2980, 2980, 2980, + + 2980, 2980, 2980, 2980, 2980, 2981, 2981, 2981, 2981, 2981, + 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, + 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2982, 2982, 2982, + 2982, 2982, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2982, 2982, 2982, 2982, 2982, 2983, 2983, + 2983, 2983, 2983, 2983, 2983, 2983, 2983, 2983, 2983, 2983, + 2983, 2983, 2983, 2983, 2983, 2983, 2983, 2983, 2983, 2983, + 2984, 2984, 0, 2984, 2984, 2984, 2984, 2984, 2984, 2984, + 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, + 2984, 2984, 2985, 2985, 2985, 2985, 2985, 0, 0, 0, + + 0, 2985, 2985, 0, 2985, 0, 2985, 0, 2985, 2985, + 2985, 2985, 2985, 2986, 2986, 2986, 2986, 2986, 2986, 2986, + 2986, 2986, 2986, 2986, 2986, 2986, 2986, 2986, 2986, 2986, + 2986, 2986, 2986, 2986, 2986, 2987, 2987, 2987, 2987, 2987, + 0, 0, 0, 0, 2987, 2987, 0, 2987, 2987, 2987, + 2987, 0, 2987, 2987, 2987, 2987, 2988, 2988, 2988, 2988, + 0, 0, 0, 2988, 2988, 0, 0, 0, 2988, 2988, + 2988, 0, 0, 2988, 2988, 2988, 2988, 2989, 2989, 2989, + 2989, 0, 0, 0, 2989, 2989, 0, 0, 0, 2989, + 2989, 2989, 0, 0, 2989, 2989, 2989, 2989, 2990, 2990, + + 2990, 2990, 2990, 0, 0, 0, 0, 2990, 2990, 0, + 2990, 2990, 2990, 2990, 0, 2990, 2990, 2990, 2990, 2991, + 2991, 2991, 2991, 2991, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2991, 0, 2991, 2991, 2991, 2991, + 2992, 2992, 2992, 2992, 2992, 0, 0, 0, 0, 0, + 0, 0, 0, 2992, 2992, 2992, 0, 2992, 2992, 2992, + 2992, 2993, 2993, 2993, 2993, 2993, 0, 0, 2993, 0, + 2993, 2993, 0, 2993, 0, 2993, 2993, 0, 2993, 2993, + 2993, 2993, 2994, 2994, 2994, 2994, 2994, 0, 0, 2994, + 0, 2994, 2994, 0, 2994, 2994, 2994, 2994, 0, 2994, + + 2994, 2994, 2994, 2995, 2995, 2995, 2995, 0, 0, 0, + 2995, 2995, 0, 0, 0, 2995, 2995, 2995, 0, 0, + 2995, 2995, 2995, 2995, 2996, 2996, 2996, 2996, 2996, 0, + 0, 2996, 0, 2996, 2996, 0, 2996, 2996, 2996, 2996, + 0, 2996, 2996, 2996, 2996, 2997, 2997, 2997, 2997, 2997, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2997, 0, 2997, 2997, 2997, 2997, 2998, 2998, 2998, 2998, + 2998, 0, 0, 0, 0, 0, 0, 0, 0, 2998, + 2998, 2998, 0, 2998, 2998, 2998, 2998, 2999, 2999, 2999, + 2999, 2999, 0, 0, 2999, 0, 2999, 2999, 0, 2999, + + 0, 2999, 0, 0, 2999, 2999, 2999, 2999, 3000, 3000, + 3000, 3000, 3000, 0, 0, 3000, 0, 3000, 3000, 0, + 3000, 3000, 3000, 3000, 0, 3000, 3000, 3000, 3000, 3001, + 3001, 0, 3001, 3001, 3001, 3001, 3001, 3001, 3001, 3001, + 3001, 3001, 3001, 3001, 3001, 3001, 3001, 3001, 3001, 3001, + 3001, 3002, 3002, 3002, 3002, 3002, 3002, 3002, 3002, 3002, + 3002, 3002, 3002, 3002, 3002, 3002, 3002, 3002, 3002, 3002, + 3002, 3002, 3002, 3003, 3003, 3003, 3003, 3003, 3003, 3003, + 3003, 3003, 3003, 3003, 3003, 3003, 3003, 3003, 3003, 3003, + 3003, 3003, 3003, 3003, 3003, 3004, 3004, 3004, 3004, 3004, + + 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, + 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3005, 0, 0, + 0, 0, 3005, 3005, 0, 3005, 0, 3005, 0, 0, + 3005, 3005, 3005, 3005, 3006, 3006, 3006, 3006, 3006, 0, + 0, 0, 0, 3006, 3006, 0, 3006, 3006, 3006, 3006, + 0, 3006, 3006, 3006, 3006, 3007, 3007, 3007, 3007, 3007, + 3007, 3007, 3007, 3007, 3007, 3007, 3007, 3007, 3007, 3007, + 3007, 3007, 3007, 3007, 3007, 3007, 3007, 3008, 3008, 3008, + 3008, 3008, 3008, 3008, 3008, 3008, 3008, 3008, 3008, 3008, + 3008, 3008, 3008, 3008, 3008, 3008, 3008, 3008, 3008, 3009, + + 3009, 3009, 3009, 3009, 3009, 3009, 3009, 3009, 3009, 3009, + 3009, 3009, 3009, 3009, 3009, 3009, 3009, 3009, 3009, 3009, + 3009, 3010, 3010, 3010, 3010, 3010, 0, 0, 0, 0, + 3010, 3010, 0, 3010, 3010, 3010, 3010, 0, 3010, 3010, + 3010, 3010, 3011, 3011, 3011, 3011, 3011, 0, 0, 0, + 0, 0, 0, 0, 0, 3011, 3011, 3011, 0, 3011, + 3011, 3011, 3011, 3012, 3012, 3012, 3012, 3012, 3012, 3012, + 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, + 3012, 3012, 3012, 3012, 3012, 3013, 3013, 3013, 3013, 3013, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 3013, 0, 3013, 3013, 3013, 3013, 3014, 3014, 3014, 3014, + 3014, 0, 0, 0, 0, 0, 0, 0, 0, 3014, + 3014, 3014, 0, 3014, 3014, 3014, 3014, 3015, 3015, 3015, + 3015, 3015, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3015, 3015, 3015, 3015, 3016, 0, + 0, 0, 0, 3016, 3016, 0, 3016, 0, 3016, 0, + 0, 3016, 3016, 3016, 3016, 3017, 3017, 3017, 3017, 3017, + 0, 0, 0, 0, 3017, 3017, 0, 3017, 3017, 3017, + 3017, 0, 3017, 3017, 3017, 3017, 3018, 3018, 0, 3018, + 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, + + 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3019, 3019, + 3019, 3019, 3019, 3019, 3019, 3019, 3019, 3019, 3019, 3019, + 3019, 3019, 3019, 3019, 3019, 3019, 3019, 3019, 3019, 3019, + 3020, 3020, 3020, 3020, 3020, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3020, 3020, 3020, + 3020, 3021, 3021, 3021, 3021, 3021, 0, 0, 0, 0, + 3021, 3021, 0, 3021, 0, 3021, 0, 0, 3021, 3021, + 3021, 3021, 3022, 3022, 3022, 3022, 3022, 0, 0, 0, + 0, 3022, 3022, 0, 3022, 3022, 3022, 3022, 0, 3022, + 3022, 3022, 3022, 3023, 3023, 3023, 3023, 3023, 3023, 3023, + + 3023, 3023, 3023, 3023, 3023, 3023, 3023, 3023, 3023, 3023, + 3023, 3023, 3023, 3023, 3023, 3024, 3024, 3024, 3024, 3024, + 3024, 3024, 3024, 3024, 3024, 3024, 3024, 3024, 3024, 3024, + 3024, 3024, 3024, 3024, 3024, 3024, 3024, 3025, 3025, 3025, + 3025, 3025, 0, 0, 0, 0, 3025, 3025, 0, 3025, + 0, 3025, 0, 3025, 3025, 3025, 3025, 3025, 3026, 3026, + 0, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, + 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, + 3027, 3027, 3027, 3027, 3027, 3027, 3027, 3027, 3027, 3027, + 3027, 3027, 3027, 3027, 3027, 3027, 3027, 3027, 3027, 3027, + + 3027, 3027, 3028, 3028, 3028, 3028, 3028, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3028, + 3028, 3028, 3028, 3029, 3029, 3029, 3029, 3029, 0, 0, + 0, 0, 0, 0, 0, 0, 3029, 3029, 3029, 0, + 3029, 3029, 3029, 3029, 3030, 3030, 3030, 3030, 3030, 3030, + 3030, 3030, 3030, 3030, 3030, 3030, 3030, 3030, 3030, 3030, + 3030, 3030, 3030, 3030, 3030, 3030, 3031, 0, 0, 0, + 0, 3031, 3031, 0, 3031, 0, 3031, 0, 0, 3031, + 3031, 3031, 3031, 3032, 3032, 3032, 3032, 3032, 0, 0, + 0, 0, 3032, 3032, 0, 3032, 3032, 3032, 3032, 0, + + 3032, 3032, 3032, 3032, 3033, 3033, 3033, 3033, 3033, 3033, + 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, + 3033, 3033, 3033, 3033, 3033, 3033, 3034, 3034, 3034, 3034, + 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, + 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3035, 3035, + 0, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, + 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, + 3036, 3036, 3036, 3036, 3036, 3036, 3036, 3036, 3036, 3036, + 3036, 3036, 3036, 3036, 3036, 3036, 3036, 3036, 3036, 3036, + 3036, 3036, 3037, 3037, 3037, 3037, 3037, 3037, 3037, 3037, + + 3037, 3037, 3037, 3037, 3037, 3037, 3037, 3037, 3037, 3037, + 3037, 3037, 3037, 3037, 3038, 3038, 3038, 3038, 3038, 3038, + 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, + 3038, 3038, 3038, 3038, 3038, 3038, 3039, 3039, 3039, 3039, + 3039, 3039, 3039, 3039, 3039, 3039, 3039, 3039, 3039, 3039, + 3039, 3039, 3039, 3039, 3039, 3039, 3039, 3039, 3040, 3040, + 3040, 3040, 3040, 3040, 3040, 3040, 3040, 3040, 3040, 3040, + 3040, 3040, 3040, 3040, 3040, 3040, 3040, 3040, 3040, 3040, + 3041, 3041, 3041, 3041, 3041, 3041, 3041, 3041, 3041, 3041, + 3041, 3041, 3041, 3041, 3041, 3041, 3041, 3041, 3041, 3041, + + 3041, 3041, 3042, 3042, 3042, 3042, 3042, 3042, 3042, 3042, + 3042, 3042, 3042, 3042, 3042, 3042, 3042, 3042, 3042, 3042, + 3042, 3042, 3042, 3042, 3043, 3043, 3043, 3043, 3043, 3043, + 3043, 3043, 3043, 3043, 3043, 3043, 3043, 3043, 3043, 3043, + 3043, 3043, 3043, 3043, 3043, 3043, 3044, 3044, 3044, 3044, + 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, + 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3045, 3045, + 3045, 3045, 3045, 3045, 3045, 3045, 3045, 3045, 3045, 3045, + 3045, 3045, 3045, 3045, 3045, 3045, 3045, 3045, 3045, 3045, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int vhdlcodeYY_flex_debug; +int vhdlcodeYY_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *vhdlcodeYYtext; +#line 1 "vhdlcode.l" +/****************************************************************************** + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ +/****************************************************************************** + * Parser for syntax hightlighting and references for vhdl subset + * written by M. Kreis + * supports VHDL-87 + * does not support VHDL-AMS + ******************************************************************************/ +#line 23 "vhdlcode.l" + +/* + * includes + */ +#include <stdio.h> +#include <assert.h> +#include <ctype.h> +#include <qregexp.h> +#include <qdir.h> +#include <qstringlist.h> + +#include "qtbc.h" +#include "entry.h" +#include "doxygen.h" +#include "message.h" +#include "outputlist.h" +#include "util.h" +#include "membername.h" +#include "searchindex.h" +#include "vhdldocgen.h" + +#define YY_NEVER_INTERACTIVE 1 + +// Toggle for some debugging info +//#define DBG_CTX(x) fprintf x +#define DBG_CTX(x) do { } while(0) + + +/* ----------------------------------------------------------------- + * statics + */ + +// ----------------- <vhdl> ---------------------------------- + +//static bool isPackBody=FALSE; +//static bool isStartMap; +static bool isFuncProto=FALSE; +static bool isComponent=FALSE; +static bool isPackageBody=FALSE; +static bool isProto = FALSE; + +static QCString g_PrevString; +static QCString g_CurrClass; +static QDict<QCString>g_vhdlKeyDict; +static QCString g_tempClass; +static QCString g_tempComp; +static QCString g_PortMapComp; +static MemberDef *g_vhdlMember; +static QCString g_FuncProto; + +//----------------------------------------------------------- + +static CodeOutputInterface * g_code; +static QCString g_curClassName; +static QCString g_parmType; +static QCString g_parmName; +static const char * g_inputString; //!< the code fragment as text +static int g_inputPosition; //!< read offset during parsing +static int g_inputLines; //!< number of line in the code fragment +static int g_yyLineNr; //!< current line number +static bool g_needsTermination; + +static QCString g_exampleName; +static QCString g_exampleFile; + +static QCString g_type; +static QCString g_name; +static QCString g_args; +static QCString g_classScope; + +static QCString g_CurrScope; + +static FileDef * g_sourceFileDef; +static Definition * g_currentDefinition; +static MemberDef * g_currentMemberDef; +static bool g_includeCodeFragment; +static const char * g_currentFontClass; + +static bool g_lexInit = FALSE; +static int g_braceCount=0; + + +static void writeFont(const char *s,const char* text); +static void generateMemLink(CodeOutputInterface &ol,QCString &clName,QCString& memberName); +static bool writeColoredWord(QCString& word ); +static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool typeOnly=FALSE); +static void endFontClass(); +static void startFontClass(const char *s); +//------------------------------------------------------------------- + + +static void setCurrentDoc(const QCString &name,const QCString &base,const QCString &anchor="") +{ + if (Doxygen::searchIndex) + { + Doxygen::searchIndex->setCurrentDoc(name,base,anchor); + } +} + +static bool checkString(QCString &name) +{ + if (name.isEmpty()) return FALSE; + static QRegExp regg("[\\s\"]"); + + int len=name.length(); + if (name.at(0)=='"' && name.at(len-1)=='"' && len > 2) + { + QStringList qrl=QStringList::split(regg,name,FALSE); + if (VhdlDocGen::isNumber((QCString)qrl[0])) + { + g_code->codify("\""); + startFontClass("vhdllogic"); + QCString mid=name.mid(1,len-2); //" 1223 " + g_code->codify(mid.data()); + endFontClass(); + g_code->codify("\""); + } + else + { + startFontClass("keyword"); + g_code->codify(name.data()); + endFontClass(); + } + return TRUE; + } + + if (VhdlDocGen::isNumber(name)) + { + startFontClass("vhdllogic"); + g_code->codify(name.data()); + endFontClass(); + return TRUE; + } + return FALSE; +} + +static void addToSearchIndex(const char *text) +{ + if (Doxygen::searchIndex) + { + Doxygen::searchIndex->addWord(text,FALSE); + } +} + + +/*! start a new line of code, inserting a line number if g_sourceFileDef + * is TRUE. If a definition starts at the current line, then the line + * number is linked to the documentation of that definition. + */ +static void startCodeLine() +{ + //if (g_currentFontClass) { g_code->endFontClass(); } + if (g_sourceFileDef) + { + //QCString lineNumber,lineAnchor; + //lineNumber.sprintf("%05d",g_yyLineNr); + //lineAnchor.sprintf("l%05d",g_yyLineNr); + // if ((g_yyLineNr % 500) == 0) + // fprintf(stderr,"\n starting Line %d:",g_yyLineNr); + Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr); + //printf("startCodeLine %d d=%s\n", g_yyLineNr,d ? d->name().data() : "<null>"); + if (!g_includeCodeFragment && d) + { + g_currentDefinition = d; + g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr); + if (!g_tempComp.isEmpty() && g_currentMemberDef ) + { + //ClassDef *cf=VhdlDocGen::getClass(g_tempComp.data()); + QCString nn=g_currentMemberDef->name(); + MemberDef* mdeff=VhdlDocGen::findMember(g_tempComp,nn); + if (mdeff) + { + g_currentMemberDef=mdeff; + } + } + + g_parmType.resize(0); + g_parmName.resize(0); + QCString lineAnchor; + lineAnchor.sprintf("l%05d",g_yyLineNr); + if (g_currentMemberDef) + { + g_code->writeLineNumber(g_currentMemberDef->getReference(), + g_currentMemberDef->getOutputFileBase(), + g_currentMemberDef->anchor(),g_yyLineNr); + setCurrentDoc(g_currentMemberDef->qualifiedName(), + g_sourceFileDef->getSourceFileBase(), + lineAnchor); + } + else if (d->isLinkableInProject()) + { + g_code->writeLineNumber(d->getReference(), + d->getOutputFileBase(), + 0,g_yyLineNr); + setCurrentDoc(d->qualifiedName(), + g_sourceFileDef->getSourceFileBase(), + lineAnchor); + } + } + else + { + g_code->writeLineNumber(0,0,0,g_yyLineNr); + } + } + g_code->startCodeLine(); + if (g_currentFontClass) + { + g_code->startFontClass(g_currentFontClass); + } +} + +static void endFontClass(); +static void endCodeLine() +{ + endFontClass(); + g_code->endCodeLine(); +} + +static void nextCodeLine() +{ + const char *fc = g_currentFontClass; + endCodeLine(); + if (g_yyLineNr<g_inputLines) + { + g_currentFontClass = fc; + startCodeLine(); + } +} + +/*! writes a word to the output. + * If curr_class is defined, the word belongs to a class + * and will be linked. + */ + +static void writeWord(const char *word,const char* curr_class=0,bool classLink=FALSE) +{ + bool found=FALSE; + QCString temp; + QCString tclass(curr_class); + QCString ttt(word); + if (ttt.isEmpty()) return; + for (unsigned int j=0;j<ttt.length();j++) + { + char c=ttt.at(j); + if (c==' '|| c==',' || c==';' || c==':' || c=='(' || c==')' || c=='\r' || c=='\t' || c=='.') + { + if (found) + { + if (!writeColoredWord(temp)) // is it a keyword ? + { + //if (VhdlDocGen::findKeyWord(temp)) + // writeFont("vhdlkeyword",temp.data()); + //printf("writeWord: %s\n",temp.data()); + if (!tclass.isEmpty()) + { + if (!classLink) + { + generateMemLink(*g_code,tclass,temp); + } + else + { + generateClassOrGlobalLink(*g_code,temp); + } + } + else + { + if (!checkString(temp)) + g_code->codify(temp.data()); + } + } + temp.resize(0); + found=FALSE; + } + + char cc[2]; + cc[0]=c; + cc[1]=0; + g_code->codify(cc); + } + else + { + found=TRUE; + temp+=c; + } + } // for + + if (!temp.isEmpty()) + { + if (!writeColoredWord(temp)) + { + if (!tclass.isEmpty()) + { + if (!classLink) + { + generateMemLink(*g_code,tclass,temp); // generateMemLink(*g_code,g_CurrClass,left); + } + else + { + generateClassOrGlobalLink(*g_code,temp); + } + } + else + { + QCString qc(temp.data()); + if (VhdlDocGen::isNumber(qc)){ + startFontClass("vhdllogic"); + g_code->codify(temp.data()); + endFontClass(); + } + else + g_code->codify(temp.data()); + } + } + } +}// writeWord + + +/*! write a code fragment `text' that may span multiple lines, inserting + * line numbers for each line. + */ +static void codifyLines(const char *text,const char *cl=0,bool classlink=FALSE) +{ + if (text==0) return; + //printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text); + const char *p=text,*sp=p; + char c; + bool done=FALSE; + while (!done) + { + sp=p; + while ((c=*p++) && c!='\n') {} + if (c=='\n') + { + g_yyLineNr++; + QCString line = sp; + line = line.left(p-sp-1); + //*(p-1)='\0'; + //g_code->codify(sp); + writeWord(line,cl,classlink); + nextCodeLine(); + } + else + { + //g_code->codify(sp); + writeWord(sp,cl,classlink); + done=TRUE; + } + } +} + +/*! writes a link to a fragment \a text that may span multiple lines, inserting + * line numbers for each line. If \a text contains newlines, the link will be + * split into multiple links with the same destination, one for each line. + */ +static void writeMultiLineCodeLink(CodeOutputInterface &ol, + const char *ref,const char *file, + const char *anchor,const char *text, + const char *tooltip) +{ + bool done=FALSE; + char *p=(char *)text; + while (!done) + { + char *sp=p; + char c; + while ((c=*p++) && c!='\n') {} + if (c=='\n') + { + g_yyLineNr++; + *(p-1)='\0'; + // printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp); + ol.writeCodeLink(ref,file,anchor,sp,tooltip); + nextCodeLine(); + } + else + { + ol.writeCodeLink(ref,file,anchor,sp,tooltip); + done=TRUE; + } + } +} + +static void setParameterList(MemberDef *md) +{ + g_classScope = md->getClassDef() ? md->getClassDef()->name().data() : ""; + LockingPtr<ArgumentList> al = md->argumentList(); + if (al==0) return; + Argument *a = al->first(); + while (a) + { + g_parmName = a->name.copy(); + g_parmType = a->type.copy(); + int i = g_parmType.find('*'); + if (i!=-1) g_parmType = g_parmType.left(i); + i = g_parmType.find('&'); + if (i!=-1) g_parmType = g_parmType.left(i); + g_parmType.stripPrefix("const "); + g_parmType=g_parmType.stripWhiteSpace(); + // g_theVarContext.addVariable(g_parmType,g_parmName); + a = al->next(); + } +} + + +/*! writes a link to a function or procedure + */ + +static void generateFuncLink(CodeOutputInterface &ol,MemberDef* mdef) +{ + + //printf("generateFuncLink(FuncName=%s)\n",mdef->name().data()); + QCString memberName=mdef->name(); + + if (mdef && mdef->isLinkable()) // is it a linkable class + { + writeMultiLineCodeLink(ol,mdef->getReference(), + mdef->getOutputFileBase(), + mdef->anchor(), + mdef->name(), + mdef->briefDescriptionAsTooltip()); + addToSearchIndex(memberName); + return; + } + ol.linkableSymbol(g_yyLineNr,memberName,0,g_currentMemberDef?g_currentMemberDef:g_currentDefinition); + codifyLines(memberName.data()); + addToSearchIndex(memberName); +} // generateFuncLink + + +static void generateMemLink(CodeOutputInterface &ol,QCString &clName,QCString& memberName) +{ + if (clName.isEmpty() || memberName.isEmpty()) return; + QCString className=clName; + + MemberDef *md=0; + //MemberDef *comp=0; + //bool isLocal=FALSE; + + md=VhdlDocGen::findMember(className,memberName); + ClassDef *po=VhdlDocGen::getClass(className.data()); + + if (md==0 && po && (VhdlDocGen::VhdlClasses)po->protection()==VhdlDocGen::PACKBODYCLASS) + { + QCString temp=className;//.stripPrefix("_"); + temp.stripPrefix("_"); + md=VhdlDocGen::findMember(temp,memberName); + } + + if (md && md->isLinkable()) // is it a linkable class + { + writeMultiLineCodeLink(ol,md->getReference(), + md->getOutputFileBase(), + md->anchor(), + memberName, + md->briefDescriptionAsTooltip()); + addToSearchIndex(memberName); + return; + } + // nothing found, just write out the word + ol.linkableSymbol(g_yyLineNr,memberName,0,g_currentMemberDef?g_currentMemberDef:g_currentDefinition); + codifyLines(memberName.data()); + addToSearchIndex(memberName); +}// generateMemLink + + +static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool /*typeOnly*/) +{ + QCString className=clName; + + if (className.isEmpty()) return; + + ClassDef *cd=0; + //MemberDef *md=0; + //bool isLocal=FALSE; + className.stripPrefix("_"); + cd = getClass(className.data()); + while (cd) + { + //className.stripPrefix("_"); + QCString temp(clName); + temp.stripPrefix("_"); + if (cd && cd->isLinkable()) // is it a linkable class + { + //if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS) + //{ + // temp=VhdlDocGen::getClassName(cd); + //} + ol.linkableSymbol(g_yyLineNr,temp,cd, + g_currentMemberDef ? + g_currentMemberDef : + g_currentDefinition); + writeMultiLineCodeLink(ol,cd->getReference(), + cd->getOutputFileBase(), + cd->anchor(), + temp, + cd->briefDescriptionAsTooltip()); + addToSearchIndex(className); + return; + } + Definition *d = cd->getOuterScope(); + if (d && d->definitionType()==Definition::TypeClass) + { + cd = (ClassDef*)d; + } + else + { + cd = 0; + } + } + + // nothing found, just write out the word + ol.linkableSymbol(g_yyLineNr,clName,0,g_currentMemberDef?g_currentMemberDef:g_currentDefinition); + codifyLines(clName); + addToSearchIndex(clName); +}// generateClasss or global link + + +/*! counts the number of lines in the input */ +static int countLines() +{ + const char *p=g_inputString; + char c; + int count=1; + while ((c=*p)) + { + p++ ; + if (c=='\n') count++; + } + if (p>g_inputString && *(p-1)!='\n') + { // last line does not end with a \n, so we add an extra + // line and explicitly terminate the line after parsing. + count++, + g_needsTermination=TRUE; + } + return count; +} + +static void endFontClass() +{ + if (g_currentFontClass) + { + g_code->endFontClass(); + g_currentFontClass=0; + } +} + +static void startFontClass(const char *s) +{ + if (s==0) return; + endFontClass(); + g_code->startFontClass(s); + g_currentFontClass=s; +} + +static void writeFont(const char *s,const char* text) +{ + if (s==0 || text==0) return; + //printf("writeFont(%d,\"%s\")\n",g_yyLineNr,text); + g_code->startFontClass(s); + g_code->codify(text); + g_code->endFontClass(); +} + +//---------------------------------------------------------------------------- + +static void appStringLower(QCString& qcs,const char* text) +{ + qcs.resize(0); + qcs.append(text); + //qcs=qcs.lower(); + qcs=qcs.stripWhiteSpace(); +} + +//static void appString(QCString& qcs,const char* text) +//{ +// qcs.resize(0); +// qcs.append(text); +//} + +static QCString g_temp; + +/* writes and links a port map statement */ +static void codifyMapLines(char *text) +{ + if (text==0) return; + g_temp.resize(0); + //bool dot=FALSE; + int wordCounter=0; + QCString ctemp; + //printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text); + char *p=text,*sp=p; + char c; + bool done=FALSE; + while (!done) + { + sp=p; + while ((c=*p++) && c!='\n' && c!=':' && c != ' ' && c != '(' && c!='\0' && c!='\t') + { + if (c!=0x9) + g_temp+=c; + } + if (c=='\0') return; + if (!g_temp.isEmpty()) wordCounter++; + + if (!g_temp.isEmpty()) + { + // different kinds of component instantiations + // xxx:yyy (generic/port) map( + // xxx:(entity/component/configuration) yyy (generic/port) map( + // xxx: entity yyy(zzz) (generic/port) map( + if (wordCounter==2 || wordCounter==3) + { + QCString q=g_temp.lower(); // consider (upper/lower) cases + if (q=="entity" || q=="component" || q=="configuration" || q=="port" || q=="generic") + { + generateMemLink(*g_code,g_CurrClass,g_temp); + } + else + { + g_PortMapComp=g_temp; + generateClassOrGlobalLink(*g_code,g_temp); + } + } + else + { + generateMemLink(*g_code,g_CurrClass,g_temp); + } + } + ctemp.fill(c,1); + codifyLines(ctemp.data()); + ctemp.resize(0); + g_temp.resize(0); + }//while +}//codifymaplines + +/* +* writes a function|procedure prototype and links the function|procedure name +*/ + +static void writeFuncProto() +{ + QList<Argument> ql; + QCString name,ret; + VhdlDocGen::parseFuncProto(g_FuncProto,ql,name,ret,FALSE); + + if (name.isEmpty()) + { + codifyLines(g_FuncProto.data(),g_CurrClass.data()); + return; + } + QStringList qlist=QStringList::split(name,g_FuncProto,FALSE); + QCString temp=(QCString)qlist[0]; + codifyLines(temp.data(),g_CurrClass.data()); + g_FuncProto.stripPrefix(temp.data()); + temp.resize(0); + temp=g_CurrClass; + if (isPackageBody) + { + temp.stripPrefix("_");// _{package body name} + } + MemberDef *mdef=VhdlDocGen::findFunction(ql,name,temp,FALSE); + + if (mdef) + { + generateFuncLink(*g_code,mdef); + g_FuncProto.stripPrefix(name.data()); + codifyLines(g_FuncProto.data(),g_CurrClass.data()); + } + else + { + codifyLines(g_FuncProto.data(),g_CurrClass.data()); + } +}// writeFuncProto + +/* writes a process prototype to the ouput */ + + static void writeProcessProto(){ + codifyLines(g_FuncProto.data(),g_CurrClass.data()); + g_vhdlKeyDict.clear(); +}// writeProcessProto + +/* writes a keyword */ + +static bool writeColoredWord(QCString& word ) +{ + QCString qcs=word.lower(); + QCString *ss=VhdlDocGen::findKeyWord(qcs); + if (ss) + { + writeFont(ss->data(),word.data()); + return TRUE; + } + return FALSE; +} + +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); + +static int yyread(char *buf,int max_size) +{ + int c=0; + while( c < max_size && g_inputString[g_inputPosition] ) + { + *buf = g_inputString[g_inputPosition++] ; + c++; buf++; + } + return c; +} + + + + + + + + + + + + + +#line 9062 "<stdout>" + +#define INITIAL 0 +#define Bases 1 +#define ParseType 2 +#define ParseFuncProto 3 +#define ParseComponent 4 +#define ParsePackage 5 +#define ParseProcessProto 6 +#define ClassName 7 +#define PackageName 8 +#define ClassVar 9 +#define ClassesName 10 +#define Map 11 +#define Body 12 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include <unistd.h> +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int vhdlcodeYYlex_destroy (void ); + +int vhdlcodeYYget_debug (void ); + +void vhdlcodeYYset_debug (int debug_flag ); + +YY_EXTRA_TYPE vhdlcodeYYget_extra (void ); + +void vhdlcodeYYset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *vhdlcodeYYget_in (void ); + +void vhdlcodeYYset_in (FILE * in_str ); + +FILE *vhdlcodeYYget_out (void ); + +void vhdlcodeYYset_out (FILE * out_str ); + +yy_size_t vhdlcodeYYget_leng (void ); + +char *vhdlcodeYYget_text (void ); + +int vhdlcodeYYget_lineno (void ); + +void vhdlcodeYYset_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int vhdlcodeYYwrap (void ); +#else +extern int vhdlcodeYYwrap (void ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 262144 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO fwrite( vhdlcodeYYtext, vhdlcodeYYleng, 1, vhdlcodeYYout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( vhdlcodeYYin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( vhdlcodeYYin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, vhdlcodeYYin))==0 && ferror(vhdlcodeYYin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(vhdlcodeYYin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int vhdlcodeYYlex (void); + +#define YY_DECL int vhdlcodeYYlex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after vhdlcodeYYtext and vhdlcodeYYleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( vhdlcodeYYleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (vhdlcodeYYtext[vhdlcodeYYleng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 794 "vhdlcode.l" + + +#line 9260 "<stdout>" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! vhdlcodeYYin ) + vhdlcodeYYin = stdin; + + if ( ! vhdlcodeYYout ) + vhdlcodeYYout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + vhdlcodeYYensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + vhdlcodeYY_create_buffer(vhdlcodeYYin,YY_BUF_SIZE ); + } + + vhdlcodeYY_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of vhdlcodeYYtext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 2913 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 31091 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 796 "vhdlcode.l" +{ + BEGIN(Bases); + } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 800 "vhdlcode.l" +{ + g_braceCount++; + writeFont("vhdlchar",vhdlcodeYYtext); + BEGIN(Map); + } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 806 "vhdlcode.l" +{ /* write and link a port map lines */ + QCString tt(vhdlcodeYYtext); + VhdlDocGen::deleteAllChars(tt,','); + QRegExp r("=>"); + QStringList ql=QStringList::split(r,tt,FALSE); + if (ql.count()>=2) + { + unsigned int index=0; + QCString t1=(QCString)ql[0]; + char cc=t1.at(index); + while (cc==' ' || cc=='\t') + { + char c2[2]; + c2[0]=cc; + c2[1]=0; + g_code->codify(c2); + index++; + if (index>=t1.size()) break; + cc=t1.at(index); + } + + QCString s1=(QCString)ql[0]; + s1=s1.stripWhiteSpace(); + + // if (!g_PortMapComp.isEmpty()) + generateMemLink(*g_code,g_PortMapComp,s1); + while (index++<t1.size()) + { + char cc=t1.at(index); + if (cc==' ' || cc=='\t') + { + char c2[2]; + c2[0]=cc; + c2[1]=0; + g_code->codify(c2); + } + } + codifyLines("=>"); + index=0; + QCString s2=(QCString)ql[1]; + t1=s2; + cc=t1.at(index); + while (cc==' ' || cc=='\t') + { + char c2[2]; + c2[0]=cc; + c2[1]=0; + g_code->codify(c2); + index++; + if (index>=t1.size()) break; + cc=t1.at(index); + } + s2=s2.stripWhiteSpace(); + if (!checkString(s2)) + generateMemLink(*g_code,g_CurrClass,s2); + while (index++<t1.size()) + { + if (t1.at(index)==' ') + { + g_code->codify(" "); + } + } + } + else + { + codifyLines(vhdlcodeYYtext,g_CurrClass.data()); + } + BEGIN(Map); + } + YY_BREAK +case 4: +/* rule 4 can match eol */ +YY_RULE_SETUP +#line 876 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext); + BEGIN(Map); + } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 881 "vhdlcode.l" +{ + g_braceCount--; + writeFont("vhdlchar",vhdlcodeYYtext); + if (g_braceCount==0) + { + BEGIN(Bases); + } + } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 890 "vhdlcode.l" +{ + QCString tmp(vhdlcodeYYtext); + tmp=tmp.stripWhiteSpace(); + appStringLower(g_PrevString,vhdlcodeYYtext); + g_vhdlKeyDict.insert(g_PrevString,new QCString(g_PrevString.data())); + if (!writeColoredWord(tmp)) + { + generateMemLink(*g_code,g_CurrClass,tmp); + } + BEGIN(Bases); + } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 902 "vhdlcode.l" +{ + QCString qcs(vhdlcodeYYtext); + VhdlDocGen::deleteAllChars(qcs,'"'); + VhdlDocGen::deleteAllChars(qcs,' '); + if (VhdlDocGen::isNumber(qcs)) + writeFont("vhdllogic",vhdlcodeYYtext); + else + writeFont("keyword",vhdlcodeYYtext); + } + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +#line 912 "vhdlcode.l" +{ + g_FuncProto.append(vhdlcodeYYtext); + if (isProto) + { + codifyLines(vhdlcodeYYtext); + } + BEGIN(ParseType); + } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 922 "vhdlcode.l" +{ + g_FuncProto.append(vhdlcodeYYtext); + if (isProto) + { + writeFont("keyword",vhdlcodeYYtext); + } + BEGIN(ParseType); + } + YY_BREAK +case 10: +/* rule 10 can match eol */ +YY_RULE_SETUP +#line 931 "vhdlcode.l" +{ + QRegExp regg("[\\s]"); + QCString tt(vhdlcodeYYtext); + codifyLines(vhdlcodeYYtext,g_CurrClass.data()); + tt=tt.lower(); + VhdlDocGen::deleteAllChars(tt,';'); + tt.stripWhiteSpace(); + QStringList ql=QStringList::split(regg,tt,FALSE); + int index=ql.findIndex(QCString("if"))+1; + index+=ql.findIndex(QCString("case"))+1; + index+=ql.findIndex(QCString("loop"))+1; + index+=ql.findIndex(QCString("generate"))+1; + if (index==0) + { + BEGIN(Bases); + } + else + { + BEGIN(ParseType); + } + } + YY_BREAK +case 11: +/* rule 11 can match eol */ +YY_RULE_SETUP +#line 953 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext,g_CurrClass.data()); + g_vhdlKeyDict.clear(); + } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 958 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext,g_CurrClass.data()); + isFuncProto=FALSE; + } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 963 "vhdlcode.l" +{ + g_FuncProto.append(vhdlcodeYYtext); + if (isProto) + { + codifyLines(vhdlcodeYYtext,g_CurrClass.data()); + } + } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 971 "vhdlcode.l" +{ + QCString val(vhdlcodeYYtext); + g_FuncProto.append(vhdlcodeYYtext); + appStringLower(g_PrevString,vhdlcodeYYtext); + + if (isFuncProto && g_braceCount==0) + { + g_vhdlKeyDict.insert(g_PrevString,new QCString(g_PrevString.data())); + } + + if (isProto) + { + if (!writeColoredWord(val)) + { + if (!isFuncProto && !g_vhdlKeyDict.find(g_PrevString)) + { + val=val.stripWhiteSpace(); + if (VhdlDocGen::isNumber(val)) + { + startFontClass("vhdllogic"); + codifyLines(vhdlcodeYYtext,g_CurrClass.data()); + endFontClass(); + } + else + generateMemLink(*g_code,g_CurrClass,val); + } + else + { + codifyLines(vhdlcodeYYtext,g_CurrClass.data()); + } + } + } + BEGIN(ParseType); + } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 1006 "vhdlcode.l" +{ + g_braceCount++; + g_FuncProto+='('; + if (isProto) + { + writeFont("vhdlchar",vhdlcodeYYtext); + } + BEGIN(ParseType); + } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 1016 "vhdlcode.l" +{ + g_braceCount--; + g_FuncProto+=')'; + if (isProto) + { + writeFont("vhdlchar",vhdlcodeYYtext); + } + if (g_braceCount==0 && !isProto)// && !isPackageBody) + { + isProto=TRUE; + appStringLower(g_PrevString,vhdlcodeYYtext); + writeFuncProto(); + BEGIN(Bases); + } + if (isPackageBody) + { + BEGIN(ParseType); + } + } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 1037 "vhdlcode.l" +{ + QDict<QCString> mem; + appStringLower(g_PrevString,vhdlcodeYYtext); + g_CurrClass.resize(0); + g_CurrClass.append(vhdlcodeYYtext); + g_CurrClass=g_CurrClass.stripWhiteSpace(); + + if (!writeColoredWord(g_CurrScope)) + { + generateClassOrGlobalLink(*g_code,vhdlcodeYYtext); + } + else + { + codifyLines(vhdlcodeYYtext,g_CurrClass.data()); + } + BEGIN(Bases); + } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 1056 "vhdlcode.l" +{ + g_braceCount++; + g_code->codify(vhdlcodeYYtext); + } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 1062 "vhdlcode.l" +{ + g_braceCount--; + g_code->codify(vhdlcodeYYtext); + if (g_braceCount==0 && !isComponent) + { + g_tempComp.resize(0); + BEGIN(Bases); + } + else + { + BEGIN(ParseComponent); + } + } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 1076 "vhdlcode.l" +{ + if (strlen(vhdlcodeYYtext)>=2) // found text ? + { + writeFont("keyword",vhdlcodeYYtext); + } + else + { + writeFont("vhdlchar",vhdlcodeYYtext); + } + } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 1087 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext); + } + YY_BREAK +case 22: +/* rule 22 can match eol */ +YY_RULE_SETUP +#line 1093 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext); + } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 1097 "vhdlcode.l" +{ + startFontClass("vhdllogic"); + codifyLines(vhdlcodeYYtext); + endFontClass(); + } + YY_BREAK +case 24: +/* rule 24 can match eol */ +YY_RULE_SETUP +#line 1103 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext); + g_braceCount=1; + isComponent=FALSE; + } + YY_BREAK +case 25: +/* rule 25 can match eol */ +YY_RULE_SETUP +#line 1109 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext); + g_braceCount=1; + } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 1114 "vhdlcode.l" +{ + QCString temp(vhdlcodeYYtext); + appStringLower(g_PrevString,vhdlcodeYYtext); + if (!checkString(temp)){ + if (!writeColoredWord(g_PrevString)) + { + generateMemLink(*g_code,g_tempComp,temp); + } + } + } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 1125 "vhdlcode.l" +{ + QCString temp(vhdlcodeYYtext); + if (!checkString(temp)) + codifyLines(vhdlcodeYYtext); + } + YY_BREAK +case 28: +/* rule 28 can match eol */ +YY_RULE_SETUP +#line 1132 "vhdlcode.l" +{ + g_FuncProto.append(vhdlcodeYYtext); + } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 1138 "vhdlcode.l" +{ + g_FuncProto.append(vhdlcodeYYtext); + g_braceCount++; + } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 1143 "vhdlcode.l" +{ + g_FuncProto.append(vhdlcodeYYtext); + g_braceCount--; + if (g_braceCount==0) + { + writeProcessProto(); + BEGIN(Bases); + } + } + YY_BREAK +case 31: +/* rule 31 can match eol */ +YY_RULE_SETUP +#line 1153 "vhdlcode.l" +{ //found package + QCString temp(vhdlcodeYYtext); + QStringList strl=QStringList::split(".",temp,FALSE); + + if (strl.count()>2) + { + QCString s1=(QCString)strl[0]; + QCString s2=(QCString)strl[1]; + QCString s3=(QCString)strl[2]; + s1.append("."); + s3.prepend("."); + codifyLines(s1.data(),g_CurrClass.data()); + ClassDef *cd=VhdlDocGen::getPackageName(s2); + if (cd) + { + generateClassOrGlobalLink(*g_code,s2.data()); + } + else + { + codifyLines(s2.data()); + } + codifyLines(s3.data()); + } + else + { + writeFont("keywordflow",vhdlcodeYYtext); + } + BEGIN(Bases); + } + YY_BREAK +case 32: +/* rule 32 can match eol */ +YY_RULE_SETUP +#line 1183 "vhdlcode.l" +{ // found port or generic map + QCString tt(vhdlcodeYYtext); + /* + if (tt.contains(':',FALSE)) + { + isStartMap=TRUE; + } + else + { + isStartMap=FALSE; + } + */ + int j=tt.find('.'); + + if (j>0) + { + QCString left=tt.left(j+1); + codifyLines(left.data()); + tt=tt.right(tt.length()-j-1); + left=VhdlDocGen::getIndexWord(tt.data(),0); + if (!left.isEmpty()) + { + if (left.contains('(')) + { + j=left.find('(',FALSE); + QCString name=left.left(j); + generateClassOrGlobalLink(*g_code,name.data()); + g_PortMapComp=name; + name=tt.right(tt.length()-name.length()); + codifyLines(name.data()); + } + else + { + generateClassOrGlobalLink(*g_code,left.data()); + tt=tt.right(tt.length()-left.length()-1); + tt.prepend(" "); + g_PortMapComp=left; + codifyLines(tt.data()); + } + } + } + else + { + if (tt.contains(':',FALSE)) + codifyMapLines(tt.data()); + else + codifyLines(tt.data()); + } + g_braceCount=1; + BEGIN(Map); + } + YY_BREAK +case 33: +/* rule 33 can match eol */ +YY_RULE_SETUP +#line 1235 "vhdlcode.l" +{ // found component + appStringLower(g_PrevString,vhdlcodeYYtext); + // writeFont("keywordflow",VhdlDocGen::getIndexWord(vhdlcodeYYtext,0).data()); + // writeFont("vhdlkeyword"," "); + QCString temp=VhdlDocGen::getIndexWord(vhdlcodeYYtext,1); + temp=temp.stripWhiteSpace(); + VhdlDocGen::deleteAllChars(temp,'\n'); + g_tempComp=temp; + codifyLines(vhdlcodeYYtext,temp.data(),TRUE); + g_braceCount=0; + + //if (getClass(temp.data())) + // generateClassOrGlobalLink(*g_code,temp.data()); + //else + // generateMemLink(*g_code,g_CurrClass,temp); + + isComponent=TRUE; + BEGIN(ParseComponent); + } + YY_BREAK +case 34: +/* rule 34 can match eol */ +YY_RULE_SETUP +#line 1257 "vhdlcode.l" +{ // found architecture + g_PortMapComp.resize(0); + // writeFont("vhdlkeyword",VhdlDocGen::getIndexWord(vhdlcodeYYtext,0).data()); + // writeFont("vhdlkeyword"," "); + // writeFont("vhdlchar",VhdlDocGen::getIndexWord(vhdlcodeYYtext,1).data()); + // writeFont("vhdlkeyword"," "); + // writeFont("vhdlkeyword",VhdlDocGen::getIndexWord(vhdlcodeYYtext,2).data()); + // writeFont("vhdlkeyword"," "); + //QCString temp=VhdlDocGen::getIndexWord(vhdlcodeYYtext,1); + //temp=temp.stripWhiteSpace(); + //temp+=("-"); + //temp+=VhdlDocGen::getIndexWord(vhdlcodeYYtext,3); + QCString temp = VhdlDocGen::getIndexWord(vhdlcodeYYtext,3); + temp+="::"; + temp+=VhdlDocGen::getIndexWord(vhdlcodeYYtext,1); + g_CurrClass=temp; + VhdlDocGen::deleteAllChars(temp,'\n'); + codifyLines(vhdlcodeYYtext,temp.data(),TRUE); + //generateClassOrGlobalLink(*g_code,temp.data()); + isPackageBody=FALSE; + BEGIN(ClassName); + } + YY_BREAK +case 35: +/* rule 35 can match eol */ +YY_RULE_SETUP +#line 1281 "vhdlcode.l" +{ // found package body + QCString ss(vhdlcodeYYtext); + QCString temp=VhdlDocGen::getIndexWord(vhdlcodeYYtext,2); + QStringList ql=QStringList::split(temp,ss,FALSE); + QCString ll=(QCString)ql[0]; + codifyLines(ll.data(),g_CurrClass.data()); + temp=temp.stripWhiteSpace(); + temp.prepend("_"); + generateClassOrGlobalLink(*g_code,temp.data()); + g_CurrClass.resize(0); + g_CurrClass=temp; + isProto=FALSE; + isPackageBody=TRUE; + // BEGIN(ClassesName); + } + YY_BREAK +case 36: +/* rule 36 can match eol */ +YY_RULE_SETUP +#line 1297 "vhdlcode.l" +{ // found process + isFuncProto=TRUE; + g_FuncProto.resize(0); + g_FuncProto.append(vhdlcodeYYtext); + g_vhdlKeyDict.clear(); + appStringLower(g_PrevString,vhdlcodeYYtext); + if (g_PrevString.contains('(')) + { + g_braceCount=1; + BEGIN(ParseProcessProto); + } + else + { + writeProcessProto(); + } + } + YY_BREAK +case 37: +/* rule 37 can match eol */ +YY_RULE_SETUP +#line 1314 "vhdlcode.l" +{ // end of process + isFuncProto=FALSE; + codifyLines(vhdlcodeYYtext); + BEGIN(Bases); + } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 1321 "vhdlcode.l" +{ + isFuncProto=FALSE; + writeFont("vhdlkeyword",vhdlcodeYYtext); + } + YY_BREAK +case 39: +/* rule 39 can match eol */ +YY_RULE_SETUP +#line 1326 "vhdlcode.l" +{ //found package or library + writeFont("vhdlkeyword",vhdlcodeYYtext); + BEGIN(ParsePackage); + } + YY_BREAK +case 40: +/* rule 40 can match eol */ +YY_RULE_SETUP +#line 1332 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext); + } + YY_BREAK +case 41: +/* rule 41 can match eol */ +YY_RULE_SETUP +#line 1338 "vhdlcode.l" +{ // found function|procedure + g_vhdlKeyDict.clear(); + g_FuncProto.resize(0); + isProto=FALSE; + g_FuncProto.append(vhdlcodeYYtext); + g_braceCount=1; + BEGIN(ParseType); + } + YY_BREAK +case 42: +/* rule 42 can match eol */ +YY_RULE_SETUP +#line 1349 "vhdlcode.l" +{ + appStringLower(g_PrevString,vhdlcodeYYtext); + writeFont("keywordflow",vhdlcodeYYtext); + isPackageBody=FALSE; + BEGIN(ClassesName); + } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 1357 "vhdlcode.l" +{ // found keyword + QCString qcs(vhdlcodeYYtext); + if (!writeColoredWord(qcs)) + { + startFontClass("vhdlchar"); + g_code->codify(vhdlcodeYYtext); + endFontClass(); + } + } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 1368 "vhdlcode.l" +{ + appStringLower(g_PrevString,vhdlcodeYYtext); + QCString temp(vhdlcodeYYtext); + temp=temp.stripWhiteSpace(); + + if (!writeColoredWord(temp)) + { + startFontClass("vhdlchar"); + generateMemLink(*g_code,g_CurrClass,temp); + endFontClass(); + } + } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 1381 "vhdlcode.l" +{ + startFontClass("vhdllogic"); + codifyLines(vhdlcodeYYtext); + endFontClass(); + } + YY_BREAK +case 46: +/* rule 46 can match eol */ +YY_RULE_SETUP +#line 1387 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext,g_CurrClass.data(),TRUE); + } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 1392 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext); + if (isFuncProto) + { + BEGIN(ParseFuncProto); + } + else + { + BEGIN(Bases); + } + } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 1404 "vhdlcode.l" +{ + startFontClass("vhdlchar"); + g_code->codify(vhdlcodeYYtext); + endFontClass(); + } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 1410 "vhdlcode.l" +{ + startFontClass("vhdlchar"); + g_code->codify(vhdlcodeYYtext); + endFontClass(); + } + YY_BREAK +case 50: +YY_RULE_SETUP +#line 1416 "vhdlcode.l" +{ + QCString qcs(vhdlcodeYYtext); + VhdlDocGen::deleteAllChars(qcs,'"'); + VhdlDocGen::deleteAllChars(qcs,' '); + + if (VhdlDocGen::isNumber(qcs)) + writeFont("vhdllogic",vhdlcodeYYtext); + else + writeFont("keyword",vhdlcodeYYtext); + } + YY_BREAK +case 51: +/* rule 51 can match eol */ +YY_RULE_SETUP +#line 1427 "vhdlcode.l" +{ + codifyLines(vhdlcodeYYtext); + BEGIN(Bases); + } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 1432 "vhdlcode.l" +{ + g_code->codify(vhdlcodeYYtext); + } + YY_BREAK +case 53: +/* rule 53 can match eol */ +YY_RULE_SETUP +#line 1436 "vhdlcode.l" +{ // found normal or special comment on its own line + QCString text(vhdlcodeYYtext); + int i=text.find("--"); + if (text.mid(i,3)=="--!" && // hide special comment + Config_getBool("STRIP_CODE_COMMENTS")) + { + g_yyLineNr++; // skip complete line + } + else // normal comment + { + startFontClass("comment"); + codifyLines(text); + endFontClass(); + } + } + YY_BREAK +case 54: +YY_RULE_SETUP +#line 1451 "vhdlcode.l" +{ // found normal or special comment after something + QCString text(vhdlcodeYYtext); + int i=text.find("--"); + if (text.mid(i,3)=="--!" && + Config_getBool("STRIP_CODE_COMMENTS")) + { + // hide special comment + } + else // normal comment + { + startFontClass("comment"); + codifyLines(text); + endFontClass(); + } + } + YY_BREAK +case 55: +YY_RULE_SETUP +#line 1468 "vhdlcode.l" +ECHO; + YY_BREAK +#line 10184 "<stdout>" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(Bases): +case YY_STATE_EOF(ParseType): +case YY_STATE_EOF(ParseFuncProto): +case YY_STATE_EOF(ParseComponent): +case YY_STATE_EOF(ParsePackage): +case YY_STATE_EOF(ParseProcessProto): +case YY_STATE_EOF(ClassName): +case YY_STATE_EOF(PackageName): +case YY_STATE_EOF(ClassVar): +case YY_STATE_EOF(ClassesName): +case YY_STATE_EOF(Map): +case YY_STATE_EOF(Body): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed vhdlcodeYYin at a new source and called + * vhdlcodeYYlex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = vhdlcodeYYin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( vhdlcodeYYwrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * vhdlcodeYYtext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of vhdlcodeYYlex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + vhdlcodeYYrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + vhdlcodeYYrestart(vhdlcodeYYin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) vhdlcodeYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 2913 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 2913 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 2912); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + vhdlcodeYYrestart(vhdlcodeYYin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( vhdlcodeYYwrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve vhdlcodeYYtext */ + (yy_hold_char) = *++(yy_c_buf_p); + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void vhdlcodeYYrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + vhdlcodeYYensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + vhdlcodeYY_create_buffer(vhdlcodeYYin,YY_BUF_SIZE ); + } + + vhdlcodeYY_init_buffer(YY_CURRENT_BUFFER,input_file ); + vhdlcodeYY_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void vhdlcodeYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * vhdlcodeYYpop_buffer_state(); + * vhdlcodeYYpush_buffer_state(new_buffer); + */ + vhdlcodeYYensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + vhdlcodeYY_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (vhdlcodeYYwrap()) processing, but the only time this flag + * is looked at is after vhdlcodeYYwrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void vhdlcodeYY_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + vhdlcodeYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE vhdlcodeYY_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) vhdlcodeYYalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in vhdlcodeYY_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) vhdlcodeYYalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in vhdlcodeYY_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + vhdlcodeYY_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with vhdlcodeYY_create_buffer() + * + */ + void vhdlcodeYY_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + vhdlcodeYYfree((void *) b->yy_ch_buf ); + + vhdlcodeYYfree((void *) b ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a vhdlcodeYYrestart() or at EOF. + */ + static void vhdlcodeYY_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + vhdlcodeYY_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then vhdlcodeYY_init_buffer was _probably_ + * called from vhdlcodeYYrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void vhdlcodeYY_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + vhdlcodeYY_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void vhdlcodeYYpush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + vhdlcodeYYensure_buffer_stack(); + + /* This block is copied from vhdlcodeYY_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from vhdlcodeYY_switch_to_buffer. */ + vhdlcodeYY_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void vhdlcodeYYpop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + vhdlcodeYY_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + vhdlcodeYY_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void vhdlcodeYYensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)vhdlcodeYYalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in vhdlcodeYYensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)vhdlcodeYYrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in vhdlcodeYYensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE vhdlcodeYY_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) vhdlcodeYYalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in vhdlcodeYY_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + vhdlcodeYY_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to vhdlcodeYYlex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * vhdlcodeYY_scan_bytes() instead. + */ +YY_BUFFER_STATE vhdlcodeYY_scan_string (yyconst char * yystr ) +{ + + return vhdlcodeYY_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to vhdlcodeYYlex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE vhdlcodeYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n, i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) vhdlcodeYYalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in vhdlcodeYY_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = vhdlcodeYY_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in vhdlcodeYY_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up vhdlcodeYYtext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + vhdlcodeYYtext[vhdlcodeYYleng] = (yy_hold_char); \ + (yy_c_buf_p) = vhdlcodeYYtext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + vhdlcodeYYleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int vhdlcodeYYget_lineno (void) +{ + + return vhdlcodeYYlineno; +} + +/** Get the input stream. + * + */ +FILE *vhdlcodeYYget_in (void) +{ + return vhdlcodeYYin; +} + +/** Get the output stream. + * + */ +FILE *vhdlcodeYYget_out (void) +{ + return vhdlcodeYYout; +} + +/** Get the length of the current token. + * + */ +yy_size_t vhdlcodeYYget_leng (void) +{ + return vhdlcodeYYleng; +} + +/** Get the current token. + * + */ + +char *vhdlcodeYYget_text (void) +{ + return vhdlcodeYYtext; +} + +/** Set the current line number. + * @param line_number + * + */ +void vhdlcodeYYset_lineno (int line_number ) +{ + + vhdlcodeYYlineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see vhdlcodeYY_switch_to_buffer + */ +void vhdlcodeYYset_in (FILE * in_str ) +{ + vhdlcodeYYin = in_str ; +} + +void vhdlcodeYYset_out (FILE * out_str ) +{ + vhdlcodeYYout = out_str ; +} + +int vhdlcodeYYget_debug (void) +{ + return vhdlcodeYY_flex_debug; +} + +void vhdlcodeYYset_debug (int bdebug ) +{ + vhdlcodeYY_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from vhdlcodeYYlex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + vhdlcodeYYin = stdin; + vhdlcodeYYout = stdout; +#else + vhdlcodeYYin = (FILE *) 0; + vhdlcodeYYout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * vhdlcodeYYlex_init() + */ + return 0; +} + +/* vhdlcodeYYlex_destroy is for both reentrant and non-reentrant scanners. */ +int vhdlcodeYYlex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + vhdlcodeYY_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + vhdlcodeYYpop_buffer_state(); + } + + /* Destroy the stack itself. */ + vhdlcodeYYfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * vhdlcodeYYlex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *vhdlcodeYYalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *vhdlcodeYYrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void vhdlcodeYYfree (void * ptr ) +{ + free( (char *) ptr ); /* see vhdlcodeYYrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 1468 "vhdlcode.l" + + + +/*@ ---------------------------------------------------------------------------- + */ + +void resetVhdlCodeParserState() +{ + g_vhdlKeyDict.setAutoDelete(TRUE); + g_vhdlKeyDict.clear(); +} + +void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString &s, + bool exBlock, const char *exName,FileDef *fd, + int startLine,int endLine,bool inlineFragment, + MemberDef *memberDef,bool) +{ + //printf("***parseCode() exBlock=%d exName=%s fd=%p\n",exBlock,exName,fd); + if (s.isEmpty()) return; + if (memberDef) + { + ClassDef *dd=memberDef->getClassDef(); + if (dd) g_CurrClass=dd->className(); + startLine--; + } + resetVhdlCodeParserState(); + g_code = &od; + g_inputString = s; + g_inputPosition = 0; + g_currentFontClass = 0; + g_needsTermination = FALSE; + + if (endLine!=-1) + g_inputLines = endLine+1; + else + g_inputLines = countLines(); + + if (startLine!=-1) + g_yyLineNr = startLine; + else + g_yyLineNr = 1; + + + // g_theCallContext.clear(); + g_classScope = className; + g_exampleName = exName; + g_sourceFileDef = fd; + if (exBlock && fd==0) + { + // create a dummy filedef for the example + g_sourceFileDef = new FileDef("",exName); + } + if (g_sourceFileDef) + { + setCurrentDoc(g_sourceFileDef->name(),g_sourceFileDef->getSourceFileBase()); + } + g_currentDefinition = 0; + g_currentMemberDef = 0; + g_vhdlMember=0; + if (!g_exampleName.isEmpty()) + { + g_exampleFile = convertNameToFile(g_exampleName+"-example"); + } + g_includeCodeFragment = inlineFragment; + if (!memberDef) + { + startCodeLine(); + } + // g_type.resize(0); + // g_name.resize(0); + // g_args.resize(0); + g_parmName.resize(0); + g_parmType.resize(0); + if (memberDef) + { + setParameterList(memberDef); + } + vhdlcodeYYrestart( vhdlcodeYYin ); + BEGIN( Bases ); + vhdlcodeYYlex(); + g_lexInit=TRUE; + if (g_needsTermination) + { + endCodeLine(); + } + if (exBlock && g_sourceFileDef) + { + // delete the temporary file definition used for this example + delete g_sourceFileDef; + g_sourceFileDef=0; + } + return; +} + +void codeFreeVhdlScanner() +{ +#if defined(YY_FLEX_SUBMINOR_VERSION) + if (g_lexInit) + { + vhdlcodeYYlex_destroy(); + } +#endif +} + +#if !defined(YY_FLEX_SUBMINOR_VERSION) +extern "C" { // some bogus code to keep the compiler happy + void vhdlcodeYYdummy() { yy_flex_realloc(0,0); } +} +#elif YY_FLEX_SUBMINOR_VERSION<33 +#error "You seem to be using a version of flex newer than 2.5.4 but older than 2.5.33. These versions do NOT work with doxygen! Please use version <=2.5.4 or >=2.5.33 or expect things to be parsed wrongly!" +#endif + + + + + Index: branches/xZenu/src/util/doxygen/src/instdox.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/instdox.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/instdox.cpp (revision 1322) @@ -0,0 +1,180 @@ +/****************************************************************************** + * + * $Id: instdox.cpp,v 1.16 2001/03/19 19:27:40 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include <sys/types.h> +#include <sys/stat.h> + +#include "qtbc.h" +#include <qfile.h> +#include <qfileinfo.h> + +#include "instdox.h" +#include "doxygen.h" +#include "config.h" +#include "message.h" + +void writeInstallScript() +{ + QCString fileName=Config_getString("HTML_OUTPUT")+"/installdox"; + QFile f(fileName); + if (f.open(IO_WriteOnly)) + { + FTextStream t(&f); + t << "#!" << Config_getString("PERL_PATH") << endl << endl << "%subst = ( "; + + char *s=Config_getList("TAGFILES").first(); + while (s) + { + QCString tagLine=s; + QCString fileName; + int eqPos = tagLine.find('='); + if (eqPos!=-1) // strip destination part + { + fileName = tagLine.left(eqPos).stripWhiteSpace(); + } + else + { + fileName = tagLine; + } + QFileInfo fi(fileName); + t << "\"" << fi.fileName() << "\", \"\""; + s=Config_getList("TAGFILES").next(); + if (s) t << ", "; + } + + t << ");\n"; + t << "$quiet = 0;\n"; + t << "\n"; + t << "while ( @ARGV ) {\n"; + t << " $_ = shift @ARGV;\n"; + t << " if ( s/^-// ) {\n"; + t << " if ( /^l(.*)/ ) {\n"; + t << " $v = ($1 eq \"\") ? shift @ARGV : $1;\n"; + t << " ($v =~ /\\/$/) || ($v .= \"/\");\n"; + t << " $_ = $v;\n"; + t << " if ( /(.+)\\@(.+)/ ) {\n"; + t << " if ( exists $subst{$1} ) {\n"; + t << " $subst{$1} = $2;\n"; + t << " } else {\n"; + t << " print STDERR \"Unknown tag file $1 given with option -l\\n\";\n"; + t << " &usage();\n"; + t << " }\n"; + t << " } else {\n"; + t << " print STDERR \"Argument $_ is invalid for option -l\\n\";\n"; + t << " &usage();\n"; + t << " }\n"; + t << " }\n"; + t << " elsif ( /^q/ ) {\n"; + t << " $quiet = 1;\n"; + t << " }\n"; + t << " elsif ( /^\\?|^h/ ) {\n"; + t << " &usage();\n"; + t << " }\n"; + t << " else {\n"; + t << " print STDERR \"Illegal option -$_\\n\";\n"; + t << " &usage();\n"; + t << " }\n"; + t << " }\n"; + t << " else {\n"; + t << " push (@files, $_ );\n"; + t << " }\n"; + t << "}\n"; + t << "\n"; + t << "foreach $sub (keys %subst)\n"; + t << "{\n"; + t << " if ( $subst{$sub} eq \"\" ) \n"; + t << " {\n"; + t << " print STDERR \"No substitute given for tag file `$sub'\\n\";\n"; + t << " &usage();\n"; + t << " }\n"; + t << " elsif ( ! $quiet && $sub ne \"_doc\" && $sub ne \"_cgi\" )\n"; + t << " {\n"; + t << " print \"Substituting $subst{$sub} for each occurrence of tag file $sub\\n\"; \n"; + t << " }\n"; + t << "}\n"; + t << "\n"; + t << "if ( ! @files ) {\n"; + t << " if (opendir(D,\".\")) {\n"; + t << " foreach $file ( readdir(D) ) {\n"; + t << " $match = \"" << Config_getString("HTML_FILE_EXTENSION") << "\";\n"; + t << " next if ( $file =~ /^\\.\\.?$/ );\n"; + t << " ($file =~ /$match/) && (push @files, $file);\n"; + t << " ($file =~ /\\.svg/) && (push @files, $file);\n"; + t << " ($file =~ \"navtree.js\") && (push @files, $file);\n"; + t << " }\n"; + t << " closedir(D);\n"; + t << " }\n"; + t << "}\n"; + t << "\n"; + t << "if ( ! @files ) {\n"; + t << " print STDERR \"Warning: No input files given and none found!\\n\";\n"; + t << "}\n"; + t << "\n"; + t << "foreach $f (@files)\n"; + t << "{\n"; + t << " if ( ! $quiet ) {\n"; + t << " print \"Editing: $f...\\n\";\n"; + t << " }\n"; + t << " $oldf = $f;\n"; + t << " $f .= \".bak\";\n"; + t << " unless (rename $oldf,$f) {\n"; + t << " print STDERR \"Error: cannot rename file $oldf\\n\";\n"; + t << " exit 1;\n"; + t << " }\n"; + t << " if (open(F,\"<$f\")) {\n"; + t << " unless (open(G,\">$oldf\")) {\n"; + t << " print STDERR \"Error: opening file $oldf for writing\\n\";\n"; + t << " exit 1;\n"; + t << " }\n"; + t << " if ($oldf ne \"tree.js\") {\n"; + t << " while (<F>) {\n"; + t << " s/doxygen\\=\\\"([^ \\\"\\:\\t\\>\\<]*)\\:([^ \\\"\\t\\>\\<]*)\\\" (xlink:href|href|src)=\\\"\\2/doxygen\\=\\\"$1:$subst{$1}\\\" \\3=\\\"$subst{$1}/g;\n"; + t << " print G \"$_\";\n"; + t << " }\n"; + t << " }\n"; + t << " else {\n"; + t << " while (<F>) {\n"; + t << " s/\\\"([^ \\\"\\:\\t\\>\\<]*)\\:([^ \\\"\\t\\>\\<]*)\\\", \\\"\\2/\\\"$1:$subst{$1}\\\" ,\\\"$subst{$1}/g;\n"; + t << " print G \"$_\";\n"; + t << " }\n"; + t << " }\n"; + t << " } \n"; + t << " else {\n"; + t << " print STDERR \"Warning file $f does not exist\\n\";\n"; + t << " }\n"; + t << " unlink $f;\n"; + t << "}\n"; + t << "\n"; + t << "sub usage {\n"; + t << " print STDERR \"Usage: installdox [options] [html-file [html-file ...]]\\n\";\n"; + t << " print STDERR \"Options:\\n\";\n"; + t << " print STDERR \" -l tagfile\\@linkName tag file + URL or directory \\n\";\n"; + t << " print STDERR \" -q Quiet mode\\n\\n\";\n"; + t << " exit 1;\n"; + t << "}\n"; + } + else + { + err("Error: Cannot open file %s for writing\n",fileName.data()); + } + f.close(); + struct stat stat_struct; + stat(fileName,&stat_struct); +#if !defined(_WIN32) + chmod(fileName,stat_struct.st_mode|S_IXUSR|S_IXGRP|S_IXOTH); +#endif +} Index: branches/xZenu/src/util/doxygen/src/doxygen_css.h =================================================================== --- branches/xZenu/src/util/doxygen/src/doxygen_css.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/doxygen_css.h (revision 1322) @@ -0,0 +1,835 @@ +"/* The standard CSS for doxygen */\n" +"\n" +"body, table, div, p, dl {\n" +" font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;\n" +" font-size: 12px;\n" +"}\n" +"\n" +"/* @group Heading Levels */\n" +"\n" +"h1 {\n" +" font-size: 150%;\n" +"}\n" +"\n" +".title {\n" +" font-size: 150%;\n" +" font-weight: bold;\n" +" margin: 10px 2px;\n" +"}\n" +"\n" +"h2 {\n" +" font-size: 120%;\n" +"}\n" +"\n" +"h3 {\n" +" font-size: 100%;\n" +"}\n" +"\n" +"dt {\n" +" font-weight: bold;\n" +"}\n" +"\n" +"div.multicol {\n" +" -moz-column-gap: 1em;\n" +" -webkit-column-gap: 1em;\n" +" -moz-column-count: 3;\n" +" -webkit-column-count: 3;\n" +"}\n" +"\n" +"p.startli, p.startdd, p.starttd {\n" +" margin-top: 2px;\n" +"}\n" +"\n" +"p.endli {\n" +" margin-bottom: 0px;\n" +"}\n" +"\n" +"p.enddd {\n" +" margin-bottom: 4px;\n" +"}\n" +"\n" +"p.endtd {\n" +" margin-bottom: 2px;\n" +"}\n" +"\n" +"/* @end */\n" +"\n" +"caption {\n" +" font-weight: bold;\n" +"}\n" +"\n" +"span.legend {\n" +" font-size: 70%;\n" +" text-align: center;\n" +"}\n" +"\n" +"h3.version {\n" +" font-size: 90%;\n" +" text-align: center;\n" +"}\n" +"\n" +"div.qindex, div.navtab{\n" +" background-color: ##ee;\n" +" border: 1px solid ##b0;\n" +" text-align: center;\n" +" margin: 2px;\n" +" padding: 2px;\n" +"}\n" +"\n" +"div.qindex, div.navpath {\n" +" width: 100%;\n" +" line-height: 140%;\n" +"}\n" +"\n" +"div.navtab {\n" +" margin-right: 15px;\n" +"}\n" +"\n" +"/* @group Link Styling */\n" +"\n" +"a {\n" +" color: ##50;\n" +" font-weight: normal;\n" +" text-decoration: none;\n" +"}\n" +"\n" +".contents a:visited {\n" +" color: ##60;\n" +"}\n" +"\n" +"a:hover {\n" +" text-decoration: underline;\n" +"}\n" +"\n" +"a.qindex {\n" +" font-weight: bold;\n" +"}\n" +"\n" +"a.qindexHL {\n" +" font-weight: bold;\n" +" background-color: ##AA;\n" +" color: #ffffff;\n" +" border: 1px double ##98;\n" +"}\n" +"\n" +".contents a.qindexHL:visited {\n" +" color: #ffffff;\n" +"}\n" +"\n" +"a.el {\n" +" font-weight: bold;\n" +"}\n" +"\n" +"a.elRef {\n" +"}\n" +"\n" +"a.code {\n" +" color: ##60;\n" +"}\n" +"\n" +"a.codeRef {\n" +" color: ##60;\n" +"}\n" +"\n" +"/* @end */\n" +"\n" +"dl.el {\n" +" margin-left: -1cm;\n" +"}\n" +"\n" +".fragment {\n" +" font-family: monospace, fixed;\n" +" font-size: 105%;\n" +"}\n" +"\n" +"pre.fragment {\n" +" border: 1px solid ##CC;\n" +" background-color: ##FC;\n" +" padding: 4px 6px;\n" +" margin: 4px 8px 4px 2px;\n" +" overflow: auto;\n" +" word-wrap: break-word;\n" +" font-size: 9pt;\n" +" line-height: 125%;\n" +"}\n" +"\n" +"div.ah {\n" +" background-color: black;\n" +" font-weight: bold;\n" +" color: #ffffff;\n" +" margin-bottom: 3px;\n" +" margin-top: 3px;\n" +" padding: 0.2em;\n" +" border: solid thin #333;\n" +" border-radius: 0.5em;\n" +" -webkit-border-radius: .5em;\n" +" -moz-border-radius: .5em;\n" +" box-shadow: 2px 2px 3px #999;\n" +" -webkit-box-shadow: 2px 2px 3px #999;\n" +" -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;\n" +" background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));\n" +" background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);\n" +"}\n" +"\n" +"div.groupHeader {\n" +" margin-left: 16px;\n" +" margin-top: 12px;\n" +" font-weight: bold;\n" +"}\n" +"\n" +"div.groupText {\n" +" margin-left: 16px;\n" +" font-style: italic;\n" +"}\n" +"\n" +"body {\n" +" background: white;\n" +" color: black;\n" +" margin: 0;\n" +"}\n" +"\n" +"div.contents {\n" +" margin-top: 10px;\n" +" margin-left: 10px;\n" +" margin-right: 5px;\n" +"}\n" +"\n" +"td.indexkey {\n" +" background-color: ##ee;\n" +" font-weight: bold;\n" +" border: 1px solid ##cc;\n" +" margin: 2px 0px 2px 0;\n" +" padding: 2px 10px;\n" +"}\n" +"\n" +"td.indexvalue {\n" +" background-color: ##ee;\n" +" border: 1px solid ##cc;\n" +" padding: 2px 10px;\n" +" margin: 2px 0px;\n" +"}\n" +"\n" +"tr.memlist {\n" +" background-color: ##f0;\n" +"}\n" +"\n" +"p.formulaDsp {\n" +" text-align: center;\n" +"}\n" +"\n" +"img.formulaDsp {\n" +" \n" +"}\n" +"\n" +"img.formulaInl {\n" +" vertical-align: middle;\n" +"}\n" +"\n" +"div.center {\n" +" text-align: center;\n" +" margin-top: 0px;\n" +" margin-bottom: 0px;\n" +" padding: 0px;\n" +"}\n" +"\n" +"div.center img {\n" +" border: 0px;\n" +"}\n" +"\n" +"address.footer {\n" +" text-align: right;\n" +" padding-right: 12px;\n" +"}\n" +"\n" +"img.footer {\n" +" border: 0px;\n" +" vertical-align: middle;\n" +"}\n" +"\n" +"/* @group Code Colorization */\n" +"\n" +"span.keyword {\n" +" color: #008000\n" +"}\n" +"\n" +"span.keywordtype {\n" +" color: #604020\n" +"}\n" +"\n" +"span.keywordflow {\n" +" color: #e08000\n" +"}\n" +"\n" +"span.comment {\n" +" color: #800000\n" +"}\n" +"\n" +"span.preprocessor {\n" +" color: #806020\n" +"}\n" +"\n" +"span.stringliteral {\n" +" color: #002080\n" +"}\n" +"\n" +"span.charliteral {\n" +" color: #008080\n" +"}\n" +"\n" +"span.vhdldigit { \n" +" color: #ff00ff \n" +"}\n" +"\n" +"span.vhdlchar { \n" +" color: #000000 \n" +"}\n" +"\n" +"span.vhdlkeyword { \n" +" color: #700070 \n" +"}\n" +"\n" +"span.vhdllogic { \n" +" color: #ff0000 \n" +"}\n" +"\n" +"/* @end */\n" +"\n" +"/*\n" +".search {\n" +" color: #003399;\n" +" font-weight: bold;\n" +"}\n" +"\n" +"form.search {\n" +" margin-bottom: 0px;\n" +" margin-top: 0px;\n" +"}\n" +"\n" +"input.search {\n" +" font-size: 75%;\n" +" color: #000080;\n" +" font-weight: normal;\n" +" background-color: #e8eef2;\n" +"}\n" +"*/\n" +"\n" +"td.tiny {\n" +" font-size: 75%;\n" +"}\n" +"\n" +".dirtab {\n" +" padding: 4px;\n" +" border-collapse: collapse;\n" +" border: 1px solid ##b0;\n" +"}\n" +"\n" +"th.dirtab {\n" +" background: ##ee;\n" +" font-weight: bold;\n" +"}\n" +"\n" +"hr {\n" +" height: 0px;\n" +" border: none;\n" +" border-top: 1px solid ##66;\n" +"}\n" +"\n" +"hr.footer {\n" +" height: 1px;\n" +"}\n" +"\n" +"/* @group Member Descriptions */\n" +"\n" +"table.memberdecls {\n" +" border-spacing: 0px;\n" +" padding: 0px;\n" +"}\n" +"\n" +".mdescLeft, .mdescRight,\n" +".memItemLeft, .memItemRight,\n" +".memTemplItemLeft, .memTemplItemRight, .memTemplParams {\n" +" background-color: ##FA;\n" +" border: none;\n" +" margin: 4px;\n" +" padding: 1px 0 0 8px;\n" +"}\n" +"\n" +".mdescLeft, .mdescRight {\n" +" padding: 0px 8px 4px 8px;\n" +" color: #555;\n" +"}\n" +"\n" +".memItemLeft, .memItemRight, .memTemplParams {\n" +" border-top: 1px solid ##cc;\n" +"}\n" +"\n" +".memItemLeft, .memTemplItemLeft {\n" +" white-space: nowrap;\n" +"}\n" +"\n" +".memItemRight {\n" +" width: 100%;\n" +"}\n" +"\n" +".memTemplParams {\n" +" color: ##60;\n" +" white-space: nowrap;\n" +"}\n" +"\n" +"/* @end */\n" +"\n" +"/* @group Member Details */\n" +"\n" +"/* Styles for detailed member documentation */\n" +"\n" +".memtemplate {\n" +" font-size: 80%;\n" +" color: ##60;\n" +" font-weight: normal;\n" +" margin-left: 9px;\n" +"}\n" +"\n" +".memnav {\n" +" background-color: ##ee;\n" +" border: 1px solid ##b0;\n" +" text-align: center;\n" +" margin: 2px;\n" +" margin-right: 15px;\n" +" padding: 2px;\n" +"}\n" +"\n" +".mempage {\n" +" width: 100%;\n" +"}\n" +"\n" +".memitem {\n" +" padding: 0;\n" +" margin-bottom: 10px;\n" +" margin-right: 5px;\n" +"}\n" +"\n" +".memname {\n" +" white-space: nowrap;\n" +" font-weight: bold;\n" +" margin-left: 6px;\n" +"}\n" +"\n" +".memproto {\n" +" border-top: 1px solid ##B4;\n" +" border-left: 1px solid ##B4;\n" +" border-right: 1px solid ##B4;\n" +" padding: 6px 0px 6px 0px;\n" +" color: ##2b;\n" +" font-weight: bold;\n" +" text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);\n" +" /* opera specific markup */\n" +" box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n" +" border-top-right-radius: 8px;\n" +" border-top-left-radius: 8px;\n" +" /* firefox specific markup */\n" +" -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n" +" -moz-border-radius-topright: 8px;\n" +" -moz-border-radius-topleft: 8px;\n" +" /* webkit specific markup */\n" +" -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n" +" -webkit-border-top-right-radius: 8px;\n" +" -webkit-border-top-left-radius: 8px;\n" +" background-image:url('nav_f.png');\n" +" background-repeat:repeat-x;\n" +" background-color: ##E6;\n" +"\n" +"}\n" +"\n" +".memdoc {\n" +" border-bottom: 1px solid ##B4; \n" +" border-left: 1px solid ##B4; \n" +" border-right: 1px solid ##B4; \n" +" padding: 2px 5px;\n" +" background-color: ##FC;\n" +" border-top-width: 0;\n" +" /* opera specific markup */\n" +" border-bottom-left-radius: 8px;\n" +" border-bottom-right-radius: 8px;\n" +" box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n" +" /* firefox specific markup */\n" +" -moz-border-radius-bottomleft: 8px;\n" +" -moz-border-radius-bottomright: 8px;\n" +" -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n" +" background-image: -moz-linear-gradient(center top, ##FF 0%, ##FF 60%, ##F8 95%, ##F0);\n" +" /* webkit specific markup */\n" +" -webkit-border-bottom-left-radius: 8px;\n" +" -webkit-border-bottom-right-radius: 8px;\n" +" -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n" +" background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.6,##FF), color-stop(0.60,##FF), color-stop(0.95,##F8), to(##F0));\n" +"}\n" +"\n" +".paramkey {\n" +" text-align: right;\n" +"}\n" +"\n" +".paramtype {\n" +" white-space: nowrap;\n" +"}\n" +"\n" +".paramname {\n" +" color: #602020;\n" +" white-space: nowrap;\n" +"}\n" +".paramname em {\n" +" font-style: normal;\n" +"}\n" +"\n" +".params, .retval, .exception, .tparams {\n" +" border-spacing: 6px 2px;\n" +"} \n" +"\n" +".params .paramname, .retval .paramname {\n" +" font-weight: bold;\n" +" vertical-align: top;\n" +"}\n" +" \n" +".params .paramtype {\n" +" font-style: italic;\n" +" vertical-align: top;\n" +"} \n" +" \n" +".params .paramdir {\n" +" font-family: \"courier new\",courier,monospace;\n" +" vertical-align: top;\n" +"}\n" +"\n" +"\n" +"\n" +"\n" +"/* @end */\n" +"\n" +"/* @group Directory (tree) */\n" +"\n" +"/* for the tree view */\n" +"\n" +".ftvtree {\n" +" font-family: sans-serif;\n" +" margin: 0px;\n" +"}\n" +"\n" +"/* these are for tree view when used as main index */\n" +"\n" +".directory {\n" +" font-size: 9pt;\n" +" font-weight: bold;\n" +" margin: 5px;\n" +"}\n" +"\n" +".directory h3 {\n" +" margin: 0px;\n" +" margin-top: 1em;\n" +" font-size: 11pt;\n" +"}\n" +"\n" +"/*\n" +"The following two styles can be used to replace the root node title\n" +"with an image of your choice. Simply uncomment the next two styles,\n" +"specify the name of your image and be sure to set 'height' to the\n" +"proper pixel height of your image.\n" +"*/\n" +"\n" +"/*\n" +".directory h3.swap {\n" +" height: 61px;\n" +" background-repeat: no-repeat;\n" +" background-image: url(\"yourimage.gif\");\n" +"}\n" +".directory h3.swap span {\n" +" display: none;\n" +"}\n" +"*/\n" +"\n" +".directory > h3 {\n" +" margin-top: 0;\n" +"}\n" +"\n" +".directory p {\n" +" margin: 0px;\n" +" white-space: nowrap;\n" +"}\n" +"\n" +".directory div {\n" +" display: none;\n" +" margin: 0px;\n" +"}\n" +"\n" +".directory img {\n" +" vertical-align: -30%;\n" +"}\n" +"\n" +"/* these are for tree view when not used as main index */\n" +"\n" +".directory-alt {\n" +" font-size: 100%;\n" +" font-weight: bold;\n" +"}\n" +"\n" +".directory-alt h3 {\n" +" margin: 0px;\n" +" margin-top: 1em;\n" +" font-size: 11pt;\n" +"}\n" +"\n" +".directory-alt > h3 {\n" +" margin-top: 0;\n" +"}\n" +"\n" +".directory-alt p {\n" +" margin: 0px;\n" +" white-space: nowrap;\n" +"}\n" +"\n" +".directory-alt div {\n" +" display: none;\n" +" margin: 0px;\n" +"}\n" +"\n" +".directory-alt img {\n" +" vertical-align: -30%;\n" +"}\n" +"\n" +"/* @end */\n" +"\n" +"div.dynheader {\n" +" margin-top: 8px;\n" +"}\n" +"\n" +"address {\n" +" font-style: normal;\n" +" color: ##33;\n" +"}\n" +"\n" +"table.doxtable {\n" +" border-collapse:collapse;\n" +"}\n" +"\n" +"table.doxtable td, table.doxtable th {\n" +" border: 1px solid ##37;\n" +" padding: 3px 7px 2px;\n" +"}\n" +"\n" +"table.doxtable th {\n" +" background-color: ##47;\n" +" color: #FFFFFF;\n" +" font-size: 110%;\n" +" padding-bottom: 4px;\n" +" padding-top: 5px;\n" +" text-align:left;\n" +"}\n" +"\n" +".tabsearch {\n" +" top: 0px;\n" +" left: 10px;\n" +" height: 36px;\n" +" background-image: url('tab_b.png');\n" +" z-index: 101;\n" +" overflow: hidden;\n" +" font-size: 13px;\n" +"}\n" +"\n" +".navpath ul\n" +"{\n" +" font-size: 11px;\n" +" background-image:url('tab_b.png');\n" +" background-repeat:repeat-x;\n" +" height:30px;\n" +" line-height:30px;\n" +" color:##9b;\n" +" border:solid 1px ##ca;\n" +" overflow:hidden;\n" +" margin:0px;\n" +" padding:0px;\n" +"}\n" +"\n" +".navpath li\n" +"{\n" +" list-style-type:none;\n" +" float:left;\n" +" padding-left:10px;\n" +" padding-right:15px;\n" +" background-image:url('bc_s.png');\n" +" background-repeat:no-repeat;\n" +" background-position:right;\n" +" color:##45;\n" +"}\n" +"\n" +".navpath li.navelem a\n" +"{\n" +" height:32px;\n" +" display:block;\n" +" text-decoration: none;\n" +" outline: none;\n" +"}\n" +"\n" +".navpath li.navelem a:hover\n" +"{\n" +" color:##80;\n" +"}\n" +"\n" +".navpath li.footer\n" +"{\n" +" list-style-type:none;\n" +" float:right;\n" +" padding-left:10px;\n" +" padding-right:15px;\n" +" background-image:none;\n" +" background-repeat:no-repeat;\n" +" background-position:right;\n" +" color:##45;\n" +" font-size: 8pt;\n" +"}\n" +"\n" +"\n" +"div.summary\n" +"{\n" +" float: right;\n" +" font-size: 8pt;\n" +" padding-right: 5px;\n" +" width: 50%;\n" +" text-align: right;\n" +"} \n" +"\n" +"div.summary a\n" +"{\n" +" white-space: nowrap;\n" +"}\n" +"\n" +"div.ingroups\n" +"{\n" +" font-size: 8pt;\n" +" padding-left: 5px;\n" +" width: 50%;\n" +" text-align: left;\n" +"}\n" +"\n" +"div.ingroups a\n" +"{\n" +" white-space: nowrap;\n" +"}\n" +"\n" +"div.header\n" +"{\n" +" background-image:url('nav_h.png');\n" +" background-repeat:repeat-x;\n" +" background-color: ##FA;\n" +" margin: 0px;\n" +" border-bottom: 1px solid ##CC;\n" +"}\n" +"\n" +"div.headertitle\n" +"{\n" +" padding: 5px 5px 5px 10px;\n" +"}\n" +"\n" +"dl\n" +"{\n" +" padding: 0 0 0 10px;\n" +"}\n" +"\n" +"dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug\n" +"{\n" +" border-left:4px solid;\n" +" padding: 0 0 0 6px;\n" +"}\n" +"\n" +"dl.note\n" +"{\n" +" border-color: #D0C000;\n" +"}\n" +"\n" +"dl.warning, dl.attention\n" +"{\n" +" border-color: #FF0000;\n" +"}\n" +"\n" +"dl.pre, dl.post, dl.invariant\n" +"{\n" +" border-color: #00D000;\n" +"}\n" +"\n" +"dl.deprecated\n" +"{\n" +" border-color: #505050;\n" +"}\n" +"\n" +"dl.todo\n" +"{\n" +" border-color: #00C0E0;\n" +"}\n" +"\n" +"dl.test\n" +"{\n" +" border-color: #3030E0;\n" +"}\n" +"\n" +"dl.bug\n" +"{\n" +" border-color: #C08050;\n" +"}\n" +"\n" +"#projectlogo\n" +"{\n" +" text-align: center;\n" +" vertical-align: bottom;\n" +" border-collapse: separate;\n" +"}\n" +" \n" +"#projectlogo img\n" +"{ \n" +" border: 0px none;\n" +"}\n" +" \n" +"#projectname\n" +"{\n" +" font: 300% Tahoma, Arial,sans-serif;\n" +" margin: 0px;\n" +" padding: 2px 0px;\n" +"}\n" +" \n" +"#projectbrief\n" +"{\n" +" font: 120% Tahoma, Arial,sans-serif;\n" +" margin: 0px;\n" +" padding: 0px;\n" +"}\n" +"\n" +"#projectnumber\n" +"{\n" +" font: 50% Tahoma, Arial,sans-serif;\n" +" margin: 0px;\n" +" padding: 0px;\n" +"}\n" +"\n" +"#titlearea\n" +"{\n" +" padding: 0px;\n" +" margin: 0px;\n" +" width: 100%;\n" +" border-bottom: 1px solid ##70;\n" +"}\n" +"\n" +".image\n" +"{\n" +" text-align: center;\n" +"}\n" +"\n" +".dotgraph\n" +"{\n" +" text-align: center;\n" +"}\n" +"\n" +".mscgraph\n" +"{\n" +" text-align: center;\n" +"}\n" +"\n" +".caption\n" +"{\n" +" font-weight: bold;\n" +"}\n" +"\n" Index: branches/xZenu/src/util/doxygen/src/layout_default.xml =================================================================== --- branches/xZenu/src/util/doxygen/src/layout_default.xml (revision 0) +++ branches/xZenu/src/util/doxygen/src/layout_default.xml (revision 1322) @@ -0,0 +1,185 @@ +<doxygenlayout version="1.0"> + <!-- Navigation index tabs for HTML output --> + <navindex> + <tab type="mainpage" visible="yes" title=""/> + <tab type="pages" visible="yes" title="" intro=""/> + <tab type="modules" visible="yes" title="" intro=""/> + <tab type="namespaces" visible="yes" title=""> + <tab type="namespaces" visible="yes" title="" intro=""/> + <tab type="namespacemembers" visible="yes" title="" intro=""/> + </tab> + <tab type="classes" visible="yes" title=""> + <tab type="classes" visible="yes" title="" intro=""/> + <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> + <tab type="hierarchy" visible="yes" title="" intro=""/> + <tab type="classmembers" visible="yes" title="" intro=""/> + </tab> + <tab type="files" visible="yes" title=""> + <tab type="files" visible="yes" title="" intro=""/> + <tab type="globals" visible="yes" title="" intro=""/> + </tab> + <tab type="dirs" visible="yes" title="" intro=""/> + <tab type="examples" visible="yes" title="" intro=""/> + </navindex> + + <!-- Layout definition for a class page --> + <class> + <briefdescription visible="yes"/> + <includes visible="$SHOW_INCLUDE_FILES"/> + <inheritancegraph visible="$CLASS_GRAPH"/> + <collaborationgraph visible="$COLLABORATION_GRAPH"/> + <allmemberslink visible="yes"/> + <memberdecl> + <nestedclasses visible="yes" title=""/> + <publictypes title=""/> + <publicslots title=""/> + <signals title=""/> + <publicmethods title=""/> + <publicstaticmethods title=""/> + <publicattributes title=""/> + <publicstaticattributes title=""/> + <protectedtypes title=""/> + <protectedslots title=""/> + <protectedmethods title=""/> + <protectedstaticmethods title=""/> + <protectedattributes title=""/> + <protectedstaticattributes title=""/> + <packagetypes title=""/> + <packagemethods title=""/> + <packagestaticmethods title=""/> + <packageattributes title=""/> + <packagestaticattributes title=""/> + <properties title=""/> + <events title=""/> + <privatetypes title=""/> + <privateslots title=""/> + <privatemethods title=""/> + <privatestaticmethods title=""/> + <privateattributes title=""/> + <privatestaticattributes title=""/> + <friends title=""/> + <related title="" subtitle=""/> + <membergroups visible="yes"/> + </memberdecl> + <detaileddescription title=""/> + <memberdef> + <typedefs title=""/> + <enums title=""/> + <constructors title=""/> + <functions title=""/> + <related title=""/> + <variables title=""/> + <properties title=""/> + <events title=""/> + </memberdef> + <usedfiles visible="$SHOW_USED_FILES"/> + <authorsection visible="yes"/> + </class> + + <!-- Layout definition for a namespace page --> + <namespace> + <briefdescription visible="yes"/> + <memberdecl> + <nestednamespaces visible="yes" title=""/> + <classes visible="yes" title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + <membergroups visible="yes"/> + </memberdecl> + <detaileddescription title=""/> + <memberdef> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + </memberdef> + <authorsection visible="yes"/> + </namespace> + + <!-- Layout definition for a file page --> + <file> + <briefdescription visible="yes"/> + <includes visible="$SHOW_INCLUDE_FILES"/> + <includegraph visible="$INCLUDE_GRAPH"/> + <includedbygraph visible="$INCLUDED_BY_GRAPH"/> + <sourcelink visible="yes"/> + <memberdecl> + <classes visible="yes" title=""/> + <namespaces visible="yes" title=""/> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + <membergroups visible="yes"/> + </memberdecl> + <detaileddescription title=""/> + <memberdef> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + </memberdef> + <authorsection/> + </file> + + <!-- Layout definition for a group page --> + <group> + <briefdescription visible="yes"/> + <groupgraph visible="$GROUP_GRAPHS"/> + <memberdecl> + <classes visible="yes" title=""/> + <namespaces visible="yes" title=""/> + <dirs visible="yes" title=""/> + <nestedgroups visible="yes" title=""/> + <files visible="yes" title=""/> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <enumvalues title=""/> + <functions title=""/> + <variables title=""/> + <signals title=""/> + <publicslots title=""/> + <protectedslots title=""/> + <privateslots title=""/> + <events title=""/> + <properties title=""/> + <friends title=""/> + <membergroups visible="yes"/> + </memberdecl> + <detaileddescription title=""/> + <memberdef> + <pagedocs/> + <inlineclasses title=""/> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <enumvalues title=""/> + <functions title=""/> + <variables title=""/> + <signals title=""/> + <publicslots title=""/> + <protectedslots title=""/> + <privateslots title=""/> + <events title=""/> + <properties title=""/> + <friends title=""/> + </memberdef> + <authorsection visible="yes"/> + </group> + + <!-- Layout definition for a directory page --> + <directory> + <briefdescription visible="yes"/> + <directorygraph visible="yes"/> + <memberdecl> + <dirs visible="yes"/> + <files visible="yes"/> + </memberdecl> + <detaileddescription title=""/> + </directory> +</doxygenlayout> Index: branches/xZenu/src/util/doxygen/src/lang_cfg.h =================================================================== --- branches/xZenu/src/util/doxygen/src/lang_cfg.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/lang_cfg.h (revision 1322) @@ -0,0 +1,39 @@ +#define LANG_NL +#define LANG_SV +#define LANG_CZ +#define LANG_FR +#define LANG_ID +#define LANG_IT +#define LANG_DE +#define LANG_JP +#define LANG_JE +#define LANG_ES +#define LANG_FI +#define LANG_RU +#define LANG_HR +#define LANG_PL +#define LANG_PT +#define LANG_HU +#define LANG_KR +#define LANG_KE +#define LANG_RO +#define LANG_SI +#define LANG_CN +#define LANG_NO +#define LANG_MK +#define LANG_BR +#define LANG_DK +#define LANG_SK +#define LANG_UA +#define LANG_GR +#define LANG_TW +#define LANG_SR +#define LANG_CA +#define LANG_LT +#define LANG_ZA +#define LANG_AR +#define LANG_FA +#define LANG_SC +#define LANG_VI +#define LANG_TR +#define LANG_EO Index: branches/xZenu/src/util/doxygen/src/navtree_js.h =================================================================== --- branches/xZenu/src/util/doxygen/src/navtree_js.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/navtree_js.h (revision 1322) @@ -0,0 +1,245 @@ +"function createIndent(o,domNode,node,level)\n" +"{\n" +" if (node.parentNode && node.parentNode.parentNode)\n" +" {\n" +" createIndent(o,domNode,node.parentNode,level+1);\n" +" }\n" +" var imgNode = document.createElement(\"img\");\n" +" if (level==0 && node.childrenData)\n" +" {\n" +" node.plus_img = imgNode;\n" +" node.expandToggle = document.createElement(\"a\");\n" +" node.expandToggle.href = \"javascript:void(0)\";\n" +" node.expandToggle.onclick = function() \n" +" {\n" +" if (node.expanded) \n" +" {\n" +" $(node.getChildrenUL()).slideUp(\"fast\");\n" +" if (node.isLast)\n" +" {\n" +" node.plus_img.src = node.relpath+\"ftv2plastnode.png\";\n" +" }\n" +" else\n" +" {\n" +" node.plus_img.src = node.relpath+\"ftv2pnode.png\";\n" +" }\n" +" node.expanded = false;\n" +" } \n" +" else \n" +" {\n" +" expandNode(o, node, false);\n" +" }\n" +" }\n" +" node.expandToggle.appendChild(imgNode);\n" +" domNode.appendChild(node.expandToggle);\n" +" }\n" +" else\n" +" {\n" +" domNode.appendChild(imgNode);\n" +" }\n" +" if (level==0)\n" +" {\n" +" if (node.isLast)\n" +" {\n" +" if (node.childrenData)\n" +" {\n" +" imgNode.src = node.relpath+\"ftv2plastnode.png\";\n" +" }\n" +" else\n" +" {\n" +" imgNode.src = node.relpath+\"ftv2lastnode.png\";\n" +" domNode.appendChild(imgNode);\n" +" }\n" +" }\n" +" else\n" +" {\n" +" if (node.childrenData)\n" +" {\n" +" imgNode.src = node.relpath+\"ftv2pnode.png\";\n" +" }\n" +" else\n" +" {\n" +" imgNode.src = node.relpath+\"ftv2node.png\";\n" +" domNode.appendChild(imgNode);\n" +" }\n" +" }\n" +" }\n" +" else\n" +" {\n" +" if (node.isLast)\n" +" {\n" +" imgNode.src = node.relpath+\"ftv2blank.png\";\n" +" }\n" +" else\n" +" {\n" +" imgNode.src = node.relpath+\"ftv2vertline.png\";\n" +" }\n" +" }\n" +" imgNode.border = \"0\";\n" +"}\n" +"\n" +"function newNode(o, po, text, link, childrenData, lastNode)\n" +"{\n" +" var node = new Object();\n" +" node.children = Array();\n" +" node.childrenData = childrenData;\n" +" node.depth = po.depth + 1;\n" +" node.relpath = po.relpath;\n" +" node.isLast = lastNode;\n" +"\n" +" node.li = document.createElement(\"li\");\n" +" po.getChildrenUL().appendChild(node.li);\n" +" node.parentNode = po;\n" +"\n" +" node.itemDiv = document.createElement(\"div\");\n" +" node.itemDiv.className = \"item\";\n" +"\n" +" node.labelSpan = document.createElement(\"span\");\n" +" node.labelSpan.className = \"label\";\n" +"\n" +" createIndent(o,node.itemDiv,node,0);\n" +" node.itemDiv.appendChild(node.labelSpan);\n" +" node.li.appendChild(node.itemDiv);\n" +"\n" +" var a = document.createElement(\"a\");\n" +" node.labelSpan.appendChild(a);\n" +" node.label = document.createTextNode(text);\n" +" a.appendChild(node.label);\n" +" if (link) \n" +" {\n" +" a.href = node.relpath+link;\n" +" } \n" +" else \n" +" {\n" +" if (childrenData != null) \n" +" {\n" +" a.className = \"nolink\";\n" +" a.href = \"javascript:void(0)\";\n" +" a.onclick = node.expandToggle.onclick;\n" +" node.expanded = false;\n" +" }\n" +" }\n" +"\n" +" node.childrenUL = null;\n" +" node.getChildrenUL = function() \n" +" {\n" +" if (!node.childrenUL) \n" +" {\n" +" node.childrenUL = document.createElement(\"ul\");\n" +" node.childrenUL.className = \"children_ul\";\n" +" node.childrenUL.style.display = \"none\";\n" +" node.li.appendChild(node.childrenUL);\n" +" }\n" +" return node.childrenUL;\n" +" };\n" +"\n" +" return node;\n" +"}\n" +"\n" +"function showRoot()\n" +"{\n" +" var headerHeight = $(\"#top\").height();\n" +" var footerHeight = $(\"#nav-path\").height();\n" +" var windowHeight = $(window).height() - headerHeight - footerHeight;\n" +" navtree.scrollTo('#selected',0,{offset:-windowHeight/2});\n" +"}\n" +"\n" +"function expandNode(o, node, imm)\n" +"{\n" +" if (node.childrenData && !node.expanded) \n" +" {\n" +" if (!node.childrenVisited) \n" +" {\n" +" getNode(o, node);\n" +" }\n" +" if (imm)\n" +" {\n" +" $(node.getChildrenUL()).show();\n" +" } \n" +" else \n" +" {\n" +" $(node.getChildrenUL()).slideDown(\"fast\",showRoot);\n" +" }\n" +" if (node.isLast)\n" +" {\n" +" node.plus_img.src = node.relpath+\"ftv2mlastnode.png\";\n" +" }\n" +" else\n" +" {\n" +" node.plus_img.src = node.relpath+\"ftv2mnode.png\";\n" +" }\n" +" node.expanded = true;\n" +" }\n" +"}\n" +"\n" +"function getNode(o, po)\n" +"{\n" +" po.childrenVisited = true;\n" +" var l = po.childrenData.length-1;\n" +" for (var i in po.childrenData) \n" +" {\n" +" var nodeData = po.childrenData[i];\n" +" po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],\n" +" i==l);\n" +" }\n" +"}\n" +"\n" +"function findNavTreePage(url, data)\n" +"{\n" +" var nodes = data;\n" +" var result = null;\n" +" for (var i in nodes) \n" +" {\n" +" var d = nodes[i];\n" +" if (d[1] == url) \n" +" {\n" +" return new Array(i);\n" +" }\n" +" else if (d[2] != null) // array of children\n" +" {\n" +" result = findNavTreePage(url, d[2]);\n" +" if (result != null) \n" +" {\n" +" return (new Array(i).concat(result));\n" +" }\n" +" }\n" +" }\n" +" return null;\n" +"}\n" +"\n" +"function initNavTree(toroot,relpath)\n" +"{\n" +" var o = new Object();\n" +" o.toroot = toroot;\n" +" o.node = new Object();\n" +" o.node.li = document.getElementById(\"nav-tree-contents\");\n" +" o.node.childrenData = NAVTREE;\n" +" o.node.children = new Array();\n" +" o.node.childrenUL = document.createElement(\"ul\");\n" +" o.node.getChildrenUL = function() { return o.node.childrenUL; };\n" +" o.node.li.appendChild(o.node.childrenUL);\n" +" o.node.depth = 0;\n" +" o.node.relpath = relpath;\n" +"\n" +" getNode(o, o.node);\n" +"\n" +" o.breadcrumbs = findNavTreePage(toroot, NAVTREE);\n" +" if (o.breadcrumbs == null)\n" +" {\n" +" o.breadcrumbs = findNavTreePage(\"index.html\",NAVTREE);\n" +" }\n" +" if (o.breadcrumbs != null && o.breadcrumbs.length>0)\n" +" {\n" +" var p = o.node;\n" +" for (var i in o.breadcrumbs) \n" +" {\n" +" var j = o.breadcrumbs[i];\n" +" p = p.children[j];\n" +" expandNode(o,p,true);\n" +" }\n" +" p.itemDiv.className = p.itemDiv.className + \" selected\";\n" +" p.itemDiv.id = \"selected\";\n" +" $(window).load(showRoot);\n" +" }\n" +"}\n" +"\n" Index: branches/xZenu/src/util/doxygen/src/rtfdocvisitor.h =================================================================== --- branches/xZenu/src/util/doxygen/src/rtfdocvisitor.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/rtfdocvisitor.h (revision 1322) @@ -0,0 +1,165 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef _RTFDOCVISITOR_H +#define _RTFDOCVISITOR_H + +#include "docvisitor.h" +#include <qstack.h> +#include <qcstring.h> + +class FTextStream; +class CodeOutputInterface; + +/*! @brief Concrete visitor implementation for RTF output. */ +class RTFDocVisitor : public DocVisitor +{ + public: + RTFDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt); + + //-------------------------------------- + // visitor functions for leaf nodes + //-------------------------------------- + + void visit(DocWord *); + void visit(DocLinkedWord *); + void visit(DocWhiteSpace *); + void visit(DocSymbol *); + void visit(DocURL *); + void visit(DocLineBreak *); + void visit(DocHorRuler *); + void visit(DocStyleChange *); + void visit(DocVerbatim *); + void visit(DocAnchor *); + void visit(DocInclude *); + void visit(DocIncOperator *); + void visit(DocFormula *); + void visit(DocIndexEntry *); + void visit(DocSimpleSectSep *); + + //-------------------------------------- + // visitor functions for compound nodes + //-------------------------------------- + + void visitPre(DocAutoList *); + void visitPost(DocAutoList *); + void visitPre(DocAutoListItem *); + void visitPost(DocAutoListItem *); + void visitPre(DocPara *); + void visitPost(DocPara *); + void visitPre(DocRoot *); + void visitPost(DocRoot *); + void visitPre(DocSimpleSect *); + void visitPost(DocSimpleSect *); + void visitPre(DocTitle *); + void visitPost(DocTitle *); + void visitPre(DocSimpleList *); + void visitPost(DocSimpleList *); + void visitPre(DocSimpleListItem *); + void visitPost(DocSimpleListItem *); + void visitPre(DocSection *s); + void visitPost(DocSection *); + void visitPre(DocHtmlList *s); + void visitPost(DocHtmlList *s); + void visitPre(DocHtmlListItem *); + void visitPost(DocHtmlListItem *); + //void visitPre(DocHtmlPre *); + //void visitPost(DocHtmlPre *); + void visitPre(DocHtmlDescList *); + void visitPost(DocHtmlDescList *); + void visitPre(DocHtmlDescTitle *); + void visitPost(DocHtmlDescTitle *); + void visitPre(DocHtmlDescData *); + void visitPost(DocHtmlDescData *); + void visitPre(DocHtmlTable *t); + void visitPost(DocHtmlTable *t); + void visitPre(DocHtmlCaption *); + void visitPost(DocHtmlCaption *); + void visitPre(DocHtmlRow *); + void visitPost(DocHtmlRow *) ; + void visitPre(DocHtmlCell *); + void visitPost(DocHtmlCell *); + void visitPre(DocInternal *); + void visitPost(DocInternal *); + void visitPre(DocHRef *); + void visitPost(DocHRef *); + void visitPre(DocHtmlHeader *); + void visitPost(DocHtmlHeader *) ; + void visitPre(DocImage *); + void visitPost(DocImage *); + void visitPre(DocDotFile *); + void visitPost(DocDotFile *); + void visitPre(DocMscFile *); + void visitPost(DocMscFile *); + void visitPre(DocLink *); + void visitPost(DocLink *); + void visitPre(DocRef *ref); + void visitPost(DocRef *); + void visitPre(DocSecRefItem *); + void visitPost(DocSecRefItem *); + void visitPre(DocSecRefList *); + void visitPost(DocSecRefList *); + //void visitPre(DocLanguage *); + //void visitPost(DocLanguage *); + void visitPre(DocParamSect *); + void visitPost(DocParamSect *); + void visitPre(DocParamList *); + void visitPost(DocParamList *); + void visitPre(DocXRefItem *); + void visitPost(DocXRefItem *); + void visitPre(DocInternalRef *); + void visitPost(DocInternalRef *); + void visitPre(DocCopy *); + void visitPost(DocCopy *); + void visitPre(DocText *); + void visitPost(DocText *); + + private: + + //-------------------------------------- + // helper functions + //-------------------------------------- + + void filter(const char *str,bool verbatim=FALSE); + void startLink(const QCString &ref,const QCString &file, + const QCString &anchor); + void endLink(const QCString &ref); + QCString getStyle(const char *name); + void incIndentLevel(); + void decIndentLevel(); + + void pushEnabled(); + void popEnabled(); + void writeDotFile(const QCString &fileName); + void writeMscFile(const QCString &fileName); + + //-------------------------------------- + // state variables + //-------------------------------------- + + FTextStream &m_t; + CodeOutputInterface &m_ci; + bool m_insidePre; + bool m_hide; + int m_indentLevel; + QStack<bool> m_enabled; + bool m_lastIsPara; + QCString m_langExt; +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/latexgen.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/latexgen.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/latexgen.cpp (revision 1322) @@ -0,0 +1,2368 @@ +/****************************************************************************** + * + * $Id: latexgen.cpp,v 1.58 2001/03/19 19:27:40 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include <stdlib.h> + +#include "qtbc.h" +#include <qdir.h> +#include "latexgen.h" +#include "config.h" +#include "message.h" +#include "doxygen.h" +#include "util.h" +#include "diagram.h" +#include "language.h" +#include "version.h" +#include "dot.h" +#include "pagedef.h" +#include "docparser.h" +#include "latexdocvisitor.h" +#include "dirdef.h" + +//static QCString filterTitle(const char *s) +//{ +// QCString tmp=s,result; +// uint i;for (i=0;i<tmp.length();i++) +// { +// char c=tmp.at(i); +// switch(c) +// { +// case '#': result+="\\#"; break; +// case '"': result+="\\\""; break; +// case '%': result+="\\%"; break; +// case '[': result+="{"; break; +// case ']': result+="}"; break; +// default: result+=c; break; +// } +// } +// return result; +//} + + + +LatexGenerator::LatexGenerator() : OutputGenerator() +{ + dir=Config_getString("LATEX_OUTPUT"); + col=0; + //printf("LatexGenerator::LatexGenerator() insideTabbing=FALSE\n"); + insideTabbing=FALSE; + firstDescItem=TRUE; + disableLinks=FALSE; + m_indent=0; + templateMemberItem = FALSE; + m_prettyCode=Config_getBool("LATEX_SOURCE_CODE"); +} + +LatexGenerator::~LatexGenerator() +{ +} + +void LatexGenerator::init() +{ + QCString dir=Config_getString("LATEX_OUTPUT"); + QDir d(dir); + if (!d.exists() && !d.mkdir(dir)) + { + err("Could not create output directory %s\n",dir.data()); + exit(1); + } + + QCString fileName=dir+"/Makefile"; + QFile file(fileName); + if (!file.open(IO_WriteOnly)) + { + err("Could not open file %s for writing\n",fileName.data()); + exit(1); + } + // inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05 + QCString latex_command = Config_getString("LATEX_CMD_NAME"); + QCString mkidx_command = Config_getString("MAKEINDEX_CMD_NAME"); + // end insertion by KONNO Akihisa <konno@researchers.jp> 2002-03-05 + FTextStream t(&file); + if (!Config_getBool("USE_PDFLATEX")) // use plain old latex + { + t << "all: refman.dvi" << endl + << endl + << "ps: refman.ps" << endl + << endl + << "pdf: refman.pdf" << endl + << endl + << "ps_2on1: refman_2on1.ps" << endl + << endl + << "pdf_2on1: refman_2on1.pdf" << endl + << endl + << "refman.ps: refman.dvi" << endl + << "\tdvips -o refman.ps refman.dvi" << endl + << endl; + t << "refman.pdf: refman.ps" << endl; +#if defined(_MSC_VER) + // ps2pdf.bat does not work properly from a makefile using GNU make! + t << "\tgswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite " + "-sOutputFile=refman.pdf -c save pop -f refman.ps" << endl << endl; +#else + t << "\tps2pdf refman.ps refman.pdf" << endl << endl; +#endif + t << "refman.dvi: clean refman.tex doxygen.sty" << endl + << "\techo \"Running latex...\"" << endl + << "\t" << latex_command << " refman.tex" << endl + << "\techo \"Running makeindex...\"" << endl + << "\t" << mkidx_command << " refman.idx" << endl + << "\techo \"Rerunning latex....\"" << endl + << "\t" << latex_command << " refman.tex" << endl + << "\tlatex_count=5 ; \\" << endl + << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl + << "\t do \\" << endl + << "\t echo \"Rerunning latex....\" ;\\" << endl + << "\t " << latex_command << " refman.tex ;\\" << endl + << "\t latex_count=`expr $$latex_count - 1` ;\\" << endl + << "\t done" << endl << endl + << "refman_2on1.ps: refman.ps" << endl + << "\tpsnup -2 refman.ps >refman_2on1.ps" << endl + << endl + << "refman_2on1.pdf: refman_2on1.ps" << endl +#if defined(_MSC_VER) + // ps2pdf.bat does not work properly from a makefile using GNU make! + << "\tgswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite " + "-sOutputFile=refman_2on1.pdf -c save pop -f refman_2on1.ps" << endl; +#else + << "\tps2pdf refman_2on1.ps refman_2on1.pdf" << endl; +#endif + } + else // use pdflatex for higher quality output + { + t << "all: refman.pdf" << endl << endl + << "pdf: refman.pdf" << endl << endl; + t << "refman.pdf: clean refman.tex" << endl; + t << "\tpdflatex refman.tex" << endl; + t << "\tmakeindex refman.idx" << endl; + t << "\tpdflatex refman.tex" << endl + << "\tlatex_count=5 ; \\" << endl + << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl + << "\t do \\" << endl + << "\t echo \"Rerunning latex....\" ;\\" << endl + << "\t pdflatex refman.tex ;\\" << endl + << "\t latex_count=`expr $$latex_count - 1` ;\\" << endl + << "\t done" << endl << endl; + } + + t << endl + << "clean:" << endl +#if defined(_MSC_VER) + << "\tdel /s/y " +#else + << "\trm -f " +#endif + << "*.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf" << endl; + + createSubDirs(d); +} + +static void writeDefaultHeaderPart1(FTextStream &t) +{ + // part 1 + + QCString paperName; + if (Config_getBool("LATEX_BATCHMODE")) t << "\\batchmode" << endl; + QCString &paperType=Config_getEnum("PAPER_TYPE"); + if (paperType=="a4wide") + paperName="a4"; + else + paperName=paperType; + t << "\\documentclass[" << paperName << "paper"; + //if (Config_getBool("PDF_HYPERLINKS")) t << ",ps2pdf"; + t << "]{"; + if (Config_getBool("COMPACT_LATEX")) t << "article"; else t << "book"; + t << "}\n"; + // the next package is obsolete (see bug 563698) + //if (paperType=="a4wide") t << "\\usepackage{a4wide}\n"; + t << "\\usepackage{makeidx}\n" + "\\usepackage{graphicx}\n" + "\\usepackage{multicol}\n" + "\\usepackage{float}\n" + "\\usepackage{listings}\n" + "\\usepackage{color}\n" + "\\usepackage{ifthen}\n" + "\\usepackage[table]{xcolor}\n" + "\\usepackage{textcomp}\n" + "\\usepackage{alltt}\n" + //"\\usepackage{ae,aecompl,aeguill}\n" + ; + //if (Config_getBool("USE_PDFLATEX")) + //{ + // t << "\\usepackage{times}" << endl; + //} + if (Config_getBool("PDF_HYPERLINKS")) + { + t << "\\usepackage{ifpdf}" << endl + << "\\ifpdf" << endl + << "\\usepackage[pdftex," << endl + << " pagebackref=true," << endl + << " colorlinks=true," << endl + << " linkcolor=blue," << endl + << " unicode" << endl + << " ]{hyperref}" << endl + << "\\else" << endl + << "\\usepackage[ps2pdf," << endl + << " pagebackref=true," << endl + << " colorlinks=true," << endl + << " linkcolor=blue," << endl + << " unicode" << endl + << " ]{hyperref}" << endl + << "\\usepackage{pspicture}" << endl + << "\\fi" << endl; + } + // Try to get the command for switching on the language + // support + t << "\\usepackage[utf8]{inputenc}" << endl; + QCString sLanguageSupportCommand( + theTranslator->latexLanguageSupportCommand()); + + if (!sLanguageSupportCommand.isEmpty()) + { + // The command is not empty. Put it to the output. + // if the command is empty, no output is needed. + t << sLanguageSupportCommand << endl; + } + t << "\\usepackage{mathptmx}\n"; + t << "\\usepackage[scaled=.90]{helvet}\n"; + t << "\\usepackage{courier}\n"; + t << "\\usepackage{sectsty}\n"; + t << "\\usepackage[titles]{tocloft}\n"; + t << "\\usepackage{doxygen}\n"; + + // define option for listings + t << "\\lstset{language=C++," + "inputencoding=utf8," + "basicstyle=\\footnotesize," + "breaklines=true," + "breakatwhitespace=true," + "tabsize=" << Config_getInt("TAB_SIZE") <<"," + "numbers=left }" << endl; + + QStrList &extraPackages = Config_getList("EXTRA_PACKAGES"); + const char *s=extraPackages.first(); + while (s) + { + t << "\\usepackage{" << s << "}\n"; + s=extraPackages.next(); + } + t << "\\makeindex\n" + "\\setcounter{tocdepth}{3}\n" + "\\renewcommand{\\footrulewidth}{0.4pt}\n" + "\\renewcommand{\\familydefault}{\\sfdefault}\n" + "\\begin{document}\n"; + static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); + if (pdfHyperlinks && usePDFLatex) + { + // to avoid duplicate page anchors due to reuse of same numbers for + // the index (be it as roman numbers) + t << "\\hypersetup{pageanchor=false}" << endl; + } + if (theTranslator->idLanguage()=="greek") t << "\\selectlanguage{greek}\n"; + t << "\\begin{titlepage}\n" + "\\vspace*{7cm}\n" + "\\begin{center}\n" + "{\\Large "; + +} + +static void writeDefaultHeaderPart2(FTextStream &t) +{ + // part 2 + t << "}\\\\" << endl + << "\\vspace*{1cm}" << endl + << "{\\large "; +} + +static void writeDefaultHeaderPart3(FTextStream &t) +{ + // part 3 + t << " Doxygen " << versionString << "}\\\\" << endl + << "\\vspace*{0.5cm}" << endl + << "{\\small " << dateToString(TRUE) << "}\\\\" << endl + << "\\end{center}" << endl + << "\\end{titlepage}" << endl; + if (!Config_getBool("COMPACT_LATEX")) t << "\\clearemptydoublepage\n"; + t << "\\pagenumbering{roman}\n"; + t << "\\tableofcontents\n"; + if (!Config_getBool("COMPACT_LATEX")) t << "\\clearemptydoublepage\n"; + t << "\\pagenumbering{arabic}\n"; + static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); + if (pdfHyperlinks && usePDFLatex) + { + t << "\\hypersetup{pageanchor=true}" << endl; + } +} + +static void writeDefaultStyleSheetPart1(FTextStream &t) +{ + // part 1 + t << "\\NeedsTeXFormat{LaTeX2e}\n" + "\\ProvidesPackage{doxygen}\n\n"; + t << "% Packages used by this style file\n" + "\\RequirePackage{alltt}\n" + "\\RequirePackage{array}\n" + "\\RequirePackage{calc}\n" + "\\RequirePackage{color}\n" + "\\RequirePackage{fancyhdr}\n" + "\\RequirePackage{longtable}\n" + "\\RequirePackage{verbatim}\n" + "\\RequirePackage{ifthen}\n" + "\\RequirePackage[table]{xcolor}\n\n"; + + t << "% Use helvetica font instead of times roman\n" + "\\RequirePackage{helvet}\n" + "\\RequirePackage{sectsty}\n" + "\\RequirePackage{tocloft}\n" +// "\\allsectionsfont{\\usefont{OT1}{phv}{bc}{n}\\selectfont}\n" +// "\\providecommand{\\cftchapfont}{%\n" +// " \\fontsize{11}{13}\\usefont{OT1}{phv}{bc}{n}\\selectfont\n" +// "}\n" +// "\\providecommand{\\cftchappagefont}{%\n" +// " \\fontsize{11}{13}\\usefont{OT1}{phv}{c}{n}\\selectfont\n" +// "}\n" +// "\\providecommand{\\cftsecfont}{%\n" +// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n" +// "}\n" +// "\\providecommand{\\cftsecpagefont}{%\n" +// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n" +// "}\n" +// "\\providecommand{\\cftsubsecfont}{%\n" +// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n" +// "}\n" +// "\\providecommand{\\cftsubsecpagefont}{%\n" +// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n" +// "}\n" +// "\\providecommand{\\cftsubsubsecfont}{%\n" +// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n" +// "}\n" +// "\\providecommand{\\cftsubsubsecpagefont}{%\n" +// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n" +// "}\n" +// "\\providecommand{\\cftparafont}{%\n" +// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n" +// "}\n" +// "\\providecommand{\\cftparapagefont}{%\n" +// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n" +// "}\n" +// "\\providecommand{\\cfttoctitlefont}{%\n" +// " \\fontsize{20}{22}\\usefont{OT1}{phv}{b}{n}\\selectfont\n" +// "}\n" + "\\providecommand{\\rmdefault}{phv}\n" + "\\providecommand{\\bfdefault}{bc}\n" + "\n\n"; + + t << "% Setup fancy headings\n" + "\\pagestyle{fancyplain}\n" + "\\newcommand{\\clearemptydoublepage}{%\n" + " \\newpage{\\pagestyle{empty}\\cleardoublepage}%\n" + "}\n"; + if (!Config_getBool("COMPACT_LATEX")) + t << "\\renewcommand{\\chaptermark}[1]{%\n" + " \\markboth{#1}{}%\n" + "}\n"; + t << "\\renewcommand{\\sectionmark}[1]{%\n" + " \\markright{\\thesection\\ #1}%\n" + "}\n"; + + //t << "\\lhead[\\fancyplain{}{\\bfseries\\thepage}]{%\n" + // " \\fancyplain{}{\\bfseries\\rightmark}%\n" + // "}\n"; + //t << "\\rhead[\\fancyplain{}{\\bfseries\\leftmark}]{%\n" + // " \\fancyplain{}{\\bfseries\\thepage}%\n" + // "}\n"; + //t << "\\rfoot[\\fancyplain{}{\\bfseries\\scriptsize%\n "; + t << "\\fancyhead[LE]{\\fancyplain{}{\\bfseries\\thepage}}\n"; + t << "\\fancyhead[CE]{\\fancyplain{}{}}\n"; + t << "\\fancyhead[RE]{\\fancyplain{}{\\bfseries\\leftmark}}\n"; + t << "\\fancyhead[LO]{\\fancyplain{}{\\bfseries\\rightmark}}\n"; + t << "\\fancyhead[CO]{\\fancyplain{}{}}\n"; + t << "\\fancyhead[RO]{\\fancyplain{}{\\bfseries\\thepage}}\n"; + + t << "\\fancyfoot[LE]{\\fancyplain{}{}}\n"; + t << "\\fancyfoot[CE]{\\fancyplain{}{}}\n"; + t << "\\fancyfoot[RE]{\\fancyplain{}{\\bfseries\\scriptsize "; +} + +static void writeDefaultStyleSheetPart2(FTextStream &t) +{ + t << "}}\n"; + t << "\\fancyfoot[LO]{\\fancyplain{}{\\bfseries\\scriptsize "; + //t << "\\lfoot[]{\\fancyplain{}{\\bfseries\\scriptsize%\n "; + +} + +static void writeDefaultStyleSheetPart3(FTextStream &t) +{ + static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); + t << "}}\n"; + //t << "\\cfoot{}\n\n"; + t << "\\fancyfoot[CO]{\\fancyplain{}{}}\n"; + t << "\\fancyfoot[RO]{\\fancyplain{}{}}\n"; + + t << "%---------- Internal commands used in this style file ----------------\n\n"; + t << "% Generic environment used by all paragraph-based environments defined\n" + "% below. Note that the command \\title{...} needs to be defined inside\n" + "% those environments!\n" + "\\newenvironment{DoxyDesc}[1]{%\n" + " \\begin{list}{}%\n" + " {%\n" + " \\settowidth{\\labelwidth}{40pt}%\n" + " \\setlength{\\leftmargin}{\\labelwidth}%\n" + " \\setlength{\\parsep}{0pt}%\n" + " \\setlength{\\itemsep}{-4pt}%\n" + " \\renewcommand{\\makelabel}{\\entrylabel}%\n" + " }%\n" + " \\item[#1]%\n" + "}{%\n" + " \\end{list}%\n" + "}\n\n"; + t << "%---------- Commands used by doxygen LaTeX output generator ----------\n\n"; + t << "% Used by <pre> ... </pre>\n" + "\\newenvironment{DoxyPre}{%\n" + " \\small%\n" + " \\begin{alltt}%\n" + "}{%\n" + " \\end{alltt}%\n" + " \\normalsize%\n" + "}\n\n"; + t << "% Used by @code ... @endcode\n" + "\\newenvironment{DoxyCode}{%\n"; + if (latexSourceCode) + { + t << "\n\n\\begin{footnotesize}\\begin{alltt}%" << endl; + } + else + { + t << " \\footnotesize%\n" + " \\verbatim%\n"; + } + t << "}{%\n"; + if (latexSourceCode) + { + t << "\\end{alltt}\\end{footnotesize}%" << endl; + } + else + { + t << " \\endverbatim%\n" + " \\normalsize%\n"; + } + t << "}\n\n"; + t << "% Used by @example, @include, @includelineno and @dontinclude\n" + "\\newenvironment{DoxyCodeInclude}{%\n" + " \\DoxyCode%\n" + "}{%\n" + " \\endDoxyCode%\n" + "}\n\n"; + t << "% Used by @verbatim ... @endverbatim\n" + "\\newenvironment{DoxyVerb}{%\n" + " \\footnotesize%\n" + " \\verbatim%\n" + "}{%\n" + " \\endverbatim%\n" + " \\normalsize%\n" + "}\n\n"; + t << "% Used by @verbinclude\n" + "\\newenvironment{DoxyVerbInclude}{%\n" + " \\DoxyVerb%\n" + "}{%\n" + " \\endDoxyVerb%\n" + "}\n\n"; + t << "% Used by numbered lists (using '-#' or <ol> ... </ol>)\n" + "\\newenvironment{DoxyEnumerate}{%\n" + " \\enumerate%\n" + "}{%\n" + " \\endenumerate%\n" + "}\n\n"; + t << "% Used by bullet lists (using '-', @li, @arg, or <ul> ... </ul>)\n" + "\\newenvironment{DoxyItemize}{%\n" + " \\itemize%\n" + "}{%\n" + " \\enditemize%\n" + "}\n\n"; + t << "% Used by description lists (using <dl> ... </dl>)\n" + "\\newenvironment{DoxyDescription}{%\n" + " \\description%\n" + "}{%\n" + " \\enddescription%\n" + "}\n\n"; + t << "% Used by @image, @dotfile, and @dot ... @enddot\n" + "% (only if caption is specified)\n" + "\\newenvironment{DoxyImage}{%\n" + " \\begin{figure}[H]%\n" + " \\begin{center}%\n" + "}{%\n" + " \\end{center}%\n" + " \\end{figure}%\n" + "}\n\n"; + t << "% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc\n" + "% (only if no caption is specified)\n" + "\\newenvironment{DoxyImageNoCaption}{%\n" + "}{%\n" + "}\n\n"; + t << "% Used by @attention\n" + "\\newenvironment{DoxyAttention}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @author and @authors\n" + "\\newenvironment{DoxyAuthor}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @date\n" + "\\newenvironment{DoxyDate}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @invariant\n" + "\\newenvironment{DoxyInvariant}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @note\n" + "\\newenvironment{DoxyNote}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @post\n" + "\\newenvironment{DoxyPostcond}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @pre\n" + "\\newenvironment{DoxyPrecond}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @remark\n" + "\\newenvironment{DoxyRemark}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @return\n" + "\\newenvironment{DoxyReturn}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @since\n" + "\\newenvironment{DoxySince}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @see\n" + "\\newenvironment{DoxySeeAlso}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @version\n" + "\\newenvironment{DoxyVersion}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @warning\n" + "\\newenvironment{DoxyWarning}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + "}{%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by @internal\n" + "\\newenvironment{DoxyInternal}[1]{%\n" + " \\paragraph*{#1}%\n" + "}{%\n" + "}\n\n"; + t << "% Used by @par and @paragraph\n" + "\\newenvironment{DoxyParagraph}[1]{%\n" + " \\begin{list}{}%\n" + " {%\n" + " \\settowidth{\\labelwidth}{40pt}%\n" + " \\setlength{\\leftmargin}{\\labelwidth}%\n" + " \\setlength{\\parsep}{0pt}%\n" + " \\setlength{\\itemsep}{-4pt}%\n" + " \\renewcommand{\\makelabel}{\\entrylabel}%\n" + " }%\n" + " \\item[#1]%\n" + "}{%\n" + " \\end{list}%\n" + "}\n\n"; + t << "% Used by parameter lists\n" + "\\newenvironment{DoxyParams}[2][]{%\n" + " \\begin{DoxyDesc}{#2}%\n" + " \\begin{description}%\n" + " \\item[] \\hspace{\\fill} \\vspace{-25pt}%\n" + " \\definecolor{tableShade}{HTML}{F8F8F8}%\n" + " \\rowcolors{1}{white}{tableShade}%\n" + " \\arrayrulecolor{gray}%\n" + " \\setlength{\\tabcolsep}{0.01\\textwidth}%\n" + " \\ifthenelse{\\equal{#1}{}}\n" // default: name, docs columns + " {\\begin{longtable}{|>{\\raggedleft\\hspace{0pt}}p{0.15\\textwidth}|%\n" + " p{0.87\\textwidth}|}}%\n" + " {\\ifthenelse{\\equal{#1}{1}}%\n" // inout, name, docs columns, or type, name, docs columns + " {\\begin{longtable}{|>{\\centering}p{0.10\\textwidth}|%\n" + " >{\\raggedleft\\hspace{0pt}}p{0.15\\textwidth}|%\n" + " p{0.75\\textwidth}|}}%\n" + " {\\begin{longtable}{|>{\\centering}p{0.10\\textwidth}|%\n" // inout, type, name, docs columns + " >{\\centering\\hspace{0pt}}p{0.15\\textwidth}|%\n" + " >{\\raggedleft\\hspace{0pt}}p{0.15\\textwidth}|%\n" + " p{0.58\\textwidth}|}}%\n" + " }\\hline%\n" + "}{%\n" + " \\end{longtable}%\n" + " \\end{description}%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% is used for parameters within a detailed function description\n" + "\\newenvironment{DoxyParamCaption}{%\n" + " \\renewcommand{\\item}[2][]{##1 {\\em ##2}}%\n" + " }{%\n" + "}\n\n"; + t << "% Used by return value lists\n" + "\\newenvironment{DoxyRetVals}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + " \\begin{description}%\n" + " \\item[] \\hspace{\\fill} \\vspace{-25pt}%\n" + " \\definecolor{tableShade}{HTML}{F8F8F8}%\n" + " \\rowcolors{1}{white}{tableShade}%\n" + " \\arrayrulecolor{gray}%\n" + " \\setlength{\\tabcolsep}{0.01\\textwidth}%\n" + " \\begin{longtable}{|>{\\raggedleft\\hspace{0pt}}p{0.25\\textwidth}|%\n" + " p{0.77\\textwidth}|}%\n" + " \\hline%\n" + "}{%\n" + " \\end{longtable}%\n" + " \\end{description}%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by exception lists\n" + "\\newenvironment{DoxyExceptions}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + " \\begin{description}%\n" + " \\item[] \\hspace{\\fill} \\vspace{-25pt}%\n" + " \\definecolor{tableShade}{HTML}{F8F8F8}%\n" + " \\rowcolors{1}{white}{tableShade}%\n" + " \\arrayrulecolor{gray}%\n" + " \\setlength{\\tabcolsep}{0.01\\textwidth}%\n" + " \\begin{longtable}{|>{\\raggedleft\\hspace{0pt}}p{0.25\\textwidth}|%\n" + " p{0.77\\textwidth}|}%\n" + " \\hline%\n" + "}{%\n" + " \\end{longtable}%\n" + " \\end{description}%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "% Used by template parameter lists\n" + "\\newenvironment{DoxyTemplParams}[1]{%\n" + " \\begin{DoxyDesc}{#1}%\n" + " \\begin{description}%\n" + " \\item[] \\hspace{\\fill} \\vspace{-25pt}%\n" + " \\definecolor{tableShade}{HTML}{F8F8F8}%\n" + " \\rowcolors{1}{white}{tableShade}%\n" + " \\arrayrulecolor{gray}%\n" + " \\setlength{\\tabcolsep}{0.01\\textwidth}%\n" + " \\begin{longtable}{|>{\\raggedleft\\hspace{0pt}}p{0.25\\textwidth}|%\n" + " p{0.77\\textwidth}|}%\n" + " \\hline%\n" + "}{%\n" + " \\end{longtable}%\n" + " \\end{description}%\n" + " \\end{DoxyDesc}%\n" + "}\n\n"; + t << "\\newcommand{\\doxyref}[3]{\\textbf{#1} (\\textnormal{#2}\\,\\pageref{#3})}\n"; + t << "\\newenvironment{DoxyCompactList}\n"; + t << "{\\begin{list}{}{\n"; + t << " \\setlength{\\leftmargin}{0.5cm}\n"; + t << " \\setlength{\\itemsep}{0pt}\n"; + t << " \\setlength{\\parsep}{0pt}\n"; + t << " \\setlength{\\topsep}{0pt}\n"; + t << " \\renewcommand{\\makelabel}{\\hfill}}}\n"; + t << "{\\end{list}}\n"; + t << "\\newenvironment{DoxyCompactItemize}\n"; + t << "{\n"; + t << " \\begin{itemize}\n"; + t << " \\setlength{\\itemsep}{-3pt}\n"; + t << " \\setlength{\\parsep}{0pt}\n"; + t << " \\setlength{\\topsep}{0pt}\n"; + t << " \\setlength{\\partopsep}{0pt}\n"; + t << "}\n"; + t << "{\\end{itemize}}\n"; + t << "\\newcommand{\\PBS}[1]{\\let\\temp=\\\\#1\\let\\\\=\\temp}\n"; + t << "\\newlength{\\tmplength}\n"; + t << "\\newenvironment{TabularC}[1]\n"; + t << "{\n"; + t << "\\setlength{\\tmplength}\n"; + t << " {\\linewidth/(#1)-\\tabcolsep*2-\\arrayrulewidth*(#1+1)/(#1)}\n"; + t << " \\par\\begin{tabular*}{\\linewidth}\n"; + t << " {*{#1}{|>{\\PBS\\raggedright\\hspace{0pt}}p{\\the\\tmplength}}|}\n"; + t << "}\n"; + t << "{\\end{tabular*}\\par}\n"; + t << "\\newcommand{\\entrylabel}[1]{\n"; + t << " {\\parbox[b]{\\labelwidth-4pt}{\\makebox[0pt][l]{\\textbf{#1}}\\vspace{1.5\\baselineskip}}}}\n"; + t << "\\newenvironment{Desc}\n"; + t << "{\\begin{list}{}\n"; + t << " {\n"; + t << " \\settowidth{\\labelwidth}{40pt}\n"; + t << " \\setlength{\\leftmargin}{\\labelwidth}\n"; + t << " \\setlength{\\parsep}{0pt}\n"; + t << " \\setlength{\\itemsep}{-4pt}\n"; + t << " \\renewcommand{\\makelabel}{\\entrylabel}\n"; + t << " }\n"; + t << "}\n"; + t << "{\\end{list}}\n"; + + t << "\\newenvironment{Indent}\n"; + t << " {\\begin{list}{}{\\setlength{\\leftmargin}{0.5cm}}\n"; + t << " \\item[]\\ignorespaces}\n"; + t << " {\\unskip\\end{list}}\n"; + + t << "\\setlength{\\parindent}{0cm}\n"; + t << "\\setlength{\\parskip}{0.2cm}\n"; + t << "\\addtocounter{secnumdepth}{2}\n"; + // \sloppy should not be used, see bug 563698 + //t << "\\sloppy\n"; + t << "\\usepackage[T1]{fontenc}\n"; + t << "\\makeatletter\n"; + t << "\\renewcommand{\\paragraph}{\\@startsection{paragraph}{4}{0ex}%\n"; + t << " {-1.0ex}%\n"; + t << " {1.0ex}%\n"; + t << " {\\usefont{OT1}{phv}{bc}{n}\\color{darkgray}}}\n"; + t << "\\renewcommand{\\subparagraph}{\\@startsection{subparagraph}{5}{0ex}%\n"; + t << " {-1.0ex}%\n"; + t << " {1.0ex}%\n"; + t << " {\\usefont{OT1}{phv}{bc}{n}\\color{darkgray}}}\n"; + t << "\\makeatother\n"; + t << "\\allsectionsfont{\\usefont{OT1}{phv}{bc}{n}\\selectfont\\color{darkgray}}\n"; + t << "\\stepcounter{secnumdepth}\n"; + t << "\\stepcounter{tocdepth}\n"; + t << "\\definecolor{comment}{rgb}{0.5,0.0,0.0}\n"; + t << "\\definecolor{keyword}{rgb}{0.0,0.5,0.0}\n"; + t << "\\definecolor{keywordtype}{rgb}{0.38,0.25,0.125}\n"; + t << "\\definecolor{keywordflow}{rgb}{0.88,0.5,0.0}\n"; + t << "\\definecolor{preprocessor}{rgb}{0.5,0.38,0.125}\n"; + t << "\\definecolor{stringliteral}{rgb}{0.0,0.125,0.25}\n"; + t << "\\definecolor{charliteral}{rgb}{0.0,0.5,0.5}\n"; + t << "\\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0}\n"; + t << "\\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43}\n"; + t << "\\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0}\n"; + t << "\\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}\n"; +} + +static void writeDefaultFooter(FTextStream &t) +{ + t << "\\printindex\n"; + t << "\\end{document}\n"; +} + +void LatexGenerator::writeHeaderFile(QFile &f) +{ + FTextStream t(&f); + writeDefaultHeaderPart1(t); + t << "Your title here"; + writeDefaultHeaderPart2(t); + t << "Generated by"; + writeDefaultHeaderPart3(t); +} + +void LatexGenerator::writeFooterFile(QFile &f) +{ + FTextStream t(&f); + writeDefaultFooter(t); +} + +void LatexGenerator::writeStyleSheetFile(QFile &f) +{ + FTextStream t(&f); + + writeDefaultStyleSheetPart1(t); + QCString &projectName = Config_getString("PROJECT_NAME"); + + t << theTranslator->trGeneratedAt( dateToString(TRUE), projectName ); + t << " doxygen"; + //t << " " << theTranslator->trWrittenBy() << " "; + //t << "Dimitri van Heesch \\copyright~1997-2011"; + writeDefaultStyleSheetPart2(t); + t << theTranslator->trGeneratedAt( dateToString(TRUE), projectName ); + t << " doxygen"; + //t << " << theTranslator->trWrittenBy() << " "; + //t << "Dimitri van Heesch \\copyright~1997-2011"; + writeDefaultStyleSheetPart3(t); +} + +void LatexGenerator::startFile(const char *name,const char *,const char *) +{ +#if 0 + setEncoding(Config_getString("LATEX_OUTPUT_ENCODING")); +#endif + QCString fileName=name; + relPath = relativePathToRoot(fileName); + sourceFileName = stripPath(fileName); + if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex"; + startPlainFile(fileName); +} + +void LatexGenerator::endFile() +{ + endPlainFile(); + sourceFileName.resize(0); +} + +//void LatexGenerator::writeIndex() +//{ +// startFile("refman.tex"); +//} + +void LatexGenerator::startProjectNumber() +{ + t << "\\\\[1ex]\\large "; +} + +void LatexGenerator::startIndexSection(IndexSections is) +{ + bool &compactLatex = Config_getBool("COMPACT_LATEX"); + QCString &latexHeader = Config_getString("LATEX_HEADER"); + switch (is) + { + case isTitlePageStart: + { + if (latexHeader.isEmpty()) + { + writeDefaultHeaderPart1(t); + } + else + { + QCString header = fileToString(latexHeader); + t << substituteKeywords(header,0); + } + } + break; + case isTitlePageAuthor: + if (latexHeader.isEmpty()) + { + writeDefaultHeaderPart2(t); + } + break; + case isMainPage: + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Introduction}\n" + break; + //case isPackageIndex: + // if (compactLatex) t << "\\section"; else t << "\\chapter"; + // t << "{"; //Package Index}\n" + // break; + case isModuleIndex: + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Module Index}\n" + break; + case isDirIndex: + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Directory Index}\n" + break; + case isNamespaceIndex: + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Namespace Index}\" + break; + case isClassHierarchyIndex: + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Hierarchical Index}\n" + break; + case isCompoundIndex: + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Annotated Compound Index}\n" + break; + case isFileIndex: + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Annotated File Index}\n" + break; + case isPageIndex: + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Annotated Page Index}\n" + break; + case isModuleDocumentation: + { + GroupSDict::Iterator gli(*Doxygen::groupSDict); + GroupDef *gd; + bool found=FALSE; + for (gli.toFirst();(gd=gli.current()) && !found;++gli) + { + if (!gd->isReference()) + { + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Module Documentation}\n"; + found=TRUE; + } + } + } + break; + case isDirDocumentation: + { + SDict<DirDef>::Iterator dli(*Doxygen::directories); + DirDef *dd; + bool found=FALSE; + for (dli.toFirst();(dd=dli.current()) && !found;++dli) + { + if (dd->isLinkableInProject()) + { + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Module Documentation}\n"; + found=TRUE; + } + } + } + break; + case isNamespaceDocumentation: + { + NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict); + NamespaceDef *nd; + bool found=FALSE; + for (nli.toFirst();(nd=nli.current()) && !found;++nli) + { + if (nd->isLinkableInProject()) + { + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; // Namespace Documentation}\n": + found=TRUE; + } + } + } + break; + case isClassDocumentation: + { + ClassSDict::Iterator cli(*Doxygen::classSDict); + ClassDef *cd=0; + bool found=FALSE; + for (cli.toFirst();(cd=cli.current()) && !found;++cli) + { + if (cd->isLinkableInProject() && + cd->templateMaster()==0 && + !cd->isEmbeddedInGroupDocs() + ) + { + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Compound Documentation}\n"; + found=TRUE; + } + } + } + break; + case isFileDocumentation: + { + bool isFirst=TRUE; + FileName *fn=Doxygen::inputNameList->first(); + while (fn) + { + FileDef *fd=fn->first(); + while (fd) + { + if (fd->isLinkableInProject()) + { + if (isFirst) + { + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //File Documentation}\n"; + isFirst=FALSE; + break; + } + } + fd=fn->next(); + } + fn=Doxygen::inputNameList->next(); + } + } + break; + case isExampleDocumentation: + { + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Example Documentation}\n"; + } + break; + case isPageDocumentation: + { + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{"; //Page Documentation}\n"; + } + break; + case isPageDocumentation2: + break; + case isEndIndex: + break; + } +} + +void LatexGenerator::endIndexSection(IndexSections is) +{ + //static bool compactLatex = Config_getBool("COMPACT_LATEX"); + static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); + static QCString latexHeader = Config_getString("LATEX_HEADER"); + static QCString latexFooter = Config_getString("LATEX_FOOTER"); + switch (is) + { + case isTitlePageStart: + break; + case isTitlePageAuthor: + if (latexHeader.isEmpty()) + { + writeDefaultHeaderPart3(t); + } + break; + case isMainPage: + { + QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; + t << "}\n\\label{index}"; + if (Config_getBool("PDF_HYPERLINKS")) t << "\\hypertarget{index}{}"; + t << "\\input{" << indexName << "}\n"; + } + break; + case isModuleIndex: + t << "}\n\\input{modules}\n"; + break; + case isDirIndex: + t << "}\n\\input{dirs}\n"; + break; + case isNamespaceIndex: + t << "}\n\\input{namespaces}\n"; + break; + case isClassHierarchyIndex: + t << "}\n\\input{hierarchy}\n"; + break; + case isCompoundIndex: + t << "}\n\\input{annotated}\n"; + break; + case isFileIndex: + t << "}\n\\input{files}\n"; + break; + case isPageIndex: + t << "}\n\\input{pages}\n"; + break; + case isModuleDocumentation: + { + GroupSDict::Iterator gli(*Doxygen::groupSDict); + GroupDef *gd; + bool found=FALSE; + for (gli.toFirst();(gd=gli.current()) && !found;++gli) + { + if (!gd->isReference()) + { + t << "}\n\\input{" << gd->getOutputFileBase() << "}\n"; + found=TRUE; + } + } + for (;(gd=gli.current());++gli) + { + if (!gd->isReference()) + { + //if (compactLatex) t << "\\input"; else t << "\\include"; + t << "\\input"; + t << "{" << gd->getOutputFileBase() << "}\n"; + } + } + } + break; + case isDirDocumentation: + { + SDict<DirDef>::Iterator dli(*Doxygen::directories); + DirDef *dd; + bool found=FALSE; + for (dli.toFirst();(dd=dli.current()) && !found;++dli) + { + if (dd->isLinkableInProject()) + { + t << "}\n\\input{" << dd->getOutputFileBase() << "}\n"; + found=TRUE; + } + } + for (;(dd=dli.current());++dli) + { + if (dd->isLinkableInProject()) + { + //if (compactLatex) t << "\\input"; else t << "\\include"; + t << "\\input"; + t << "{" << dd->getOutputFileBase() << "}\n"; + } + } + } + break; + case isNamespaceDocumentation: + { + NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict); + NamespaceDef *nd; + bool found=FALSE; + for (nli.toFirst();(nd=nli.current()) && !found;++nli) + { + if (nd->isLinkableInProject()) + { + t << "}\n\\input{" << nd->getOutputFileBase() << "}\n"; + found=TRUE; + } + } + while ((nd=nli.current())) + { + if (nd->isLinkableInProject()) + { + //if (compactLatex) t << "\\input"; else t << "\\include"; + t << "\\input"; + t << "{" << nd->getOutputFileBase() << "}\n"; + } + ++nli; + } + } + break; + case isClassDocumentation: + { + ClassSDict::Iterator cli(*Doxygen::classSDict); + ClassDef *cd=0; + bool found=FALSE; + for (cli.toFirst();(cd=cli.current()) && !found;++cli) + { + if (cd->isLinkableInProject() && + cd->templateMaster()==0 && + !cd->isEmbeddedInGroupDocs() + ) + { + t << "}\n\\input{" << cd->getOutputFileBase() << "}\n"; + found=TRUE; + } + } + for (;(cd=cli.current());++cli) + { + if (cd->isLinkableInProject() && + cd->templateMaster()==0 && + !cd->isEmbeddedInGroupDocs() + ) + { + //if (compactLatex) t << "\\input"; else t << "\\include"; + t << "\\input"; + t << "{" << cd->getOutputFileBase() << "}\n"; + } + } + } + break; + case isFileDocumentation: + { + bool isFirst=TRUE; + FileName *fn=Doxygen::inputNameList->first(); + while (fn) + { + FileDef *fd=fn->first(); + while (fd) + { + if (fd->isLinkableInProject()) + { + if (isFirst) + { + t << "}\n\\input{" << fd->getOutputFileBase() << "}\n"; + if (sourceBrowser && m_prettyCode && fd->generateSourceFile()) + { + //t << "\\include{" << fd->getSourceFileBase() << "}\n"; + t << "\\input{" << fd->getSourceFileBase() << "}\n"; + } + isFirst=FALSE; + } + else + { + //if (compactLatex) t << "\\input" ; else t << "\\include"; + t << "\\input" ; + t << "{" << fd->getOutputFileBase() << "}\n"; + if (sourceBrowser && m_prettyCode && fd->generateSourceFile()) + { + //t << "\\include{" << fd->getSourceFileBase() << "}\n"; + t << "\\input{" << fd->getSourceFileBase() << "}\n"; + } + } + } + fd=fn->next(); + } + fn=Doxygen::inputNameList->next(); + } + } + break; + case isExampleDocumentation: + { + t << "}\n"; + PageSDict::Iterator pdi(*Doxygen::exampleSDict); + PageDef *pd=pdi.toFirst(); + if (pd) + { + t << "\\input{" << pd->getOutputFileBase() << "}\n"; + } + for (++pdi;(pd=pdi.current());++pdi) + { + //if (compactLatex) t << "\\input" ; else t << "\\include"; + t << "\\input"; + t << "{" << pd->getOutputFileBase() << "}\n"; + } + } + break; + case isPageDocumentation: + { + t << "}\n"; +#if 0 + PageSDict::Iterator pdi(*Doxygen::pageSDict); + PageDef *pd=pdi.toFirst(); + bool first=TRUE; + for (pdi.toFirst();(pd=pdi.current());++pdi) + { + if (!pd->getGroupDef() && !pd->isReference()) + { + if (compactLatex) t << "\\section"; else t << "\\chapter"; + t << "{" << pd->title(); + t << "}\n"; + + if (compactLatex || first) t << "\\input" ; else t << "\\include"; + t << "{" << pd->getOutputFileBase() << "}\n"; + first=FALSE; + } + } +#endif + } + break; + case isPageDocumentation2: + break; + case isEndIndex: + if (latexFooter.isEmpty()) + { + writeDefaultFooter(t); + } + else + { + QCString footer = fileToString(latexFooter); + t << substituteKeywords(footer,0); + } + break; + } +} + +void LatexGenerator::writePageLink(const char *name, bool /*first*/) +{ + //bool &compactLatex = Config_getBool("COMPACT_LATEX"); + // next is remove for bug615957 + //if (compactLatex || first) t << "\\input" ; else t << "\\include"; + t << "\\input" ; + t << "{" << name << "}\n"; +} + + +void LatexGenerator::writeStyleInfo(int part) +{ + switch(part) + { + case 0: + { + //QCString pname=Config_getString("PROJECT_NAME").stripWhiteSpace(); + startPlainFile("doxygen.sty"); + writeDefaultStyleSheetPart1(t); + } + break; + case 1: + case 3: + t << " Doxygen "; + break; + case 2: + { + writeDefaultStyleSheetPart2(t); + } + break; + case 4: + { + writeDefaultStyleSheetPart3(t); + endPlainFile(); + } + break; + } +} + +void LatexGenerator::newParagraph() +{ + t << endl << endl; +} + +void LatexGenerator::startParagraph() +{ + t << endl << endl; +} + +void LatexGenerator::endParagraph() +{ + t << endl << endl; +} + +void LatexGenerator::writeString(const char *text) +{ + t << text; +} + +void LatexGenerator::startIndexItem(const char *ref,const char *fn) +{ + t << "\\item "; + if (!ref && fn) + { + t << "\\contentsline{section}{"; + } +} + +void LatexGenerator::endIndexItem(const char *ref,const char *fn) +{ + if (!ref && fn) + { + t << "}{\\pageref{" << fn << "}}{}" << endl; + } +} + +//void LatexGenerator::writeIndexFileItem(const char *,const char *text) +//{ +// t << "\\item\\contentsline{section}{"; +// docify(text); +// t << "}{\\pageref{" << text << "}}" << endl; +//} + + +void LatexGenerator::startHtmlLink(const char *url) +{ + if (Config_getBool("PDF_HYPERLINKS")) + { + t << "\\href{"; + t << url; + t << "}"; + } + t << "{\\tt "; +} + +void LatexGenerator::endHtmlLink() +{ + t << "}"; +} + +//void LatexGenerator::writeMailLink(const char *url) +//{ +// if (Config_getBool("PDF_HYPERLINKS")) +// { +// t << "\\href{mailto:"; +// t << url; +// t << "}"; +// } +// t << "{\\tt "; +// docify(url); +// t << "}"; +//} + +void LatexGenerator::writeStartAnnoItem(const char *,const char *, + const char *path,const char *name) +{ + t << "\\item\\contentsline{section}{\\bf "; + if (path) docify(path); + docify(name); + t << "} "; +} + +void LatexGenerator::writeEndAnnoItem(const char *name) +{ + t << "}{\\pageref{" << name << "}}{}" << endl; +} + +void LatexGenerator::startIndexKey() +{ + t << "\\item\\contentsline{section}{"; +} + +void LatexGenerator::endIndexKey() +{ +} + +void LatexGenerator::startIndexValue(bool hasBrief) +{ + t << " "; + if (hasBrief) t << "("; +} + +void LatexGenerator::endIndexValue(const char *name,bool hasBrief) +{ + if (hasBrief) t << ")"; + t << "}{\\pageref{" << name << "}}{}" << endl; +} + +//void LatexGenerator::writeClassLink(const char *,const char *, +// const char *,const char *name) +//{ +// t << "{\\bf "; +// docify(name); +// t << "}"; +//} + +void LatexGenerator::startTextLink(const char *f,const char *anchor) +{ + if (!disableLinks && Config_getBool("PDF_HYPERLINKS")) + { + t << "\\hyperlink{"; + if (f) t << stripPath(f); + if (anchor) t << "_" << anchor; + t << "}{"; + } + else + { + t << "{\\bf "; + } +} + +void LatexGenerator::endTextLink() +{ + t << "}"; +} + +void LatexGenerator::writeObjectLink(const char *ref, const char *f, + const char *anchor, const char *text) +{ + if (!disableLinks && !ref && Config_getBool("PDF_HYPERLINKS")) + { + t << "\\hyperlink{"; + if (f) t << stripPath(f); + if (f && anchor) t << "_"; + if (anchor) t << anchor; + t << "}{"; + docify(text); + t << "}"; + } + else + { + t << "{\\bf "; + docify(text); + t << "}"; + } +} + +void LatexGenerator::startPageRef() +{ + t << " \\doxyref{}{"; +} + +void LatexGenerator::endPageRef(const char *clname, const char *anchor) +{ + t << "}{"; + if (clname) t << clname; + if (anchor) t << "_" << anchor; + t << "}"; +} + +void LatexGenerator::writeCodeLink(const char *ref,const char *f, + const char *anchor,const char *name, + const char *) +{ + static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); + int l = strlen(name); + if (col+l>80) + { + t << "\n "; + col=0; + } + if (m_prettyCode && !disableLinks && !ref && usePDFLatex && pdfHyperlinks) + { + t << "\\hyperlink{"; + if (f) t << stripPath(f); + if (f && anchor) t << "_"; + if (anchor) t << anchor; + t << "}{" << name << "}"; + } + else + { + t << name; + } + col+=l; +} + +void LatexGenerator::startTitleHead(const char *fileName) +{ + static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); + if (usePDFLatex && pdfHyperlinks && fileName) + { + t << "\\hypertarget{" << stripPath(fileName) << "}{" << endl; + } + if (Config_getBool("COMPACT_LATEX")) + { + t << "\\subsection{"; + } + else + { + t << "\\section{"; + } +} + +void LatexGenerator::endTitleHead(const char *fileName,const char *name) +{ + static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); + t << "}" << endl; + if (name) + { + t << "\\label{" << fileName << "}\\index{"; + escapeLabelName(name); + t << "@{"; + escapeMakeIndexChars(name); + t << "}}" << endl; + } + if (usePDFLatex && pdfHyperlinks && fileName) + { + t << "}" << endl; + } +} + +void LatexGenerator::startTitle() +{ + if (Config_getBool("COMPACT_LATEX")) + { + t << "\\subsection{"; + } + else + { + t << "\\section{"; + } +} + +void LatexGenerator::startGroupHeader(int extraIndentLevel) +{ + if (Config_getBool("COMPACT_LATEX")) + { + extraIndentLevel++; + } + + if (extraIndentLevel==3) + { + t << "\\subparagraph*{"; + } + else if (extraIndentLevel==2) + { + t << "\\paragraph{"; + } + else if (extraIndentLevel==1) + { + t << "\\subsubsection{"; + } + else // extraIndentLevel==0 + { + t << "\\subsection{"; + } + disableLinks=TRUE; +} + +void LatexGenerator::endGroupHeader(int) +{ + disableLinks=FALSE; + t << "}" << endl; +} + +void LatexGenerator::startMemberHeader(const char *) +{ + if (Config_getBool("COMPACT_LATEX")) + { + t << "\\subsubsection*{"; + } + else + { + t << "\\subsection*{"; + } + disableLinks=TRUE; +} + +void LatexGenerator::endMemberHeader() +{ + disableLinks=FALSE; + t << "}" << endl; +} + +void LatexGenerator::startMemberDoc(const char *clname, + const char *memname, + const char *, + const char *title, + bool showInline) +{ + if (memname && memname[0]!='@') + { + t << "\\index{"; + if (clname) + { + escapeLabelName(clname); + t << "@{"; + escapeMakeIndexChars(clname); + t << "}!"; + } + escapeLabelName(memname); + t << "@{"; + escapeMakeIndexChars(memname); + t << "}}" << endl; + + t << "\\index{"; + escapeLabelName(memname); + t << "@{"; + escapeMakeIndexChars(memname); + t << "}"; + if (clname) + { + t << "!" << clname << "@{"; + docify(clname); + t << "}"; + } + t << "}" << endl; + } + static const char *levelLab[] = { "subsubsection","paragraph","subparagraph", "subparagraph" }; + static bool compactLatex = Config_getBool("COMPACT_LATEX"); + int level=0; + if (showInline) level+=2; + if (compactLatex) level++; + t << "\\" << levelLab[level]; + + //if (Config_getBool("PDF_HYPERLINKS") && memname) + //{ + // t << "["; + // escapeMakeIndexChars(this,t,memname); + // t << "]"; + //} + t << "[{"; + escapeMakeIndexChars(title); + t << "}]"; + t << "{\\setlength{\\rightskip}{0pt plus 5cm}"; + disableLinks=TRUE; +} + +void LatexGenerator::endMemberDoc(bool) +{ + disableLinks=FALSE; + t << "}"; + //if (Config_getBool("COMPACT_LATEX")) t << "\\hfill"; +} + +void LatexGenerator::startDoxyAnchor(const char *fName,const char *, + const char *anchor, const char *, + const char *) +{ + static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); + if (usePDFLatex && pdfHyperlinks) + { + t << "\\hypertarget{"; + if (fName) t << stripPath(fName); + if (anchor) t << "_" << anchor; + t << "}{" << endl; + } +} + +void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor) +{ + static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); + if (usePDFLatex && pdfHyperlinks) + { + t << "}" << endl; + } + t << "\\label{"; + if (fName) t << fName; + if (anchor) t << "_" << anchor; + t << "}" << endl; +} + +void LatexGenerator::writeAnchor(const char *fName,const char *name) +{ + //printf("LatexGenerator::writeAnchor(%s,%s)\n",fName,name); + t << "\\label{" << name << "}" << endl; + static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); + if (usePDFLatex && pdfHyperlinks) + { + if (fName) + { + t << "\\hypertarget{" << stripPath(fName) << "_" << name << "}{}" << endl; + } + else + { + t << "\\hypertarget{" << name << "}{}" << endl; + } + } +} + + +//void LatexGenerator::writeLatexLabel(const char *clName,const char *anchor) +//{ +// writeDoxyAnchor(0,clName,anchor,0); +//} + +void LatexGenerator::addIndexItem(const char *s1,const char *s2) +{ + if (s1) + { + t << "\\index{"; + escapeLabelName(s1); + t << "@{"; + escapeMakeIndexChars(s1); + t << "}"; + if (s2) + { + t << "!"; + escapeLabelName(s2); + t << "@{"; + escapeMakeIndexChars(s2); + t << "}"; + } + t << "}"; + } +} + + +void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::SectionType type) +{ + static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); + if (usePDFLatex && pdfHyperlinks) + { + t << "\\hypertarget{" << stripPath(lab) << "}{}"; + } + t << "\\"; + if (Config_getBool("COMPACT_LATEX")) + { + switch(type) + { + case SectionInfo::Page: t << "subsection"; break; + case SectionInfo::Section: t << "subsubsection"; break; + case SectionInfo::Subsection: t << "paragraph"; break; + case SectionInfo::Subsubsection: t << "subparagraph"; break; + case SectionInfo::Paragraph: t << "subparagraph"; break; + default: ASSERT(0); break; + } + t << "{"; + } + else + { + switch(type) + { + case SectionInfo::Page: t << "section"; break; + case SectionInfo::Section: t << "subsection"; break; + case SectionInfo::Subsection: t << "subsubsection"; break; + case SectionInfo::Subsubsection: t << "paragraph"; break; + case SectionInfo::Paragraph: t << "subparagraph"; break; + default: ASSERT(0); break; + } + t << "{"; + } +} + +void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) +{ + t << "}\\label{" << lab << "}" << endl; +} + + +void LatexGenerator::docify(const char *str) +{ + filterLatexString(t,str,insideTabbing,FALSE); +} + +void LatexGenerator::codify(const char *str) +{ + if (str) + { + const char *p=str; + char c; + char cs[5]; + int spacesToNextTabStop; + static int tabSize = Config_getInt("TAB_SIZE"); + while (*p) + { + //static bool MultiByte = FALSE; + c=*p++; + + switch(c) + { + case 0x0c: break; // remove ^L + case '\t': spacesToNextTabStop = + tabSize - (col%tabSize); + t << Doxygen::spaces.left(spacesToNextTabStop); + col+=spacesToNextTabStop; + break; + case '\n': t << '\n'; col=0; break; + default: cs[0]=c; + cs[1]=0; + int bytes=1; + if (c<0) // multibyte utf-8 character + { + bytes++; // 1xxx.xxxx: >=2 byte character + cs[1]=*p; + cs[2]=0; + if (((uchar)c&0xE0)==0xE0) + { + bytes++; // 111x.xxxx: >=3 byte character + cs[2]=*(p+1); + cs[3]=0; + } + if (((uchar)c&0xF0)==0xF0) + { + bytes++; // 1111.xxxx: 4 byte character + cs[2]=*(p+2); + cs[4]=0; + } + } + if (m_prettyCode) + { + filterLatexString(t,cs,insideTabbing,TRUE); + } + else + { + t << cs; + } + if (col>=80) + { + t << "\n "; + col=0; + } + else + { + col++; + } + p+=(bytes-1); // skip to next character + break; + } + } + } +} + +void LatexGenerator::writeChar(char c) +{ + char cs[2]; + cs[0]=c; + cs[1]=0; + docify(cs); +} + +void LatexGenerator::startClassDiagram() +{ + //if (Config_getBool("COMPACT_LATEX")) t << "\\subsubsection"; else t << "\\subsection"; + //t << "{"; +} + +void LatexGenerator::endClassDiagram(const ClassDiagram &d, + const char *fileName,const char *) +{ + d.writeFigure(t,dir,fileName); +} + + +void LatexGenerator::startAnonTypeScope(int indent) +{ + if (indent==0) + { + t << "\\begin{tabbing}" << endl; + t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill" << endl; + insideTabbing=TRUE; + } + m_indent=indent; +} + +void LatexGenerator::endAnonTypeScope(int indent) +{ + if (indent==0) + { + t << endl << "\\end{tabbing}"; + insideTabbing=FALSE; + } + m_indent=indent; +} + +void LatexGenerator::startMemberTemplateParams() +{ + if (templateMemberItem) + { + t << "{\\footnotesize "; + } +} + +void LatexGenerator::endMemberTemplateParams() +{ + if (templateMemberItem) + { + t << "}\\\\"; + } +} + +void LatexGenerator::startMemberItem(int annoType) +{ + //printf("LatexGenerator::startMemberItem(%d)\n",annType); + if (!insideTabbing) + { + t << "\\item " << endl; + templateMemberItem = (annoType == 3); + } +} + +void LatexGenerator::endMemberItem() +{ + if (insideTabbing) + { + t << "\\\\"; + } + templateMemberItem = FALSE; + t << endl; +} + +void LatexGenerator::startMemberDescription() +{ + if (!insideTabbing) + { + t << "\\begin{DoxyCompactList}\\small\\item\\em "; + } + else + { + for (int i=0;i<m_indent+2;i++) t << "\\>"; + t << "{\\em "; + } +} + +void LatexGenerator::endMemberDescription() +{ + if (!insideTabbing) + { + //t << "\\item\\end{DoxyCompactList}"; + t << "\\end{DoxyCompactList}"; + } + else + { + t << "}\\\\\n"; + } +} + + +void LatexGenerator::writeNonBreakableSpace(int) +{ + //printf("writeNonBreakbleSpace()\n"); + if (insideTabbing) + { + t << "\\>"; + } + else + t << "~"; +} + +void LatexGenerator::startMemberList() +{ + if (!insideTabbing) + { + t << "\\begin{DoxyCompactItemize}" << endl; + } +} + +void LatexGenerator::endMemberList() +{ + //printf("LatexGenerator::endMemberList(%d)\n",insideTabbing); + if (!insideTabbing) + { + t << "\\end{DoxyCompactItemize}" << endl; + } +} + + +void LatexGenerator::startMemberGroupHeader(bool hasHeader) +{ + if (hasHeader) t << "\\begin{Indent}"; + if (Config_getBool("COMPACT_LATEX")) + { + t << "\\subparagraph*{"; + } + else + { + t << "\\paragraph*{"; + } +} + +void LatexGenerator::endMemberGroupHeader() +{ + t << "}" << endl; +} + +void LatexGenerator::startMemberGroupDocs() +{ + t << "{\\em "; +} + +void LatexGenerator::endMemberGroupDocs() +{ + t << "}"; +} + +void LatexGenerator::startMemberGroup() +{ +} + +void LatexGenerator::endMemberGroup(bool hasHeader) +{ + if (hasHeader)t << "\\end{Indent}"; + t << endl; +} + +void LatexGenerator::startDotGraph() +{ + newParagraph(); +} + +void LatexGenerator::endDotGraph(const DotClassGraph &g) +{ + g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath); +} + +void LatexGenerator::startInclDepGraph() +{ +} + +void LatexGenerator::endInclDepGraph(const DotInclDepGraph &g) +{ + g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath); +} + +void LatexGenerator::startGroupCollaboration() +{ +} + +void LatexGenerator::endGroupCollaboration(const DotGroupCollaboration &g) +{ + g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath); +} + +void LatexGenerator::startCallGraph() +{ +} + +void LatexGenerator::endCallGraph(const DotCallGraph &g) +{ + g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath); +} + +void LatexGenerator::startDirDepGraph() +{ +} + +void LatexGenerator::endDirDepGraph(const DotDirDeps &g) +{ + g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath); +} + +void LatexGenerator::startDescription() +{ + t << "\\begin{description}" << endl; +} + +void LatexGenerator::endDescription() +{ + t << "\\end{description}" << endl; + firstDescItem=TRUE; +} + +void LatexGenerator::startDescItem() +{ + firstDescItem=TRUE; + t << "\\item["; +} + +void LatexGenerator::endDescItem() +{ + if (firstDescItem) + { + t << "]" << endl; + firstDescItem=FALSE; + } + else + { + lineBreak(); + } +} + +void LatexGenerator::startSimpleSect(SectionTypes,const char *file, + const char *anchor,const char *title) +{ + t << "\\begin{Desc}\n\\item["; + if (file) + { + writeObjectLink(0,file,anchor,title); + } + else + { + docify(title); + } + t << "]"; +} + +void LatexGenerator::endSimpleSect() +{ + t << "\\end{Desc}" << endl; +} + +void LatexGenerator::startParamList(ParamListTypes,const char *title) +{ + t << "\\begin{Desc}\n\\item["; + docify(title); + t << "]"; +} + +void LatexGenerator::endParamList() +{ + t << "\\end{Desc}" << endl; +} + +void LatexGenerator::startParameterList(bool openBracket) +{ + /* start of ParameterType ParameterName list */ + if (openBracket) t << "("; + t << endl << "\\begin{DoxyParamCaption}" << endl; +} + +void LatexGenerator::endParameterList() +{ +} + + +void LatexGenerator::startParameterType(bool /*first*/,const char *key) +{ + t << "\\item[{"; + t << key; +// if (!first) +// { +// t << "\\/ " << key << " "; +// } +} + +void LatexGenerator::endParameterType() +{ + t << "}]"; +} + +void LatexGenerator::startParameterName(bool /*oneArgOnly*/) +{ + t << "{"; +} + +void LatexGenerator::endParameterName(bool last,bool /* emptyList */,bool closeBracket) +{ + t << "}" << endl; + + if (last) + { + t << "\\end{DoxyParamCaption}" << endl; + if (closeBracket) t << ")"; + } +} + + +void LatexGenerator::printDoc(DocNode *n,const char *langExt) +{ + LatexDocVisitor *visitor = new LatexDocVisitor(t,*this,langExt,insideTabbing); + n->accept(visitor); + delete visitor; +} + +void LatexGenerator::startConstraintList(const char *header) +{ + t << "\\begin{Desc}\n\\item["; + docify(header); + t << "]"; + t << "\\begin{description}" << endl; +} + +void LatexGenerator::startConstraintParam() +{ + t << "\\item[{\\em "; +} + +void LatexGenerator::endConstraintParam() +{ +} + +void LatexGenerator::startConstraintType() +{ + t << "} : {\\em "; +} + +void LatexGenerator::endConstraintType() +{ + t << "}]"; +} + +void LatexGenerator::startConstraintDocs() +{ +} + +void LatexGenerator::endConstraintDocs() +{ +} + +void LatexGenerator::endConstraintList() +{ + t << "\\end{description}" << endl; + t << "\\end{Desc}" << endl; +} + +void LatexGenerator::escapeLabelName(const char *s) +{ + const char *p=s; + char str[2]; + str[1]=0; + char c; + while ((c=*p++)) + { + switch (c) + { + case '%': t << "\\%"; break; + //case '|': t << "\\tt{\"|}"; break; + //case '!': t << "\"!"; break; + default: str[0]=c; docify(str); break; + } + } +} + +void LatexGenerator::escapeMakeIndexChars(const char *s) +{ + const char *p=s; + char str[2]; + str[1]=0; + char c; + while ((c=*p++)) + { + switch (c) + { + //case '!': t << "\"!"; break; + case '"': t << "\"\""; break; + case '@': t << "\"@"; break; + //case '|': t << "\\tt{\"|}"; break; + case '[': t << "["; break; + case ']': t << "]"; break; + default: str[0]=c; docify(str); break; + } + } +} + +void LatexGenerator::startCodeFragment() +{ + //if (m_prettyCode) + //{ + // t << endl << endl; + // t << "\\begin{footnotesize}\\begin{alltt}\n"; + //} + //else + //{ + t << "\n\\begin{DoxyCode}\n"; + //} +} + +void LatexGenerator::endCodeFragment() +{ + //if (m_prettyCode) + //{ + // t << "\\end{alltt}\\end{footnotesize}" << endl; + //} + //else + //{ + t << "\\end{DoxyCode}\n"; + //} +} + +void LatexGenerator::writeLineNumber(const char *ref,const char *fileName,const char *anchor,int l) +{ + if (m_prettyCode) + { + QCString lineNumber; + lineNumber.sprintf("%05d",l); + + if (fileName && !sourceFileName.isEmpty()) + { + QCString lineAnchor; + lineAnchor.sprintf("_l%05d",l); + lineAnchor.prepend(sourceFileName); + startCodeAnchor(lineAnchor); + writeCodeLink(ref,fileName,anchor,lineNumber,0); + endCodeAnchor(); + } + else + { + codify(lineNumber); + } + t << " "; + } + else + { + t << l << " "; + } +} + +void LatexGenerator::startCodeLine() +{ + col=0; +} + +void LatexGenerator::endCodeLine() +{ + codify("\n"); +} + +void LatexGenerator::startFontClass(const char *name) +{ + if (!m_prettyCode) return; + t << "\\textcolor{" << name << "}{"; +} + +void LatexGenerator::endFontClass() +{ + if (!m_prettyCode) return; + t << "}"; +} + +void LatexGenerator::startCodeAnchor(const char *name) +{ + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); + static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + if (!m_prettyCode) return; + if (usePDFLatex && pdfHyperlinks) + { + t << "\\hypertarget{" << stripPath(name) << "}{}"; + } +} + +void LatexGenerator::endCodeAnchor() +{ +} + +void LatexGenerator::startInlineHeader() +{ + if (Config_getBool("COMPACT_LATEX")) + { + t << "\\paragraph*{"; + } + else + { + t << "\\subsubsection*{"; + } +} + +void LatexGenerator::endInlineHeader() +{ + t << "}" << endl; +} + Index: branches/xZenu/src/util/doxygen/src/commentscan.h =================================================================== --- branches/xZenu/src/util/doxygen/src/commentscan.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/commentscan.h (revision 1322) @@ -0,0 +1,84 @@ +/****************************************************************************** + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef COMMENTSCAN_H +#define COMMENTSCAN_H + +#include "qtbc.h" +#include "entry.h" + +class ParserInterface; + +/** @file + * @brief Interface for the comment block parser */ + +/** Invokes the comment block parser with the request to parse a + * single comment block. + * @param[in] parser The language parse that invoked this function. + * The comment block parse may invoke + * ParserInterface::parsePrototype() in order to parse + * the argument of a @@fn command. + * @param[in] curEntry The Entry to which the comment block belongs. + * Any information (like documentation) that is found in + * the comment block will be stored in this entry. + * @param[in] comment A string representing the actual comment block. + * Note that leading *'s are already stripped from the comment block. + * @param[in] fileName The name of the file in which the comment is found. + * Mainly used for producing warnings. + * @param[in,out] lineNr The line number at which the comment block was found. + * When the function returns it will be set to the last line parsed. + * @param[in] isBrief TRUE iff this comment block represents a brief description. + * @param[in] isJavaDocStyle TRUE iff this comment block is in "JavaDoc" style. + * This means that it starts as a brief description until the end of + * the sentences is found and then proceeds as a detailed description. + * @param[in] isInbody TRUE iff this comment block is located in the body of + * a function. + * @param[in,out] prot The protection level in which this comment block was + * found. Commands in the comment block may override this. + * @param[in,out] position The character position within \a comment where the + * comment block starts. Typically used in case the comment block + * contains multiple structural commands. + * @param[out] newEntryNeeded Boolean that is TRUE if the comment block parser + * finds that a the comment block finishes the entry and a new one + * needs to be started. + * @returns TRUE if the comment requires further processing. The + * parameter \a newEntryNeeded will typically be true in this case and + * \a position will indicate the offset inside the \a comment string + * where to proceed parsing. FALSE indicates no further processing is + * needed. + */ +bool parseCommentBlock(ParserInterface *parser, + Entry *curEntry, + const QCString &comment, + const QCString &fileName, + int &lineNr, + bool isBrief, + bool isJavaDocStyle, + bool isInbody, + Protection &prot, + int &position, + bool &newEntryNeeded + ); + +void groupEnterFile(const char *file,int line); +void groupLeaveFile(const char *file,int line); +void groupLeaveCompound(const char *file,int line,const char *name); +void groupEnterCompound(const char *file,int line,const char *name); +void openGroup(Entry *e,const char *file,int line); +void closeGroup(Entry *,const char *file,int line,bool foundInline=FALSE); +void initGroupInfo(Entry *e); + + +#endif Index: branches/xZenu/src/util/doxygen/src/membername.h =================================================================== --- branches/xZenu/src/util/doxygen/src/membername.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/membername.h (revision 1322) @@ -0,0 +1,98 @@ +/****************************************************************************** + * + * $Id: membername.h,v 1.17 2001/03/19 19:27:41 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef MEMBERNAME_H +#define MEMBERNAME_H + +#include <qlist.h> +#include "memberdef.h" +#include "sortdict.h" + +class MemberName : public QList<MemberDef> +{ + public: + MemberName(const char *name); + ~MemberName(); + const char *memberName() const { return name; } + + int compareItems(GCI item1,GCI item2); + private: + QCString name; +}; + +class MemberNameIterator : public QListIterator<MemberDef> +{ + public: + MemberNameIterator( const MemberName &list); +}; + +class MemberNameSDict : public SDict<MemberName> +{ + public: + MemberNameSDict(int size) : SDict<MemberName>(size) {} + ~MemberNameSDict() {} + + int compareItems(GCI item1,GCI item2); +}; + +struct MemberInfo +{ + MemberInfo(MemberDef *md,Protection p,Specifier v,bool inh) : + memberDef(md), prot(p), virt(v), inherited(inh), ambigClass(0) {} + ~MemberInfo() {} + MemberDef *memberDef; + Protection prot; + Specifier virt; + bool inherited; + QCString scopePath; + QCString ambiguityResolutionScope; + ClassDef *ambigClass; +}; + +class MemberNameInfo : public QList<MemberInfo> +{ + public: + MemberNameInfo(const char *name); + ~MemberNameInfo() {} + const char *memberName() const { return name; } + int compareItems(GCI item1,GCI item2); + private: + QCString name; +}; + +class MemberNameInfoIterator : public QListIterator<MemberInfo> +{ + public: + MemberNameInfoIterator(const MemberNameInfo &mnii) + : QListIterator<MemberInfo>(mnii) {} +}; + + +class MemberNameInfoSDict : public SDict<MemberNameInfo> +{ + public: + MemberNameInfoSDict(int size) : SDict<MemberNameInfo>(size) {} + ~MemberNameInfoSDict() {} + int compareItems(GCI item1,GCI item2) + { return stricmp( + ((MemberNameInfo *)item1)->memberName(), + ((MemberNameInfo *)item2)->memberName() + ); + } +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/htmlattrib.h =================================================================== --- branches/xZenu/src/util/doxygen/src/htmlattrib.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/htmlattrib.h (revision 1322) @@ -0,0 +1,65 @@ +/****************************************************************************** + * + * $Id: htmlattrib.h,v 1.2 2001/01/01 10:15:18 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _HTMLATTRIB_H +#define _HTMLATTRIB_H + +/*! A Html option. A name, value pair */ +struct HtmlAttrib +{ + QCString name; + QCString value; +}; + +/*! @brief A list of Html attributes. + * + * The Html attributes are deeply copied into the list. + */ +class HtmlAttribList : public QList<HtmlAttrib> +{ + public: + HtmlAttribList() : QList<HtmlAttrib>() { setAutoDelete(TRUE); } + ~HtmlAttribList() { clear(); } + HtmlAttribList(const HtmlAttribList &l) : QList<HtmlAttrib>() + { operator=(l); } + HtmlAttribList &operator=(const HtmlAttribList &l) + { clear(); QList<HtmlAttrib>::operator=(l); return *this; } + QCString toString() const + { + HtmlAttribList *that = (HtmlAttribList *)this; + QCString result; + HtmlAttrib *attr=that->first(); + while (attr) + { + result+=" "+attr->name+"=\""+attr->value+"\""; + attr=that->next(); + } + return result; + } + private: + QCollection::Item newItem( QCollection::Item d ) + { return (QCollection::Item)new HtmlAttrib(*(HtmlAttrib *)d); } + void deleteItem(QCollection::Item d) + { delete (HtmlAttrib *)d; } +}; + +/*! @brief Html attribute list iterator */ +class HtmlAttribListIterator : public QListIterator<HtmlAttrib> +{ + public: + HtmlAttribListIterator(const HtmlAttribList &l) : QListIterator<HtmlAttrib>(l) {} +}; + +#endif + Index: branches/xZenu/src/util/doxygen/src/cppvalue.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/cppvalue.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/cppvalue.cpp (revision 1322) @@ -0,0 +1,95 @@ +/****************************************************************************** + * + * $Id: cppvalue.cpp,v 1.6 2001/03/19 19:27:40 root Exp $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include <stdlib.h> + +#include "cppvalue.h" +#include "constexp.h" + +CPPValue parseOctal() +{ + long val = 0; + for (const char *p = g_strToken.data(); *p != 0; p++) + { + if (*p >= '0' && *p <= '7') val = val * 8 + *p - '0'; + } + return CPPValue(val); +} + +CPPValue parseDecimal() +{ + long val = 0; + for (const char *p = g_strToken.data(); *p != 0; p++) + { + if (*p >= '0' && *p <= '9') val = val * 10 + *p - '0'; + } + return CPPValue(val); +} + +CPPValue parseHexadecimal() +{ + long val = 0; + for (const char *p = g_strToken.data(); *p != 0; p++) + { + if (*p >= '0' && *p <= '9') val = val * 16 + *p - '0'; + else if (*p >= 'a' && *p <= 'f') val = val * 16 + *p - 'a' + 10; + else if (*p >= 'A' && *p <= 'F') val = val * 16 + *p - 'A' + 10; + } + //printf("parseHexadecimal %s->%x\n",g_strToken.data(),val); + return CPPValue(val); +} + +CPPValue parseCharacter() // does not work for '\n' and the alike +{ + if (g_strToken[1]=='\\') + { + switch(g_strToken[2]) + { + case 'n': return CPPValue((long)'\n'); + case 't': return CPPValue((long)'\t'); + case 'v': return CPPValue((long)'\v'); + case 'b': return CPPValue((long)'\b'); + case 'r': return CPPValue((long)'\r'); + case 'f': return CPPValue((long)'\f'); + case 'a': return CPPValue((long)'\a'); + case '\\': return CPPValue((long)'\\'); + case '?': return CPPValue((long)'\?'); + case '\'': return CPPValue((long)'\''); + case '"': return CPPValue((long)'"'); + case '0': // fall through + case '1': // fall through + case '2': // fall through + case '3': // fall through + case '4': // fall through + case '5': // fall through + case '6': // fall through + case '7': // fall through + return parseOctal(); + case 'x': + case 'X': return parseHexadecimal(); + default: printf("Invalid escape sequence %s found!\n",g_strToken.data()); + return CPPValue(0L); + } + } + return CPPValue((long)g_strToken[1]); +} + +CPPValue parseFloat() +{ + return CPPValue(atof(g_strToken)); +} Index: branches/xZenu/src/util/doxygen/src/commentscan.l =================================================================== --- branches/xZenu/src/util/doxygen/src/commentscan.l (revision 0) +++ branches/xZenu/src/util/doxygen/src/commentscan.l (revision 1322) @@ -0,0 +1,2761 @@ +/***************************************************************************** + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +%{ + +/* + * includes + */ +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <ctype.h> + +#include "qtbc.h" +#include <qarray.h> +#include <qstack.h> +#include <qregexp.h> +#include <unistd.h> +#include <qfile.h> + +#include "scanner.h" +#include "entry.h" +#include "doxygen.h" +#include "message.h" +#include "config.h" +#include "util.h" +#include "index.h" +#include "defargs.h" +#include "language.h" +#include "outputlist.h" +#include "membergroup.h" +#include "reflist.h" +#include "debug.h" +#include "parserintf.h" + +// forward declarations +static bool handleBrief(const QCString &); +static bool handleFn(const QCString &); +static bool handleDef(const QCString &); +static bool handleOverload(const QCString &); +static bool handleEnum(const QCString &); +static bool handleDefGroup(const QCString &); +static bool handleAddToGroup(const QCString &); +static bool handleWeakGroup(const QCString &); +static bool handleNamespace(const QCString &); +static bool handlePackage(const QCString &); +static bool handleClass(const QCString &); +static bool handleHeaderFile(const QCString &); +static bool handleProtocol(const QCString &); +static bool handleCategory(const QCString &); +static bool handleUnion(const QCString &); +static bool handleStruct(const QCString &); +static bool handleInterface(const QCString &); +static bool handleIdlException(const QCString &); +static bool handlePage(const QCString &); +static bool handleMainpage(const QCString &); +static bool handleFile(const QCString &); +static bool handleDir(const QCString &); +static bool handleExample(const QCString &); +static bool handleDetails(const QCString &); +static bool handleName(const QCString &); +static bool handleTodo(const QCString &); +static bool handleTest(const QCString &); +static bool handleBug(const QCString &); +static bool handleSubpage(const QCString &s); +static bool handleDeprecated(const QCString &); +static bool handleXRefItem(const QCString &); +static bool handleRelated(const QCString &); +static bool handleRelatedAlso(const QCString &); +static bool handleMemberOf(const QCString &); +static bool handleRefItem(const QCString &); +static bool handleSection(const QCString &); +static bool handleAnchor(const QCString &); +static bool handleFormatBlock(const QCString &); +static bool handleAddIndex(const QCString &); +static bool handleIf(const QCString &); +static bool handleIfNot(const QCString &); +static bool handleElseIf(const QCString &); +static bool handleElse(const QCString &); +static bool handleEndIf(const QCString &); +static bool handleIngroup(const QCString &); +static bool handleNoSubGrouping(const QCString &); +static bool handleShowInitializer(const QCString &); +static bool handleHideInitializer(const QCString &); +static bool handleCallgraph(const QCString &); +static bool handleCallergraph(const QCString &); +static bool handleInternal(const QCString &); +static bool handleLineBr(const QCString &); +static bool handleStatic(const QCString &); +static bool handlePure(const QCString &); +static bool handlePrivate(const QCString &); +static bool handlePrivateSection(const QCString &); +static bool handleProtected(const QCString &); +static bool handleProtectedSection(const QCString &); +static bool handlePublic(const QCString &s); +static bool handlePublicSection(const QCString &s); +static bool handleInherit(const QCString &); +static bool handleExtends(const QCString &); + +typedef bool (*DocCmdFunc)(const QCString &name); + +struct DocCmdMap +{ + const char *cmdName; + DocCmdFunc handler; + bool endsBrief; +}; + +// map of command to handler function +static DocCmdMap docCmdMap[] = +{ + // command name handler function ends brief description + { "brief", &handleBrief, FALSE }, + { "short", &handleBrief, FALSE }, + { "fn", &handleFn, FALSE }, + { "var", &handleFn, FALSE }, + { "typedef", &handleFn, FALSE }, + { "property", &handleFn, FALSE }, + { "def", &handleDef, FALSE }, + { "overload", &handleOverload, FALSE }, + { "enum", &handleEnum, FALSE }, + { "defgroup", &handleDefGroup, FALSE }, + { "addtogroup", &handleAddToGroup, FALSE }, + { "weakgroup", &handleWeakGroup, FALSE }, + { "namespace", &handleNamespace, FALSE }, + { "package", &handlePackage, FALSE }, + { "class", &handleClass, FALSE }, + { "headerfile", &handleHeaderFile, FALSE }, + { "protocol", &handleProtocol, FALSE }, + { "category", &handleCategory, FALSE }, + { "union", &handleUnion, FALSE }, + { "struct", &handleStruct, FALSE }, + { "interface", &handleInterface, FALSE }, + { "idlexcept", &handleIdlException, FALSE }, + { "page", &handlePage, FALSE }, + { "mainpage", &handleMainpage, FALSE }, + { "file", &handleFile, FALSE }, + { "dir", &handleDir, FALSE }, + { "example", &handleExample, FALSE }, + { "details", &handleDetails, TRUE }, + { "name", &handleName, FALSE }, + { "todo", &handleTodo, FALSE }, // end brief will be done differently + { "test", &handleTest, FALSE }, // end brief will be done differently + { "bug", &handleBug, FALSE }, // end brief will be done differently + { "deprecated", &handleDeprecated, FALSE }, // end brief will be done differently + { "xrefitem", &handleXRefItem, FALSE }, // end brief will be done differently + { "related", &handleRelated, TRUE }, + { "relates", &handleRelated, TRUE }, + { "relatedalso", &handleRelatedAlso, TRUE }, + { "relatesalso", &handleRelatedAlso, TRUE }, + { "refitem", &handleRefItem, TRUE }, + { "subpage", &handleSubpage, TRUE }, + { "section", &handleSection, TRUE }, + { "subsection", &handleSection, TRUE }, + { "subsubsection", &handleSection, TRUE }, + { "paragraph", &handleSection, TRUE }, + { "anchor", &handleAnchor, TRUE }, + { "verbatim", &handleFormatBlock, TRUE }, + { "latexonly", &handleFormatBlock, FALSE }, + { "htmlonly", &handleFormatBlock, FALSE }, + { "xmlonly", &handleFormatBlock, FALSE }, + { "rtfonly", &handleFormatBlock, FALSE }, + { "manonly", &handleFormatBlock, FALSE }, + { "dot", &handleFormatBlock, TRUE }, + { "msc", &handleFormatBlock, TRUE }, + { "code", &handleFormatBlock, TRUE }, + { "addindex", &handleAddIndex, FALSE }, + { "if", &handleIf, FALSE }, + { "ifnot", &handleIfNot, FALSE }, + { "elseif", &handleElseIf, FALSE }, + { "else", &handleElse, FALSE }, + { "endif", &handleEndIf, FALSE }, + { "ingroup", &handleIngroup, FALSE }, + { "nosubgrouping", &handleNoSubGrouping, FALSE }, + { "showinitializer", &handleShowInitializer, FALSE }, + { "hideinitializer", &handleHideInitializer, FALSE }, + { "callgraph", &handleCallgraph, FALSE }, + { "callergraph", &handleCallergraph, FALSE }, + { "internal", &handleInternal, TRUE }, + { "_linebr", &handleLineBr, FALSE }, + { "static", &handleStatic, FALSE }, + { "pure", &handlePure, FALSE }, + { "private", &handlePrivate, FALSE }, + { "privatesection", &handlePrivateSection, FALSE }, + { "protected", &handleProtected, FALSE }, + { "protectedsection",&handleProtectedSection, FALSE }, + { "public", &handlePublic, FALSE }, + { "publicsection", &handlePublicSection, FALSE }, + { "inherit", &handleInherit, TRUE }, + { "extends", &handleExtends, TRUE }, + { "implements", &handleExtends, TRUE }, + { "memberof", &handleMemberOf, TRUE }, + { "arg", 0, TRUE }, + { "attention", 0, TRUE }, + { "author", 0, TRUE }, + { "authors", 0, TRUE }, + { "copydoc", 0, TRUE }, + { "copybrief", 0, FALSE }, + { "copydetails", 0, TRUE }, + { "date", 0, TRUE }, + { "dotfile", 0, TRUE }, + { "htmlinclude", 0, FALSE }, + { "image", 0, TRUE }, + { "include", 0, TRUE }, + { "includelineno", 0, TRUE }, + { "invariant", 0, TRUE }, + { "li", 0, TRUE }, + { "line", 0, TRUE }, + { "note", 0, TRUE }, + { "par", 0, TRUE }, + { "param", 0, TRUE }, + { "tparam", 0, TRUE }, + { "post", 0, TRUE }, + { "pre", 0, TRUE }, + { "remark", 0, TRUE }, + { "remarks", 0, TRUE }, + { "result", 0, TRUE }, + { "return", 0, TRUE }, + { "returns", 0, TRUE }, + { "retval", 0, TRUE }, + { "sa", 0, TRUE }, + { "see", 0, TRUE }, + { "since", 0, TRUE }, + { "throw", 0, TRUE }, + { "throws", 0, TRUE }, + { "until", 0, TRUE }, + { "verbinclude", 0, FALSE }, + { "version", 0, TRUE }, + { "warning", 0, TRUE }, + { 0, 0, FALSE } +}; + +/** @brief Command mapper. + * + * Maps a command name (as found in a comment block) onto a + * specific handler function. + */ +class DocCmdMapper +{ + public: + struct Cmd + { + DocCmdFunc func; + bool endsBrief; + }; + + /** maps a command name to a handler function */ + static Cmd *map(const char *name) + { + return instance()->find(name); + } + + /** release the singleton */ + static void freeInstance() + { + delete s_instance; s_instance=0; + } + + private: + static DocCmdMapper *instance() + { + if (s_instance==0) s_instance = new DocCmdMapper; + return s_instance; + } + + DocCmdMapper() : m_map(113) + { + m_map.setAutoDelete(TRUE); + DocCmdMap *p = docCmdMap; + while (p->cmdName) + { + if (m_map.find(p->cmdName)!=0) + { + printf("Error: DocCmdMapper: command %s already added\n",p->cmdName); + exit(1); + } + Cmd *cmd = new Cmd; + cmd->func = p->handler; + cmd->endsBrief = p->endsBrief; + m_map.insert(p->cmdName,cmd); + p++; + } + } + + Cmd *find(const char *name) + { + return m_map.find(name); + } + QDict<Cmd> m_map; + static DocCmdMapper *s_instance; +}; + +DocCmdMapper *DocCmdMapper::s_instance=0; + + +#define YY_NEVER_INTERACTIVE 1 + +enum XRefKind +{ + XRef_Item, + XRef_Todo, + XRef_Test, + XRef_Bug, + XRef_Deprecated, + XRef_None +}; + +enum OutputContext +{ + OutputDoc, + OutputBrief, + OutputXRef, + OutputInbody +}; + +enum GuardType +{ + Guard_If, + Guard_IfNot, + Guard_Skip +}; + +class GuardedSection +{ + public: + GuardedSection(bool enabled,bool parentVisible) + : m_enabled(enabled),m_parentVisible(parentVisible) {} + bool isEnabled() const { return m_enabled; } + bool parentVisible() const { return m_parentVisible; } + + private: + bool m_enabled; + bool m_parentVisible; +}; + +void openGroup(Entry *e,const char *file,int line); +void closeGroup(Entry *e,const char *file,int line,bool foundInline=FALSE); +void initGroupInfo(Entry *e); +static void groupAddDocs(Entry *e,const char *fileName); + +/* ----------------------------------------------------------------- + * + * statics + */ + +static ParserInterface *langParser; // the language parser that is calling us +static QCString inputString; // input string +static int inputPosition; // read pointer +static QCString yyFileName; // file name that is read from +static int yyLineNr; // line number in the input +static bool inBody; // was the comment found inside the body of a function? +static OutputContext inContext; // are we inside the brief, details or xref part +static bool briefEndsAtDot; // does the brief description stop at a dot? +static QCString formulaText; // Running text of a formula +static QCString formulaEnv; // environment name +static int formulaNewLines; // amount of new lines in the formula +static QCString *pOutputString; // pointer to string to which the output is appended. +static QCString outputXRef; // temp argument of todo/test/../xrefitem commands +static QCString blockName; // preformatted block name (e.g. verbatim, latexonly,...) +static XRefKind xrefKind; // kind of cross-reference command +static XRefKind newXRefKind; // +static GuardType guardType; // kind of guard for conditional section +static bool enabledSectionFound; +static QCString functionProto; // function prototype +static QStack<GuardedSection> guards; // tracks nested conditional sections (if,ifnot,..) +static Entry* current = 0 ; // working entry +//static Entry* current_root = 0 ; // parent of working entry + + +//static Entry* previous = 0 ; // TODO: remove need for this +static bool needNewEntry; + +static QCString sectionLabel; +static QCString sectionTitle; +static QCString xrefItemKey; +static QCString newXRefItemKey; +static QCString xrefItemTitle; +static QCString xrefListTitle; +static Protection protection; + +static bool xrefAppendFlag; +static bool inGroupParamFound; +static int braceCount; +static bool insidePre; +static bool parseMore; +static int g_condCount; +static int g_sectionLevel; + +static int g_commentCount; + +//----------------------------------------------------------------------------- + +static QStack<Grouping> g_autoGroupStack; +static int g_memberGroupId = DOX_NOGROUP; +static QCString g_memberGroupHeader; +static QCString g_memberGroupDocs; +static QCString g_memberGroupRelates; +static QCString g_compoundName; + +//----------------------------------------------------------------------------- + +static void initParser() +{ + sectionLabel.resize(0); + sectionTitle.resize(0); + g_memberGroupHeader.resize(0); +} + +//----------------------------------------------------------------------------- + +static QCString getDocSectionName(int s) +{ + switch(s) + { + case Entry::CLASSDOC_SEC: return "\\class"; + case Entry::STRUCTDOC_SEC: return "\\struct"; + case Entry::UNIONDOC_SEC: return "\\union"; + case Entry::EXCEPTIONDOC_SEC: return "\\exception"; + case Entry::NAMESPACEDOC_SEC: return "\\namespace"; + case Entry::PROTOCOLDOC_SEC: return "\\protocol"; + case Entry::CATEGORYDOC_SEC: return "\\category"; + case Entry::ENUMDOC_SEC: return "\\enum"; + case Entry::PAGEDOC_SEC: return "\\page"; + case Entry::VARIABLEDOC_SEC: return "\\var"; + case Entry::MEMBERDOC_SEC: return "\\fn"; + case Entry::OVERLOADDOC_SEC: return "\\overload"; + case Entry::FILEDOC_SEC: return "\\file"; + case Entry::DEFINEDOC_SEC: return "\\def"; + case Entry::GROUPDOC_SEC: return "\\defgroup"; + case Entry::MAINPAGEDOC_SEC: return "\\mainpage"; + case Entry::PACKAGEDOC_SEC: return "\\package"; + case Entry::DIRDOC_SEC: return "\\dir"; + case Entry::EXAMPLE_SEC: return "\\example"; + case Entry::MEMBERGRP_SEC: return "\\name"; + default: return ""; + } +} + +//----------------------------------------------------------------------------- + +static bool makeStructuralIndicator(Entry::Sections s) +{ + //printf("current->section=%x\n",current->section); + if (!getDocSectionName(current->section).isEmpty()) + { + return TRUE; + } + else + { + needNewEntry = TRUE; + current->section = s; + current->fileName = yyFileName; + current->startLine = yyLineNr; + return FALSE; + } +} + +static void lineCount() +{ + for( const char* c = yytext ; *c ; ++c ) + yyLineNr += (*c == '\n') ; +} + + +static QCString stripQuotes(const char *s) +{ + QCString name; + if (s==0 || *s==0) return name; + name=s; + if (name.at(0)=='"' && name.at(name.length()-1)=='"') + { + name=name.mid(1,name.length()-2); + } + return name; +} + +//----------------------------------------------------------------- + +static void addXRefItem(const char *listName,const char *itemTitle, + const char *listTitle,bool append) +{ + Entry *docEntry = current; // inBody && previous ? previous : current; + if (listName==0) return; + //printf("addXRefItem(%s,%s,%s,%d)\n",listName,itemTitle,listTitle,append); + + ListItemInfo *lii=0; + RefList *refList = Doxygen::xrefLists->find(listName); + if (refList==0) // new list + { + refList = new RefList(listName,listTitle,itemTitle); + Doxygen::xrefLists->insert(listName,refList); + //printf("new list!\n"); + } + if (docEntry->sli) + { + QListIterator<ListItemInfo> slii(*docEntry->sli); + for (slii.toFirst();(lii=slii.current());++slii) + { + if (strcmp(lii->type,listName)==0) + { + //printf("found %s lii->type=%s\n",listName,lii->type); + break; + } + } + } + if (lii && append) // already found item of same type just before this one + { + //printf("listName=%s item id = %d existing\n",listName,lii->itemId); + RefItem *item = refList->getRefItem(lii->itemId); + ASSERT(item!=0); + item->text += " <p>"; + item->text += outputXRef; + //printf("%s: text +=%s\n",listName,item->text.data()); + } + else // new item + { + int itemId = refList->addRefItem(); + //printf("listName=%s item id = %d new current=%p\n",listName,itemId,current); + + // if we have already an item from the same list type (e.g. a second @todo) + // in the same Entry (i.e. lii!=0) then we reuse its link anchor. + char anchorLabel[1024]; + //sprintf(anchorLabel,"_%s%06d",listName,lii ? lii->itemId : itemId); + sprintf(anchorLabel,"_%s%06d",listName,itemId); + RefItem *item = refList->getRefItem(itemId); + ASSERT(item!=0); + item->text = outputXRef; + item->listAnchor = anchorLabel; + docEntry->addSpecialListItem(listName,itemId); + QCString cmdString; + cmdString.sprintf("\\xrefitem %s %d.",listName,itemId); + if (inBody) + { + docEntry->inbodyDocs += cmdString; + } + else + { + docEntry->doc += cmdString; + } + SectionInfo *si=new SectionInfo(listName,anchorLabel, + sectionTitle,SectionInfo::Anchor); + Doxygen::sectionDict.insert(anchorLabel,si); + docEntry->anchors->append(si); + } + outputXRef.resize(0); +} + +//----------------------------------------------------------------------------- + +// Adds a formula text to the list/dictionary of formulas if it was +// not already added. Returns the label of the formula. +static QCString addFormula() +{ + QCString formLabel; + QCString fText=formulaText.simplifyWhiteSpace(); + Formula *f=0; + if ((f=Doxygen::formulaDict[fText])==0) + { + f = new Formula(fText); + Doxygen::formulaList.append(f); + Doxygen::formulaDict.insert(fText,f); + formLabel.sprintf("\\form#%d",f->getId()); + Doxygen::formulaNameDict.insert(formLabel,f); + } + else + { + formLabel.sprintf("\\form#%d",f->getId()); + } + int i; + for (i=0;i<formulaNewLines;i++) formLabel+="\\_fakenl"; // add fake newlines to + // keep the warnings + // correctly aligned. + return formLabel; +} + +//----------------------------------------------------------------------------- + +static void checkFormula(); +//----------------------------------------------------------------------------- + +static void addSection() +{ + sectionTitle+=yytext; + sectionTitle=sectionTitle.stripWhiteSpace(); + //printf("Adding new section file=%s label=%s title=%s\n",yyFileName,sectionLabel.data(),sectionTitle.data()); + SectionInfo *si = new SectionInfo(yyFileName,sectionLabel,sectionTitle,SectionInfo::Anchor); + current->anchors->append(si); + Doxygen::sectionDict.insert(yytext,si); +} + +//----------------------------------------------------------------------------- + +// strip trailing whitespace (excluding newlines) from string s +static void stripTrailingWhiteSpace(QCString &s) +{ + uint len = s.length(); + int i = (int)len-1; + char c; + while (i>=0 && ((c = s.at(i))==' ' || c=='\t' || c=='\r')) i--; + if (i!=(int)len-1) + { + s.resize(i+2); // string upto and including char at pos i and \0 terminator + } +} + +// selects the output to write to +static inline void setOutput(OutputContext ctx) +{ + bool xrefAppendToPrev = xrefAppendFlag; + // determine append flag for the next item (i.e. the end of this item) + xrefAppendFlag = !inBody && + inContext==OutputXRef && ctx==OutputXRef && // two consecutive xref items + newXRefKind==xrefKind && // of the same kind + (xrefKind!=XRef_Item || + newXRefItemKey==xrefItemKey); // with the same key if \xrefitem + //printf("%d && %d && %d && (%d || %d)\n", + // inContext==OutputXRef, + // ctx==OutputXRef, + // newXRefKind==xrefKind, + // xrefKind!=XRef_Item, + // newXRefItemKey==xrefItemKey); + + //printf("refKind=%d newXRefKind=%d xrefAppendToPrev=%d xrefAppendFlag=%d\n", + // xrefKind,newXRefKind,xrefAppendToPrev,xrefAppendFlag); + + //printf("setOutput(inContext=%d ctx=%d)\n",inContext,ctx); + if (inContext==OutputXRef) // end of XRef section => add the item + { + // See if we can append this new xref item to the previous one. + // We know this at the start of the next item of the same + // type and need to remember this until the end of that item. + switch(xrefKind) + { + case XRef_Todo: + addXRefItem("todo", + theTranslator->trTodo(), + theTranslator->trTodoList(), + xrefAppendToPrev + ); + break; + case XRef_Test: + addXRefItem("test", + theTranslator->trTest(), + theTranslator->trTestList(), + xrefAppendToPrev + ); + break; + case XRef_Bug: + addXRefItem("bug", + theTranslator->trBug(), + theTranslator->trBugList(), + xrefAppendToPrev + ); + break; + case XRef_Deprecated: + addXRefItem("deprecated", + theTranslator->trDeprecated(), + theTranslator->trDeprecatedList(), + xrefAppendToPrev + ); + break; + case XRef_Item: // user defined list + addXRefItem(xrefItemKey, + xrefItemTitle, + xrefListTitle, + xrefAppendToPrev + ); + break; + case XRef_None: + ASSERT(0); + break; + } + } + xrefItemKey = newXRefItemKey; + + int oldContext = inContext; + inContext = ctx; + if (inContext!=OutputXRef && inBody) inContext=OutputInbody; + switch(inContext) + { + case OutputDoc: + if (oldContext!=inContext) + { + stripTrailingWhiteSpace(current->doc); + if (current->docFile.isEmpty()) + { + current->docFile = yyFileName; + current->docLine = yyLineNr; + } + } + pOutputString = ¤t->doc; + break; + case OutputBrief: + if (oldContext!=inContext) + { + if (current->briefFile.isEmpty()) + { + current->briefFile = yyFileName; + current->briefLine = yyLineNr; + } + } + if (current->brief.stripWhiteSpace().isEmpty()) // we only want one brief + // description even if multiple + // are given... + { + pOutputString = ¤t->brief; + } + else + { + pOutputString = ¤t->doc; + inContext = OutputDoc; // need to switch to detailed docs, see bug 631380 + } + break; + case OutputXRef: + pOutputString = &outputXRef; + // first item found, so can't append to previous + //xrefAppendFlag = FALSE; + break; + case OutputInbody: + pOutputString = ¤t->inbodyDocs; + break; + } +} + +// add a string to the output +static inline void addOutput(const char *s) +{ + *pOutputString+=s; +} + +// add a character to the output +static inline void addOutput(char c) +{ + *pOutputString+=c; +} + +static void endBrief(bool addToOutput=TRUE) +{ + if (!current->brief.stripWhiteSpace().isEmpty()) + { // only go to the detailed description if we have + // found some brief description and not just whitespace + briefEndsAtDot=FALSE; + setOutput(OutputDoc); + if (addToOutput) addOutput(yytext); + } +} + +/* ----------------------------------------------------------------- */ +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); + +static int prevPosition=0; + +static int yyread(char *buf,int max_size) +{ + prevPosition=inputPosition; + int c=0; + while( c < max_size && inputString[inputPosition] ) + { + *buf = inputString[inputPosition++] ; + //printf("%d (%c)\n",*buf,*buf); + c++; buf++; + } + return c; +} + +%} + + /* start command character */ +CMD ("\\"|"@") +DCMD1 ("arg"|"attention"|"author"|"code") +DCMD2 ("date"|"dot"|"msc"|"dotfile"|"example") +DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include") +DCMD4 ("includelineno"|"internal"|"invariant") +DCMD5 ("latexonly"|"li"|"line"|"manonly"|"name") +DCMD6 ("note"|"par"|"paragraph"|"param"|"post") +DCMD7 ("pre"|"remarks"|(("relate"[sd])("also")?)) +DCMD8 ("remarks"|("return"[s]?)|"retval"|"sa"|"section") +DCMD9 ("see"|"since"|"subsection"|"subsubsection") +DCMD10 ("throw"|"until"|"verbatim") +DCMD11 ("verbinclude"|"version"|"warning") +DETAILEDCMD {CMD}({DCMD1}|{DCMD2}|{DCMD3}|{DCMD4}|{DCMD5}|{DCMD6}|{DCMD7}|{DCMD8}|{DCMD9}|{DCMD10}|{DCMD11}) +XREFCMD {CMD}("bug"|"deprecated"|"test"|"todo"|"xrefitem") +PRE [pP][rR][eE] +TABLE [tT][aA][bB][lL][eE] +P [pP] +UL [uU][lL] +OL [oO][lL] +DL [dD][lL] +IMG [iI][mM][gG] +HR [hH][rR] +DETAILEDHTML {PRE}|{UL}|{TABLE}|{OL}|{DL}|{P}|[Hh][1-6]|{IMG}|{HR} +BN [ \t\n\r] +BL [ \t\r]*"\n" +B [ \t] +BS ^(({B}*"//")?)(({B}*"*"+)?){B}* +ATTR ({B}+[^>\n]*)? +DOCNL "\n"|"\\_linebr" +LC "\\"{B}*"\n" +NW [^a-z_A-Z0-9] +FILESCHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+] +FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+] +FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]*"\"") +ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]* +LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]* +SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?) +SCOPENAME "$"?(({ID}?{BN}*("::"|"."){BN}*)*)((~{BN}*)?{ID}) +MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+ +RCSTAG "$"{ID}":"[^\n$]+"$" + +%option noyywrap + + /* comment parsing states. */ +%x Comment +%x PageDocArg1 +%x PageDocArg2 +%x RelatesParam1 +%x ClassDocArg1 +%x ClassDocArg2 +%x ClassDocArg3 +%x CategoryDocArg1 +%x XRefItemParam1 +%x XRefItemParam2 +%x XRefItemParam3 +%x FileDocArg1 +%x EnumDocArg1 +%x NameSpaceDocArg1 +%x PackageDocArg1 +%x GroupDocArg1 +%x GroupDocArg2 +%x SectionLabel +%x SectionTitle +%x SubpageLabel +%x SubpageTitle +%x FormatBlock +%x LineParam +%x GuardParam +%x GuardParamEnd +%x SkipGuardedSection +%x SkipInternal +%x NameParam +%x InGroupParam +%x FnParam +%x OverloadParam +%x InheritParam +%x ExtendsParam +%x ReadFormulaShort +%x ReadFormulaLong +%x AnchorLabel +%x HtmlComment +%x SkipLang + +%% + + /* What can happen in while parsing a comment block: + * commands (e.g. @page, or \page) + * escaped commands (e.g. @@page or \\page). + * formulas (e.g. \f$ \f[ \f{..) + * directories (e.g. \doxygen\src\) + * autolist end. (e.g. a dot on an otherwise empty line) + * newlines. + * end of brief description due to blank line. + * end of brief description due to some command (@command, or <command>). + * words and whitespace and other characters (#,?!, etc). + * grouping commands (e.g. @{ and @}) + * language switch (e.g. \~english or \~). + * mail adress (e.g. dimitri@stack.nl). + * quoted text, such as "foo@bar" + * XML commands, <summary></summary><remarks></remarks> + */ + +<Comment>{CMD}{CMD}[a-z_A-Z]+{B}* { // escaped command + addOutput(yytext); + } +<Comment>{CMD}{CMD}"~"[a-z_A-Z]* { // escaped command + addOutput(yytext); + } +<Comment>{MAILADR} { // mail adress + addOutput(yytext); + } +<Comment>"\""[^"\n]*"\"" { // quoted text + addOutput(yytext); + } +<Comment>("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!) + addOutput(yytext); + } +<Comment>{XREFCMD}/[^a-z_A-Z]* { // xref command + if (inContext!=OutputXRef) + { + briefEndsAtDot=FALSE; + setOutput(OutputDoc); + } + // continue with the same input + REJECT; + } + /* +<Comment>{DETAILEDCMD}/[^a-z_A-Z]* { // command that can end a brief description + briefEndsAtDot=FALSE; + setOutput(OutputDoc); + // continue with the same input + REJECT; + } + */ +<Comment>"<"{DETAILEDHTML}{ATTR}">" { // HTML command that ends a brief description + setOutput(OutputDoc); + // continue with the same input + REJECT; + } +<Comment>"<summary>" { // start of a .NET XML style brief description + setOutput(OutputBrief); + } +<Comment>"<remarks>"|"</summary>" { // start of a .NET XML style detailed description + setOutput(OutputDoc); + } +<Comment>"</remarks>" { // end of a brief or detailed description + } +<Comment>{RCSTAG} { // RCS tag which end a brief description + setOutput(OutputDoc); + REJECT; + } +<Comment>"<!--" { + BEGIN(HtmlComment); + } +<Comment>{B}*{CMD}"endinternal"{B}* { + warn(yyFileName,yyLineNr, + "warning: found \\endinternal without matching \\internal" + ); + } +<Comment>{B}*{CMD}[a-z_A-Z]+{B}* { // potentially interesting command + // the {B}* in the front was added for bug620924 + QCString cmdName = QCString(yytext).stripWhiteSpace().data()+1; + DocCmdMapper::Cmd *cmdPtr = DocCmdMapper::map(cmdName); + if (cmdPtr) // special action is required + { + if (cmdPtr->endsBrief) + { + briefEndsAtDot=FALSE; + // this command forces the end of brief description + setOutput(OutputDoc); + } + if (cmdPtr->func && cmdPtr->func(cmdName)) + { + // implicit split of the comment block into two + // entries. Restart the next block at the start + // of this command. + parseMore=TRUE; + + // yuk, this is probably not very portable across lex implementations, + // but we need to know the position in the input buffer where this + // rule matched. + // for flex 2.5.33+ we should use YY_CURRENT_BUFFER_LVALUE +#if YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33 + inputPosition=prevPosition + yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; +#else + inputPosition=prevPosition + yy_bp - yy_current_buffer->yy_ch_buf; +#endif + yyterminate(); + } + else if (cmdPtr->func==0) + { + // command without handler, to be processed + // later by parsedoc.cpp + addOutput(yytext); + } + } + else // command not relevant + { + addOutput(yytext); + } + } +<Comment>{B}*("\\\\"|"@@")"f"[$\[{] { // escaped formula command + addOutput(yytext); + } +<Comment>{B}*{CMD}"~"[a-z_A-Z]* { // language switch command + QCString langId = QString(yytext).stripWhiteSpace().data()+2; + if (!langId.isEmpty() && + stricmp(Config_getEnum("OUTPUT_LANGUAGE"),langId)!=0) + { // enable language specific section + BEGIN(SkipLang); + } + } +<Comment>{B}*{CMD}"f{"[^}\n]+"}"("{"?) { // start of a formula with custom environment + formulaText="\\begin"; + formulaEnv=QString(yytext).stripWhiteSpace().data()+2; + if (formulaEnv.at(formulaEnv.length()-1)=='{') + { + // remove trailing open brace + formulaEnv=formulaEnv.left(formulaEnv.length()-1); + } + formulaText+=formulaEnv; + formulaNewLines=0; + BEGIN(ReadFormulaLong); + } +<Comment>{B}*{CMD}"f$" { // start of a inline formula + formulaText="$"; + formulaNewLines=0; + BEGIN(ReadFormulaShort); + } +<Comment>{B}*{CMD}"f[" { // start of a block formula + formulaText="\\["; + formulaNewLines=0; + BEGIN(ReadFormulaLong); + } +<Comment>{B}*{CMD}"{" { // begin of a group + //langParser->handleGroupStartCommand(g_memberGroupHeader); + openGroup(current,yyFileName,yyLineNr); + } +<Comment>{B}*{CMD}"}" { // end of a group + //langParser->handleGroupEndCommand(); + closeGroup(current,yyFileName,yyLineNr,TRUE); + g_memberGroupHeader.resize(0); + parseMore=TRUE; + needNewEntry = TRUE; +#if YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33 + inputPosition=prevPosition + yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + strlen(yytext); +#else + inputPosition=prevPosition + yy_bp - yy_current_buffer->yy_ch_buf + strlen(yytext); +#endif + yyterminate(); + } +<Comment>{B}*{CMD}[$@\\&~<>#%] { // escaped character + addOutput(yytext); + } +<Comment>[a-z_A-Z]+ { // normal word + addOutput(yytext); + } +<Comment>^{B}*"."{B}*/\n { // explicit end autolist: e.g " ." + addOutput(yytext); + } +<Comment>^{B}*"-" { // start of autolist + setOutput(OutputDoc); + addOutput(yytext); + } +<Comment>("."+)[a-z_A-Z0-9\)] { // . at start or in the middle of a word, or ellipsis + addOutput(yytext); + } +<Comment>".\\"[ \t] { // . with escaped space. + addOutput(yytext[0]); + addOutput(yytext[2]); + } +<Comment>".," { // . with comma such as "e.g.," + addOutput(yytext); + } +<Comment>"...\\"[ \t] { // ellipsis with escaped space. + addOutput("... "); + } +<Comment>".."[\.]?/[^ \t\n] { // internal ellipsis + addOutput(yytext); + } +<Comment>(\n|\\_linebr)({B}*(\n|\\_linebr))+ { // at least one blank line (or blank line command) + if (inContext==OutputXRef) + { + // see bug 613024, we need to put the newlines after ending the XRef section. + setOutput(OutputDoc); + addOutput("\n\n"); + } + else if (inContext!=OutputBrief) + { + addOutput("\n\n"); + setOutput(OutputDoc); + } + else // inContext==OutputBrief + { // only go to the detailed description if we have + // found some brief description and not just whitespace + endBrief(FALSE); + } + lineCount(); + } +<Comment>"." { // potential end of a JavaDoc style comment + addOutput(*yytext); + if (briefEndsAtDot) + { + setOutput(OutputDoc); + briefEndsAtDot=FALSE; + } + } +<Comment>\n { // newline + addOutput(*yytext); + yyLineNr++; + } +<Comment>. { // catch-all for anything else + addOutput(*yytext); + } + + + /* -------------- Rules for handling HTML comments ----------- */ + +<HtmlComment>"--"[!]?">"{B}* { BEGIN( Comment ); } +<HtmlComment>{DOCNL} { + if (*yytext=='\n') yyLineNr++; + } +<HtmlComment>[^\\\n\-]+ { // ignore unimportant characters + } +<HtmlComment>. { // ignore every else + } + + /* -------------- Rules for handling formulas ---------------- */ + +<ReadFormulaShort>{CMD}"f$" { // end of inline formula + formulaText+="$"; + addOutput(" "+addFormula()); + BEGIN(Comment); + } +<ReadFormulaLong>{CMD}"f]" { // end of block formula + formulaText+="\\]"; + addOutput(" "+addFormula()); + BEGIN(Comment); + } +<ReadFormulaLong>{CMD}"f}" { // end of custom env formula + formulaText+="\\end"; + formulaText+=formulaEnv; + addOutput(" "+addFormula()); + BEGIN(Comment); + } +<ReadFormulaLong,ReadFormulaShort>[^\\@\n]+ { // any non-special character + formulaText+=yytext; + } +<ReadFormulaLong,ReadFormulaShort>\n { // new line + formulaNewLines++; + formulaText+=*yytext; + yyLineNr++; + } +<ReadFormulaLong,ReadFormulaShort>. { // any othe character + formulaText+=*yytext; + } + + /* ------------ handle argument of enum command --------------- */ + +<EnumDocArg1>{SCOPEID} { // handle argument + current->name = yytext; + BEGIN( Comment ); + } +<EnumDocArg1>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<EnumDocArg1>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: missing argument after \\enum." + ); + addOutput('\n'); + if (*yytext=='\n') yyLineNr++; + BEGIN( Comment ); + } +<EnumDocArg1>. { // ignore other stuff + } + + /* ------------ handle argument of namespace command --------------- */ + +<NameSpaceDocArg1>{SCOPENAME} { // handle argument + current->name = substitute(yytext,".","::"); + BEGIN( Comment ); + } +<NameSpaceDocArg1>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<NameSpaceDocArg1>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: missing argument after " + "\\namespace." + ); + addOutput('\n'); + if (*yytext=='\n') yyLineNr++; + BEGIN( Comment ); + } +<NameSpaceDocArg1>. { // ignore other stuff + } + + /* ------------ handle argument of package command --------------- */ + +<PackageDocArg1>{ID}("."{ID})* { // handle argument + current->name = yytext; + BEGIN( Comment ); + } +<PackageDocArg1>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<PackageDocArg1>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: missing argument after " + "\\package." + ); + addOutput('\n'); + if (*yytext=='\n') yyLineNr++; + BEGIN( Comment ); + } +<PackageDocArg1>. { // ignore other stuff + } + + /* ------ handle argument of class/struct/union command --------------- */ + +<ClassDocArg1>{SCOPENAME} { // first argument + current->name = substitute(yytext,".","::"); + if (current->section==Entry::PROTOCOLDOC_SEC) + { + current->name+="-p"; + } + // prepend outer scope name + BEGIN( ClassDocArg2 ); + } +<CategoryDocArg1>{SCOPENAME}{B}*"("[^\)]+")" { + current->name = substitute(yytext,".","::"); + BEGIN( ClassDocArg2 ); + } +<ClassDocArg1,CategoryDocArg1>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<ClassDocArg1,CategoryDocArg1>{DOCNL} { + warn(yyFileName,yyLineNr, + "warning: missing argument after " + "\\%s.",YY_START==ClassDocArg1?"class":"category" + ); + addOutput('\n'); + if (*yytext=='\n') yyLineNr++; + BEGIN( Comment ); + } +<ClassDocArg1,CategoryDocArg1>. { // ignore other stuff + } + +<ClassDocArg2>{FILE}|"<>" { // second argument; include file + current->includeFile = yytext; + BEGIN( ClassDocArg3 ); + } +<ClassDocArg2>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<ClassDocArg2>{DOCNL} { + addOutput('\n'); + if (*yytext=='\n') yyLineNr++; + BEGIN( Comment ); + } +<ClassDocArg2>. { // ignore other stuff + } + +<ClassDocArg3>[<]?{FILE}?[>]? { // third argument; include file name + current->includeName = yytext; + BEGIN( Comment ); + } +<ClassDocArg3>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<ClassDocArg3>{DOCNL} { + if (*yytext=='\n') yyLineNr++; + BEGIN( Comment ); + } +<ClassDocArg3>. { // ignore other stuff + } + + /* --------- handle arguments of {def,add,weak}group commands --------- */ + +<GroupDocArg1>{LABELID}(".html"?) { // group name + current->name = yytext; + //lastDefGroup.groupname = yytext; + //lastDefGroup.pri = current->groupingPri(); + // the .html stuff is for Qt compatibility + if (current->name.right(5)==".html") + { + current->name=current->name.left(current->name.length()-5); + } + current->type.resize(0); + BEGIN(GroupDocArg2); + } +<GroupDocArg1>"\\"{B}*"\n" { // line continuation + yyLineNr++; + addOutput('\n'); + } +<GroupDocArg1>{DOCNL} { // missing argument! + warn(yyFileName,yyLineNr, + "warning: missing group name after %s", + current->groupDocCmd() + ); + addOutput('\n'); + if (*yytext=='\n') yyLineNr++; + BEGIN( Comment ); + } +<GroupDocArg2>"\\"{B}*"\n" { // line continuation + yyLineNr++; + addOutput('\n'); + } +<GroupDocArg2>[^\n\\\*]+ { // title (stored in type) + current->type += yytext; + current->type = current->type.stripWhiteSpace(); + } +<GroupDocArg2>{DOCNL} { + if ( current->groupDocType==Entry::GROUPDOC_NORMAL && + current->type.isEmpty() + ) // defgroup requires second argument + { + warn(yyFileName,yyLineNr, + "warning: missing title after " + "\\defgroup %s", current->name.data() + ); + } + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } + + /* --------- handle arguments of page/mainpage command ------------------- */ + +<PageDocArg1>{FILE} { // first argument; page name + current->name = stripQuotes(yytext); + BEGIN( PageDocArg2 ); + } +<PageDocArg1>{LC} { yyLineNr++; + addOutput('\n'); + } +<PageDocArg1>{DOCNL} { + warn(yyFileName,yyLineNr, + "warning: missing argument after " + "\\page." + ); + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<PageDocArg1>. { // ignore other stuff + } +<PageDocArg2>.*"\n" { // second argument; page title + yyLineNr++; + current->args = yytext; + addOutput('\n'); + BEGIN( Comment ); + } + + /* --------- handle arguments of the file/dir/example command ------------ */ + +<FileDocArg1>{DOCNL} { // no file name specfied + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<FileDocArg1>{FILE} { // first argument; name + current->name = stripQuotes(yytext); + BEGIN( Comment ); + } +<FileDocArg1>{LC} { yyLineNr++; + addOutput('\n'); + } +<FileDocArg1>. { // ignore other stuff + } + + /* --------- handle arguments of the xrefitem command ------------ */ + +<XRefItemParam1>{LABELID} { // first argument + newXRefItemKey=yytext; + setOutput(OutputXRef); + BEGIN(XRefItemParam2); + } +<XRefItemParam1>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<XRefItemParam1>{DOCNL} { // missing arguments + warn(yyFileName,yyLineNr, + "warning: Missing first argument of \\xrefitem" + ); + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + inContext = OutputDoc; + BEGIN( Comment ); + } +<XRefItemParam1>. { // ignore other stuff + } + +<XRefItemParam2>"\""[^\n\"]*"\"" { // second argument + xrefItemTitle = stripQuotes(yytext); + BEGIN(XRefItemParam3); + } +<XRefItemParam2>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<XRefItemParam2>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: Missing second argument of \\xrefitem" + ); + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + inContext = OutputDoc; + BEGIN( Comment ); + } +<XRefItemParam2>. { // ignore other stuff + } + +<XRefItemParam3>"\""[^\n\"]*"\"" { // third argument + xrefListTitle = stripQuotes(yytext); + xrefKind = XRef_Item; + BEGIN( Comment ); + } +<XRefItemParam2,XRefItemParam3>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<XRefItemParam3>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: Missing third argument of \\xrefitem" + ); + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + inContext = OutputDoc; + BEGIN( Comment ); + } +<XRefItemParam3>. { // ignore other stuff + } + + + /* ----- handle arguments of the relates(also)/memberof command ------- */ + +<RelatesParam1>({ID}("::"|"."))*{ID} { // argument + current->relates = yytext; + //if (current->mGrpId!=DOX_NOGROUP) + //{ + // memberGroupRelates = yytext; + //} + BEGIN( Comment ); + } +<RelatesParam1>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<RelatesParam1>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: Missing argument of \\relates or \\memberof command" + ); + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<RelatesParam1>. { // ignore other stuff + } + + + /* ----- handle arguments of the relates(also)/addindex commands ----- */ + +<LineParam>{DOCNL} { // end of argument + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<LineParam>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<LineParam>. { // ignore other stuff + addOutput(*yytext); + } + + /* ----- handle arguments of the section/subsection/.. commands ------- */ + +<SectionLabel>{LABELID} { // first argyment + sectionLabel=yytext; + addOutput(yytext); + sectionTitle.resize(0); + BEGIN(SectionTitle); + } +<SectionLabel>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: \\section command has no label" + ); + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<SectionLabel>. { // invalid character for section label + warn(yyFileName,yyLineNr, + "warning: Invalid or missing section label" + ); + BEGIN(Comment); + } + +<SectionTitle>[^\n@\\*]*/"\n" { // end of section title + addSection(); + addOutput(yytext); + BEGIN( Comment ); + } +<SectionTitle>[^\n@\\]*/"\\_linebr" { // end of section title + addSection(); + addOutput(yytext); + BEGIN( Comment ); + } +<SectionTitle>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<SectionTitle>[^\n@\\]* { // any character without special meaning + sectionTitle+=yytext; + addOutput(yytext); + } +<SectionTitle>("\\\\"|"@@"){ID} { // unescape escaped command + sectionTitle+=&yytext[1]; + addOutput(yytext); + } +<SectionTitle>{CMD}[$@\\&~<>#%] { // unescape escaped character + sectionTitle+=yytext[1]; + addOutput(yytext); + } +<SectionTitle>. { // anything else + sectionTitle+=yytext; + addOutput(*yytext); + } + + /* ----- handle arguments of the subpage command ------- */ + +<SubpageLabel>{LABELID} { // first argument + addOutput(yytext); + // we add subpage labels as a kind of "inheritance" relation to prevent + // needing to add another list to the Entry class. + current->extends->append(new BaseInfo(yytext,Public,Normal)); + BEGIN(SubpageTitle); + } +<SubpageLabel>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: \\subpage command has no label" + ); + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<SubpageTitle>{DOCNL} { // no title, end command + addOutput(yytext); + BEGIN( Comment ); + } +<SubpageTitle>[ \t]*"\""[^\"\n]*"\"" { // add title, end of command + addOutput(yytext); + BEGIN( Comment ); + } +<SubpageTitle>. { // no title, end of command + unput(*yytext); + BEGIN( Comment ); + } + + /* ----- handle arguments of the anchor command ------- */ + +<AnchorLabel>{LABELID} { // found argument + SectionInfo *si = new SectionInfo(yyFileName,yytext,0,SectionInfo::Anchor); + Doxygen::sectionDict.insert(yytext,si); + current->anchors->append(si); + addOutput(yytext); + BEGIN( Comment ); + } +<AnchorLabel>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: \\anchor command has no label" + ); + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<AnchorLabel>. { // invalid character for anchor label + warn(yyFileName,yyLineNr, + "warning: Invalid or missing anchor label" + ); + BEGIN(Comment); + } + + + /* ----- handle arguments of the preformatted block commands ------- */ + +<FormatBlock>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc")/{NW} { // possible ends + addOutput(yytext); + if (&yytext[4]==blockName) // found end of the block + { + BEGIN(Comment); + } + } +<FormatBlock>[^ \@\*\/\\\n]* { // some word + addOutput(yytext); + } +<FormatBlock>{DOCNL} { // new line + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + } +<FormatBlock>"/*" { // start of a C-comment + g_commentCount++; + addOutput(yytext); + } +<FormatBlock>"*/" { // end of a C-comment + addOutput(yytext); + g_commentCount--; + if (g_commentCount<0 && blockName!="verbatim") + { + warn(yyFileName,yyLineNr, + "warning: found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",blockName.data(),blockName.data()); + } + } +<FormatBlock>. { + addOutput(*yytext); + } +<FormatBlock><<EOF>> { + warn(yyFileName,yyLineNr, + "warning: reached end of comment while inside a @%s block; check for missing @end%s tag!", + blockName.data(),blockName.data() + ); + yyterminate(); + } + + /* ----- handle arguments of if/ifnot commands ------- */ + +<GuardParam>{LABELID} { // parameter of if/ifnot guard + bool sectionEnabled = Config_getList("ENABLED_SECTIONS").find(yytext)!=-1; + bool parentEnabled = TRUE; + if (!guards.isEmpty()) parentEnabled = guards.top()->isEnabled(); + if (parentEnabled) + { + if ( + (sectionEnabled && guardType==Guard_If) || + (!sectionEnabled && guardType==Guard_IfNot) + ) // section is visible + { + guards.push(new GuardedSection(TRUE,TRUE)); + enabledSectionFound=TRUE; + BEGIN( GuardParamEnd ); + } + else // section is invisible + { + if (guardType!=Guard_Skip) + { + guards.push(new GuardedSection(FALSE,TRUE)); + } + BEGIN( SkipGuardedSection ); + } + } + else // invisible because of parent + { + guards.push(new GuardedSection(FALSE,FALSE)); + BEGIN( SkipGuardedSection ); + } + } +<GuardParam>{DOCNL} { // end of argument + if (*yytext=='\n') yyLineNr++; + //next line is commented out due to bug620924 + //addOutput('\n'); + BEGIN( Comment ); + } +<GuardParam>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<GuardParam>. { // ignore other stuff + addOutput(*yytext); + } +<GuardParamEnd>{B}*{DOCNL} { + BEGIN(Comment); + } +<GuardParamEnd>{B}* { + BEGIN(Comment); + } +<GuardParamEnd>. { + unput(*yytext); + BEGIN(Comment); + } + + /* ----- handle skipping of conditional sections ------- */ + +<SkipGuardedSection>{CMD}"ifnot"/{NW} { + guardType = Guard_IfNot; + BEGIN( GuardParam ); + } +<SkipGuardedSection>{CMD}"if"/{NW} { + guardType = Guard_If; + BEGIN( GuardParam ); + } +<SkipGuardedSection>{CMD}"endif"/{NW} { + if (guards.isEmpty()) + { + warn(yyFileName,yyLineNr, + "warning: found @endif without matching start command"); + } + else + { + delete guards.pop(); + BEGIN( GuardParamEnd ); + } + } +<SkipGuardedSection>{CMD}"else"/{NW} { + if (guards.isEmpty()) + { + warn(yyFileName,yyLineNr, + "warning: found @else without matching start command"); + } + else + { + if (!enabledSectionFound && guards.top()->parentVisible()) + { + delete guards.pop(); + guards.push(new GuardedSection(TRUE,TRUE)); + enabledSectionFound=TRUE; + BEGIN( GuardParamEnd ); + } + } + } +<SkipGuardedSection>{CMD}"elseif"/{NW} { + if (guards.isEmpty()) + { + warn(yyFileName,yyLineNr, + "warning: found @elseif without matching start command"); + } + else + { + if (!enabledSectionFound && guards.top()->parentVisible()) + { + delete guards.pop(); + BEGIN( GuardParam ); + } + } + } +<SkipGuardedSection>{DOCNL} { // skip line + if (*yytext=='\n') yyLineNr++; + //addOutput('\n'); + } +<SkipGuardedSection>[^ \\@\n]+ { // skip non-special characters + } +<SkipGuardedSection>. { // any other character + } + + + /* ----- handle skipping of internal section ------- */ + +<SkipInternal>{DOCNL} { // skip line + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + } +<SkipInternal>[@\\]"if"/[ \t] { + g_condCount++; + } +<SkipInternal>[@\\]"ifnot"/[ \t] { + g_condCount++; + } +<SkipInternal>[@\\]/"endif" { + g_condCount--; + if (g_condCount<0) // handle conditional section around of \internal, see bug607743 + { + unput('\\'); + BEGIN(Comment); + } + } +<SkipInternal>[@\\]/"section"[ \t] { + if (g_sectionLevel>0) + { + unput('\\'); + BEGIN(Comment); + } + } +<SkipInternal>[@\\]/"subsection"[ \t] { + if (g_sectionLevel>1) + { + unput('\\'); + BEGIN(Comment); + } + } +<SkipInternal>[@\\]/"subsubsection"[ \t] { + if (g_sectionLevel>2) + { + unput('\\'); + BEGIN(Comment); + } + } +<SkipInternal>[@\\]/"paragraph"[ \t] { + if (g_sectionLevel>3) + { + unput('\\'); + BEGIN(Comment); + } + } +<SkipInternal>[@\\]"endinternal"[ \t]* { + BEGIN(Comment); + } +<SkipInternal>[^ \\@\n]+ { // skip non-special characters + } +<SkipInternal>. { // any other character + } + + + /* ----- handle argument of name command ------- */ + +<NameParam>{DOCNL} { // end of argument + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<NameParam>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + g_memberGroupHeader+=' '; + } +<NameParam>. { // ignore other stuff + g_memberGroupHeader+=*yytext; + current->name+=*yytext; + } + + /* ----- handle argument of ingroup command ------- */ + +<InGroupParam>{LABELID} { // group id + current->groups->append( + new Grouping(yytext, Grouping::GROUPING_INGROUP) + ); + inGroupParamFound=TRUE; + } +<InGroupParam>{DOCNL} { // missing argument + if (!inGroupParamFound) + { + warn(yyFileName,yyLineNr, + "warning: Missing group name for \\ingroup command" + ); + } + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<InGroupParam>{LC} { // line continuation + yyLineNr++; + addOutput('\n'); + } +<InGroupParam>. { // ignore other stuff + addOutput(*yytext); + } + + /* ----- handle argument of fn command ------- */ + +<FnParam>{DOCNL} { // end of argument + if (braceCount==0) + { + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + langParser->parsePrototype(functionProto); + BEGIN( Comment ); + } + } +<FnParam>{LC} { // line continuation + yyLineNr++; + functionProto+=' '; + } +<FnParam>[^@\\\n()]+ { // non-special characters + functionProto+=yytext; + } +<FnParam>"(" { + functionProto+=yytext; + braceCount++; + } +<FnParam>")" { + functionProto+=yytext; + braceCount--; + } +<FnParam>. { // add other stuff + functionProto+=*yytext; + } + + + /* ----- handle argument of overload command ------- */ + + +<OverloadParam>{DOCNL} { // end of argument + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + if (functionProto.stripWhiteSpace().isEmpty()) + { // plain overload command + addOutput(getOverloadDocs()); + } + else // overload declaration + { + makeStructuralIndicator(Entry::OVERLOADDOC_SEC); + langParser->parsePrototype(functionProto); + } + BEGIN( Comment ); + } +<OverloadParam>{LC} { // line continuation + yyLineNr++; + functionProto+=' '; + } +<OverloadParam>. { // add other stuff + functionProto+=*yytext; + } + + /* ----- handle argument of inherit command ------- */ + +<InheritParam>({ID}("::"|"."))*{ID} { // found argument + current->extends->append( + new BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal) + ); + BEGIN( Comment ); + } +<InheritParam>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: \\inherit command has no argument" + ); + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<InheritParam>. { // invalid character for anchor label + warn(yyFileName,yyLineNr, + "warning: Invalid or missing name for \\inherit command" + ); + BEGIN(Comment); + } + + /* ----- handle argument of extends and implements commands ------- */ + +<ExtendsParam>({ID}("::"|"."))*{ID} { // found argument + current->extends->append( + new BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal) + ); + BEGIN( Comment ); + } +<ExtendsParam>{DOCNL} { // missing argument + warn(yyFileName,yyLineNr, + "warning: \\extends or \\implements command has no argument" + ); + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +<ExtendsParam>. { // ignore other stuff + } + + /* ----- handle language specific sections ------- */ + +<SkipLang>[\\@]"~"[a-zA-Z]* { /* language switch */ + QCString langId = &yytext[2]; + if (langId.isEmpty() || + stricmp(Config_getEnum("OUTPUT_LANGUAGE"),langId)==0) + { // enable language specific section + BEGIN(Comment); + } + } +<SkipLang>[^*@\\\n]* { /* any character not a *, @, backslash or new line */ + } +<SkipLang>{DOCNL} { /* new line in verbatim block */ + if (*yytext=='\n') yyLineNr++; + } +<SkipLang>. { /* any other character */ + } + + +%% + +//---------------------------------------------------------------------------- + +static bool handleBrief(const QCString &) +{ + //printf("handleBrief\n"); + setOutput(OutputBrief); + return FALSE; +} + +static bool handleFn(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::MEMBERDOC_SEC); + functionProto.resize(0); + braceCount=0; + BEGIN(FnParam); + return stop; +} + +static bool handleDef(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::DEFINEDOC_SEC); + functionProto.resize(0); + BEGIN(FnParam); + return stop; +} + +static bool handleOverload(const QCString &) +{ + functionProto.resize(0); + BEGIN(OverloadParam); + return FALSE; +} + +static bool handleEnum(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::ENUMDOC_SEC); + BEGIN(EnumDocArg1); + return stop; +} + +static bool handleDefGroup(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC); + current->groupDocType = Entry::GROUPDOC_NORMAL; + BEGIN( GroupDocArg1 ); + return stop; +} + +static bool handleAddToGroup(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC); + current->groupDocType = Entry::GROUPDOC_ADD; + BEGIN( GroupDocArg1 ); + return stop; +} + +static bool handleWeakGroup(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC); + current->groupDocType = Entry::GROUPDOC_WEAK; + BEGIN( GroupDocArg1 ); + return stop; +} + +static bool handleNamespace(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::NAMESPACEDOC_SEC); + BEGIN( NameSpaceDocArg1 ); + return stop; +} + +static bool handlePackage(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::PACKAGEDOC_SEC); + BEGIN( PackageDocArg1 ); + return stop; +} + +static bool handleClass(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::CLASSDOC_SEC); + BEGIN( ClassDocArg1 ); + return stop; +} + +static bool handleHeaderFile(const QCString &) +{ + BEGIN( ClassDocArg2 ); + return FALSE; +} + +static bool handleProtocol(const QCString &) +{ // Obj-C protocol + bool stop=makeStructuralIndicator(Entry::PROTOCOLDOC_SEC); + BEGIN( ClassDocArg1 ); + return stop; +} + +static bool handleCategory(const QCString &) +{ // Obj-C category + bool stop=makeStructuralIndicator(Entry::CATEGORYDOC_SEC); + BEGIN( CategoryDocArg1 ); + return stop; +} + +static bool handleUnion(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::UNIONDOC_SEC); + BEGIN( ClassDocArg1 ); + return stop; +} + +static bool handleStruct(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::STRUCTDOC_SEC); + BEGIN( ClassDocArg1 ); + return stop; +} + +static bool handleInterface(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::INTERFACEDOC_SEC); + BEGIN( ClassDocArg1 ); + return stop; +} + +static bool handleIdlException(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::EXCEPTIONDOC_SEC); + BEGIN( ClassDocArg1 ); + return stop; +} + +static bool handlePage(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::PAGEDOC_SEC); + BEGIN( PageDocArg1 ); + return stop; +} + +static bool handleMainpage(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::MAINPAGEDOC_SEC); + if (!stop) + { + current->name = "mainpage"; + } + BEGIN( PageDocArg2 ); + return stop; +} + +static bool handleFile(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::FILEDOC_SEC); + if (!stop) + { + current->name = yyFileName; + } + BEGIN( FileDocArg1 ); + return stop; +} + +static bool handleDir(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::DIRDOC_SEC); + if (!stop) current->name = yyFileName; + BEGIN( FileDocArg1 ); + return stop; +} + +static bool handleExample(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::EXAMPLE_SEC); + if (!stop) current->name = yyFileName; + BEGIN( FileDocArg1 ); + return stop; +} + +static bool handleDetails(const QCString &) +{ + if (inContext!=OutputBrief) + { + addOutput("\n\n"); // treat @details outside brief description + // as a new paragraph + } + setOutput(OutputDoc); + return FALSE; +} + +static bool handleName(const QCString &) +{ + bool stop=makeStructuralIndicator(Entry::MEMBERGRP_SEC); + if (!stop) + { + g_memberGroupHeader.resize(0); + BEGIN( NameParam ); + if (g_memberGroupId!=DOX_NOGROUP) // end of previous member group + { + closeGroup(current,yyFileName,yyLineNr,TRUE); + } + } + return stop; +} + +static bool handleTodo(const QCString &) +{ + newXRefKind = XRef_Todo; + setOutput(OutputXRef); + xrefKind = XRef_Todo; + return FALSE; +} + +static bool handleTest(const QCString &) +{ + newXRefKind = XRef_Test; + setOutput(OutputXRef); + xrefKind = XRef_Test; + return FALSE; +} + +static bool handleBug(const QCString &) +{ + newXRefKind = XRef_Bug; + setOutput(OutputXRef); + xrefKind = XRef_Bug; + return FALSE; +} + +static bool handleDeprecated(const QCString &) +{ + newXRefKind = XRef_Deprecated; + setOutput(OutputXRef); + xrefKind = XRef_Deprecated; + return FALSE; +} + +static bool handleXRefItem(const QCString &) +{ + BEGIN(XRefItemParam1); + return FALSE; +} + +static bool handleRelated(const QCString &) +{ + BEGIN(RelatesParam1); + return FALSE; +} + +static bool handleRelatedAlso(const QCString &) +{ + current->relatesType = Duplicate; + BEGIN(RelatesParam1); + return FALSE; +} + +static bool handleMemberOf(const QCString &) +{ + current->relatesType = MemberOf; + BEGIN(RelatesParam1); + return FALSE; +} + +static bool handleRefItem(const QCString &) +{ + addOutput(" @refitem "); + BEGIN(LineParam); + return FALSE; +} + +static bool handleSection(const QCString &s) +{ + setOutput(OutputDoc); + addOutput(" @"+s+" "); + BEGIN(SectionLabel); + if (s=="section") g_sectionLevel=1; + else if (s=="subsection") g_sectionLevel=2; + else if (s=="subsubsection") g_sectionLevel=3; + else if (s=="paragraph") g_sectionLevel=4; + return FALSE; +} + +static bool handleSubpage(const QCString &s) +{ + if (current->section!=Entry::EMPTY_SEC && + current->section!=Entry::PAGEDOC_SEC && + current->section!=Entry::MAINPAGEDOC_SEC + ) + { + warn(yyFileName,yyLineNr, + "warning: found \\subpage command in a comment block that is not marked as a page!"); + } + addOutput(" @"+s+" "); + BEGIN(SubpageLabel); + return FALSE; +} + +static bool handleAnchor(const QCString &s) +{ + addOutput(" @"+s+" "); + BEGIN(AnchorLabel); + return FALSE; +} + +static bool handleFormatBlock(const QCString &s) +{ + addOutput(" @"+s+" "); + //printf("handleFormatBlock(%s)\n",s.data()); + blockName=s; + g_commentCount=0; + BEGIN(FormatBlock); + return FALSE; +} + +static bool handleAddIndex(const QCString &) +{ + addOutput(" @addindex "); + BEGIN(LineParam); + return FALSE; +} + +static bool handleIf(const QCString &) +{ + enabledSectionFound=FALSE; + guardType = Guard_If; + BEGIN(GuardParam); + return FALSE; +} + +static bool handleIfNot(const QCString &) +{ + enabledSectionFound=FALSE; + guardType = Guard_IfNot; + BEGIN(GuardParam); + return FALSE; +} + +static bool handleElseIf(const QCString &) +{ + if (guards.isEmpty()) + { + warn(yyFileName,yyLineNr, + "warning: found \\else without matching start command"); + } + else + { + guardType = enabledSectionFound ? Guard_Skip : Guard_If; + BEGIN(GuardParam); + } + return FALSE; +} + +static bool handleElse(const QCString &) +{ + if (guards.isEmpty()) + { + warn(yyFileName,yyLineNr, + "warning: found \\else without matching start command"); + } + else + { + BEGIN( SkipGuardedSection ); + } + return FALSE; +} + +static bool handleEndIf(const QCString &) +{ + if (guards.isEmpty()) + { + warn(yyFileName,yyLineNr, + "warning: found \\endif without matching start command"); + } + else + { + delete guards.pop(); + } + enabledSectionFound=FALSE; + BEGIN( GuardParamEnd ); + return FALSE; +} + +static bool handleIngroup(const QCString &) +{ + inGroupParamFound=FALSE; + BEGIN( InGroupParam ); + return FALSE; +} + +static bool handleNoSubGrouping(const QCString &) +{ + current->subGrouping = FALSE; + return FALSE; +} + +static bool handleShowInitializer(const QCString &) +{ + current->initLines = 100000; // ON + return FALSE; +} + +static bool handleHideInitializer(const QCString &) +{ + current->initLines = 0; // OFF + return FALSE; +} + +static bool handleCallgraph(const QCString &) +{ + current->callGraph = TRUE; // ON + return FALSE; +} + +static bool handleCallergraph(const QCString &) +{ + current->callerGraph = TRUE; // ON + return FALSE; +} + +static bool handleInternal(const QCString &) +{ + if (!Config_getBool("INTERNAL_DOCS")) + { + // make sure some whitespace before a \internal command + // is not treated as "documentation" + if (current->doc.stripWhiteSpace().isEmpty()) + { + current->doc.resize(0); + } + g_condCount=0; + BEGIN( SkipInternal ); + } + else + { + // re-enabled for bug640828 + addOutput("\\internal "); + } + return FALSE; +} + +static bool handleLineBr(const QCString &) +{ + addOutput('\n'); + return FALSE; +} + +static bool handleStatic(const QCString &) +{ + endBrief(); + current->stat = TRUE; + return FALSE; +} + +static bool handlePure(const QCString &) +{ + endBrief(); + current->virt = Pure; + return FALSE; +} + +static bool handlePrivate(const QCString &) +{ + current->protection = Private; + return FALSE; +} + +static bool handlePrivateSection(const QCString &) +{ + current->protection = protection = Private; + return FALSE; +} + +static bool handleProtected(const QCString &) +{ + current->protection = Protected; + return FALSE; +} + +static bool handleProtectedSection(const QCString &) +{ + current->protection = protection = Protected ; + return FALSE; +} + +static bool handlePublic(const QCString &) +{ + current->protection = Public; + return FALSE; +} + +static bool handlePublicSection(const QCString &) +{ + current->protection = protection = Public; + return FALSE; +} + +static bool handleInherit(const QCString &) +{ + BEGIN(InheritParam); + return FALSE; +} + +static bool handleExtends(const QCString &) +{ + BEGIN(ExtendsParam); + return FALSE; +} + +//---------------------------------------------------------------------------- + +static void checkFormula() +{ + if (YY_START==ReadFormulaShort || YY_START==ReadFormulaLong) + { + warn(yyFileName,yyLineNr,"warning: End of comment block while inside formula."); + } +} + +//---------------------------------------------------------------------------- + +bool parseCommentBlock(/* in */ ParserInterface *parser, + /* in */ Entry *curEntry, + /* in */ const QCString &comment, + /* in */ const QCString &fileName, + /* in,out */ int &lineNr, + /* in */ bool isBrief, + /* in */ bool isAutoBriefOn, + /* in */ bool isInbody, + /* in,out */ Protection &prot, + /* in,out */ int &position, + /* out */ bool &newEntryNeeded + ) +{ + //printf("parseCommentBlock() isBrief=%d isAutoBriefOn=%d lineNr=%d\n", + // isBrief,isAutoBriefOn,lineNr); + + initParser(); + guards.setAutoDelete(TRUE); + guards.clear(); + langParser = parser; + current = curEntry; + if (comment.isEmpty()) return FALSE; // avoid empty strings + inputString = comment; + inputString.append(" "); + inputPosition = position; + yyLineNr = lineNr; + yyFileName = fileName; + protection = prot; + needNewEntry = FALSE; + xrefKind = XRef_None; + xrefAppendFlag = FALSE; + insidePre = FALSE; + parseMore = FALSE; + inBody = isInbody; + outputXRef.resize(0); + setOutput( isBrief || isAutoBriefOn ? OutputBrief : OutputDoc ); + briefEndsAtDot = isAutoBriefOn; + g_condCount = 0; + g_sectionLevel = 0; + + if (!current->inbodyDocs.isEmpty() && isInbody) // separate in body fragments + { + current->inbodyDocs+="\n\n"; + } + + Debug::print(Debug::CommentScan,0,"-----------\nCommentScanner: %s:%d\n" + "input=[%s]\n",fileName.data(),lineNr,comment.data() + ); + + commentScanYYrestart( commentScanYYin ); + BEGIN( Comment ); + commentScanYYlex(); + setOutput( OutputDoc ); + + if (YY_START==OverloadParam) // comment ended with \overload + { + addOutput(getOverloadDocs()); + } + + if (!guards.isEmpty()) + { + warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!"); + } + + current->doc=stripLeadingAndTrailingEmptyLines(current->doc); + + if (current->section==Entry::FILEDOC_SEC && current->doc.isEmpty()) + { + // to allow a comment block with just a @file command. + current->doc="\n\n"; + } + + if (current->section==Entry::MEMBERGRP_SEC && + g_memberGroupId==DOX_NOGROUP) // @name section but no group started yet + { + openGroup(current,yyFileName,yyLineNr); + } + + Debug::print(Debug::CommentScan,0, + "brief=[%s]\ndocs=[%s]\ninbody=[%s]\n===========\n", + current->brief.data(),current->doc.data(),current->inbodyDocs.data() + ); + + checkFormula(); + prot = protection; + + groupAddDocs(curEntry,fileName); + + newEntryNeeded = needNewEntry; + + // if we did not proceed during this call, it does not make + // sense to continue, since we get stuck. See bug 567346 for situations + // were this happens + if (parseMore && position==inputPosition) parseMore=FALSE; + + if (parseMore) position=inputPosition; else position=0; + + lineNr = yyLineNr; + //printf("position=%d parseMore=%d\n",position,parseMore); + + return parseMore; +} + +//--------------------------------------------------------------------------- + +void groupEnterFile(const char *fileName,int) +{ + g_autoGroupStack.setAutoDelete(TRUE); + g_autoGroupStack.clear(); + g_memberGroupId = DOX_NOGROUP; + g_memberGroupDocs.resize(0); + g_memberGroupRelates.resize(0); + g_compoundName=fileName; +} + +void groupLeaveFile(const char *fileName,int line) +{ + //if (g_memberGroupId!=DOX_NOGROUP) + //{ + // warn(fileName,line,"warning: end of file while inside a member group\n"); + //} + g_memberGroupId=DOX_NOGROUP; + g_memberGroupRelates.resize(0); + g_memberGroupDocs.resize(0); + if (!g_autoGroupStack.isEmpty()) + { + warn(fileName,line,"warning: end of file while inside a group\n"); + } +} + +void groupEnterCompound(const char *fileName,int line,const char *name) +{ + if (g_memberGroupId!=DOX_NOGROUP) + { + warn(fileName,line,"warning: try to put compound %s inside a member group\n",name); + } + g_memberGroupId=DOX_NOGROUP; + g_memberGroupRelates.resize(0); + g_memberGroupDocs.resize(0); + g_compoundName = name; + int i = g_compoundName.find('('); + if (i!=-1) + { + g_compoundName=g_compoundName.left(i); // strip category (Obj-C) + } + if (g_compoundName.isEmpty()) + { + g_compoundName=fileName; + } + //printf("groupEnterCompound(%s)\n",name); +} + +void groupLeaveCompound(const char *,int,const char * /*name*/) +{ + //printf("groupLeaveCompound(%s)\n",name); + //if (g_memberGroupId!=DOX_NOGROUP) + //{ + // warn(fileName,line,"warning: end of compound %s while inside a member group\n",name); + //} + g_memberGroupId=DOX_NOGROUP; + g_memberGroupRelates.resize(0); + g_memberGroupDocs.resize(0); + g_compoundName.resize(0); +} + +static int findExistingGroup(int &groupId,const MemberGroupInfo *info) +{ + //printf("findExistingGroup %s:%s\n",info->header.data(),info->compoundName.data()); + QIntDictIterator<MemberGroupInfo> di(Doxygen::memGrpInfoDict); + MemberGroupInfo *mi; + for (di.toFirst();(mi=di.current());++di) + { + if (g_compoundName==mi->compoundName && // same file or scope + !mi->header.isEmpty() && // not a nameless group + stricmp(mi->header,info->header)==0 // same header name + ) + { + //printf("Found it!\n"); + return di.currentKey(); // put the item in this group + } + } + groupId++; // start new group + return groupId; +} + +void openGroup(Entry *e,const char *,int) +{ + //printf("==> openGroup(name=%s,sec=%x) g_autoGroupStack=%d\n", + // e->name.data(),e->section,g_autoGroupStack.count()); + if (e->section==Entry::GROUPDOC_SEC) // auto group + { + g_autoGroupStack.push(new Grouping(e->name,e->groupingPri())); + } + else // start of a member group + { + //printf(" membergroup id=%d %s\n",g_memberGroupId,g_memberGroupHeader.data()); + if (g_memberGroupId==DOX_NOGROUP) // no group started yet + { + static int curGroupId=0; + + MemberGroupInfo *info = new MemberGroupInfo; + info->header = g_memberGroupHeader.stripWhiteSpace(); + info->compoundName = g_compoundName; + g_memberGroupId = findExistingGroup(curGroupId,info); + //printf(" use membergroup %d\n",g_memberGroupId); + Doxygen::memGrpInfoDict.insert(g_memberGroupId,info); + + g_memberGroupRelates = e->relates; + e->mGrpId = g_memberGroupId; + } + } +} + +void closeGroup(Entry *e,const char *fileName,int,bool foundInline) +{ + //printf("==> closeGroup(name=%s,sec=%x) g_autoGroupStack=%d\n", + // e->name.data(),e->section,g_autoGroupStack.count()); + if (g_memberGroupId!=DOX_NOGROUP) // end of member group + { + MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(g_memberGroupId); + if (info) // known group + { + info->doc = g_memberGroupDocs; + info->docFile = fileName; + } + g_memberGroupId=DOX_NOGROUP; + g_memberGroupRelates.resize(0); + g_memberGroupDocs.resize(0); + e->mGrpId=DOX_NOGROUP; + //printf("new group id=%d\n",g_memberGroupId); + } + else if (!g_autoGroupStack.isEmpty()) // end of auto group + { + Grouping *grp = g_autoGroupStack.pop(); + // see bug577005: we should not remove the last group for e + if (!foundInline) e->groups->removeLast(); + //printf("Removing %s e=%p\n",grp->groupname.data(),e); + delete grp; + if (!foundInline) initGroupInfo(e); + } +} + +void initGroupInfo(Entry *e) +{ + //printf("==> initGroup(id=%d,related=%s,e=%p)\n",g_memberGroupId, + // g_memberGroupRelates.data(),e); + e->mGrpId = g_memberGroupId; + e->relates = g_memberGroupRelates; + if (!g_autoGroupStack.isEmpty()) + { + //printf("Appending group %s to %s: count=%d entry=%p\n", + // g_autoGroupStack.top()->groupname.data(), + // e->name.data(),e->groups->count(),e); + e->groups->append(new Grouping(*g_autoGroupStack.top())); + } +} + +static void groupAddDocs(Entry *e,const char *fileName) +{ + if (e->section==Entry::MEMBERGRP_SEC) + { + g_memberGroupDocs=e->brief.stripWhiteSpace(); + e->doc = stripLeadingAndTrailingEmptyLines(e->doc); + if (!g_memberGroupDocs.isEmpty() && !e->doc.isEmpty()) + { + g_memberGroupDocs+="\n\n"; + } + g_memberGroupDocs+=e->doc; + MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(g_memberGroupId); + if (info) + { + info->doc = g_memberGroupDocs; + info->docFile = fileName; + info->setRefItems(e->sli); + } + e->doc.resize(0); + e->brief.resize(0); + } +} + + +#if !defined(YY_FLEX_SUBMINOR_VERSION) +//---------------------------------------------------------------------------- +extern "C" { // some bogus code to keep the compiler happy + void commentScanYYdummy() { yy_flex_realloc(0,0); } +} +#endif + Index: branches/xZenu/src/util/doxygen/src/translator_sc.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator_sc.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator_sc.h (revision 1322) @@ -0,0 +1,1805 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef TRANSLATOR_SC_H +#define TRANSLATOR_SC_H + +/*! + When defining a translator class for the new language, follow + the description in the documentation. One of the steps says + that you should copy the translator_en.h (this) file to your + translator_xx.h new file. Your new language should use the + Translator class as the base class. This means that you need to + implement exactly the same (pure virtual) methods as the + TranslatorEnglish does. Because of this, it is a good idea to + start with the copy of TranslatorEnglish and replace the strings + one by one. + + It is not necessary to include "translator.h" or + "translator_adapter.h" here. The files are included in the + language.cpp correctly. Not including any of the mentioned + files frees the maintainer from thinking about whether the + first, the second, or both files should be included or not, and + why. This holds namely for localized translators because their + base class is changed occasionaly to adapter classes when the + Translator class changes the interface, or back to the + Translator class (by the local maintainer) when the localized + translator is made up-to-date again. +*/ +class TranslatorSerbianCyrilic : public TranslatorAdapter_1_6_0 +{ + public: + + // --- Language control methods ------------------- + + /*! Used for identification of the language. The identification + * should not be translated. It should be replaced by the name + * of the language in English using lower-case characters only + * (e.g. "czech", "japanese", "russian", etc.). It should be equal to + * the identification used in language.cpp. + */ + virtual QCString idLanguage() + { return "serbiancyr"; } + + /*! Used to get the LaTeX command(s) for the language support. + * This method should return string with commands that switch + * LaTeX to the desired language. For example + * <pre>"\\usepackage[german]{babel}\n" + * </pre> + * or + * <pre>"\\usepackage{polski}\n" + * "\\usepackage[latin2]{inputenc}\n" + * "\\usepackage[T1]{fontenc}\n" + * </pre> + * + * The English LaTeX does not use such commands. Because of this + * the empty string is returned in this implementation. + */ + virtual QCString latexLanguageSupportCommand() + { + return ""; + } + + /*! return the language charset. This will be used for the HTML output */ + virtual QCString idLanguageCharset() + { + return "utf-8"; + } + + // --- Language translation methods ------------------- + + /*! used in the compound documentation before a list of related functions. */ + virtual QCString trRelatedFunctions() + { return "Повезане функције"; } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return "(Ðапомињемо да ово ниÑу функције чланице.)"; } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return "Опширније"; } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return "Документација дефиниције типа"; } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + { return "Документација члана набрајања"; } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { return "Документација функције чланице"; } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Документација поља"; + } + else + { + return "Документација атрибута"; + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return "Још..."; } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return "СпиÑак Ñвих чланова."; } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return "СпиÑак чланова"; } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return "Ово је ÑпиÑак Ñвих чланова од "; } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return ", укључујући Ñве наÑлеђене чланове."; } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ + virtual QCString trGeneratedAutomatically(const char *s) + { QCString result="ÐутоматÑки направљено помоћу Doxygen-а"; + if (s) result+=(QCString)" за "+s; + result+=" из изворног кода."; + return result; + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return "назив набрајања"; } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return "вредноÑÑ‚ набрајања"; } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return "дефиниÑано у"; } + + // quick reference sections + + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \\group command). + */ + virtual QCString trModules() + { return "Модули"; } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return "Хијерархија клаÑа"; } + + /*! This is put above each page as a link to the list of annotated classes */ + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Структуре"; + } + else + { + return "СпиÑак клаÑа"; + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return "СпиÑак датотека"; } + + /*! This is put above each page as a link to all members of compounds. */ + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Поља"; + } + else + { + return "Чланови клаÑе"; + } + } + + /*! This is put above each page as a link to all members of files. */ + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Глобално"; + } + else + { + return "Чланови датотеке"; + } + } + + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return "Повезане Ñтранице"; } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return "Примери"; } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return "Тражи"; } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { return "Овај ÑпиÑак наÑлеђивања је уређен " + "Ñкоро по абецеди:"; + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool extractAll) + { + QCString result="Овде је ÑпиÑак Ñвих "; + if (!extractAll) result+="документованих "; + result+="датотека Ñа кратким опиÑима:"; + return result; + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Овде Ñу Ñтруктуре Ñа кратким опиÑима:"; + } + else + { + return "Овде Ñу клаÑе, Ñтруктуре, " + "уније и интерфејÑи Ñа кратким опиÑима:"; + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result="Овде је ÑпиÑак Ñвих "; + if (!extractAll) + { + result+="документованих "; + } + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="поља Ñтруктура и унија"; + } + else + { + result+="чланова клаÑа"; + } + result+=" Ñа везама ка "; + if (!extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="документацији Ñтруктуре/уније за Ñвако поље:"; + } + else + { + result+="документацији клаÑе за Ñваки члан:"; + } + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="Ñтруктури/унији којој припадају:"; + } + else + { + result+="клаÑи којој припадају:"; + } + } + return result; + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool extractAll) + { + QCString result="Овде је ÑпиÑак Ñвих "; + if (!extractAll) result+="документованих "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="фрункција, променљивих, макро замена, набрајања, и дефиниција типова"; + } + else + { + result+="чланова датотеке"; + } + result+=" Ñа везама ка "; + if (extractAll) + result+="датотекама којима припадају:"; + else + result+="документацији:"; + return result; + } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return "Овде је ÑпиÑак Ñвих примера:"; } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return "Овде је ÑпиÑак Ñвих повезаних Ñтраница документације:"; } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return "Овде је ÑпиÑак Ñвих модула:"; } + + // index titles (the project name is prepended for these) + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return "Документација"; } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return "Ð˜Ð½Ð´ÐµÐºÑ Ð¼Ð¾Ð´ÑƒÐ»Ð°"; } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return "ХијерархијÑки индекÑ"; } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Ð˜Ð½Ð´ÐµÐºÑ Ñтруктура"; + } + else + { + return "Ð˜Ð½Ð´ÐµÐºÑ ÐºÐ»Ð°Ñа"; + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return "Ð˜Ð½Ð´ÐµÐºÑ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return "Документација модула"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Документација Ñтруктуре"; + } + else + { + return "Документација клаÑе"; + } + } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return "Документација датотеке"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return "Документација примера"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return "Документација Ñтранице"; } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return "Приручник"; } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return "Дефиниције"; } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return "Декларације функција"; } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return "Дефиниције типова"; } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return "Ðабрајања"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return "Функције"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return "Променљиве"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return "ВредноÑти набрајања"; } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return "Документација дефиниције"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return "Документација декларације функције"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return "Документација дефиниције типа"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return "Документација набрајања"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return "Документација функције"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return "Документација променљиве"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Структуре"; + } + else + { + return "КлаÑе"; + } + } + + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ + virtual QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result=(QCString)"Ðаправљено "+date; + if (projName) result+=(QCString)" за "+projName; + result+=(QCString)" помоћу"; + return result; + } + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return "напиÑао"; + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return (QCString)"Дијаграм наÑлеђивања за "+clName+":"; + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return "Само за унутрашњу употребу."; } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return "Упозорење"; } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return "Верзија"; } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return "Датум"; } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return "Враћа"; } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return "Види"; } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return "Параметри"; } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return "Изизеци"; } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return "Ðаправљено помоћу"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return "СпиÑак проÑтора имена"; } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool extractAll) + { + QCString result="Овде је ÑпиÑак Ñвих "; + if (!extractAll) result+="документованих "; + result+="проÑтора имена Ñа кратким опиÑима:"; + return result; + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return "Пријатељи"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return "Документација за пријатеље и повезане функције"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=(QCString)clName; + if (isTemplate) { + result+=" Шаблон"; + switch(compType) + { + case ClassDef::Class: result+="Ñка клаÑа"; break; + case ClassDef::Struct: result+="Ñка Ñтруктура"; break; + case ClassDef::Union: result+="Ñка унија"; break; + case ClassDef::Interface: result+="Ñки интерфејÑ"; break; + case ClassDef::Protocol: result+="Ñки протокол"; break; + case ClassDef::Category: result+="Ñка категорија"; break; + case ClassDef::Exception: result+="Ñки изузетак"; break; + } + } else { + result+=" Референца"; + switch(compType) + { + case ClassDef::Class: result+=" клаÑе"; break; + case ClassDef::Struct: result+=" Ñтруктуре"; break; + case ClassDef::Union: result+=" уније"; break; + case ClassDef::Interface: result+=" интерфејÑа"; break; + case ClassDef::Protocol: result+=" протокола"; break; + case ClassDef::Category: result+=" категорије"; break; + case ClassDef::Exception: result+=" изузетка"; break; + } + } + return result; + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result=fileName; + result+=" Референца датотеке"; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" Референца проÑтора имена"; + return result; + } + + virtual QCString trPublicMembers() + { return "Јавне функције чланице"; } + virtual QCString trPublicSlots() + { return "Јавни Ñлотови"; } + virtual QCString trSignals() + { return "Сигнали"; } + virtual QCString trStaticPublicMembers() + { return "Статичке јавне функције чланице"; } + virtual QCString trProtectedMembers() + { return "Заштићене функције чланице"; } + virtual QCString trProtectedSlots() + { return "Заштићени Ñлотови"; } + virtual QCString trStaticProtectedMembers() + { return "Статичке заштићене функције чланице"; } + virtual QCString trPrivateMembers() + { return "Приватне функције чланице"; } + virtual QCString trPrivateSlots() + { return "Приватни Ñлотови"; } + virtual QCString trStaticPrivateMembers() + { return "Статичке приватне функције чланице"; } + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + virtual QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i<numEntries;i++) + { + // use generateMarker to generate placeholders for the class links! + result+=generateMarker(i); // generate marker for entry i in the list + // (order is left to right) + + if (i!=numEntries-1) // not the last entry, so we need a separator + { + if (i<numEntries-2) // not the fore last entry + result+=", "; + else // the fore last entry + result+=" и "; + } + } + return result; + } + + /*! used in class documentation to produce a list of base classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritsList(int numEntries) + { + return "ÐаÑлеђује "+trWriteList(numEntries)+"."; + } + + /*! used in class documentation to produce a list of super classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritedByList(int numEntries) + { + return "ÐаÑлеђују "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * members that are hidden by this one. + */ + virtual QCString trReimplementedFromList(int numEntries) + { + return "Поново имплементирано од "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all member that overwrite the implementation of this member. + */ + virtual QCString trReimplementedInList(int numEntries) + { + return "Поново имплементирано у "+trWriteList(numEntries)+"."; + } + + /*! This is put above each page as a link to all members of namespaces. */ + virtual QCString trNamespaceMembers() + { return "Чланови проÑтора имена"; } + + /*! This is an introduction to the page with all namespace members */ + virtual QCString trNamespaceMemberDescription(bool extractAll) + { + QCString result="Овде је ÑпиÑак Ñвих "; + if (!extractAll) result+="документованих "; + result+="чланова проÑтора имена Ñа везама ка "; + if (extractAll) + result+="документацији проÑтора имена за Ñваки члан:"; + else + result+="проÑторима имена којима припадају:"; + return result; + } + /*! This is used in LaTeX as the title of the chapter with the + * index of all namespaces. + */ + virtual QCString trNamespaceIndex() + { return "Ð˜Ð½Ð´ÐµÐºÑ Ð¿Ñ€Ð¾Ñтора имена"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all namespaces. + */ + virtual QCString trNamespaceDocumentation() + { return "Документација проÑтора имена"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + virtual QCString trNamespaces() + { return "ПроÑтори имена"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Class", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Документација за "; + switch(compType) + { + case ClassDef::Class: result+="ову клаÑу"; break; + case ClassDef::Struct: result+="ову Ñтруктуру"; break; + case ClassDef::Union: result+="ову унију"; break; + case ClassDef::Interface: result+="овај интерфејÑ"; break; + case ClassDef::Protocol: result+="овај протокол"; break; + case ClassDef::Category: result+="ову категорију"; break; + case ClassDef::Exception: result+="овај изузетак"; break; + } + result+=" је произведена из"; + if (single) result+="Ñледеће датотеке:"; else result+="Ñледећих датотека:"; + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + virtual QCString trAlphabeticalList() + { return "Ðбецедни ÑпиÑак"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + virtual QCString trReturnValues() + { return "Враћене вредноÑти"; } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + virtual QCString trMainPage() + { return "Главна Ñтраница"; } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + virtual QCString trPageAbbreviation() + { return "ÑÑ‚Ñ€."; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDefinedAtLineInSourceFile() + { + return "Дефиниција у линији @0 датотеке @1."; + } + virtual QCString trDefinedInSourceFile() + { + return "Дефиниција у датотеци @0."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() + { + return "ЗаÑтарело"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + virtual QCString trCollaborationDiagram(const char *clName) + { + return (QCString)"Дијаграм Ñарадње за "+clName+":"; + } + /*! this text is put before an include dependency graph */ + virtual QCString trInclDepGraph(const char *fName) + { + return (QCString)"Дијаграм завиÑноÑти укључивања за "+fName+":"; + } + /*! header that is put before the list of constructor/destructors. */ + virtual QCString trConstructorDocumentation() + { + return "Документација конÑтруктора и деÑтруктора"; + } + /*! Used in the file documentation to point to the corresponding sources. */ + virtual QCString trGotoSourceCode() + { + return "Иди на изворни код овог фајла."; + } + /*! Used in the file sources to point to the corresponding documentation. */ + virtual QCString trGotoDocumentation() + { + return "Иди на документацију овог фајла."; + } + /*! Text for the \\pre command */ + virtual QCString trPrecondition() + { + return "УÑлов пре"; + } + /*! Text for the \\post command */ + virtual QCString trPostcondition() + { + return "УÑлов поÑле"; + } + /*! Text for the \\invariant command */ + virtual QCString trInvariant() + { + return "Инваријанта"; + } + /*! Text shown before a multi-line variable/enum initialization */ + virtual QCString trInitialValue() + { + return "Почетна вредноÑÑ‚:"; + } + /*! Text used the source code in the file index */ + virtual QCString trCode() + { + return "код"; + } + virtual QCString trGraphicalHierarchy() + { + return "Графичка хијерархија клаÑа"; + } + virtual QCString trGotoGraphicalHierarchy() + { + return "Иди на графичку хијерархију клаÑа"; + } + virtual QCString trGotoTextualHierarchy() + { + return "Иди на текÑтуалну хијерархију клаÑа"; + } + virtual QCString trPageIndex() + { + return "Ð˜Ð½Ð´ÐµÐºÑ Ñтрана"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() + { + return "Ðапомена"; + } + virtual QCString trPublicTypes() + { + return "Јавни типови"; + } + virtual QCString trPublicAttribs() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Поља"; + } + else + { + return "Јавни атрибути"; + } + } + virtual QCString trStaticPublicAttribs() + { + return "Статички јавни атрибути"; + } + virtual QCString trProtectedTypes() + { + return "Заштићени типови"; + } + virtual QCString trProtectedAttribs() + { + return "Заштићени атрибути"; + } + virtual QCString trStaticProtectedAttribs() + { + return "Статички заштићени атрибути"; + } + virtual QCString trPrivateTypes() + { + return "Приватни типови"; + } + virtual QCString trPrivateAttribs() + { + return "Приватни атрибути"; + } + virtual QCString trStaticPrivateAttribs() + { + return "Статички приватни атрибути"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\todo item */ + virtual QCString trTodo() + { + return "Урадити"; + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return "ПодÑетник шта још урадити"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { + return "Референцирано од"; + } + virtual QCString trRemarks() + { + return "Ðапомене"; + } + virtual QCString trAttention() + { + return "Пажња"; + } + virtual QCString trInclByDepGraph() + { + return "Овај граф показује које датотеке директно или " + "или индиректно укључују овај фајл:"; + } + virtual QCString trSince() + { + return "Од"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return "Легенда графова"; + } + /*! page explaining how the dot graph's should be interpreted + * The %A in the text below are to prevent link to classes called "A". + */ + virtual QCString trLegendDocs() + { + return + "Ова Ñтраница објашњава како тумачити графове који Ñу направљени " + "doxygen-ом.<p>\n" + "Размотримо Ñледећи пример:\n" + "\\code\n" + "/*! Ðевидљива клаÑа због одÑецања */\n" + "class Invisible { };\n\n" + "/*! ОдÑечена клаÑа, веза наÑлеђивања је Ñкривена */\n" + "class Truncated : public Invisible { };\n\n" + "/* КлаÑа која није документована doxygen коментарима */\n" + "class Undocumented { };\n\n" + "/*! КлаÑа која је наÑлеђена јавним наÑлеђивањем */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! ШаблонÑка клаÑа */\n" + "template<class T> class Templ { };\n\n" + "/*! КлаÑа која је наÑлеђена заштићеним наÑлеђивањем */\n" + "class ProtectedBase { };\n\n" + "/*! КлаÑа која је наÑлеђена јавним наÑлеђивањем */\n" + "class PrivateBase { };\n\n" + "/*! КлаÑа коју кориÑти наÑлеђена клаÑа */\n" + "class Used { };\n\n" + "/*! ÐадклаÑа која наÑлеђује неки број других клаÑа */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented,\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "Ðко је \\c MAX_DOT_GRAPH_HEIGHT таг у конфигурационој датотеци " + "подешен на 240, то ће резултовати на Ñледећи начин:" + "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "Правоугаоници имају Ñледеће значење:\n" + "<ul>\n" + "<li>%Пуни Ñиви правоугаоник предÑтавља Ñтруктуру или клаÑу за коју је " + "граф направљен.\n" + "<li>%Правоугаоник Ñа црним оквиром означава документовану Ñтруктуру или клаÑу.\n" + "<li>%Правоугаоник Ñа Ñивим оквиром означава недокументовану Ñтруктуру или клаÑу.\n" + "<li>%Правоугаоник Ñа црвеним оквиром означава документовану Ñтруктуру или клаÑу за" + "за коју ниÑу Ñве релације наÑлеђивања/Ñадржавања приказане. %Граф је " + "одÑечен ако излази из Ñпецифицираних оквира.\n" + "</ul>\n" + "Стрелице имају Ñледећа значења:\n" + "<ul>\n" + "<li>%Тамноплава Ñтрелица Ñе кориÑти да прикаже релацију јавног извођења " + "између двеју клаÑа.\n" + "<li>%Тамнозелена Ñтрелица Ñе кориÑти за заштићено наÑлеђивање.\n" + "<li>%Тамноцрвена Ñтрелица Ñе кориÑти за приватно наÑлеђивање.\n" + "<li>%ЉубичаÑта иÑпрекидана Ñтрелица Ñе кориÑти ако клаÑа Ñадржи или кориÑти " + "друга клаÑа. Стрелица је означена променљивом/променљивама " + "кроз које је показивана клаÑа или Ñтруктура доÑтупна.\n" + "<li>%Жута иÑпрекидана Ñтрелица означава везу између примерка шаблона и " + "и шаблонÑке клаÑе из које је инÑтанцирана. Стрелица је означена " + "параметрима примерка шаблона.\n" + "</ul>\n"; + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return "легенда"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return "ТеÑÑ‚"; + } + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return "СпиÑак теÑтова"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return "DCOP функције чланице"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return "СвоÑтва"; + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return "Документација ÑвоÑјтва"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Структуре"; + } + else + { + return "КлаÑе"; + } + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)"Пакет "+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return "СпиÑак пакета"; + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return "Овде Ñу пакети Ñа кратким опиÑима (ако Ñу доÑтупни):"; + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return "Пакети"; + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return "ВредноÑÑ‚:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return "Грешка"; + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return "СпиÑак грешака"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file + * + * The following table shows the correlation of Charset name, Charset Value and + * <pre> + * Codepage number: + * Charset Name Charset Value(hex) Codepage number + * ------------------------------------------------------ + * DEFAULT_CHARSET 1 (x01) + * SYMBOL_CHARSET 2 (x02) + * OEM_CHARSET 255 (xFF) + * ANSI_CHARSET 0 (x00) 1252 + * RUSSIAN_CHARSET 204 (xCC) 1251 + * EE_CHARSET 238 (xEE) 1250 + * GREEK_CHARSET 161 (xA1) 1253 + * TURKISH_CHARSET 162 (xA2) 1254 + * BALTIC_CHARSET 186 (xBA) 1257 + * HEBREW_CHARSET 177 (xB1) 1255 + * ARABIC _CHARSET 178 (xB2) 1256 + * SHIFTJIS_CHARSET 128 (x80) 932 + * HANGEUL_CHARSET 129 (x81) 949 + * GB2313_CHARSET 134 (x86) 936 + * CHINESEBIG5_CHARSET 136 (x88) 950 + * </pre> + * + */ + virtual QCString trRTFansicp() + { + return "1252"; + } + + + /*! Used as ansicpg for RTF fcharset + * \see trRTFansicp() for a table of possible values. + */ + virtual QCString trRTFCharSet() + { + return "0"; + } + + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return "ИндекÑ"; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + QCString result((first_capital ? "КлаÑ" : "клаÑ")); + if (!singular) result+="e"; else result+="a"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + QCString result((first_capital ? "Датотек" : "датотек")); + if (!singular) result+="e"; else result+="a"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + QCString result((first_capital ? "ПроÑтор" : "проÑтор")); + if (!singular) result+="и имена"; else result+=" имена"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + QCString result((first_capital ? "Груп" : "груп")); + if (!singular) result+="е"; else result+="a"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + QCString result((first_capital ? "Страниц" : "Ñтраниц")); + if (!singular) result+="е"; else result += "a"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + QCString result((first_capital ? "Члан" : "члан")); + if (!singular) result+="ови"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + QCString result((first_capital ? "Глобалн" : "глобалн")); + if (!singular) result+="а"; else result+="о"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + QCString result((first_capital ? "Ðутор" : "аутор")); + if (!singular) result+="и"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return "Референце"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Имплементира "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this abstract member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Имплементирано у "+trWriteList(numEntries)+"."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return "Садржај"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "СпиÑак заÑтарелог"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Догађаји"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Документација догажаја"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return "Типови пакета"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return "Функције пакета"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return "Статичке функције пакета"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return "Ðтрибути пакета"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return "Статички атрибути пакета"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "Све"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Овде је граф позивања за ову функцију:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + return "Тражим"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "Резултати претраге"; + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return "Жао ми је, али нема докумената који одговарају упиту."; + } + else if (numDocuments==1) + { + return "Пронађен <b>1</b> документ који одговара упиту."; + } + else if (numDocuments==2) + { + return "Пронађена <b>а</b> документа која одговарају упиту."; + } + else if (numDocuments==3) + { + return "Пронађена <b>3</b> документа која одговарају упиту."; + } + else if (numDocuments==4) + { + return "Пронађена <b>4</b> документа која одговарају упиту."; + } + else + { + return "Пронађено <b>$num</b> докумената који одговарају упиту. " + "Приказују Ñе прво најбољи поготци."; + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "Поготци:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return filename + " Изворна датотека"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return "Хијерархија директоријума"; } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return "Документација директоријума"; } + + /*! This is used as the title of the directory index and also in the + * Quick links of an HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return "Директоријуми"; } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { return "Ова хијерархија директоријума је уређена " + "приближно по абецеди:"; + } + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { QCString result=dirName; result+=" Референца директоријума"; return result; } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool first_capital, bool singular) + { + QCString result((first_capital ? "Директоријум" : "директоријум")); + if (singular) result+=""; else result+="и"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return "Ово је преоптерећена функција чланица. " + "Разликује Ñе од наведене Ñамо по врÑти аргумената кое прихвата"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + /*! This is used to introduce a caller (or called-by) graph */ + virtual QCString trCallerGraph() + { + return "Ово је граф функција које позивају ову функцију:"; + } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { return "Документација вредноÑти набрајања"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 (mainly for Fortran) +////////////////////////////////////////////////////////////////////////// + + /*! header that is put before the list of member subprograms (Fortran). */ + virtual QCString trMemberFunctionDocumentationFortran() + { return "Документацијаr функције чланице, одноÑно потпрограма члана"; } + + /*! This is put above each page as a link to the list of annotated data types (Fortran). */ + virtual QCString trCompoundListFortran() + { return "СпиÑак типова података"; } + + /*! This is put above each page as a link to all members of compounds (Fortran). */ + virtual QCString trCompoundMembersFortran() + { return "Поља"; } + + /*! This is an introduction to the annotated compound list (Fortran). */ + virtual QCString trCompoundListDescriptionFortran() + { return "Овде Ñу типови података Ñа кратким опиÑима:"; } + + /*! This is an introduction to the page with all data types (Fortran). */ + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) + { + QCString result="Овде је ÑпиÑак Ñвих "; + if (!extractAll) + { + result+="документованих "; + } + result+="чланова типова података"; + result+=" Ñа везама ка "; + if (!extractAll) + { + result+="документацији Ñтруктуре података за Ñваки члан"; + } + else + { + result+="типовима података којима припадају:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index (Fortran). + */ + virtual QCString trCompoundIndexFortran() + { return "Ð˜Ð½Ð´ÐµÐºÑ Ñ‚Ð¸Ð¿Ð¾Ð²Ð° података"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all data types (Fortran). + */ + virtual QCString trTypeDocumentation() + { return "Документација типова података"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) subprograms (Fortran). + */ + virtual QCString trSubprograms() + { return "Функције/потпрограми"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for subprograms (Fortran) + */ + virtual QCString trSubprogramDocumentation() + { return "Документација функције/потпрограма"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds (Fortran) + */ + virtual QCString trDataTypes() + { return "Типови података"; } + + /*! used as the title of page containing all the index of all modules (Fortran). */ + virtual QCString trModulesList() + { return "СпиÑак модула"; } + + /*! used as an introduction to the modules list (Fortran) */ + virtual QCString trModulesListDescription(bool extractAll) + { + QCString result="Овде је ÑпиÑак Ñвих "; + if (!extractAll) result+="документованих "; + result+="модула Ñа кратким опиÑима:"; + return result; + } + + /*! used as the title of the HTML page of a module/type (Fortran) */ + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=(QCString)clName; + if (isTemplate) result+=" Шаблон"; + result+=" Референца"; + switch(compType) + { + case ClassDef::Class: result+=" модула"; break; + case ClassDef::Struct: result+=" типа"; break; + case ClassDef::Union: result+=" уније"; break; + case ClassDef::Interface: result+=" интерфејÑа"; break; + case ClassDef::Protocol: result+=" протокола"; break; + case ClassDef::Category: result+=" категорије"; break; + case ClassDef::Exception: result+=" изузетка"; break; + } + return result; + } + /*! used as the title of the HTML page of a module (Fortran) */ + virtual QCString trModuleReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" Референца модула"; + return result; + } + + /*! This is put above each page as a link to all members of modules. (Fortran) */ + virtual QCString trModulesMembers() + { return "Чланови модула"; } + + /*! This is an introduction to the page with all modules members (Fortran) */ + virtual QCString trModulesMemberDescription(bool extractAll) + { + QCString result="Овде је ÑпиÑак Ñвих "; + if (!extractAll) result+="документованих "; + result+="чланова модула Ñа везама ка "; + if (extractAll) + { + result+="документацији модула за Ñваки члан:"; + } + else + { + result+="модулима којима припадају:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all modules (Fortran). + */ + virtual QCString trModulesIndex() + { return "Ð˜Ð½Ð´ÐµÐºÑ Ð¼Ð¾Ð´ÑƒÐ»Ð°"; } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trModule(bool first_capital, bool singular) + { + QCString result((first_capital ? "Модул" : "модул")); + if (!singular) result+="и"; + return result; + } + /*! This is put at the bottom of a module documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Module", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Документација за "; + switch(compType) + { + case ClassDef::Class: result+="овај модул"; break; + case ClassDef::Struct: result+="овај тип"; break; + case ClassDef::Union: result+="ову унију"; break; + case ClassDef::Interface: result+="овај интерфејÑ"; break; + case ClassDef::Protocol: result+="овај протокол"; break; + case ClassDef::Category: result+="ову категорију"; break; + case ClassDef::Exception: result+="овај изузетак"; break; + } + result+=" је направљен из Ñледећ"; + if (single) result+="е датотеке:"; else result+="их датотека:"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trType(bool first_capital, bool singular) + { + QCString result((first_capital ? "Тип" : "тип")); + if (!singular) result+="ови"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trSubprogram(bool first_capital, bool singular) + { + QCString result((first_capital ? "Потпрограм" : "потпрограм")); + if (!singular) result+="и"; + return result; + } + + /*! C# Type Constraint list */ + virtual QCString trTypeConstraints() + { + return "Ограничења типова"; + } + +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/pre.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/pre.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/pre.cpp (revision 1322) @@ -0,0 +1,7030 @@ + +#line 3 "<stdout>" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer preYY_create_buffer +#define yy_delete_buffer preYY_delete_buffer +#define yy_flex_debug preYY_flex_debug +#define yy_init_buffer preYY_init_buffer +#define yy_flush_buffer preYY_flush_buffer +#define yy_load_buffer_state preYY_load_buffer_state +#define yy_switch_to_buffer preYY_switch_to_buffer +#define yyin preYYin +#define yyleng preYYleng +#define yylex preYYlex +#define yylineno preYYlineno +#define yyout preYYout +#define yyrestart preYYrestart +#define yytext preYYtext +#define yywrap preYYwrap +#define yyalloc preYYalloc +#define yyrealloc preYYrealloc +#define yyfree preYYfree + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <stdlib.h> + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include <inttypes.h> +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE preYYrestart(preYYin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 262144 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t preYYleng; + +extern FILE *preYYin, *preYYout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up preYYtext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up preYYtext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via preYYrestart()), so that the user can continue scanning by + * just pointing preYYin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when preYYtext is formed. */ +static char yy_hold_char; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t preYYleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow preYYwrap()'s to do buffer switches + * instead of setting up a fresh preYYin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void preYYrestart (FILE *input_file ); +void preYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE preYY_create_buffer (FILE *file,int size ); +void preYY_delete_buffer (YY_BUFFER_STATE b ); +void preYY_flush_buffer (YY_BUFFER_STATE b ); +void preYYpush_buffer_state (YY_BUFFER_STATE new_buffer ); +void preYYpop_buffer_state (void ); + +static void preYYensure_buffer_stack (void ); +static void preYY_load_buffer_state (void ); +static void preYY_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER preYY_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE preYY_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE preYY_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE preYY_scan_bytes (yyconst char *bytes,yy_size_t len ); + +void *preYYalloc (yy_size_t ); +void *preYYrealloc (void *,yy_size_t ); +void preYYfree (void * ); + +#define yy_new_buffer preYY_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + preYYensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + preYY_create_buffer(preYYin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + preYYensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + preYY_create_buffer(preYYin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define preYYwrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *preYYin = (FILE *) 0, *preYYout = (FILE *) 0; + +typedef int yy_state_type; + +extern int preYYlineno; + +int preYYlineno = 1; + +extern char *preYYtext; +#define yytext_ptr preYYtext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up preYYtext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + preYYleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 166 +#define YY_END_OF_BUFFER 167 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_acclist[1240] = + { 0, + 148, 148, 167, 165, 166, 1, 165, 166, 164, 166, + 3, 165, 166, 165, 166, 165, 166, 2, 165, 166, + 6, 165, 166, 1, 6, 165, 166, 6, 165, 166, + 6, 164, 166, 3, 6, 165, 166, 5, 165, 166, + 6, 165, 166, 6, 165, 166, 6, 165, 166, 2, + 6, 165, 166, 53, 165, 166, 1, 53, 165, 166, + 49, 164, 166, 3, 53, 165, 166, 53, 165, 166, + 53, 165, 166, 50, 53, 165, 166, 50, 53, 165, + 166, 50, 53, 165, 166, 50, 53, 165, 166, 50, + 53, 165, 166, 50, 53, 165, 166, 2, 53, 165, + + 166, 77, 165, 166, 1, 77, 165, 166, 75, 164, + 166, 3, 77, 165, 166, 77, 165, 166, 77, 165, + 166, 76, 77, 165, 166, 76, 77, 165, 166, 76, + 77, 165, 166, 2, 77, 165, 166, 78, 81, 165, + 166, 1, 78, 81, 165, 166, 84, 164, 166, 3, + 78, 81, 165, 166, 80, 81, 165, 166, 81, 165, + 166, 81, 165, 166, 78, 81, 165, 166, 2, 78, + 81, 165, 166, 85, 88, 165, 166, 1, 85, 88, + 165, 166, 3, 85, 88, 165, 166, 87, 88, 165, + 166, 85, 88, 165, 166, 85, 88, 165, 166, 88, + + 165, 166, 2, 85, 88, 165, 166, 23, 165, 166, + 1, 23, 165, 166, 24, 164, 166, 3, 23, 165, + 166, 16, 23, 165, 166, 23, 165, 166, 23, 165, + 166, 23, 165, 166, 21, 23, 165, 166,16404, 23, + 165, 166, 21, 23, 165, 166,16404, 11, 23, 165, + 166, 12, 23, 165, 166, 2, 23, 165, 166, 17, + 165, 166, 1, 17, 165, 166, 19, 165, 166, 17, + 165, 166, 17, 165, 166, 165, 166, 2, 17, 165, + 166, 165, 166, 1, 165, 166, 3, 165, 166, 165, + 166, 165, 166, 2, 165, 166, 90, 165, 166, 94, + + 165, 166, 1, 94, 165, 166, 92, 164, 166, 3, + 94, 165, 166, 94, 165, 166, 94, 165, 166, 94, + 165, 166, 2, 94, 165, 166, 8289, 165, 166,16479, + 16481,16482, 165, 166, 101, 165, 166, 102, 165, 166, + 100, 165, 166, 165, 166, 104, 165, 166, 165, 166, + 160, 165, 166, 1, 160, 165, 166, 148, 160, 165, + 166, 147, 164, 166, 3, 160, 165, 166, 151, 160, + 165, 166, 143, 160, 165, 166, 152, 160, 165, 166, + 160, 165, 166, 160, 165, 166, 150, 160, 165, 166, + 144, 160, 165, 166, 160, 165, 166, 2, 160, 165, + + 166, 70, 165, 166, 1, 70, 165, 166, 69, 164, + 166, 3, 70, 165, 166, 70, 165, 166, 70, 165, + 166, 2, 70, 165, 166, 68, 70, 165, 166, 1, + 68, 70, 165, 166, 68, 70, 165, 166, 68, 69, + 164, 166, 3, 68, 70, 165, 166, 67, 70, 165, + 166, 68, 70, 165, 166, 68, 70, 165, 166, 2, + 68, 70, 165, 166, 120, 122, 165, 166, 1, 122, + 165, 166, 121, 164, 166, 3, 120, 122, 165, 166, + 122, 165, 166, 122, 165, 166, 120, 122, 165, 166, + 122, 165, 166, 2, 120, 122, 165, 166, 123, 145, + + 165, 166, 1, 123, 145, 165, 166, 125, 164, 166, + 3, 123, 145, 165, 166, 145, 165, 166, 123, 145, + 165, 166, 123, 145, 165, 166, 144, 145, 165, 166, + 2, 123, 145, 165, 166, 122, 165, 166, 122, 165, + 166, 122, 165, 166, 133, 137, 138, 165, 166, 1, + 133, 138, 165, 166, 134, 164, 166, 3, 133, 137, + 138, 165, 166, 137, 138, 165, 166, 133, 137, 138, + 165, 166, 138, 165, 166, 2, 133, 137, 138, 165, + 166, 130, 132, 165, 166, 1, 132, 165, 166, 131, + 164, 166, 3, 130, 132, 165, 166, 132, 165, 166, + + 130, 132, 165, 166, 130, 132, 165, 166, 2, 130, + 132, 165, 166, 141, 142, 165, 166, 1, 142, 165, + 166, 3, 141, 142, 165, 166, 141, 142, 165, 166, + 141, 142, 165, 166, 2, 141, 142, 165, 166, 59, + 165, 166, 1, 59, 165, 166, 60, 164, 166, 3, + 59, 165, 166, 59, 165, 166, 59, 165, 166, 58, + 59, 165, 166, 59, 165, 166, 58, 59, 165, 166, + 2, 59, 165, 166, 66, 165, 166, 1, 66, 165, + 166, 64, 164, 166, 3, 66, 165, 166, 66, 165, + 166, 66, 165, 166, 62, 66, 165, 166, 66, 165, + + 166, 2, 66, 165, 166, 65, 66, 165, 166, 63, + 66, 165, 166, 158, 165, 166, 1, 158, 165, 166, + 3, 158, 165, 166, 155, 158, 165, 166, 158, 165, + 166, 158, 165, 166, 158, 165, 166, 2, 158, 165, + 166, 159, 165, 166, 1, 159, 165, 166, 3, 159, + 165, 166, 157, 159, 165, 166, 159, 165, 166, 159, + 165, 166, 159, 165, 166, 2, 159, 165, 166, 54, + 165, 166, 52, 165, 166, 1, 52, 165, 166, 3, + 52, 165, 166, 52, 165, 166, 52, 165, 166, 52, + 165, 166, 2, 52, 165, 166, 31, 165, 166, 1, + + 31, 165, 166, 29, 164, 166, 3, 31, 165, 166, + 28, 31, 165, 166, 31, 165, 166, 25, 31, 165, + 166, 26, 31, 165, 166, 31, 165, 166, 31, 165, + 166, 30, 31, 165, 166, 2, 31, 165, 166, 35, + 165, 166, 1, 35, 165, 166, 3, 35, 165, 166, + 32, 35, 165, 166, 35, 165, 166, 35, 165, 166, + 35, 165, 166, 2, 35, 165, 166, 116, 165, 166, + 1, 116, 165, 166, 3, 116, 165, 166, 116, 165, + 166, 116, 165, 166, 114, 116, 165, 166, 2, 116, + 165, 166, 162, 163, 6, 6, 5, 6, 50, 50, + + 50, 50, 50, 50, 50, 50, 50, 83, 162, 82, + 163, 76, 76, 76, 76, 78, 78, 85, 83, 85, + 162, 82, 85, 163, 85, 86, 8212, 21,16404, 22, + 21,16404, 17, 17, 162, 17, 163, 17, 18, 91, + 162, 163, 89, 90, 92, 162, 163, 93, 8289, 8290, + 8287, 8289,16479,16481,16482, 102, 101, 102, 100, 104, + 104, 99, 148, 149, 105, 162, 106, 163, 144, 146, + 68, 68, 67, 120, 107, 109, 162, 108, 163, 120, + 123, 124, 123, 163, 123, 119, 119, 162, 133, 137, + 133, 137, 135, 137, 162, 136, 137, 163, 133, 137, + + 130, 127, 129, 162, 128, 130, 163, 130, 141, 139, + 141, 162, 140, 141, 163, 141, 58, 55, 58, 62, + 61, 63, 154, 162, 153, 163, 156, 54, 51, 33, + 162, 33, 163, 34, 114, 162, 163, 4,16391, 50, + 50, 50, 50, 50, 43, 50, 50, 50, 50, 50, + 83, 83, 162, 82, 82, 163, 76, 76, 76, 71, + 76, 76, 79, 4, 78, 83, 85, 83, 85, 162, + 82, 85, 82, 85, 163, 4, 85, 15, 15, 21, + 16404, 17, 162, 17, 163, 4, 17, 162, 163, 4, + 4, 91, 162, 163, 4, 96, 103, 149, 105, 105, + + 162, 106, 106, 163, 108, 163, 4, 120, 123, 163, + 4, 123, 118, 137, 162, 137, 163, 4, 133, 137, + 4, 137, 126, 130, 163, 4, 130, 141, 162, 141, + 163, 4, 141, 58, 27, 161,16391, 9, 8199, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 83, + 161, 76, 72, 76, 76, 76, 79, 83, 85, 161, + 14, 13, 14, 21,16404, 17, 161, 161, 161, 104, + 108, 110, 137, 161, 141, 161, 58, 27, 8199, 9, + 50, 50, 44, 47, 45, 45, 50, 50, 50, 50, + 50, 50, 50, 73, 76, 74, 76, 76, 13, 21, + + 16404, 112, 58, 8, 9, 50, 50, 48, 40, 39, + 50, 50, 50, 46, 21,16404, 111, 113, 115, 58, + 9, 38, 42, 41,16420, 37, 10, 58, 9, 8228, + 57, 56, 9, 8228, 117, 9, 9, 9, 9 + } ; + +static yyconst flex_int16_t yy_accept[1158] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 4, 6, 9, + 11, 14, 16, 18, 21, 24, 28, 31, 34, 38, + 41, 44, 47, 50, 54, 57, 61, 64, 68, 71, + 74, 78, 82, 86, 90, 94, 98, 102, 105, 109, + + 112, 116, 119, 122, 126, 130, 134, 138, 142, 147, + 150, 155, 159, 162, 165, 169, 174, 178, 183, 188, + 192, 196, 200, 203, 208, 211, 215, 218, 222, 226, + 229, 232, 235, 240, 243, 248, 252, 256, 260, 263, + 267, 270, 273, 276, 278, 282, 284, 287, 290, 292, + 294, 297, 300, 303, 307, 310, 314, 317, 320, 323, + 327, 333, 335, 338, 341, 344, 346, 349, 351, 354, + 358, 362, 365, 369, 373, 377, 381, 384, 387, 391, + 395, 398, 402, 405, 409, 412, 416, 419, 422, 426, + 430, 435, 439, 443, 448, 452, 456, 460, 465, 469, + + 473, 476, 481, 484, 487, 491, 494, 499, 503, 508, + 511, 516, 519, 523, 527, 531, 536, 539, 542, 545, + 550, 555, 558, 564, 568, 573, 576, 582, 586, 590, + 593, 598, 601, 605, 609, 614, 618, 622, 627, 631, + 635, 640, 643, 647, 650, 654, 657, 660, 664, 667, + 671, 675, 678, 682, 685, 689, 692, 695, 699, 702, + 706, 710, 714, 717, 721, 725, 729, 732, 735, 738, + 742, 745, 749, 753, 757, 760, 763, 766, 770, 773, + 776, 780, 784, 787, 790, 793, 797, 800, 804, 807, + 811, 815, 818, 822, 826, 829, 832, 836, 840, 843, + + 847, 851, 855, 858, 861, 864, 868, 871, 875, 879, + 882, 885, 889, 893, 894, 895, 895, 896, 897, 898, + 899, 899, 899, 899, 900, 901, 902, 903, 904, 905, + 906, 907, 908, 910, 912, 913, 914, 915, 916, 917, + 917, 917, 918, 919, 922, 925, 926, 927, 927, 927, + 927, 928, 930, 931, 931, 933, 934, 936, 938, 939, + 940, 940, 941, 942, 943, 943, 943, 944, 945, 945, + 946, 947, 948, 948, 949, 949, 950, 951, 952, 956, + 956, 956, 957, 958, 959, 960, 960, 961, 961, 962, + 963, 964, 964, 965, 967, 969, 970, 971, 971, 972, + + 973, 974, 975, 976, 978, 980, 981, 981, 981, 981, + 981, 981, 981, 981, 981, 981, 981, 982, 983, 985, + 986, 987, 989, 989, 989, 991, 992, 993, 996, 999, + 1001, 1001, 1002, 1003, 1005, 1008, 1009, 1010, 1013, 1016, + 1017, 1018, 1019, 1019, 1020, 1021, 1022, 1023, 1025, 1027, + 1028, 1029, 1030, 1030, 1030, 1030, 1032, 1034, 1035, 1036, + 1037, 1038, 1039, 1039, 1039, 1040, 1041, 1042, 1043, 1044, + 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1054, 1055, + 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1063, 1064, 1064, + 1064, 1066, 1068, 1071, 1073, 1076, 1078, 1079, 1079, 1080, + + 1080, 1080, 1082, 1084, 1086, 1088, 1089, 1090, 1091, 1093, + 1094, 1095, 1096, 1097, 1097, 1098, 1098, 1099, 1100, 1102, + 1103, 1105, 1107, 1109, 1109, 1109, 1109, 1109, 1109, 1109, + 1109, 1109, 1109, 1109, 1109, 1109, 1109, 1109, 1109, 1109, + 1109, 1109, 1111, 1113, 1113, 1114, 1116, 1118, 1121, 1123, + 1123, 1123, 1124, 1126, 1128, 1130, 1132, 1134, 1135, 1135, + 1136, 1136, 1136, 1137, 1137, 1138, 1138, 1139, 1139, 1140, + 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, + 1152, 1153, 1155, 1156, 1157, 1157, 1158, 1158, 1161, 1162, + 1164, 1164, 1164, 1166, 1168, 1169, 1170, 1171, 1172, 1172, + + 1172, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, + 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1175, + 1177, 1178, 1178, 1179, 1179, 1179, 1179, 1179, 1179, 1180, + 1180, 1181, 1181, 1182, 1183, 1185, 1186, 1187, 1188, 1189, + 1190, 1191, 1192, 1193, 1194, 1195, 1195, 1196, 1198, 1199, + 1199, 1199, 1200, 1200, 1200, 1202, 1202, 1202, 1202, 1202, + 1202, 1202, 1202, 1202, 1202, 1203, 1203, 1203, 1203, 1203, + 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, + 1203, 1204, 1204, 1204, 1204, 1204, 1204, 1205, 1205, 1206, + 1206, 1207, 1208, 1208, 1208, 1209, 1210, 1211, 1212, 1213, + + 1214, 1215, 1215, 1215, 1217, 1218, 1218, 1218, 1218, 1218, + 1218, 1218, 1219, 1220, 1220, 1220, 1220, 1220, 1220, 1220, + 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, + 1221, 1221, 1221, 1221, 1222, 1222, 1223, 1223, 1224, 1225, + 1226, 1227, 1227, 1227, 1227, 1227, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1229, 1229, 1229, + 1229, 1230, 1230, 1231, 1231, 1231, 1231, 1231, 1231, 1231, + 1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231, + 1231, 1231, 1231, 1232, 1233, 1233, 1233, 1233, 1234, 1234, + + 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1237, 1237, + 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, + 1237, 1237, 1237, 1238, 1238, 1238, 1238, 1238, 1238, 1238, + 1238, 1238, 1238, 1238, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 2, 1, 1, 3, 4, + 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 6, 7, 8, 9, 1, 1, 10, 11, + 12, 13, 1, 14, 15, 16, 17, 18, 19, 18, + 18, 18, 18, 18, 18, 20, 20, 21, 1, 22, + 23, 24, 25, 26, 27, 27, 28, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 29, 30, 31, 1, 27, 1, 32, 33, 34, 35, + + 36, 37, 38, 39, 40, 38, 41, 42, 43, 44, + 45, 46, 38, 47, 48, 49, 50, 51, 38, 52, + 53, 38, 54, 1, 55, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[57] = + { 0, + 1, 2, 3, 4, 5, 6, 7, 1, 1, 8, + 9, 6, 10, 1, 11, 12, 13, 14, 14, 14, + 1, 15, 6, 6, 1, 16, 17, 17, 1, 18, + 1, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 1, 1, 1 + } ; + +static yyconst flex_int16_t yy_base[1265] = + { 0, + 0, 4, 9, 64, 120, 0, 176, 0, 26, 37, + 231, 235, 291, 0, 346, 350, 357, 383, 439, 0, + 53, 494, 524, 0, 577, 0, 633, 0, 59, 498, + 688, 692, 697, 702, 757, 812, 868, 0, 923, 978, + 716, 730, 763, 787, 793, 803, 1034, 0, 1090, 0, + 1135, 0, 930, 937, 941, 959, 1162, 0, 1214, 1218, + 1273, 1328, 1225, 1262, 1384, 0, 2823, 5434, 5434, 5434, + 5434, 2, 2793, 5434, 5434, 5434, 71, 5434, 5434, 5434, + 3, 2791, 77, 5434, 5434, 5434, 5434, 5434, 5, 2785, + 0, 2766, 2768, 4, 57, 2755, 5434, 5434, 5434, 5434, + + 5434, 10, 2773, 0, 8, 2750, 5434, 0, 0, 5434, + 0, 5434, 2756, 32, 2756, 0, 0, 0, 0, 5434, + 58, 2755, 0, 0, 5434, 5434, 5434, 5434, 5434, 2742, + 60, 2739, 103, 33, 725, 5434, 5434, 5434, 0, 0, + 5434, 73, 2738, 0, 0, 0, 78, 227, 240, 234, + 238, 29, 2757, 2755, 5434, 2749, 99, 242, 106, 2739, + 362, 0, 2737, 2728, 2722, 2702, 247, 2708, 5434, 5434, + 110, 5434, 5434, 5434, 2699, 5434, 253, 2681, 5434, 0, + 239, 5434, 5434, 5434, 5434, 5434, 255, 2679, 5434, 5434, + 5434, 246, 5434, 5434, 5434, 256, 2678, 5434, 0, 5434, + + 5434, 0, 2672, 258, 2659, 1415, 0, 0, 0, 5434, + 0, 2665, 261, 2656, 0, 0, 2661, 263, 245, 366, + 0, 5434, 367, 266, 376, 83, 377, 0, 5434, 5434, + 0, 2656, 271, 2647, 0, 0, 5434, 0, 272, 2645, + 0, 5434, 5434, 5434, 5434, 273, 2644, 0, 391, 2628, + 5434, 5434, 5434, 5434, 5434, 343, 2638, 0, 2656, 5434, + 5434, 0, 5434, 5434, 5434, 5434, 386, 2634, 0, 5434, + 5434, 5434, 5434, 5434, 392, 2632, 0, 5434, 0, 5434, + 5434, 5434, 397, 2628, 393, 5434, 5434, 5434, 5434, 5434, + 5434, 2620, 5434, 5434, 398, 2624, 5434, 5434, 5434, 5434, + + 5434, 5434, 399, 2623, 0, 5434, 5434, 5434, 5434, 404, + 2621, 0, 5434, 2606, 2600, 0, 5434, 501, 5434, 494, + 415, 408, 507, 0, 2576, 2519, 382, 2520, 705, 2507, + 2509, 2506, 2523, 2492, 0, 383, 2471, 800, 0, 2480, + 406, 1462, 0, 523, 525, 1481, 5434, 2478, 417, 534, + 5434, 720, 5434, 2482, 970, 0, 2472, 2462, 1500, 5434, + 365, 5434, 730, 524, 1519, 426, 5434, 505, 2457, 5434, + 345, 387, 1540, 5434, 2455, 747, 5434, 5434, 760, 2445, + 374, 2445, 2443, 2439, 2436, 2416, 504, 2414, 530, 5434, + 425, 2421, 2424, 534, 709, 0, 5434, 2422, 5434, 541, + + 5434, 0, 5434, 421, 2404, 1559, 1550, 2375, 2368, 2363, + 2338, 2343, 2342, 2322, 2330, 2322, 0, 5434, 2346, 1597, + 5434, 2349, 2313, 784, 693, 0, 0, 2343, 2319, 1620, + 2280, 0, 695, 2307, 2302, 1639, 0, 2304, 2288, 1658, + 0, 5434, 2300, 2265, 0, 5434, 0, 2285, 2269, 5434, + 0, 5434, 2281, 2269, 720, 2256, 2246, 5434, 0, 2231, + 5434, 5434, 767, 2234, 1242, 2204, 2199, 2197, 2196, 2191, + 5434, 2184, 2172, 2160, 2157, 2156, 0, 2172, 0, 0, + 2148, 2144, 2136, 5434, 2132, 2131, 2155, 5434, 2142, 812, + 0, 745, 816, 766, 794, 0, 5434, 2133, 2123, 822, + + 847, 995, 2115, 0, 0, 838, 778, 802, 5434, 777, + 2126, 2125, 5434, 823, 5434, 2108, 2120, 5434, 2102, 5434, + 5434, 2094, 0, 2065, 2063, 948, 2058, 2069, 2068, 2045, + 2057, 2048, 656, 2033, 2046, 2035, 2028, 2031, 2035, 2019, + 2023, 0, 0, 2018, 5434, 2034, 0, 767, 0, 1999, + 853, 5434, 0, 0, 2025, 0, 0, 1999, 2028, 5434, + 2027, 847, 5434, 2024, 1290, 1255, 1268, 1302, 5434, 1991, + 1982, 927, 1682, 1985, 1977, 1977, 1964, 1960, 1971, 0, + 1006, 796, 1969, 1959, 1984, 5434, 995, 922, 5434, 5434, + 1006, 1017, 1145, 0, 840, 1984, 5434, 1966, 1945, 1926, + + 5434, 1931, 1914, 1917, 1919, 1908, 1911, 1910, 1909, 1148, + 1906, 1895, 1891, 1880, 1871, 1881, 1865, 1308, 0, 0, + 1859, 1892, 5434, 1008, 966, 1316, 1443, 984, 1153, 1310, + 1478, 1556, 1845, 1838, 5434, 5434, 928, 1833, 1738, 1155, + 1831, 1814, 1827, 1852, 5434, 956, 1817, 0, 1222, 1840, + 1824, 5434, 1818, 1358, 1534, 1791, 1156, 1775, 1779, 1764, + 1763, 1644, 1627, 1233, 1248, 1622, 1615, 1601, 1604, 1603, + 1609, 1592, 1589, 1580, 1574, 1586, 1581, 1562, 1569, 1561, + 1560, 1585, 1584, 1612, 1792, 1007, 5434, 1795, 1798, 1802, + 1554, 1583, 989, 1543, 5434, 1223, 5434, 1238, 1279, 1543, + + 1570, 1531, 1362, 1807, 1321, 1522, 1514, 1514, 1510, 1517, + 1504, 1371, 5434, 1374, 1503, 1496, 1490, 1491, 1486, 1469, + 1472, 1474, 1458, 1452, 1445, 1446, 1452, 1441, 1438, 1441, + 1817, 1821, 1827, 1832, 1836, 1467, 1251, 1297, 5434, 1449, + 5434, 1346, 1497, 1840, 1441, 5434, 1421, 1416, 1417, 1411, + 1395, 1401, 1407, 1341, 1338, 1328, 1305, 1308, 1293, 1305, + 1294, 1298, 1282, 1272, 1283, 1265, 1301, 1855, 1861, 1874, + 1880, 1884, 0, 1516, 1893, 1296, 1255, 1217, 1203, 1187, + 1177, 1140, 0, 1138, 1122, 1112, 1109, 980, 979, 963, + 969, 950, 1369, 5434, 1908, 1914, 1903, 1918, 1927, 0, + + 1595, 1938, 1947, 937, 943, 929, 5434, 912, 912, 905, + 884, 825, 805, 806, 1955, 1961, 1966, 1974, 1981, 1635, + 1986, 1624, 774, 779, 713, 692, 659, 503, 464, 1995, + 2000, 2020, 2026, 2029, 1654, 2041, 2014, 379, 328, 234, + 2052, 2055, 2058, 2066, 2081, 1888, 2085, 2094, 202, 2110, + 2113, 2100, 2123, 2137, 2142, 2152, 2133, 2157, 2167, 2170, + 2179, 2146, 2190, 2205, 2193, 2214, 2219, 2199, 2224, 2233, + 2210, 2238, 2247, 2252, 2257, 2267, 2262, 2272, 2277, 2286, + 2289, 2292, 2304, 2307, 2319, 2310, 2324, 2334, 2329, 2339, + 2344, 2349, 2356, 2365, 2374, 2381, 2386, 2377, 2391, 2401, + + 2396, 2406, 2411, 2420, 2430, 2440, 2433, 2449, 2459, 2453, + 2464, 2473, 2468, 2478, 2488, 2493, 2497, 2507, 2500, 2512, + 2521, 2516, 2526, 2541, 2530, 2546, 2555, 2535, 2560, 2569, + 2564, 2574, 2583, 2578, 2588, 2593, 2598, 2602, 2617, 2607, + 2622, 2631, 2611, 2640, 2651, 2626, 2663, 2672, 2636, 2683, + 2688, 2693, 2697, 2706, 2711, 2716, 2725, 2719, 2730, 2741, + 2734, 2746, 2751, 2763, 2766, 2771, 2780, 2786, 2789, 2798, + 2803, 2808, 2817, 2824, 2833, 2827, 2842, 2852, 2845, 2861, + 2871, 2864, 2880, 2885, 2890, 2897, 2900, 2909, 2912, 2917, + 2926, 2929, 2938, 2932, 2947, 2957, 2943, 2962, 2971, 2952, + + 2980, 2991, 2984, 2996, 3005, 3000, 3010, 3015, 3024, 3028, + 3037, 3031, 3046, 3057, 3062, 3068, 3077, 3071, 3089, 3092, + 3101, 3104, 3115, 3109, 3124, 3129, 3134, 3138, 3147, 3156, + 3161, 3170, 3175, 3181, 3186, 3191, 3195, 3200, 3209, 3212, + 3215, 3227, 3230, 3239, 3233, 3244, 3253, 3248, 3262, 3267, + 3272, 3279, 3292, 3301, 3305, 3308, 3319, 3324, 3327, 3336, + 76, 3340, 3345, 3349, 3354, 3360, 3365, 3371, 3380, 3384, + 3393, 3402, 3397, 3407, 3412, 3417, 3423, 3426, 5, 3432, + 3436, 3439, 3445, 3449, 3454, 3459, 3464, 3469, 3478, 3484, + 3491, 3497, 3501, 3506, 3511, 3516, 3521, 3524, 3530, 3536, + + 3539, 3543, 3549, 3553, 3558, 3563, 3568, 3576, 3582, 3591, + 3595, 3601, 3605, 3610, 3615, 3620, 3623, 3628, 3634, 3637, + 3643, 3647, 3653, 3657, 3662, 3667, 3675, 3680, 3689, 3695, + 3699, 3705, 3709, 3714, 3719, 3722, 3727, 3732, 3735, 3741, + 3747, 3751, 3757, 3761, 3766, 3774, 3779, 3787, 3793, 3799, + 3803, 3809, 3813, 3818, 3821, 5434, 3875, 3893, 3911, 3929, + 3947, 3965, 3983, 4001, 4019, 4037, 4055, 4073, 4091, 4109, + 4127, 4145, 4163, 4181, 4199, 846, 1016, 4217, 4235, 4253, + 4270, 4288, 4304, 4321, 4338, 4356, 4372, 4389, 4404, 4420, + 1207, 4437, 4455, 4472, 4490, 4507, 4524, 4541, 4559, 1251, + + 1274, 1354, 4577, 1446, 4595, 4613, 4621, 4633, 4648, 1461, + 4666, 4684, 1499, 4702, 4720, 4737, 4755, 4772, 4790, 4808, + 4824, 4841, 4858, 4874, 4891, 4906, 4922, 1539, 4939, 4957, + 4974, 4992, 5009, 5026, 5043, 5061, 1558, 1574, 1638, 1657, + 5079, 5096, 5104, 5121, 5139, 1662, 5157, 5175, 1855, 5193, + 5210, 5228, 5246, 5264, 5279, 5296, 5313, 5331, 5348, 5366, + 5383, 5398, 1919, 5415 + } ; + +static yyconst flex_int16_t yy_def[1265] = + { 0, + 1157, 1157, 1157, 1158, 1156, 5, 1156, 7, 1159, 1159, + 1160, 1160, 1156, 13, 1161, 1161, 1162, 1162, 1156, 19, + 1163, 1163, 19, 23, 1156, 25, 1156, 27, 1164, 1165, + 1157, 1157, 1157, 1157, 1166, 1166, 1156, 37, 1166, 1166, + 1167, 1167, 1168, 1168, 1169, 1169, 1156, 47, 1156, 49, + 49, 51, 1170, 1170, 1171, 1171, 23, 57, 1172, 1172, + 1173, 1173, 1174, 1174, 1156, 65, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1175, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1176, 1176, 1176, 1176, 1176, 1176, 1156, 1156, 1156, 1156, + + 1156, 1156, 1156, 1177, 1177, 1177, 1156, 1178, 1178, 1156, + 1178, 1156, 1179, 1156, 1178, 1178, 1180, 1180, 1180, 1156, + 1180, 1180, 1181, 1180, 1156, 1156, 1156, 1156, 1156, 1182, + 1156, 1156, 1183, 1156, 1183, 1156, 1156, 1156, 1184, 1184, + 1156, 1184, 1184, 1185, 1184, 1186, 1186, 1186, 1186, 1186, + 1186, 1187, 1188, 1188, 1156, 1188, 1188, 1188, 1156, 1188, + 1189, 1156, 1156, 1156, 1156, 1156, 1190, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1191, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1192, 1156, 1156, 1156, 1156, 1156, 1156, 1193, 1156, + + 1156, 1193, 1156, 1156, 1193, 1156, 1193, 1194, 1194, 1156, + 1194, 1156, 1194, 1194, 1191, 1194, 1156, 1156, 1156, 1195, + 1196, 1156, 1195, 1197, 1195, 1156, 1195, 1198, 1156, 1156, + 1198, 1156, 1198, 1198, 1198, 1199, 1156, 1199, 1199, 1199, + 1199, 1156, 1156, 1156, 1156, 1156, 1156, 1200, 1156, 1200, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1201, 1156, 1156, + 1156, 1202, 1156, 1156, 1156, 1156, 1156, 1156, 1203, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1203, 1156, 1204, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1205, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + + 1156, 1156, 1156, 1156, 1206, 1156, 1156, 1156, 1156, 1156, + 1156, 1207, 1156, 1156, 1156, 1208, 1156, 1175, 1156, 1156, + 1156, 1209, 1156, 1210, 1210, 1210, 1210, 1210, 1210, 1210, + 1210, 1210, 1211, 1212, 1213, 1213, 1213, 1213, 1214, 1215, + 1216, 1214, 1217, 1218, 1219, 1217, 1156, 1156, 1220, 1156, + 1156, 1221, 1156, 1156, 1221, 1222, 1222, 1222, 1222, 1156, + 1223, 1156, 1223, 1223, 1223, 1156, 1156, 1224, 1225, 1156, + 1225, 1225, 1225, 1156, 1156, 1156, 1156, 1156, 1226, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1227, 1156, + 1156, 1156, 1156, 1156, 1156, 1228, 1156, 1156, 1156, 1229, + + 1156, 1230, 1156, 1156, 1156, 1230, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1231, 1156, 1231, 1231, + 1156, 1156, 1156, 1156, 1232, 1233, 1234, 1234, 1234, 1232, + 1156, 1235, 1156, 1156, 1235, 1235, 1236, 1236, 1236, 1236, + 1237, 1156, 1156, 1237, 1238, 1156, 1239, 1156, 1156, 1156, + 1240, 1156, 1156, 1241, 1242, 1156, 1156, 1156, 1243, 1156, + 1156, 1156, 1244, 1245, 1156, 1246, 1246, 1246, 1246, 1246, + 1156, 1246, 1246, 1246, 1246, 1246, 1247, 1247, 1248, 1248, + 1249, 1249, 1249, 1156, 1249, 1249, 1250, 1156, 1156, 1156, + 1251, 1252, 1252, 1253, 1253, 1254, 1156, 1156, 1156, 1156, + + 1156, 1255, 1256, 1256, 1256, 1257, 1257, 1257, 1156, 1225, + 1225, 1225, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1230, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1231, 1231, 1156, 1156, 1234, 1234, 1232, 1234, 1156, + 1156, 1156, 1235, 1235, 1236, 1236, 1236, 1237, 1258, 1156, + 1156, 1156, 1156, 1245, 1259, 1156, 1156, 1156, 1156, 1246, + 1246, 1246, 1156, 1246, 1246, 1246, 1246, 1246, 1246, 1247, + 1249, 1249, 1249, 1249, 1260, 1156, 1156, 1252, 1156, 1156, + 1156, 1156, 1255, 1256, 1257, 1225, 1156, 1156, 1156, 1156, + + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1234, 1236, + 1237, 1261, 1156, 1156, 1259, 1259, 1259, 1156, 1259, 1156, + 1156, 1156, 1246, 1246, 1156, 1156, 1156, 1246, 1156, 1246, + 1246, 1246, 1246, 1246, 1156, 1156, 1249, 1249, 1249, 1156, + 1156, 1156, 1156, 1156, 1255, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1237, 1156, 1156, 1259, 1259, 1156, 1156, 1156, 1156, 1156, + 1246, 1246, 1156, 1156, 1156, 1156, 1156, 1246, 1246, 1246, + + 1156, 1156, 1156, 1255, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1237, + 1259, 1259, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1262, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1237, 1259, 1259, 1156, + 1156, 1156, 1263, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1264, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1259, 1259, 1156, 1156, 1156, 1263, + + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1259, 1259, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1259, + 1259, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1259, 1259, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1259, + 1259, 1156, 1156, 1156, 1156, 1156, 1156, 1259, 1259, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 0, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156 + } ; + +static yyconst flex_int16_t yy_nxt[5491] = + { 0, + 1156, 69, 381, 70, 71, 69, 362, 70, 71, 1156, + 69, 382, 70, 71, 314, 314, 72, 314, 315, 315, + 72, 315, 333, 362, 73, 72, 334, 109, 73, 110, + 111, 366, 112, 73, 1156, 113, 353, 354, 109, 367, + 110, 111, 114, 112, 333, 327, 113, 328, 334, 336, + 115, 337, 1156, 114, 154, 74, 155, 156, 746, 74, + 184, 115, 185, 186, 74, 76, 77, 78, 79, 157, + 344, 80, 314, 318, 345, 187, 315, 158, 319, 321, + 81, 116, 159, 188, 362, 357, 351, 322, 82, 358, + 83, 83, 116, 329, 323, 323, 323, 320, 320, 330, + + 331, 362, 370, 323, 323, 350, 350, 350, 160, 374, + 375, 371, 391, 351, 189, 372, 431, 392, 410, 84, + 85, 86, 85, 87, 88, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 89, 85, 85, 85, + 85, 85, 85, 85, 90, 85, 91, 91, 85, 85, + 85, 91, 91, 92, 93, 94, 91, 91, 91, 95, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 96, + 91, 91, 91, 85, 85, 97, 98, 99, 98, 100, + 101, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 102, 98, 98, 98, 98, 98, 98, 98, + + 103, 98, 104, 104, 98, 98, 98, 104, 104, 104, + 104, 105, 104, 104, 104, 106, 104, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 104, 104, 98, + 98, 107, 118, 362, 70, 119, 118, 120, 70, 119, + 362, 120, 397, 398, 362, 370, 362, 121, 400, 387, + 362, 121, 363, 401, 545, 122, 364, 362, 365, 122, + 123, 362, 388, 362, 123, 394, 373, 333, 333, 395, + 404, 334, 334, 314, 405, 422, 545, 419, 428, 315, + 423, 424, 429, 434, 438, 314, 124, 435, 439, 315, + 124, 125, 126, 125, 127, 128, 125, 129, 125, 125, + + 130, 125, 125, 125, 125, 125, 125, 131, 125, 125, + 125, 125, 125, 125, 125, 132, 125, 133, 133, 125, + 134, 125, 133, 133, 133, 133, 135, 133, 133, 133, + 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, + 133, 133, 133, 133, 136, 137, 138, 140, 370, 70, + 71, 140, 141, 70, 71, 314, 141, 510, 147, 315, + 70, 148, 142, 68, 376, 377, 142, 426, 426, 849, + 143, 362, 378, 149, 143, 144, 381, 426, 426, 144, + 68, 150, 427, 427, 147, 382, 70, 148, 362, 68, + 370, 380, 427, 427, 442, 443, 452, 453, 448, 149, + + 430, 145, 449, 511, 314, 145, 68, 150, 315, 314, + 314, 456, 151, 315, 315, 457, 314, 321, 464, 465, + 315, 468, 481, 490, 490, 322, 499, 391, 366, 469, + 482, 545, 392, 460, 500, 500, 367, 403, 151, 68, + 69, 68, 70, 71, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 72, 68, 68, 68, 68, + 68, 68, 68, 73, 68, 152, 152, 68, 68, 68, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 68, 68, 74, 154, 321, 155, 156, 191, + + 192, 193, 194, 318, 322, 195, 387, 366, 319, 321, + 157, 323, 323, 323, 196, 367, 545, 322, 158, 388, + 323, 323, 197, 159, 323, 323, 323, 320, 320, 477, + 362, 479, 387, 323, 323, 493, 501, 501, 501, 518, + 507, 495, 840, 400, 351, 388, 519, 362, 401, 160, + 161, 161, 477, 198, 479, 161, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 68, 69, 162, + 70, 71, 68, 68, 68, 68, 68, 163, 164, 68, + 165, 68, 166, 72, 68, 68, 68, 68, 68, 68, + + 68, 73, 68, 167, 167, 68, 168, 68, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 68, 68, 74, 169, 170, 171, 172, 173, 169, 174, + 175, 169, 176, 169, 169, 169, 169, 169, 169, 177, + 169, 169, 169, 169, 169, 169, 169, 178, 179, 180, + 180, 169, 181, 169, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 180, 169, 169, 182, 69, + 608, 70, 71, 69, 426, 70, 71, 551, 69, 609, + + 70, 71, 552, 69, 72, 70, 71, 471, 72, 427, + 471, 545, 73, 72, 520, 471, 73, 221, 72, 222, + 223, 73, 350, 350, 350, 521, 73, 350, 350, 350, + 351, 221, 224, 222, 223, 351, 362, 562, 562, 472, + 225, 226, 506, 74, 545, 226, 224, 74, 473, 376, + 377, 477, 74, 362, 225, 226, 839, 74, 200, 226, + 201, 202, 376, 377, 229, 513, 230, 231, 426, 203, + 378, 227, 479, 204, 477, 232, 355, 464, 465, 233, + 370, 205, 206, 427, 362, 227, 206, 234, 229, 380, + 230, 231, 545, 596, 237, 479, 222, 238, 646, 232, + + 479, 362, 484, 233, 237, 484, 222, 238, 362, 239, + 484, 234, 207, 200, 545, 201, 202, 240, 235, 239, + 838, 586, 477, 479, 203, 362, 657, 240, 204, 587, + 587, 590, 588, 378, 485, 647, 205, 206, 545, 591, + 591, 206, 235, 486, 362, 477, 362, 829, 241, 592, + 592, 592, 380, 828, 595, 551, 623, 351, 241, 324, + 552, 362, 324, 362, 624, 624, 827, 207, 208, 209, + 208, 210, 211, 208, 208, 208, 208, 208, 208, 208, + 212, 208, 208, 208, 213, 208, 208, 208, 208, 208, + 208, 208, 214, 208, 215, 215, 208, 208, 208, 215, + + 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, + 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, + 215, 208, 208, 216, 200, 826, 201, 202, 477, 635, + 693, 264, 635, 70, 265, 217, 266, 635, 264, 218, + 70, 265, 272, 266, 70, 273, 267, 205, 219, 825, + 274, 477, 219, 267, 268, 824, 601, 275, 646, 269, + 272, 268, 70, 273, 610, 276, 269, 694, 274, 1156, + 277, 657, 350, 350, 350, 275, 601, 628, 207, 200, + 351, 201, 202, 276, 823, 270, 686, 687, 277, 657, + 217, 693, 270, 814, 218, 702, 278, 350, 350, 350, + + 813, 601, 205, 219, 488, 351, 812, 219, 645, 686, + 687, 645, 651, 651, 278, 652, 645, 560, 502, 654, + 654, 654, 811, 653, 653, 683, 683, 351, 694, 335, + 593, 810, 335, 207, 242, 243, 242, 244, 245, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 246, 242, 242, 242, 242, 242, 242, 242, 247, 242, + 248, 248, 242, 249, 242, 248, 248, 248, 250, 248, + 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 242, 242, 251, + 252, 253, 252, 254, 255, 252, 252, 252, 252, 252, + + 252, 252, 252, 252, 252, 252, 256, 252, 252, 252, + 252, 252, 252, 252, 257, 252, 258, 258, 252, 259, + 252, 258, 258, 258, 258, 258, 258, 258, 258, 258, + 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, + 258, 258, 258, 252, 252, 260, 261, 350, 350, 350, + 665, 665, 665, 809, 610, 351, 1156, 696, 705, 705, + 705, 262, 262, 808, 628, 697, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 279, 279, + 610, 655, 657, 279, 279, 279, 279, 279, 279, 279, + + 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, + 279, 279, 279, 279, 279, 281, 806, 87, 282, 281, + 396, 87, 282, 396, 484, 696, 300, 484, 70, 301, + 283, 302, 484, 697, 283, 712, 713, 714, 284, 657, + 738, 303, 284, 285, 566, 567, 568, 285, 739, 304, + 665, 665, 665, 635, 305, 657, 635, 630, 631, 632, + 805, 635, 569, 300, 441, 70, 301, 441, 302, 286, + 632, 632, 632, 286, 288, 569, 289, 290, 303, 291, + 306, 740, 292, 293, 294, 741, 304, 445, 569, 295, + 445, 305, 626, 567, 627, 569, 804, 296, 297, 738, + + 741, 628, 803, 793, 632, 632, 632, 739, 569, 792, + 629, 794, 688, 689, 690, 791, 790, 306, 684, 631, + 685, 569, 569, 705, 705, 705, 789, 628, 298, 288, + 569, 289, 290, 788, 291, 787, 629, 292, 293, 294, + 545, 673, 674, 629, 295, 610, 675, 786, 645, 676, + 677, 645, 296, 297, 678, 569, 645, 610, 679, 680, + 703, 703, 703, 569, 743, 743, 743, 447, 351, 629, + 447, 793, 351, 712, 713, 714, 714, 713, 714, 794, + 610, 785, 784, 298, 307, 308, 307, 70, 309, 307, + 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, + + 310, 307, 307, 307, 307, 307, 307, 307, 311, 307, + 312, 312, 307, 307, 307, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 307, 307, 313, + 407, 783, 782, 781, 407, 685, 632, 685, 408, 409, + 410, 740, 780, 411, 628, 741, 412, 413, 779, 451, + 778, 414, 451, 629, 777, 415, 416, 491, 776, 736, + 741, 462, 491, 491, 324, 767, 491, 324, 462, 766, + 690, 690, 690, 491, 491, 491, 496, 765, 764, 763, + 496, 496, 496, 762, 761, 496, 629, 496, 569, 774, + + 774, 774, 496, 496, 496, 505, 545, 351, 760, 505, + 505, 505, 335, 759, 505, 335, 505, 758, 801, 801, + 801, 505, 505, 505, 508, 362, 351, 757, 508, 508, + 508, 569, 756, 508, 755, 508, 350, 350, 350, 754, + 508, 508, 509, 370, 351, 512, 753, 752, 751, 512, + 512, 512, 396, 750, 512, 396, 512, 749, 690, 690, + 690, 512, 512, 512, 523, 748, 747, 742, 523, 523, + 523, 441, 701, 523, 441, 462, 569, 704, 699, 737, + 523, 523, 523, 524, 525, 736, 526, 445, 527, 326, + 445, 528, 529, 560, 560, 730, 530, 820, 820, 820, + + 531, 532, 543, 729, 728, 351, 543, 543, 543, 569, + 727, 543, 726, 543, 731, 689, 732, 725, 543, 543, + 543, 426, 724, 628, 723, 548, 837, 837, 837, 548, + 548, 548, 629, 722, 548, 721, 549, 835, 835, 835, + 720, 548, 548, 548, 554, 351, 719, 718, 554, 554, + 554, 447, 717, 554, 447, 554, 846, 846, 846, 716, + 554, 554, 554, 557, 351, 629, 715, 557, 557, 557, + 451, 711, 557, 451, 557, 324, 710, 746, 324, 557, + 557, 557, 636, 636, 637, 636, 636, 636, 636, 636, + 636, 636, 636, 636, 636, 636, 636, 636, 636, 324, + + 324, 324, 636, 636, 636, 636, 636, 636, 324, 324, + 636, 636, 636, 324, 324, 324, 324, 324, 324, 324, + 324, 638, 324, 324, 324, 324, 324, 324, 324, 324, + 324, 324, 324, 324, 324, 636, 636, 636, 695, 695, + 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, + 695, 695, 695, 695, 695, 324, 324, 324, 695, 695, + 695, 695, 695, 695, 324, 324, 695, 695, 695, 324, + 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, + 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, + 324, 695, 695, 695, 732, 690, 732, 733, 734, 735, + + 735, 735, 735, 628, 735, 735, 735, 709, 708, 744, + 744, 744, 629, 745, 707, 569, 706, 351, 569, 768, + 734, 769, 569, 769, 735, 769, 657, 652, 628, 770, + 771, 772, 628, 488, 772, 772, 772, 629, 772, 772, + 772, 629, 775, 775, 775, 629, 745, 569, 569, 488, + 351, 569, 569, 581, 701, 569, 569, 795, 771, 796, + 746, 700, 699, 796, 772, 796, 628, 698, 335, 572, + 629, 335, 628, 692, 629, 629, 797, 798, 799, 691, + 569, 629, 799, 799, 799, 569, 799, 799, 799, 569, + 855, 855, 855, 746, 569, 802, 802, 802, 351, 745, + + 569, 560, 681, 351, 569, 817, 818, 819, 629, 672, + 815, 798, 816, 671, 629, 670, 816, 799, 816, 628, + 819, 819, 819, 569, 669, 628, 668, 569, 629, 819, + 819, 819, 800, 569, 629, 800, 667, 569, 569, 666, + 821, 821, 821, 664, 745, 610, 746, 569, 351, 822, + 822, 822, 663, 745, 662, 661, 569, 830, 818, 831, + 660, 629, 659, 831, 819, 831, 628, 629, 832, 833, + 834, 569, 628, 658, 657, 629, 834, 834, 834, 656, + 569, 629, 598, 834, 834, 834, 569, 370, 836, 836, + 836, 746, 745, 488, 569, 649, 351, 841, 833, 842, + + 746, 569, 842, 834, 842, 648, 628, 644, 629, 643, + 642, 628, 641, 640, 629, 629, 848, 848, 848, 569, + 629, 639, 843, 844, 845, 634, 633, 569, 845, 845, + 845, 845, 845, 845, 569, 565, 560, 560, 621, 746, + 569, 620, 609, 847, 847, 847, 569, 745, 629, 569, + 619, 351, 618, 629, 850, 844, 851, 851, 845, 851, + 852, 853, 854, 628, 617, 616, 628, 746, 854, 854, + 854, 615, 629, 569, 614, 629, 613, 612, 569, 569, + 611, 610, 569, 854, 854, 854, 569, 856, 856, 856, + 607, 745, 606, 605, 746, 351, 857, 857, 857, 604, + + 603, 569, 852, 853, 854, 629, 602, 600, 629, 599, + 598, 569, 858, 853, 859, 859, 854, 859, 563, 569, + 569, 628, 517, 597, 628, 854, 854, 854, 370, 370, + 629, 594, 589, 629, 569, 862, 862, 862, 746, 854, + 854, 854, 589, 569, 860, 860, 860, 746, 865, 865, + 865, 488, 351, 569, 861, 861, 861, 569, 745, 858, + 853, 859, 351, 629, 488, 485, 629, 584, 628, 859, + 854, 859, 863, 863, 863, 583, 569, 629, 628, 582, + 351, 864, 864, 864, 581, 745, 746, 629, 580, 351, + 569, 579, 866, 866, 866, 868, 868, 868, 578, 746, + + 351, 871, 871, 871, 577, 746, 576, 867, 867, 867, + 629, 745, 874, 874, 874, 351, 869, 869, 869, 575, + 629, 870, 870, 870, 351, 745, 872, 872, 872, 351, + 574, 573, 746, 572, 351, 873, 873, 873, 571, 745, + 875, 875, 875, 351, 570, 565, 746, 563, 351, 876, + 876, 876, 746, 745, 877, 877, 877, 351, 746, 878, + 878, 878, 461, 746, 880, 880, 880, 351, 460, 879, + 879, 879, 746, 745, 881, 881, 881, 351, 560, 882, + 882, 882, 351, 745, 452, 461, 746, 351, 883, 883, + 883, 884, 884, 884, 885, 885, 885, 460, 745, 351, + + 746, 558, 351, 442, 556, 746, 886, 886, 886, 887, + 887, 887, 889, 889, 889, 746, 555, 351, 553, 460, + 746, 888, 888, 888, 550, 745, 890, 890, 890, 351, + 746, 892, 892, 892, 351, 547, 891, 891, 891, 746, + 745, 893, 893, 893, 351, 746, 894, 894, 894, 351, + 745, 895, 895, 895, 351, 546, 544, 746, 896, 896, + 896, 460, 542, 746, 541, 540, 351, 897, 897, 897, + 539, 745, 746, 538, 537, 351, 898, 898, 898, 901, + 901, 901, 746, 899, 899, 899, 536, 746, 900, 900, + 900, 351, 745, 902, 902, 902, 351, 746, 904, 904, + + 904, 351, 746, 903, 903, 903, 535, 745, 905, 905, + 905, 351, 534, 906, 906, 906, 351, 745, 746, 533, + 522, 351, 907, 907, 907, 397, 517, 746, 393, 516, + 746, 515, 908, 908, 908, 910, 910, 910, 385, 746, + 351, 384, 909, 909, 909, 383, 745, 384, 514, 746, + 351, 911, 911, 911, 746, 913, 913, 913, 374, 351, + 370, 912, 912, 912, 746, 745, 914, 914, 914, 351, + 916, 916, 916, 746, 351, 915, 915, 915, 504, 745, + 917, 917, 917, 351, 503, 353, 746, 497, 351, 488, + 918, 918, 918, 746, 745, 919, 919, 919, 351, 920, + + 920, 920, 922, 922, 922, 483, 746, 351, 480, 921, + 921, 921, 746, 745, 923, 923, 923, 351, 925, 925, + 925, 746, 351, 924, 924, 924, 746, 745, 926, 926, + 926, 351, 928, 928, 928, 478, 351, 931, 931, 931, + 476, 746, 475, 927, 927, 927, 746, 745, 929, 929, + 929, 351, 474, 746, 470, 467, 351, 930, 930, 930, + 746, 745, 932, 932, 932, 351, 934, 934, 934, 746, + 351, 933, 933, 933, 746, 745, 935, 935, 935, 351, + 937, 937, 937, 746, 351, 936, 936, 936, 746, 745, + 938, 938, 938, 351, 746, 939, 939, 939, 351, 745, + + 940, 940, 940, 351, 941, 941, 941, 466, 746, 943, + 943, 943, 351, 946, 946, 946, 461, 746, 460, 942, + 942, 942, 746, 745, 944, 944, 944, 351, 949, 949, + 949, 746, 351, 945, 945, 945, 746, 745, 952, 952, + 952, 351, 947, 947, 947, 316, 746, 316, 316, 455, + 351, 746, 316, 948, 948, 948, 316, 745, 316, 446, + 746, 351, 316, 444, 746, 950, 950, 950, 316, 440, + 746, 436, 433, 351, 951, 951, 951, 421, 745, 746, + 420, 418, 351, 406, 746, 953, 953, 953, 403, 746, + 954, 954, 954, 351, 745, 955, 955, 955, 351, 956, + + 956, 956, 316, 316, 746, 316, 393, 351, 957, 957, + 957, 390, 745, 958, 958, 958, 351, 386, 959, 959, + 959, 961, 961, 961, 385, 746, 351, 960, 960, 960, + 384, 745, 962, 962, 962, 351, 964, 964, 964, 383, + 351, 746, 370, 963, 963, 963, 746, 745, 965, 965, + 965, 351, 370, 966, 966, 966, 351, 745, 370, 746, + 370, 351, 359, 316, 746, 967, 967, 967, 968, 968, + 968, 349, 746, 969, 969, 969, 351, 745, 746, 346, + 342, 351, 970, 970, 970, 341, 338, 746, 971, 971, + 971, 972, 972, 972, 746, 745, 351, 316, 332, 351, + + 973, 973, 973, 326, 746, 974, 974, 974, 325, 316, + 975, 975, 975, 351, 745, 316, 746, 316, 351, 976, + 976, 976, 1156, 1156, 746, 1156, 977, 977, 977, 979, + 979, 979, 1156, 746, 351, 978, 978, 978, 1156, 745, + 1156, 1156, 746, 351, 980, 980, 980, 982, 982, 982, + 1156, 746, 351, 1156, 981, 981, 981, 1156, 745, 1156, + 1156, 746, 351, 983, 983, 983, 985, 985, 985, 1156, + 746, 351, 1156, 984, 984, 984, 1156, 745, 1156, 1156, + 746, 351, 986, 986, 986, 1156, 746, 987, 987, 987, + 351, 745, 988, 988, 988, 351, 1156, 1156, 746, 989, + + 989, 989, 990, 990, 990, 746, 745, 351, 1156, 1156, + 351, 991, 991, 991, 992, 992, 992, 746, 1156, 993, + 993, 993, 351, 745, 746, 1156, 1156, 351, 994, 994, + 994, 995, 995, 995, 997, 997, 997, 1156, 746, 351, + 996, 996, 996, 746, 745, 1000, 1000, 1000, 351, 998, + 998, 998, 1156, 746, 1003, 1003, 1003, 351, 1156, 999, + 999, 999, 746, 745, 1001, 1001, 1001, 351, 1156, 1156, + 746, 1156, 351, 1002, 1002, 1002, 1156, 745, 1156, 746, + 1156, 351, 1004, 1004, 1004, 746, 1006, 1006, 1006, 1156, + 351, 746, 1156, 1005, 1005, 1005, 746, 745, 1007, 1007, + + 1007, 351, 1009, 1009, 1009, 746, 351, 1008, 1008, 1008, + 746, 745, 1010, 1010, 1010, 351, 1156, 1011, 1011, 1011, + 351, 745, 1156, 1156, 746, 351, 1012, 1012, 1012, 1156, + 1013, 1013, 1013, 1015, 1015, 1015, 1156, 746, 351, 1014, + 1014, 1014, 1156, 745, 746, 1156, 1156, 351, 1016, 1016, + 1016, 1156, 1156, 746, 1156, 1156, 351, 1156, 746, 1017, + 1017, 1017, 1156, 745, 1018, 1018, 1018, 351, 746, 1156, + 1019, 1019, 1019, 1021, 1021, 1021, 1156, 746, 351, 1020, + 1020, 1020, 1156, 745, 746, 1156, 1156, 351, 1156, 1156, + 746, 1022, 1022, 1022, 1023, 1023, 1023, 1156, 745, 351, + + 1156, 1156, 351, 1024, 1024, 1024, 1025, 1025, 1025, 1156, + 746, 1027, 1027, 1027, 351, 746, 1156, 1026, 1026, 1026, + 1156, 745, 1156, 1156, 746, 351, 1028, 1028, 1028, 1156, + 746, 1029, 1029, 1029, 351, 745, 1030, 1030, 1030, 351, + 1031, 1031, 1031, 1156, 1156, 746, 1156, 1156, 351, 1032, + 1032, 1032, 1156, 745, 746, 1156, 1156, 351, 1033, 1033, + 1033, 1156, 746, 1034, 1034, 1034, 1156, 1156, 746, 1156, + 1156, 351, 1035, 1035, 1035, 1156, 745, 1036, 1036, 1036, + 351, 1156, 746, 1037, 1037, 1037, 1156, 746, 1038, 1038, + 1038, 351, 745, 1039, 1039, 1039, 351, 1040, 1040, 1040, + + 746, 1156, 1041, 1041, 1041, 351, 745, 1156, 1156, 746, + 351, 1042, 1042, 1042, 1043, 1043, 1043, 1044, 1044, 1044, + 1156, 745, 351, 746, 1156, 351, 1156, 1156, 746, 1045, + 1045, 1045, 1046, 1046, 1046, 1048, 1048, 1048, 1156, 746, + 351, 1047, 1047, 1047, 746, 745, 1049, 1049, 1049, 351, + 1051, 1051, 1051, 746, 351, 1050, 1050, 1050, 1156, 745, + 1156, 1156, 746, 351, 1052, 1052, 1052, 1156, 746, 1053, + 1053, 1053, 351, 745, 1054, 1054, 1054, 351, 1156, 1156, + 746, 1055, 1055, 1055, 1156, 1156, 746, 1156, 1156, 351, + 1156, 1156, 746, 1156, 1056, 1056, 1056, 1156, 745, 1156, + + 1156, 746, 351, 1057, 1057, 1057, 746, 1058, 1058, 1058, + 1059, 1059, 1059, 1156, 745, 351, 1156, 1156, 351, 1156, + 746, 1060, 1060, 1060, 1156, 746, 1061, 1061, 1061, 1062, + 1062, 1062, 1156, 745, 351, 1156, 1156, 351, 1063, 1063, + 1063, 1156, 1064, 1064, 1064, 746, 745, 1065, 1065, 1065, + 351, 1066, 1066, 1066, 746, 745, 1067, 1067, 1067, 351, + 1156, 746, 1068, 1068, 1068, 1156, 745, 1069, 1069, 1069, + 351, 1156, 746, 1070, 1070, 1070, 1156, 745, 1156, 1156, + 746, 351, 1071, 1071, 1071, 1156, 1072, 1072, 1072, 746, + 745, 1156, 1156, 746, 351, 1073, 1073, 1073, 746, 1075, + + 1075, 1075, 746, 1156, 1074, 1074, 1074, 746, 745, 1076, + 1076, 1076, 351, 746, 1077, 1077, 1077, 1156, 746, 1078, + 1078, 1078, 1156, 1156, 746, 1079, 1079, 1079, 1080, 1080, + 1080, 1156, 1156, 746, 1081, 1081, 1081, 746, 1082, 1082, + 1082, 1083, 1083, 1083, 1156, 1156, 746, 1084, 1084, 1084, + 746, 1085, 1085, 1085, 1156, 746, 1086, 1086, 1086, 1156, + 746, 1087, 1087, 1087, 1156, 746, 1088, 1088, 1088, 1156, + 746, 1089, 1089, 1089, 1156, 1156, 746, 1156, 1156, 746, + 1090, 1090, 1090, 1156, 1156, 746, 1091, 1091, 1091, 746, + 1156, 1156, 746, 1092, 1092, 1092, 1156, 1156, 746, 1093, + + 1093, 1093, 746, 1094, 1094, 1094, 1156, 746, 1095, 1095, + 1095, 1156, 746, 1096, 1096, 1096, 1156, 746, 1097, 1097, + 1097, 1156, 746, 1098, 1098, 1098, 1099, 1099, 1099, 1156, + 1156, 746, 1100, 1100, 1100, 1156, 1156, 746, 1101, 1101, + 1101, 1102, 1102, 1102, 746, 1103, 1103, 1103, 1156, 1156, + 746, 1104, 1104, 1104, 746, 1105, 1105, 1105, 1156, 746, + 1106, 1106, 1106, 1156, 746, 1107, 1107, 1107, 1156, 746, + 1108, 1108, 1108, 1156, 746, 1156, 1156, 746, 1109, 1109, + 1109, 1156, 1156, 746, 1110, 1110, 1110, 1156, 1156, 746, + 1156, 1156, 746, 1111, 1111, 1111, 746, 1112, 1112, 1112, + + 1156, 1156, 746, 1113, 1113, 1113, 746, 1114, 1114, 1114, + 1156, 746, 1115, 1115, 1115, 1156, 746, 1116, 1116, 1116, + 1156, 746, 1117, 1117, 1117, 1118, 1118, 1118, 1156, 746, + 1119, 1119, 1119, 1156, 1156, 746, 1120, 1120, 1120, 1121, + 1121, 1121, 1156, 1156, 746, 1122, 1122, 1122, 746, 1123, + 1123, 1123, 1156, 1156, 746, 1124, 1124, 1124, 746, 1125, + 1125, 1125, 1156, 746, 1126, 1126, 1126, 1156, 746, 1127, + 1127, 1127, 1156, 746, 1156, 1156, 746, 1128, 1128, 1128, + 1156, 746, 1129, 1129, 1129, 1156, 1156, 746, 1156, 1156, + 746, 1130, 1130, 1130, 1156, 1156, 746, 1131, 1131, 1131, + + 746, 1132, 1132, 1132, 1156, 1156, 746, 1133, 1133, 1133, + 746, 1134, 1134, 1134, 1156, 746, 1135, 1135, 1135, 1156, + 746, 1136, 1136, 1136, 1137, 1137, 1137, 1156, 746, 1138, + 1138, 1138, 1156, 746, 1139, 1139, 1139, 1140, 1140, 1140, + 1156, 1156, 746, 1141, 1141, 1141, 1156, 1156, 746, 1142, + 1142, 1142, 746, 1143, 1143, 1143, 1156, 1156, 746, 1144, + 1144, 1144, 746, 1145, 1145, 1145, 1156, 746, 1146, 1146, + 1146, 1156, 746, 1156, 1156, 746, 1147, 1147, 1147, 1156, + 746, 1148, 1148, 1148, 1156, 746, 1156, 1156, 746, 1149, + 1149, 1149, 1156, 1156, 746, 1150, 1150, 1150, 1156, 1156, + + 746, 1151, 1151, 1151, 746, 1152, 1152, 1152, 1156, 1156, + 746, 1153, 1153, 1153, 746, 1154, 1154, 1154, 1156, 746, + 1155, 1155, 1155, 1079, 1079, 1079, 1156, 746, 1156, 1156, + 1156, 1156, 746, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 746, 1156, 1156, 1156, 1156, 1156, 746, 1156, 1156, 1156, + 1156, 1156, 746, 1156, 1156, 1156, 746, 1156, 1156, 1156, + 1156, 1156, 746, 1156, 1156, 1156, 746, 1156, 1156, 1156, + 1156, 746, 1156, 1156, 746, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 75, 75, 75, 75, 75, 75, 75, + + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + 75, 108, 108, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108, 108, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + + 153, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 199, 199, 199, + 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, + 199, 199, 199, 199, 199, 220, 220, 220, 220, 220, + 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + 220, 220, 220, 228, 228, 228, 228, 228, 228, 228, + 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, + 228, 236, 236, 236, 236, 236, 236, 236, 236, 236, + + 236, 236, 236, 236, 236, 236, 236, 236, 236, 263, + 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 271, 271, 271, + 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, + 271, 271, 271, 271, 271, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 299, 299, 299, 299, 299, 299, 299, 299, 299, + 299, 299, 299, 299, 299, 299, 299, 299, 299, 317, + + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 317, 317, 317, 317, 317, 317, 317, 339, 339, 339, + 1156, 339, 339, 1156, 1156, 339, 339, 339, 339, 1156, + 339, 339, 339, 339, 339, 340, 340, 340, 1156, 340, + 340, 340, 1156, 340, 340, 340, 340, 340, 340, 340, + 340, 340, 340, 343, 343, 343, 1156, 343, 343, 1156, + 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, + 347, 347, 347, 1156, 347, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 347, 347, 348, 348, + 348, 1156, 348, 348, 348, 348, 348, 348, 348, 348, + + 348, 348, 348, 348, 348, 348, 352, 352, 352, 1156, + 1156, 1156, 352, 1156, 1156, 1156, 1156, 352, 1156, 1156, + 352, 356, 356, 356, 1156, 1156, 356, 1156, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 360, 360, + 360, 1156, 360, 360, 360, 360, 360, 360, 360, 360, + 360, 360, 360, 360, 360, 360, 361, 361, 361, 1156, + 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + 361, 361, 361, 361, 368, 1156, 1156, 1156, 1156, 1156, + 368, 1156, 1156, 1156, 1156, 368, 1156, 1156, 368, 369, + 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + + 369, 369, 369, 369, 369, 369, 379, 379, 1156, 1156, + 1156, 1156, 379, 1156, 1156, 1156, 1156, 379, 1156, 1156, + 379, 379, 389, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 389, 1156, 389, 1156, 1156, 389, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 402, 1156, 402, 1156, 402, + 402, 402, 402, 402, 1156, 402, 402, 1156, 402, 402, + 1156, 402, 417, 417, 417, 1156, 417, 417, 417, 417, + 417, 1156, 417, 417, 417, 417, 417, 417, 1156, 417, + 425, 425, 425, 1156, 425, 425, 425, 425, 425, 425, + + 425, 425, 425, 425, 425, 1156, 425, 426, 426, 426, + 1156, 426, 426, 426, 426, 426, 426, 426, 426, 1156, + 426, 426, 1156, 426, 427, 1156, 427, 1156, 427, 427, + 427, 427, 427, 427, 427, 427, 427, 427, 427, 1156, + 427, 432, 1156, 432, 1156, 432, 432, 432, 432, 432, + 1156, 432, 432, 432, 432, 432, 432, 432, 432, 437, + 1156, 437, 1156, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 450, 450, 450, + 1156, 450, 450, 450, 450, 450, 450, 450, 450, 450, + 450, 450, 450, 450, 450, 454, 454, 454, 1156, 454, + + 454, 454, 1156, 454, 454, 454, 454, 454, 454, 454, + 454, 454, 454, 458, 458, 458, 1156, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 459, 459, 1156, 459, 1156, 1156, 459, 462, 1156, + 462, 462, 1156, 462, 1156, 462, 1156, 462, 463, 463, + 463, 1156, 463, 463, 463, 463, 463, 463, 463, 463, + 463, 463, 463, 463, 463, 463, 477, 477, 477, 1156, + 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, + 477, 477, 477, 477, 479, 479, 479, 1156, 479, 479, + 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, + + 479, 479, 339, 339, 339, 1156, 339, 339, 1156, 1156, + 339, 339, 339, 339, 1156, 339, 339, 339, 339, 339, + 487, 487, 487, 1156, 487, 487, 487, 487, 487, 487, + 487, 487, 487, 487, 487, 487, 487, 489, 489, 489, + 1156, 489, 489, 489, 489, 489, 489, 489, 489, 489, + 489, 489, 489, 489, 489, 343, 343, 343, 1156, 343, + 343, 1156, 343, 343, 343, 343, 343, 343, 343, 343, + 343, 343, 492, 492, 492, 1156, 492, 492, 492, 492, + 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, + 494, 494, 494, 1156, 494, 494, 494, 494, 494, 494, + + 494, 494, 494, 494, 494, 494, 494, 494, 498, 498, + 498, 1156, 498, 498, 498, 498, 498, 498, 498, 498, + 498, 498, 498, 498, 498, 498, 352, 352, 352, 1156, + 1156, 1156, 352, 1156, 1156, 1156, 1156, 352, 1156, 1156, + 352, 356, 356, 356, 1156, 1156, 356, 1156, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 361, 361, + 361, 1156, 361, 361, 361, 361, 361, 361, 361, 361, + 361, 361, 361, 361, 361, 361, 368, 1156, 1156, 1156, + 1156, 1156, 368, 1156, 1156, 1156, 1156, 368, 1156, 1156, + 368, 369, 369, 369, 369, 369, 369, 369, 369, 369, + + 369, 369, 369, 369, 369, 369, 369, 369, 379, 379, + 1156, 1156, 1156, 1156, 379, 1156, 1156, 1156, 1156, 379, + 1156, 1156, 379, 379, 389, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 389, 1156, 389, 1156, 1156, 389, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 402, 1156, 402, + 1156, 402, 402, 402, 402, 402, 1156, 402, 402, 1156, + 402, 402, 1156, 402, 417, 417, 417, 1156, 417, 417, + 417, 417, 417, 1156, 417, 417, 417, 417, 417, 417, + 1156, 417, 425, 425, 425, 1156, 425, 425, 425, 425, + + 425, 425, 425, 425, 425, 425, 425, 1156, 425, 426, + 426, 426, 1156, 426, 426, 426, 426, 426, 426, 426, + 426, 1156, 426, 426, 1156, 426, 427, 1156, 427, 1156, + 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, + 427, 1156, 427, 432, 1156, 432, 1156, 432, 432, 432, + 432, 432, 1156, 432, 432, 432, 432, 432, 432, 432, + 432, 437, 1156, 437, 1156, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 559, + 559, 559, 1156, 559, 559, 559, 559, 559, 559, 559, + 559, 559, 559, 559, 559, 559, 561, 561, 561, 1156, + + 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, + 561, 561, 561, 561, 459, 459, 1156, 459, 1156, 1156, + 459, 463, 463, 463, 1156, 463, 463, 463, 463, 463, + 463, 463, 463, 463, 463, 463, 463, 463, 463, 564, + 564, 564, 1156, 564, 564, 564, 564, 564, 564, 564, + 564, 564, 564, 564, 564, 564, 564, 477, 477, 477, + 1156, 477, 477, 477, 477, 477, 477, 477, 477, 477, + 477, 477, 477, 477, 477, 479, 479, 479, 1156, 479, + 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, + 479, 479, 479, 585, 585, 585, 1156, 585, 585, 585, + + 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, + 339, 339, 339, 1156, 339, 339, 1156, 1156, 339, 339, + 339, 339, 1156, 339, 339, 339, 339, 339, 492, 492, + 492, 1156, 492, 492, 492, 492, 492, 492, 492, 492, + 492, 492, 492, 492, 492, 492, 494, 494, 494, 1156, + 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, + 494, 494, 494, 494, 343, 343, 343, 1156, 343, 343, + 1156, 343, 343, 343, 343, 343, 343, 343, 343, 343, + 343, 352, 352, 352, 1156, 1156, 1156, 352, 1156, 1156, + 1156, 1156, 352, 1156, 1156, 352, 356, 356, 356, 1156, + + 1156, 356, 1156, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 361, 361, 361, 1156, 361, 361, 361, + 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + 361, 622, 622, 622, 1156, 622, 622, 622, 622, 622, + 622, 622, 622, 622, 622, 622, 622, 622, 625, 625, + 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, + 625, 625, 625, 625, 625, 625, 650, 650, 650, 1156, + 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, + 650, 650, 650, 682, 682, 682, 1156, 682, 682, 682, + 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, + + 773, 1156, 1156, 1156, 773, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 773, 1156, 773, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 1156, 807, + 807, 1156, 807, 67, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156 + } ; + +static yyconst flex_int16_t yy_chk[5491] = + { 0, + 0, 1, 162, 1, 1, 2, 146, 2, 2, 0, + 3, 162, 3, 3, 72, 81, 1, 89, 72, 81, + 2, 89, 102, 146, 1, 3, 102, 9, 2, 9, + 9, 152, 9, 3, 0, 9, 134, 134, 10, 152, + 10, 10, 9, 10, 114, 94, 10, 94, 114, 105, + 9, 105, 0, 10, 21, 1, 21, 21, 1079, 2, + 29, 10, 29, 29, 3, 4, 4, 4, 4, 21, + 121, 4, 131, 77, 121, 29, 131, 21, 77, 83, + 4, 9, 21, 29, 147, 142, 1061, 83, 4, 142, + 4, 4, 10, 95, 83, 83, 83, 77, 77, 95, + + 95, 147, 157, 83, 83, 133, 133, 133, 21, 159, + 159, 157, 171, 133, 29, 157, 226, 171, 226, 4, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 11, 148, 11, 11, 12, 11, 12, 12, + 150, 12, 181, 181, 151, 158, 149, 11, 192, 167, + 148, 12, 149, 192, 849, 11, 149, 150, 150, 12, + 11, 151, 167, 149, 12, 177, 158, 187, 196, 177, + 204, 187, 196, 213, 204, 218, 840, 213, 224, 218, + 219, 219, 224, 233, 239, 246, 11, 233, 239, 246, + 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, + + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 15, 371, 15, + 15, 16, 15, 16, 16, 256, 16, 371, 17, 256, + 17, 17, 15, 17, 161, 161, 16, 220, 223, 839, + 15, 361, 161, 17, 16, 15, 381, 225, 227, 16, + 17, 17, 220, 223, 18, 381, 18, 18, 361, 18, + 372, 161, 225, 227, 249, 249, 285, 285, 267, 18, + + 225, 15, 267, 372, 275, 16, 18, 18, 275, 283, + 295, 303, 17, 283, 295, 303, 310, 321, 322, 322, + 310, 327, 336, 341, 341, 321, 349, 391, 366, 327, + 336, 838, 391, 404, 349, 349, 366, 404, 18, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 22, 320, 22, 22, 30, + + 30, 30, 30, 318, 320, 30, 387, 368, 318, 323, + 22, 320, 320, 320, 30, 368, 829, 323, 22, 387, + 320, 320, 30, 22, 323, 323, 323, 318, 318, 344, + 364, 345, 389, 323, 323, 344, 350, 350, 350, 394, + 364, 345, 828, 400, 350, 389, 394, 364, 400, 22, + 23, 23, 344, 30, 345, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 31, + 533, 31, 31, 32, 425, 32, 32, 433, 33, 533, + + 33, 33, 433, 34, 31, 34, 34, 329, 32, 425, + 329, 827, 31, 33, 395, 329, 32, 41, 34, 41, + 41, 33, 352, 352, 352, 395, 34, 135, 135, 135, + 352, 42, 41, 42, 42, 135, 363, 455, 455, 329, + 41, 41, 363, 31, 826, 41, 42, 32, 329, 376, + 376, 492, 33, 363, 42, 42, 825, 34, 35, 42, + 35, 35, 379, 379, 43, 376, 43, 43, 548, 35, + 379, 41, 494, 35, 492, 43, 135, 463, 463, 43, + 510, 35, 35, 548, 507, 42, 35, 43, 44, 379, + 44, 44, 424, 510, 45, 494, 45, 45, 582, 44, + + 495, 507, 338, 44, 46, 338, 46, 46, 508, 45, + 338, 44, 35, 36, 424, 36, 36, 45, 43, 46, + 824, 490, 493, 495, 36, 508, 823, 46, 36, 490, + 490, 500, 493, 514, 338, 582, 36, 36, 424, 500, + 500, 36, 44, 338, 506, 493, 595, 814, 45, 501, + 501, 501, 514, 813, 506, 551, 562, 501, 46, 1176, + 551, 506, 1176, 595, 562, 562, 812, 36, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 39, 811, 39, 39, 588, 572, + 637, 53, 572, 53, 53, 39, 53, 572, 54, 39, + 54, 54, 55, 54, 55, 55, 53, 39, 39, 810, + 55, 588, 39, 54, 53, 809, 526, 55, 646, 53, + 56, 54, 56, 56, 808, 55, 54, 637, 56, 625, + 55, 806, 355, 355, 355, 56, 526, 625, 39, 40, + 355, 40, 40, 56, 805, 53, 628, 628, 56, 804, + 40, 693, 54, 792, 40, 646, 55, 502, 502, 502, + + 791, 526, 40, 40, 587, 502, 790, 40, 581, 686, + 686, 581, 587, 587, 56, 591, 581, 624, 355, 592, + 592, 592, 789, 591, 591, 624, 624, 592, 693, 1177, + 502, 788, 1177, 40, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 51, 593, 593, 593, + 610, 610, 610, 787, 786, 593, 629, 640, 657, 657, + 657, 51, 51, 785, 629, 640, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 57, 57, + 784, 593, 782, 57, 57, 57, 57, 57, 57, 57, + + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 59, 781, 59, 59, 60, + 1191, 60, 60, 1191, 649, 696, 63, 649, 63, 63, + 59, 63, 649, 696, 60, 664, 664, 664, 59, 780, + 698, 63, 60, 59, 465, 465, 465, 60, 698, 63, + 665, 665, 665, 737, 63, 779, 737, 566, 566, 566, + 778, 737, 465, 64, 1200, 64, 64, 1200, 64, 59, + 567, 567, 567, 60, 61, 566, 61, 61, 64, 61, + 63, 699, 61, 61, 61, 699, 64, 1201, 567, 61, + 1201, 64, 565, 565, 565, 465, 777, 61, 61, 738, + + 699, 565, 776, 767, 568, 568, 568, 738, 566, 766, + 565, 767, 630, 630, 630, 765, 764, 64, 626, 626, + 626, 567, 568, 705, 705, 705, 763, 626, 61, 62, + 630, 62, 62, 762, 62, 761, 626, 62, 62, 62, + 760, 618, 618, 565, 62, 759, 618, 758, 742, 618, + 618, 742, 62, 62, 618, 568, 742, 757, 618, 618, + 654, 654, 654, 630, 703, 703, 703, 1202, 654, 626, + 1202, 793, 703, 712, 712, 712, 714, 714, 714, 793, + 756, 755, 754, 62, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 206, 753, 752, 751, 206, 627, 627, 627, 206, 206, + 206, 740, 750, 206, 627, 740, 206, 206, 749, 1204, + 748, 206, 1204, 627, 747, 206, 206, 342, 745, 736, + 740, 342, 342, 342, 1210, 730, 342, 1210, 342, 729, + 631, 631, 631, 342, 342, 342, 346, 728, 727, 726, + 346, 346, 346, 725, 724, 346, 627, 346, 631, 743, + + 743, 743, 346, 346, 346, 359, 723, 743, 722, 359, + 359, 359, 1213, 721, 359, 1213, 359, 720, 774, 774, + 774, 359, 359, 359, 365, 365, 774, 719, 365, 365, + 365, 631, 718, 365, 717, 365, 655, 655, 655, 716, + 365, 365, 365, 373, 655, 373, 715, 711, 710, 373, + 373, 373, 1228, 709, 373, 1228, 373, 708, 632, 632, + 632, 373, 373, 373, 406, 707, 706, 702, 406, 406, + 406, 1237, 701, 406, 1237, 406, 632, 655, 700, 694, + 406, 406, 406, 407, 407, 692, 407, 1238, 407, 691, + 1238, 407, 407, 683, 682, 681, 407, 801, 801, 801, + + 407, 407, 420, 680, 679, 801, 420, 420, 420, 632, + 678, 420, 677, 420, 684, 684, 684, 676, 420, 420, + 420, 430, 675, 684, 674, 430, 822, 822, 822, 430, + 430, 430, 684, 673, 430, 672, 430, 820, 820, 820, + 671, 430, 430, 430, 436, 820, 670, 669, 436, 436, + 436, 1239, 668, 436, 1239, 436, 835, 835, 835, 667, + 436, 436, 436, 440, 835, 684, 666, 440, 440, 440, + 1240, 663, 440, 1240, 440, 1246, 662, 822, 1246, 440, + 440, 440, 573, 573, 573, 573, 573, 573, 573, 573, + 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + + 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + 573, 573, 573, 573, 573, 573, 573, 573, 639, 639, + 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, + 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, + 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, + 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, + 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, + 639, 639, 639, 639, 685, 685, 685, 688, 688, 688, + + 689, 689, 689, 685, 690, 690, 690, 661, 660, 704, + 704, 704, 685, 704, 659, 688, 658, 704, 689, 731, + 731, 731, 690, 732, 732, 732, 656, 653, 731, 733, + 733, 733, 732, 651, 734, 734, 734, 731, 735, 735, + 735, 732, 744, 744, 744, 685, 744, 733, 688, 650, + 744, 689, 734, 647, 644, 690, 735, 768, 768, 768, + 704, 643, 642, 769, 769, 769, 768, 641, 1249, 638, + 731, 1249, 769, 634, 732, 768, 770, 770, 770, 633, + 733, 769, 771, 771, 771, 734, 772, 772, 772, 735, + 846, 846, 846, 744, 770, 775, 775, 775, 846, 775, + + 771, 622, 621, 775, 772, 797, 797, 797, 768, 617, + 795, 795, 795, 616, 769, 615, 796, 796, 796, 795, + 798, 798, 798, 797, 614, 796, 613, 770, 795, 799, + 799, 799, 1263, 771, 796, 1263, 612, 772, 798, 611, + 802, 802, 802, 609, 802, 608, 775, 799, 802, 803, + 803, 803, 607, 803, 606, 605, 797, 815, 815, 815, + 604, 795, 603, 816, 816, 816, 815, 796, 817, 817, + 817, 798, 816, 602, 600, 815, 818, 818, 818, 599, + 799, 816, 598, 819, 819, 819, 817, 596, 821, 821, + 821, 802, 821, 585, 818, 584, 821, 830, 830, 830, + + 803, 819, 831, 831, 831, 583, 830, 579, 815, 578, + 577, 831, 576, 575, 816, 830, 837, 837, 837, 817, + 831, 574, 832, 832, 832, 571, 570, 818, 833, 833, + 833, 834, 834, 834, 819, 564, 561, 559, 558, 821, + 832, 555, 550, 836, 836, 836, 833, 836, 830, 834, + 546, 836, 544, 831, 841, 841, 841, 842, 842, 842, + 843, 843, 843, 841, 541, 540, 842, 837, 844, 844, + 844, 539, 841, 832, 538, 842, 537, 536, 843, 833, + 535, 534, 834, 845, 845, 845, 844, 847, 847, 847, + 532, 847, 531, 530, 836, 847, 848, 848, 848, 529, + + 528, 845, 852, 852, 852, 841, 527, 525, 842, 524, + 522, 843, 850, 850, 850, 851, 851, 851, 519, 844, + 852, 850, 517, 516, 851, 853, 853, 853, 512, 511, + 850, 503, 499, 851, 845, 857, 857, 857, 847, 854, + 854, 854, 498, 853, 855, 855, 855, 848, 862, 862, + 862, 489, 855, 852, 856, 856, 856, 854, 856, 858, + 858, 858, 856, 850, 487, 486, 851, 485, 858, 859, + 859, 859, 860, 860, 860, 483, 853, 858, 859, 482, + 860, 861, 861, 861, 481, 861, 857, 859, 478, 861, + 854, 476, 863, 863, 863, 865, 865, 865, 475, 862, + + 863, 868, 868, 868, 474, 856, 473, 864, 864, 864, + 858, 864, 871, 871, 871, 864, 866, 866, 866, 472, + 859, 867, 867, 867, 866, 867, 869, 869, 869, 867, + 470, 469, 861, 468, 869, 870, 870, 870, 467, 870, + 872, 872, 872, 870, 466, 464, 865, 460, 872, 873, + 873, 873, 868, 873, 874, 874, 874, 873, 864, 875, + 875, 875, 457, 871, 877, 877, 877, 875, 456, 876, + 876, 876, 867, 876, 878, 878, 878, 876, 454, 879, + 879, 879, 878, 879, 453, 449, 870, 879, 880, 880, + 880, 881, 881, 881, 882, 882, 882, 448, 882, 881, + + 873, 444, 882, 443, 439, 874, 883, 883, 883, 884, + 884, 884, 886, 886, 886, 877, 438, 884, 435, 434, + 876, 885, 885, 885, 431, 885, 887, 887, 887, 885, + 879, 889, 889, 889, 887, 429, 888, 888, 888, 880, + 888, 890, 890, 890, 888, 882, 891, 891, 891, 890, + 891, 892, 892, 892, 891, 428, 423, 883, 893, 893, + 893, 422, 419, 886, 416, 415, 893, 894, 894, 894, + 414, 894, 885, 413, 412, 894, 895, 895, 895, 898, + 898, 898, 889, 896, 896, 896, 411, 888, 897, 897, + 897, 896, 897, 899, 899, 899, 897, 891, 901, 901, + + 901, 899, 892, 900, 900, 900, 410, 900, 902, 902, + 902, 900, 409, 903, 903, 903, 902, 903, 894, 408, + 405, 903, 904, 904, 904, 398, 393, 895, 392, 388, + 898, 386, 905, 905, 905, 907, 907, 907, 385, 897, + 905, 384, 906, 906, 906, 383, 906, 382, 380, 901, + 906, 908, 908, 908, 900, 910, 910, 910, 375, 908, + 369, 909, 909, 909, 903, 909, 911, 911, 911, 909, + 913, 913, 913, 904, 911, 912, 912, 912, 358, 912, + 914, 914, 914, 912, 357, 354, 907, 348, 914, 340, + 915, 915, 915, 906, 915, 916, 916, 916, 915, 917, + + 917, 917, 919, 919, 919, 337, 910, 917, 334, 918, + 918, 918, 909, 918, 920, 920, 920, 918, 922, 922, + 922, 913, 920, 921, 921, 921, 912, 921, 923, 923, + 923, 921, 925, 925, 925, 333, 923, 928, 928, 928, + 332, 915, 331, 924, 924, 924, 916, 924, 926, 926, + 926, 924, 330, 919, 328, 326, 926, 927, 927, 927, + 918, 927, 929, 929, 929, 927, 931, 931, 931, 922, + 929, 930, 930, 930, 921, 930, 932, 932, 932, 930, + 934, 934, 934, 925, 932, 933, 933, 933, 928, 933, + 935, 935, 935, 933, 924, 936, 936, 936, 935, 936, + + 937, 937, 937, 936, 938, 938, 938, 325, 927, 940, + 940, 940, 938, 943, 943, 943, 315, 931, 314, 939, + 939, 939, 930, 939, 941, 941, 941, 939, 946, 946, + 946, 934, 941, 942, 942, 942, 933, 942, 949, 949, + 949, 942, 944, 944, 944, 311, 936, 304, 296, 292, + 944, 937, 284, 945, 945, 945, 276, 945, 268, 259, + 940, 945, 257, 250, 943, 947, 947, 947, 247, 240, + 939, 234, 232, 947, 948, 948, 948, 217, 948, 946, + 214, 212, 948, 205, 942, 950, 950, 950, 203, 949, + 951, 951, 951, 950, 951, 952, 952, 952, 951, 953, + + 953, 953, 197, 188, 945, 178, 175, 953, 954, 954, + 954, 168, 954, 955, 955, 955, 954, 166, 956, 956, + 956, 958, 958, 958, 165, 948, 956, 957, 957, 957, + 164, 957, 959, 959, 959, 957, 961, 961, 961, 163, + 959, 951, 160, 960, 960, 960, 952, 960, 962, 962, + 962, 960, 156, 963, 963, 963, 962, 963, 154, 954, + 153, 963, 143, 132, 955, 964, 964, 964, 965, 965, + 965, 130, 958, 966, 966, 966, 965, 966, 957, 122, + 115, 966, 967, 967, 967, 113, 106, 961, 968, 968, + 968, 969, 969, 969, 960, 969, 968, 103, 96, 969, + + 970, 970, 970, 93, 963, 971, 971, 971, 92, 90, + 972, 972, 972, 971, 972, 82, 964, 73, 972, 973, + 973, 973, 67, 0, 966, 0, 974, 974, 974, 976, + 976, 976, 0, 967, 974, 975, 975, 975, 0, 975, + 0, 0, 969, 975, 977, 977, 977, 979, 979, 979, + 0, 970, 977, 0, 978, 978, 978, 0, 978, 0, + 0, 972, 978, 980, 980, 980, 982, 982, 982, 0, + 973, 980, 0, 981, 981, 981, 0, 981, 0, 0, + 976, 981, 983, 983, 983, 0, 975, 984, 984, 984, + 983, 984, 985, 985, 985, 984, 0, 0, 979, 986, + + 986, 986, 987, 987, 987, 978, 987, 986, 0, 0, + 987, 988, 988, 988, 989, 989, 989, 982, 0, 990, + 990, 990, 989, 990, 981, 0, 0, 990, 991, 991, + 991, 992, 992, 992, 994, 994, 994, 0, 984, 992, + 993, 993, 993, 985, 993, 997, 997, 997, 993, 995, + 995, 995, 0, 987, 1000, 1000, 1000, 995, 0, 996, + 996, 996, 988, 996, 998, 998, 998, 996, 0, 0, + 990, 0, 998, 999, 999, 999, 0, 999, 0, 991, + 0, 999, 1001, 1001, 1001, 994, 1003, 1003, 1003, 0, + 1001, 993, 0, 1002, 1002, 1002, 997, 1002, 1004, 1004, + + 1004, 1002, 1006, 1006, 1006, 1000, 1004, 1005, 1005, 1005, + 996, 1005, 1007, 1007, 1007, 1005, 0, 1008, 1008, 1008, + 1007, 1008, 0, 0, 999, 1008, 1009, 1009, 1009, 0, + 1010, 1010, 1010, 1012, 1012, 1012, 0, 1003, 1010, 1011, + 1011, 1011, 0, 1011, 1002, 0, 0, 1011, 1013, 1013, + 1013, 0, 0, 1006, 0, 0, 1013, 0, 1005, 1014, + 1014, 1014, 0, 1014, 1015, 1015, 1015, 1014, 1008, 0, + 1016, 1016, 1016, 1018, 1018, 1018, 0, 1009, 1016, 1017, + 1017, 1017, 0, 1017, 1012, 0, 0, 1017, 0, 0, + 1011, 1019, 1019, 1019, 1020, 1020, 1020, 0, 1020, 1019, + + 0, 0, 1020, 1021, 1021, 1021, 1022, 1022, 1022, 0, + 1014, 1024, 1024, 1024, 1022, 1015, 0, 1023, 1023, 1023, + 0, 1023, 0, 0, 1018, 1023, 1025, 1025, 1025, 0, + 1017, 1026, 1026, 1026, 1025, 1026, 1027, 1027, 1027, 1026, + 1028, 1028, 1028, 0, 0, 1020, 0, 0, 1028, 1029, + 1029, 1029, 0, 1029, 1021, 0, 0, 1029, 1030, 1030, + 1030, 0, 1024, 1031, 1031, 1031, 0, 0, 1023, 0, + 0, 1031, 1032, 1032, 1032, 0, 1032, 1033, 1033, 1033, + 1032, 0, 1026, 1034, 1034, 1034, 0, 1027, 1035, 1035, + 1035, 1034, 1035, 1036, 1036, 1036, 1035, 1037, 1037, 1037, + + 1029, 0, 1038, 1038, 1038, 1037, 1038, 0, 0, 1030, + 1038, 1039, 1039, 1039, 1040, 1040, 1040, 1041, 1041, 1041, + 0, 1041, 1040, 1032, 0, 1041, 0, 0, 1033, 1042, + 1042, 1042, 1043, 1043, 1043, 1045, 1045, 1045, 0, 1035, + 1043, 1044, 1044, 1044, 1036, 1044, 1046, 1046, 1046, 1044, + 1048, 1048, 1048, 1038, 1046, 1047, 1047, 1047, 0, 1047, + 0, 0, 1039, 1047, 1049, 1049, 1049, 0, 1041, 1050, + 1050, 1050, 1049, 1050, 1051, 1051, 1051, 1050, 0, 0, + 1042, 1052, 1052, 1052, 0, 0, 1045, 0, 0, 1052, + 0, 0, 1044, 0, 1053, 1053, 1053, 0, 1053, 0, + + 0, 1048, 1053, 1054, 1054, 1054, 1047, 1055, 1055, 1055, + 1056, 1056, 1056, 0, 1056, 1055, 0, 0, 1056, 0, + 1050, 1057, 1057, 1057, 0, 1051, 1058, 1058, 1058, 1059, + 1059, 1059, 0, 1059, 1058, 0, 0, 1059, 1060, 1060, + 1060, 0, 1062, 1062, 1062, 1053, 1062, 1063, 1063, 1063, + 1062, 1064, 1064, 1064, 1054, 1064, 1065, 1065, 1065, 1064, + 0, 1056, 1066, 1066, 1066, 0, 1066, 1067, 1067, 1067, + 1066, 0, 1057, 1068, 1068, 1068, 0, 1068, 0, 0, + 1059, 1068, 1069, 1069, 1069, 0, 1070, 1070, 1070, 1060, + 1070, 0, 0, 1062, 1070, 1071, 1071, 1071, 1063, 1073, + + 1073, 1073, 1064, 0, 1072, 1072, 1072, 1065, 1072, 1074, + 1074, 1074, 1072, 1066, 1075, 1075, 1075, 0, 1067, 1076, + 1076, 1076, 0, 0, 1068, 1077, 1077, 1077, 1078, 1078, + 1078, 0, 0, 1069, 1080, 1080, 1080, 1070, 1081, 1081, + 1081, 1082, 1082, 1082, 0, 0, 1071, 1083, 1083, 1083, + 1073, 1084, 1084, 1084, 0, 1072, 1085, 1085, 1085, 0, + 1074, 1086, 1086, 1086, 0, 1075, 1087, 1087, 1087, 0, + 1076, 1088, 1088, 1088, 0, 0, 1077, 0, 0, 1078, + 1089, 1089, 1089, 0, 0, 1080, 1090, 1090, 1090, 1081, + 0, 0, 1082, 1091, 1091, 1091, 0, 0, 1083, 1092, + + 1092, 1092, 1084, 1093, 1093, 1093, 0, 1085, 1094, 1094, + 1094, 0, 1086, 1095, 1095, 1095, 0, 1087, 1096, 1096, + 1096, 0, 1088, 1097, 1097, 1097, 1098, 1098, 1098, 0, + 0, 1089, 1099, 1099, 1099, 0, 0, 1090, 1100, 1100, + 1100, 1101, 1101, 1101, 1091, 1102, 1102, 1102, 0, 0, + 1092, 1103, 1103, 1103, 1093, 1104, 1104, 1104, 0, 1094, + 1105, 1105, 1105, 0, 1095, 1106, 1106, 1106, 0, 1096, + 1107, 1107, 1107, 0, 1097, 0, 0, 1098, 1108, 1108, + 1108, 0, 0, 1099, 1109, 1109, 1109, 0, 0, 1100, + 0, 0, 1101, 1110, 1110, 1110, 1102, 1111, 1111, 1111, + + 0, 0, 1103, 1112, 1112, 1112, 1104, 1113, 1113, 1113, + 0, 1105, 1114, 1114, 1114, 0, 1106, 1115, 1115, 1115, + 0, 1107, 1116, 1116, 1116, 1117, 1117, 1117, 0, 1108, + 1118, 1118, 1118, 0, 0, 1109, 1119, 1119, 1119, 1120, + 1120, 1120, 0, 0, 1110, 1121, 1121, 1121, 1111, 1122, + 1122, 1122, 0, 0, 1112, 1123, 1123, 1123, 1113, 1124, + 1124, 1124, 0, 1114, 1125, 1125, 1125, 0, 1115, 1126, + 1126, 1126, 0, 1116, 0, 0, 1117, 1127, 1127, 1127, + 0, 1118, 1128, 1128, 1128, 0, 0, 1119, 0, 0, + 1120, 1129, 1129, 1129, 0, 0, 1121, 1130, 1130, 1130, + + 1122, 1131, 1131, 1131, 0, 0, 1123, 1132, 1132, 1132, + 1124, 1133, 1133, 1133, 0, 1125, 1134, 1134, 1134, 0, + 1126, 1135, 1135, 1135, 1136, 1136, 1136, 0, 1127, 1137, + 1137, 1137, 0, 1128, 1138, 1138, 1138, 1139, 1139, 1139, + 0, 0, 1129, 1140, 1140, 1140, 0, 0, 1130, 1141, + 1141, 1141, 1131, 1142, 1142, 1142, 0, 0, 1132, 1143, + 1143, 1143, 1133, 1144, 1144, 1144, 0, 1134, 1145, 1145, + 1145, 0, 1135, 0, 0, 1136, 1146, 1146, 1146, 0, + 1137, 1147, 1147, 1147, 0, 1138, 0, 0, 1139, 1148, + 1148, 1148, 0, 0, 1140, 1149, 1149, 1149, 0, 0, + + 1141, 1150, 1150, 1150, 1142, 1151, 1151, 1151, 0, 0, + 1143, 1152, 1152, 1152, 1144, 1153, 1153, 1153, 0, 1145, + 1154, 1154, 1154, 1155, 1155, 1155, 0, 1146, 0, 0, + 0, 0, 1147, 0, 0, 0, 0, 0, 0, 0, + 1148, 0, 0, 0, 0, 0, 1149, 0, 0, 0, + 0, 0, 1150, 0, 0, 0, 1151, 0, 0, 0, + 0, 0, 1152, 0, 0, 0, 1153, 0, 0, 0, + 0, 1154, 0, 0, 1155, 1157, 1157, 1157, 1157, 1157, + 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157, + 1157, 1157, 1157, 1158, 1158, 1158, 1158, 1158, 1158, 1158, + + 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, + 1158, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, + 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1160, + 1160, 1160, 1160, 1160, 1160, 1160, 1160, 1160, 1160, 1160, + 1160, 1160, 1160, 1160, 1160, 1160, 1160, 1161, 1161, 1161, + 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, + 1161, 1161, 1161, 1161, 1161, 1162, 1162, 1162, 1162, 1162, + 1162, 1162, 1162, 1162, 1162, 1162, 1162, 1162, 1162, 1162, + 1162, 1162, 1162, 1163, 1163, 1163, 1163, 1163, 1163, 1163, + 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, + + 1163, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, + 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1165, + 1165, 1165, 1165, 1165, 1165, 1165, 1165, 1165, 1165, 1165, + 1165, 1165, 1165, 1165, 1165, 1165, 1165, 1166, 1166, 1166, + 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166, + 1166, 1166, 1166, 1166, 1166, 1167, 1167, 1167, 1167, 1167, + 1167, 1167, 1167, 1167, 1167, 1167, 1167, 1167, 1167, 1167, + 1167, 1167, 1167, 1168, 1168, 1168, 1168, 1168, 1168, 1168, + 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, + 1168, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, + + 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1171, 1171, 1171, + 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, + 1171, 1171, 1171, 1171, 1171, 1172, 1172, 1172, 1172, 1172, + 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, + 1172, 1172, 1172, 1173, 1173, 1173, 1173, 1173, 1173, 1173, + 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, + 1173, 1174, 1174, 1174, 1174, 1174, 1174, 1174, 1174, 1174, + 1174, 1174, 1174, 1174, 1174, 1174, 1174, 1174, 1174, 1175, + + 1175, 1175, 1175, 1175, 1175, 1175, 1175, 1175, 1175, 1175, + 1175, 1175, 1175, 1175, 1175, 1175, 1175, 1178, 1178, 1178, + 0, 1178, 1178, 0, 0, 1178, 1178, 1178, 1178, 0, + 1178, 1178, 1178, 1178, 1178, 1179, 1179, 1179, 0, 1179, + 1179, 1179, 0, 1179, 1179, 1179, 1179, 1179, 1179, 1179, + 1179, 1179, 1179, 1180, 1180, 1180, 0, 1180, 1180, 0, + 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, + 1181, 1181, 1181, 0, 1181, 1181, 1181, 1181, 1181, 1181, + 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1182, 1182, + 1182, 0, 1182, 1182, 1182, 1182, 1182, 1182, 1182, 1182, + + 1182, 1182, 1182, 1182, 1182, 1182, 1183, 1183, 1183, 0, + 0, 0, 1183, 0, 0, 0, 0, 1183, 0, 0, + 1183, 1184, 1184, 1184, 0, 0, 1184, 0, 1184, 1184, + 1184, 1184, 1184, 1184, 1184, 1184, 1184, 1184, 1185, 1185, + 1185, 0, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, + 1185, 1185, 1185, 1185, 1185, 1185, 1186, 1186, 1186, 0, + 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, + 1186, 1186, 1186, 1186, 1187, 0, 0, 0, 0, 0, + 1187, 0, 0, 0, 0, 1187, 0, 0, 1187, 1188, + 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188, + + 1188, 1188, 1188, 1188, 1188, 1188, 1189, 1189, 0, 0, + 0, 0, 1189, 0, 0, 0, 0, 1189, 0, 0, + 1189, 1189, 1190, 0, 0, 0, 0, 0, 0, 0, + 0, 1190, 0, 1190, 0, 0, 1190, 1192, 1192, 1192, + 1192, 1192, 1192, 1192, 1192, 1192, 1192, 1192, 1192, 1192, + 1192, 1192, 1192, 1192, 1192, 1193, 0, 1193, 0, 1193, + 1193, 1193, 1193, 1193, 0, 1193, 1193, 0, 1193, 1193, + 0, 1193, 1194, 1194, 1194, 0, 1194, 1194, 1194, 1194, + 1194, 0, 1194, 1194, 1194, 1194, 1194, 1194, 0, 1194, + 1195, 1195, 1195, 0, 1195, 1195, 1195, 1195, 1195, 1195, + + 1195, 1195, 1195, 1195, 1195, 0, 1195, 1196, 1196, 1196, + 0, 1196, 1196, 1196, 1196, 1196, 1196, 1196, 1196, 0, + 1196, 1196, 0, 1196, 1197, 0, 1197, 0, 1197, 1197, + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 0, + 1197, 1198, 0, 1198, 0, 1198, 1198, 1198, 1198, 1198, + 0, 1198, 1198, 1198, 1198, 1198, 1198, 1198, 1198, 1199, + 0, 1199, 0, 1199, 1199, 1199, 1199, 1199, 1199, 1199, + 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1203, 1203, 1203, + 0, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, + 1203, 1203, 1203, 1203, 1203, 1205, 1205, 1205, 0, 1205, + + 1205, 1205, 0, 1205, 1205, 1205, 1205, 1205, 1205, 1205, + 1205, 1205, 1205, 1206, 1206, 1206, 0, 1206, 1206, 1206, + 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, + 1206, 1207, 1207, 0, 1207, 0, 0, 1207, 1208, 0, + 1208, 1208, 0, 1208, 0, 1208, 0, 1208, 1209, 1209, + 1209, 0, 1209, 1209, 1209, 1209, 1209, 1209, 1209, 1209, + 1209, 1209, 1209, 1209, 1209, 1209, 1211, 1211, 1211, 0, + 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, + 1211, 1211, 1211, 1211, 1212, 1212, 1212, 0, 1212, 1212, + 1212, 1212, 1212, 1212, 1212, 1212, 1212, 1212, 1212, 1212, + + 1212, 1212, 1214, 1214, 1214, 0, 1214, 1214, 0, 0, + 1214, 1214, 1214, 1214, 0, 1214, 1214, 1214, 1214, 1214, + 1215, 1215, 1215, 0, 1215, 1215, 1215, 1215, 1215, 1215, + 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1216, 1216, 1216, + 0, 1216, 1216, 1216, 1216, 1216, 1216, 1216, 1216, 1216, + 1216, 1216, 1216, 1216, 1216, 1217, 1217, 1217, 0, 1217, + 1217, 0, 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1217, + 1217, 1217, 1218, 1218, 1218, 0, 1218, 1218, 1218, 1218, + 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, + 1219, 1219, 1219, 0, 1219, 1219, 1219, 1219, 1219, 1219, + + 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1220, 1220, + 1220, 0, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, + 1220, 1220, 1220, 1220, 1220, 1220, 1221, 1221, 1221, 0, + 0, 0, 1221, 0, 0, 0, 0, 1221, 0, 0, + 1221, 1222, 1222, 1222, 0, 0, 1222, 0, 1222, 1222, + 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1223, 1223, + 1223, 0, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, + 1223, 1223, 1223, 1223, 1223, 1223, 1224, 0, 0, 0, + 0, 0, 1224, 0, 0, 0, 0, 1224, 0, 0, + 1224, 1225, 1225, 1225, 1225, 1225, 1225, 1225, 1225, 1225, + + 1225, 1225, 1225, 1225, 1225, 1225, 1225, 1225, 1226, 1226, + 0, 0, 0, 0, 1226, 0, 0, 0, 0, 1226, + 0, 0, 1226, 1226, 1227, 0, 0, 0, 0, 0, + 0, 0, 0, 1227, 0, 1227, 0, 0, 1227, 1229, + 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, + 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1230, 0, 1230, + 0, 1230, 1230, 1230, 1230, 1230, 0, 1230, 1230, 0, + 1230, 1230, 0, 1230, 1231, 1231, 1231, 0, 1231, 1231, + 1231, 1231, 1231, 0, 1231, 1231, 1231, 1231, 1231, 1231, + 0, 1231, 1232, 1232, 1232, 0, 1232, 1232, 1232, 1232, + + 1232, 1232, 1232, 1232, 1232, 1232, 1232, 0, 1232, 1233, + 1233, 1233, 0, 1233, 1233, 1233, 1233, 1233, 1233, 1233, + 1233, 0, 1233, 1233, 0, 1233, 1234, 0, 1234, 0, + 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1234, + 1234, 0, 1234, 1235, 0, 1235, 0, 1235, 1235, 1235, + 1235, 1235, 0, 1235, 1235, 1235, 1235, 1235, 1235, 1235, + 1235, 1236, 0, 1236, 0, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1241, + 1241, 1241, 0, 1241, 1241, 1241, 1241, 1241, 1241, 1241, + 1241, 1241, 1241, 1241, 1241, 1241, 1242, 1242, 1242, 0, + + 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, + 1242, 1242, 1242, 1242, 1243, 1243, 0, 1243, 0, 0, + 1243, 1244, 1244, 1244, 0, 1244, 1244, 1244, 1244, 1244, + 1244, 1244, 1244, 1244, 1244, 1244, 1244, 1244, 1244, 1245, + 1245, 1245, 0, 1245, 1245, 1245, 1245, 1245, 1245, 1245, + 1245, 1245, 1245, 1245, 1245, 1245, 1245, 1247, 1247, 1247, + 0, 1247, 1247, 1247, 1247, 1247, 1247, 1247, 1247, 1247, + 1247, 1247, 1247, 1247, 1247, 1248, 1248, 1248, 0, 1248, + 1248, 1248, 1248, 1248, 1248, 1248, 1248, 1248, 1248, 1248, + 1248, 1248, 1248, 1250, 1250, 1250, 0, 1250, 1250, 1250, + + 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, + 1251, 1251, 1251, 0, 1251, 1251, 0, 0, 1251, 1251, + 1251, 1251, 0, 1251, 1251, 1251, 1251, 1251, 1252, 1252, + 1252, 0, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252, + 1252, 1252, 1252, 1252, 1252, 1252, 1253, 1253, 1253, 0, + 1253, 1253, 1253, 1253, 1253, 1253, 1253, 1253, 1253, 1253, + 1253, 1253, 1253, 1253, 1254, 1254, 1254, 0, 1254, 1254, + 0, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, + 1254, 1255, 1255, 1255, 0, 0, 0, 1255, 0, 0, + 0, 0, 1255, 0, 0, 1255, 1256, 1256, 1256, 0, + + 0, 1256, 0, 1256, 1256, 1256, 1256, 1256, 1256, 1256, + 1256, 1256, 1256, 1257, 1257, 1257, 0, 1257, 1257, 1257, + 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, + 1257, 1258, 1258, 1258, 0, 1258, 1258, 1258, 1258, 1258, + 1258, 1258, 1258, 1258, 1258, 1258, 1258, 1258, 1259, 1259, + 1259, 1259, 1259, 1259, 1259, 1259, 1259, 1259, 1259, 1259, + 1259, 1259, 1259, 1259, 1259, 1259, 1260, 1260, 1260, 0, + 1260, 1260, 1260, 1260, 1260, 1260, 1260, 1260, 1260, 1260, + 1260, 1260, 1260, 1261, 1261, 1261, 0, 1261, 1261, 1261, + 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, + + 1262, 0, 0, 0, 1262, 0, 0, 0, 0, 0, + 0, 0, 1262, 0, 1262, 1264, 1264, 1264, 1264, 1264, + 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 0, 1264, + 1264, 0, 1264, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156 + } ; + +extern int preYY_flex_debug; +int preYY_flex_debug = 0; + +static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; +static char *yy_full_match; +static int yy_lp; +static int yy_looking_for_trail_begin = 0; +static int yy_full_lp; +static int *yy_full_state; +#define YY_TRAILING_MASK 0x2000 +#define YY_TRAILING_HEAD_MASK 0x4000 +#define REJECT \ +{ \ +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ \ +yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ +(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \ +(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \ +yy_current_state = *(yy_state_ptr); /* restore curr. state */ \ +++(yy_lp); \ +goto find_rule; \ +} + +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *preYYtext; +#line 1 "pre.l" +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ +#line 19 "pre.l" + +/* + * includes + */ + +#include <stdio.h> +#include <assert.h> +#include <ctype.h> +#include <errno.h> + +#include "qtbc.h" +#include <qarray.h> +#include <qstack.h> +#include <qfile.h> +#include <qstrlist.h> +#include <qdict.h> +#include <qregexp.h> +#include <qfileinfo.h> +#include <qdir.h> + +#include "pre.h" +#include "constexp.h" +#include "define.h" +#include "doxygen.h" +#include "message.h" +#include "util.h" +#include "defargs.h" +#include "debug.h" +#include "bufstr.h" +#include "portable.h" +#include "bufstr.h" + +#define YY_NEVER_INTERACTIVE 1 + + +struct FileState +{ + FileState(int size) : fileBuf(size), + oldFileBuf(0), oldFileBufPos(0) {} + int lineNr; + BufStr fileBuf; + BufStr *oldFileBuf; + int oldFileBufPos; + YY_BUFFER_STATE bufState; + QCString fileName; +}; + +/* ----------------------------------------------------------------- + * + * scanner's state + */ + +static int g_yyLineNr = 1; +static QCString g_yyFileName; +static FileDef *g_yyFileDef; +static FileDef *g_inputFileDef; +static int g_ifcount = 0; +static QStrList *g_pathList = 0; +static QStack<FileState> g_includeStack; +static QDict<int> *g_argDict; +static int g_defArgs = -1; +static QCString g_defName; +static QCString g_defText; +static QCString g_defLitText; +static QCString g_defArgsStr; +static QCString g_defExtraSpacing; +static bool g_defVarArgs; +static int g_level; +static int g_lastCContext; +static int g_lastCPPContext; +static QArray<int> g_levelGuard; +static BufStr *g_inputBuf; +static int g_inputBufPos; +static BufStr *g_outputBuf; +static int g_roundCount; +static bool g_quoteArg; +static DefineDict *g_globalDefineDict = new DefineDict(10009); +static DefineDict *g_fileDefineDict = new DefineDict(1009); +static DefineDict *g_expandedDict; +static int g_findDefArgContext; +static bool g_expectGuard; +static QCString g_lastGuardName; +static QCString g_incName; +static QCString g_guardExpr; +static int g_curlyCount; +static bool g_nospaces; // add extra spaces during macro expansion + +static bool g_macroExpansion; // from the configuration +static bool g_expandOnlyPredef; // from the configuration +static int g_commentCount; +static bool g_insideComment; +static bool g_isImported; +static QCString g_blockName; +static int g_condCtx; +static bool g_skip; +static QStack<bool> g_condStack; +static bool g_insideCS; // C# has simpler preprocessor +static bool g_isSource; + +static bool g_lexInit = FALSE; + +DefineDict* getGlobalDefineDict() +{ + return g_globalDefineDict; +} + +static void setFileName(const char *name) +{ + bool ambig; + QFileInfo fi(name); + g_yyFileName=convertToQCString(fi.absFilePath()); + g_yyFileDef=findFileDef(Doxygen::inputNameDict,g_yyFileName,ambig); + if (g_yyFileDef==0) // if this is not an input file check if it is an + // include file + { + g_yyFileDef=findFileDef(Doxygen::includeNameDict,g_yyFileName,ambig); + } + //printf("setFileName(%s) g_yyFileName=%s g_yyFileDef=%p\n", + // name,g_yyFileName.data(),g_yyFileDef); + if (g_yyFileDef && g_yyFileDef->isReference()) g_yyFileDef=0; + g_insideCS = getLanguageFromFileName(g_yyFileName)==SrcLangExt_CSharp; + g_isSource = guessSection(g_yyFileName); +} + +static void incrLevel() +{ + g_level++; + g_levelGuard.resize(g_level); + g_levelGuard[g_level-1]=FALSE; + //printf("%s line %d: incrLevel %d\n",g_yyFileName.data(),g_yyLineNr,g_level); +} + +static void decrLevel() +{ + //printf("%s line %d: decrLevel %d\n",g_yyFileName.data(),g_yyLineNr,g_level); + if (g_level > 0) + { + g_level--; + g_levelGuard.resize(g_level); + } + else + { + warn(g_yyFileName,g_yyLineNr,"warning: More #endif's than #if's found.\n"); + } +} + +static bool otherCaseDone() +{ + if (g_level==0) + { + warn(g_yyFileName,g_yyLineNr,"warning: Found an #else without a preceding #if.\n"); + return TRUE; + } + else + { + return g_levelGuard[g_level-1]; + } +} + +static void setCaseDone(bool value) +{ + g_levelGuard[g_level-1]=value; +} + +static bool macroIsAccessible(Define *def) +{ + //printf("macroIsAccessible(%s) input=%s def=%s\n", + // def->name.data(),g_inputFileDef?g_inputFileDef->name().data():"<none>", + // def->fileDef ? def->fileDef->name().data() : "<none>"); + if (def && def->isPredefined) // predefined macro -> globally accessible + { + //printf("%s: predefined macro %s\n",g_inputFileDef->name().data(),def->name.data()); + return TRUE; + } + if (def && def->fileDef==g_inputFileDef) + { + //printf("%s: macro %s defined in this file at line %d now at %d\n", + // g_inputFileDef->name().data(),def->name.data(),def->lineNr,g_yyLineNr); + return def->lineNr<=g_yyLineNr; + } + if (g_inputFileDef && def && def->fileDef) // check if g_inputFileDef actually includes def->fileDef + { + QDict<FileDef> includedFiles(257); + bool b = g_inputFileDef->includes(def->fileDef,&includedFiles); + //printf("%s: Checking for accessibility of define '%s' (defined in %s): result=%d\n", + // g_inputFileDef->name().data(),def->name.data(),def->fileDef->name().data(),b); + return b; + } + //printf("not accessible!\n"); + return FALSE; +} + +static Define *isDefined(const char *name) +{ + Define *def=0; + if (name) + { + def=g_globalDefineDict->find(name); + //if ((def=fileDefineCache->findDefine(g_yyFileName,name)) && !def->undef) + // return def; + if (def && def->undef) def=0; + if (def && !macroIsAccessible(def)) def=0; + } + return def; +} + + +static QDict<void> g_allIncludes(10009); + +static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyIncluded) +{ + alreadyIncluded = FALSE; + FileState *fs = 0; + //printf("checkAndOpenFile(%s)\n",fileName.data()); + QFileInfo fi(fileName); + if (fi.exists() && fi.isFile()) + { + static QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS"); + if (patternMatch(fi,&exclPatterns)) return 0; + + QCString absName = convertToQCString(fi.absFilePath()); + + // global guard + if (g_curlyCount==0) // not #include inside { ... } + { + if (g_allIncludes.find(absName)!=0) + { + alreadyIncluded = TRUE; + //printf(" already included 1\n"); + return 0; // already done + } + g_allIncludes.insert(absName,(void *)0x8); + } + // check include stack for absName + + QStack<FileState> tmpStack; + g_includeStack.setAutoDelete(FALSE); + while ((fs=g_includeStack.pop())) + { + if (fs->fileName==absName) alreadyIncluded=TRUE; + tmpStack.push(fs); + } + while ((fs=tmpStack.pop())) + { + g_includeStack.push(fs); + } + g_includeStack.setAutoDelete(TRUE); + + if (alreadyIncluded) + { + //printf(" already included 2\n"); + return 0; + } + //printf("#include %s\n",absName.data()); + + fs = new FileState(fi.size()+4096); + alreadyIncluded = FALSE; + if (!readInputFile(absName,fs->fileBuf)) + { // error + //printf(" error reading\n"); + delete fs; + fs=0; + } + else + { + fs->oldFileBuf = g_inputBuf; + fs->oldFileBufPos = g_inputBufPos; + } + } + return fs; +} + +static FileState *findFile(const char *fileName,bool localInclude,bool &alreadyIncluded) +{ + //printf("** findFile(%s,%d) g_yyFileName=%s\n",fileName,localInclude,g_yyFileName.data()); + if (localInclude && !g_yyFileName.isEmpty()) + { + QFileInfo fi(g_yyFileName); + if (fi.exists()) + { + QCString absName = QCString(fi.dirPath(TRUE).data())+"/"+fileName; + FileState *fs = checkAndOpenFile(absName,alreadyIncluded); + if (fs) + { + setFileName(absName); + g_yyLineNr=1; + return fs; + } + else if (alreadyIncluded) + { + return 0; + } + } + } + if (g_pathList==0) + { + return 0; + } + char *s=g_pathList->first(); + while (s) + { + QCString absName = (QCString)s+"/"+fileName; + //printf(" Looking for %s in %s\n",fileName,s); + FileState *fs = checkAndOpenFile(absName,alreadyIncluded); + if (fs) + { + setFileName(absName); + g_yyLineNr=1; + //printf(" -> found it\n"); + return fs; + } + else if (alreadyIncluded) + { + return 0; + } + + s=g_pathList->next(); + } + return 0; +} + +static QCString extractTrailingComment(const char *s) +{ + if (s==0) return ""; + int i=strlen(s)-1; + while (i>=0) + { + char c=s[i]; + switch (c) + { + case '/': + { + i--; + if (i>=0 && s[i]=='*') // end of a comment block + { + i--; + while (i>0 && !(s[i-1]=='/' && s[i]=='*')) i--; + if (i==0) return s; else return &s[i-1]; + } + else + { + return ""; + } + } + break; + // whitespace or line-continuation + case ' ': + case '\t': + case '\r': + case '\n': + case '\\': + break; + default: + return ""; + } + i--; + } + return ""; +} + +static int getNextChar(const QCString &expr,QCString *rest,uint &pos); +static int getCurrentChar(const QCString &expr,QCString *rest,uint pos); +static void unputChar(const QCString &expr,QCString *rest,uint &pos,char c); +static void expandExpression(QCString &expr,QCString *rest,int pos); + +static QCString stringize(const QCString &s) +{ + QCString result; + uint i=0; + bool inString=FALSE; + bool inChar=FALSE; + char c,pc; + while (i<s.length()) + { + if (!inString && !inChar) + { + while (i<s.length() && !inString && !inChar) + { + c=s.at(i++); + if (c=='"') + { + result+="\\\""; + inString=TRUE; + } + else if (c=='\'') + { + result+=c; + inChar=TRUE; + } + else + { + result+=c; + } + } + } + else if (inChar) + { + while (i<s.length() && inChar) + { + c=s.at(i++); + if (c=='\'') + { + result+='\''; + inChar=FALSE; + } + else if (c=='\\') + { + result+="\\\\"; + } + else + { + result+=c; + } + } + } + else + { + pc=0; + while (i<s.length() && inString) + { + char c=s.at(i++); + if (c=='"') + { + result+="\\\""; + inString= pc=='\\'; + } + else if (c=='\\') + result+="\\\\"; + else + result+=c; + pc=c; + } + } + } + //printf("stringize `%s'->`%s'\n",s.data(),result.data()); + return result; +} + +/*! Execute all ## operators in expr. + * If the macro name before or after the operator contains a no-rescan + * marker (@-) then this is removed (before the concatenated macro name + * may be expanded again. + */ +static void processConcatOperators(QCString &expr) +{ + //printf("processConcatOperators: in=`%s'\n",expr.data()); + QRegExp r("[ \\t\\n]*##[ \\t\\n]*"); + int l,n,i=0; + if (expr.isEmpty()) return; + while ((n=r.match(expr,i,&l))!=-1) + { + //printf("Match: `%s'\n",expr.data()+i); + if (n+l+1<(int)expr.length() && expr.at(n+l)=='@' && expr.at(n+l+1)=='-') + { + // remove no-rescan marker after ID + l+=2; + } + //printf("found `%s'\n",expr.mid(n,l).data()); + // remove the ## operator and the surrounding whitespace + expr=expr.left(n)+expr.right(expr.length()-n-l); + int k=n-1; + while (k>=0 && isId(expr.at(k))) k--; + if (k>0 && expr.at(k)=='-' && expr.at(k-1)=='@') + { + // remove no-rescan marker before ID + expr=expr.left(k-1)+expr.right(expr.length()-k-1); + n-=2; + } + i=n; + } + //printf("processConcatOperators: out=`%s'\n",expr.data()); +} + +static void yyunput (int c,char *buf_ptr ); +static void returnCharToStream(char c) +{ + unput(c); +} + +static inline void addTillEndOfString(const QCString &expr,QCString *rest, + uint &pos,char term,QCString &arg) +{ + int cc; + while ((cc=getNextChar(expr,rest,pos))!=EOF) + { + if (cc=='\\') arg+=(char)cc,cc=getNextChar(expr,rest,pos); + else if (cc==term) return; + arg+=(char)cc; + } +} + +/*! replaces the function macro \a def whose argument list starts at + * \a pos in expression \a expr. + * Notice that this routine may scan beyond the \a expr string if needed. + * In that case the characters will be read from the input file. + * The replacement string will be returned in \a result and the + * length of the (unexpanded) argument list is stored in \a len. + */ +static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int &len,const Define *def,QCString &result) +{ + //printf("replaceFunctionMacro(expr=%s,rest=%s,pos=%d,def=%s) level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),g_level); + uint j=pos; + len=0; + result.resize(0); + int cc; + while ((cc=getCurrentChar(expr,rest,j))!=EOF && isspace(cc)) + { + len++; + getNextChar(expr,rest,j); + } + if (cc!='(') + { + unputChar(expr,rest,j,' '); + return FALSE; + } + getNextChar(expr,rest,j); // eat the `(' character + + QDict<QCString> argTable; // list of arguments + argTable.setAutoDelete(TRUE); + QCString arg; + int argCount=0; + bool done=FALSE; + + // PHASE 1: read the macro arguments + if (def->nargs==0) + { + while ((cc=getNextChar(expr,rest,j))!=EOF) + { + char c = (char)cc; + if (c==')') break; + } + } + else + { + while (!done && (argCount<def->nargs || def->varArgs) && + ((cc=getNextChar(expr,rest,j))!=EOF) + ) + { + char c=(char)cc; + if (c=='(') // argument is a function => search for matching ) + { + int level=1; + arg+=c; + //char term='\0'; + while ((cc=getNextChar(expr,rest,j))!=EOF) + { + char c=(char)cc; + //printf("processing %c: term=%c (%d)\n",c,term,term); + if (c=='\'' || c=='\"') // skip ('s and )'s inside strings + { + arg+=c; + addTillEndOfString(expr,rest,j,c,arg); + } + if (c==')') + { + level--; + arg+=c; + if (level==0) break; + } + else if (c=='(') + { + level++; + arg+=c; + } + else + arg+=c; + } + } + else if (c==')' || c==',') // last or next argument found + { + if (c==',' && argCount==def->nargs-1 && def->varArgs) + { + arg=arg.stripWhiteSpace(); + arg+=','; + } + else + { + QCString argKey; + argKey.sprintf("@%d",argCount++); // key name + arg=arg.stripWhiteSpace(); + // add argument to the lookup table + argTable.insert(argKey, new QCString(arg)); + arg.resize(0); + if (c==')') // end of the argument list + { + done=TRUE; + } + } + } + else if (c=='\"') // append literal strings + { + arg+=c; + bool found=FALSE; + while (!found && (cc=getNextChar(expr,rest,j))!=EOF) + { + found = cc=='"'; + if (cc=='\\') + { + c=(char)cc; + arg+=c; + if ((cc=getNextChar(expr,rest,j))==EOF) break; + } + c=(char)cc; + arg+=c; + } + } + else if (c=='\'') // append literal characters + { + arg+=c; + bool found=FALSE; + while (!found && (cc=getNextChar(expr,rest,j))!=EOF) + { + found = cc=='\''; + if (cc=='\\') + { + c=(char)cc; + arg+=c; + if ((cc=getNextChar(expr,rest,j))==EOF) break; + } + c=(char)cc; + arg+=c; + } + } + else // append other characters + { + arg+=c; + } + } + } + + // PHASE 2: apply the macro function + if (argCount==def->nargs || + (argCount>def->nargs && def->varArgs)) // matching parameters lists + { + uint k=0; + // substitution of all formal arguments + QCString resExpr; + const QCString d=def->definition.stripWhiteSpace(); + //printf("Macro definition: %s\n",d.data()); + bool inString=FALSE; + while (k<d.length()) + { + if (d.at(k)=='@') // maybe a marker, otherwise an escaped @ + { + if (d.at(k+1)=='@') // escaped @ => copy it (is unescaped later) + { + k+=2; + resExpr+="@@"; // we unescape these later + } + else if (d.at(k+1)=='-') // no-rescan marker + { + k+=2; + resExpr+="@-"; + } + else // argument marker => read the argument number + { + QCString key="@"; + QCString *subst=0; + bool hash=FALSE; + int l=k-1; + // search for ## backward + if (l>=0 && d.at(l)=='"') l--; + while (l>=0 && d.at(l)==' ') l--; + if (l>0 && d.at(l)=='#' && d.at(l-1)=='#') hash=TRUE; + k++; + // scan the number + while (k<d.length() && d.at(k)>='0' && d.at(k)<='9') key+=d.at(k++); + if (!hash) + { + // search for ## forward + l=k; + if (l<(int)d.length() && d.at(l)=='"') l++; + while (l<(int)d.length() && d.at(l)==' ') l++; + if (l<(int)d.length()-1 && d.at(l)=='#' && d.at(l+1)=='#') hash=TRUE; + } + //printf("request key %s result %s\n",key.data(),argTable[key]->data()); + if (key.length()>1 && (subst=argTable[key])) + { + QCString substArg=*subst; + //printf("substArg=`%s'\n",substArg.data()); + // only if no ## operator is before or after the argument + // marker we do macro expansion. + if (!hash) expandExpression(substArg,0,0); + if (inString) + { + //printf("`%s'=stringize(`%s')\n",stringize(*subst).data(),subst->data()); + + // if the marker is inside a string (because a # was put + // before the macro name) we must escape " and \ characters + resExpr+=stringize(substArg); + } + else + { + if (hash && substArg.isEmpty()) + { + resExpr+="@E"; // empty argument will be remove later on + } + else if (g_nospaces) + { + resExpr+=substArg; + } + else + { + resExpr+=" "+substArg+" "; + } + } + } + } + } + else // no marker, just copy + { + if (!inString && d.at(k)=='\"') + { + inString=TRUE; // entering a literal string + } + else if (inString && d.at(k)=='\"' && (d.at(k-1)!='\\' || d.at(k-2)=='\\')) + { + inString=FALSE; // leaving a literal string + } + resExpr+=d.at(k++); + } + } + len=j-pos; + result=resExpr; + //printf("result after substitution `%s' expr=`%s'\n", + // result.data(),expr.mid(pos,len).data()); + return TRUE; + } + return FALSE; +} + + +/*! returns the next identifier in string \a expr by starting at position \a p. + * The position of the identifier is returned (or -1 if nothing is found) + * and \a l is its length. Any quoted strings are skipping during the search. + */ +static int getNextId(const QCString &expr,int p,int *l) +{ + int n; + while (p<(int)expr.length()) + { + char c=expr.at(p++); + if (isdigit(c)) // skip number + { + while (p<(int)expr.length() && isId(expr.at(p))) p++; + } + else if (isalpha(c) || c=='_') // read id + { + n=p-1; + while (p<(int)expr.length() && isId(expr.at(p))) p++; + *l=p-n; + return n; + } + else if (c=='"') // skip string + { + char ppc=0,pc=c; + if (p<(int)expr.length()) c=expr.at(p); + while (p<(int)expr.length() && (c!='"' || (pc=='\\' && ppc!='\\'))) + // continue as long as no " is found, but ignoring \", but not \\" + { + ppc=pc; + pc=c; + c=expr.at(p); + p++; + } + if (p<(int)expr.length()) ++p; // skip closing quote + } + else if (c=='/') // skip C Comment + { + char pc=c; + if (p<(int)expr.length()) + { + c=expr.at(++p); + if (c=='*') // Start of C comment + { + while (p<(int)expr.length() && !(pc=='*' && c=='/')) + { + pc=c; + c=expr.at(++p); + } + p++; + } + } + } + } + return -1; +} + +/*! preforms recursive macro expansion on the string \a expr + * starting at position \a pos. + * May read additional characters from the input while re-scanning! + * If \a expandAll is \c TRUE then all macros in the expression are + * expanded, otherwise only the first is expanded. + */ +static void expandExpression(QCString &expr,QCString *rest,int pos) +{ + //printf("expandExpression(%s,%s)\n",expr.data(),rest ? rest->data() : 0); + QCString macroName; + QCString expMacro; + bool definedTest=FALSE; + int i=pos,l,p,len; + while ((p=getNextId(expr,i,&l))!=-1) // search for an macro name + { + bool replaced=FALSE; + macroName=expr.mid(p,l); + if (p<2 || !(expr.at(p-2)=='@' && expr.at(p-1)=='-')) // no-rescan marker? + { + if (g_expandedDict->find(macroName)==0) // expand macro + { + Define *def=isDefined(macroName); + if (definedTest) // macro name was found after defined + { + if (def) expMacro = " 1 "; else expMacro = " 0 "; + replaced=TRUE; + len=l; + definedTest=FALSE; + } + else if (def && def->nargs==-1) // simple macro + { + // substitute the definition of the macro + //printf("macro `%s'->`%s'\n",macroName.data(),def->definition.data()); + if (g_nospaces) + { + expMacro=def->definition.stripWhiteSpace(); + } + else + { + expMacro=" "+def->definition.stripWhiteSpace()+" "; + } + //expMacro=def->definition.stripWhiteSpace(); + replaced=TRUE; + len=l; + //printf("simple macro expansion=`%s'->`%s'\n",macroName.data(),expMacro.data()); + } + else if (def && def->nargs>=0) // function macro + { + replaced=replaceFunctionMacro(expr,rest,p+l,len,def,expMacro); + len+=l; + } + else if (macroName=="defined") + { + //printf("found defined inside macro definition '%s'\n",expr.right(expr.length()-p).data()); + definedTest=TRUE; + } + + if (replaced) // expand the macro and rescan the expression + { + + //printf("replacing `%s'->`%s'\n",expr.mid(p,len).data(),expMacro.data()); + QCString resultExpr=expMacro; + QCString restExpr=expr.right(expr.length()-len-p); + processConcatOperators(resultExpr); + if (def && !def->nonRecursive) + { + g_expandedDict->insert(macroName,def); + expandExpression(resultExpr,&restExpr,0); + g_expandedDict->remove(macroName); + } + expr=expr.left(p)+resultExpr+restExpr; + i=p; + //printf("new expression: %s\n",expr.data()); + } + else // move to the next macro name + { + //printf("moving to the next macro old=%d new=%d\n",i,p+l); + i=p+l; + } + } + else // move to the next macro name + { + expr=expr.left(p)+"@-"+expr.right(expr.length()-p); + //printf("macro already expanded, moving to the next macro expr=%s\n",expr.data()); + i=p+l+2; + //i=p+l; + } + } + else // no re-scan marker found, skip the macro name + { + //printf("skipping marked macro\n"); + i=p+l; + } + } +} + +/*! replaces all occurrences of @@@@ in \a s by @@ + * and removes all occurrences of @@E. + * All identifiers found are replaced by 0L + */ +QCString removeIdsAndMarkers(const char *s) +{ + //printf("removeIdsAndMarkers(%s)\n",s); + const char *p=s; + char c; + bool inNum=FALSE; + QCString result; + if (p) + { + while ((c=*p)) + { + if (c=='@') // replace @@ with @ and remove @E + { + if (*(p+1)=='@') + { + result+=c; + } + else if (*(p+1)=='E') + { + // skip + } + p+=2; + } + else if (isdigit(c)) // number + { + result+=c; + p++; + inNum=TRUE; + } + else if (c=='d' && !inNum) // identifier starting with a `d' + { + if (strncmp(p,"defined ",8)==0 || strncmp(p,"defined(",8)==0) + // defined keyword + { + p+=7; // skip defined + } + else + { + result+="0L"; + p++; + while ((c=*p) && isId(c)) p++; + } + } + else if ((isalpha(c) || c=='_') && !inNum) // replace identifier with 0L + { + result+="0L"; + p++; + while ((c=*p) && isId(c)) p++; + if (*p=='(') // undefined function macro + { + p++; + int count=1; + while ((c=*p++)) + { + if (c=='(') count++; + else if (c==')') + { + count--; + if (count==0) break; + } + else if (c=='/') + { + char pc=c; + c=*++p; + if (c=='*') // start of C comment + { + while (*p && !(pc=='*' && c=='/')) // search end of comment + { + pc=c; + c=*++p; + } + p++; + } + } + } + } + } + else if (c=='/') // skip C comments + { + char pc=c; + c=*++p; + if (c=='*') // start of C comment + { + while (*p && !(pc=='*' && c=='/')) // search end of comment + { + pc=c; + c=*++p; + } + p++; + } + else // oops, not comment but division + { + result+=pc; + goto nextChar; + } + } + else + { +nextChar: + result+=c; + char lc=tolower(c); + if (!isId(lc) && lc!='.' /*&& lc!='-' && lc!='+'*/) inNum=FALSE; + p++; + } + } + } + //printf("removeIdsAndMarkers(%s)=%s\n",s,result.data()); + return result; +} + +/*! replaces all occurrences of @@ in \a s by @ + * \par assumption: + * \a s only contains pairs of @@'s + */ +QCString removeMarkers(const char *s) +{ + const char *p=s; + char c; + QCString result; + if (p) + { + while ((c=*p)) + { + switch(c) + { + case '@': // replace @@ with @ + { + if (*(p+1)=='@') + { + result+=c; + } + p+=2; + } + break; + case '/': // skip C comments + { + result+=c; + char pc=c; + c=*++p; + if (c=='*') // start of C comment + { + while (*p && !(pc=='*' && c=='/')) // search end of comment + { + if (*p=='@' && *(p+1)=='@') + result+=c,p++; + else + result+=c; + pc=c; + c=*++p; + } + if (*p) + { + result+=c; + p++; + } + } + } + break; + case '"': // skip string literals + { + result+=c; + char pc=c; + c=*++p; + while (*p && (c!='"' || pc=='\\')) // no end quote + { + result+=c; + c=*++p; + } + } + break; + case '\'': // skip char literals + { + result+=c; + char pc=c; + c=*++p; + while (*p && (c!='\'' || pc=='\\')) // no end quote + { + result+=c; + c=*++p; + } + } + break; + default: + { + result+=c; + p++; + } + break; + } + } + } + //printf("RemoveMarkers(%s)=%s\n",s,result.data()); + return result; +} + +/*! compute the value of the expression in string \a expr. + * If needed the function may read additional characters from the input. + */ + +bool computeExpression(const QCString &expr) +{ + QCString e=expr; + expandExpression(e,0,0); + //printf("after expansion `%s'\n",e.data()); + e = removeIdsAndMarkers(e); + if (e.isEmpty()) return FALSE; + //printf("parsing `%s'\n",e.data()); + return parseCppExpression(g_yyFileName,g_yyLineNr,e); +} + +/*! expands the macro definition in \a name + * If needed the function may read additional characters from the input + */ + +QCString expandMacro(const QCString &name) +{ + QCString n=name; + expandExpression(n,0,0); + n=removeMarkers(n); + //printf("expandMacro `%s'->`%s'\n",name.data(),n.data()); + return n; +} + +Define *newDefine() +{ + Define *def=new Define; + def->name = g_defName; + def->definition = g_defText.stripWhiteSpace(); + def->nargs = g_defArgs; + def->fileName = g_yyFileName; + def->fileDef = g_yyFileDef; + def->lineNr = g_yyLineNr; + def->varArgs = g_defVarArgs; + //printf("newDefine: %s->%s\n",def->name.data(), + // def->fileDef ? def->fileDef->name().data() : "<none>"); + //printf("newDefine: `%s'->`%s'\n",def->name.data(),def->definition.data()); + if (!def->name.isEmpty() && Doxygen::expandAsDefinedDict[def->name]) + { + def->isPredefined=TRUE; + } + return def; +} + +void addDefine() +{ + if (g_skip) return; // do not add this define as it is inside a + // conditional section (cond command) that is disabled. + if (!Doxygen::gatherDefines) return; + + //printf("addDefine %s %s\n",g_defName.data(),g_defArgsStr.data()); + //ArgumentList *al = new ArgumentList; + //stringToArgumentList(g_defArgsStr,al); + MemberDef *md=new MemberDef( + g_yyFileName,g_yyLineNr, + "#define",g_defName,g_defArgsStr,0, + Public,Normal,FALSE,Member,MemberDef::Define,0,0); + if (!g_defArgsStr.isEmpty()) + { + ArgumentList *argList = new ArgumentList; + //printf("addDefine() g_defName=`%s' g_defArgsStr=`%s'\n",g_defName.data(),g_defArgsStr.data()); + stringToArgumentList(g_defArgsStr,argList); + md->setArgumentList(argList); + } + //printf("Setting initializer for `%s' to `%s'\n",g_defName.data(),g_defText.data()); + int l=g_defLitText.find('\n'); + if (l>0 && g_defLitText.left(l).stripWhiteSpace()=="\\") + { + // strip first line if it only contains a slash + g_defLitText = g_defLitText.right(g_defLitText.length()-l-1); + } + else if (l>0) + { + // align the items on the first line with the items on the second line + int k=l+1; + const char *p=g_defLitText.data()+k; + char c; + while ((c=*p++) && (c==' ' || c=='\t')) k++; + g_defLitText=g_defLitText.mid(l+1,k-l-1)+g_defLitText.stripWhiteSpace(); + } + md->setInitializer(g_defLitText.stripWhiteSpace()); + + //printf("pre.l: md->setFileDef(%p)\n",g_inputFileDef); + md->setFileDef(g_inputFileDef); + md->setDefinition("#define "+g_defName); + + MemberName *mn=Doxygen::functionNameSDict->find(g_defName); + if (mn==0) + { + mn = new MemberName(g_defName); + Doxygen::functionNameSDict->append(g_defName,mn); + } + mn->append(md); + if (g_yyFileDef) + { + g_yyFileDef->insertMember(md); + } + + //Define *d; + //if ((d=defineDict[g_defName])==0) defineDict.insert(g_defName,newDefine()); +} + +static inline void outputChar(char c) +{ + if (g_includeStack.isEmpty() || g_curlyCount>0) g_outputBuf->addChar(c); +} + +static inline void outputArray(const char *a,int len) +{ + if (g_includeStack.isEmpty() || g_curlyCount>0) g_outputBuf->addArray(a,len); +} + +static void readIncludeFile(const QCString &inc) +{ + if (!Config_getBool("SEARCH_INCLUDES")) return; // do not read include files + uint i=0; + + // find the start of the include file name + while (i<inc.length() && + (inc.at(i)==' ' || inc.at(i)=='"' || inc.at(i)=='<') + ) i++; + uint s=i; + + // was it a local include? + bool localInclude = s>0 && inc.at(s-1)=='"'; + + // find the end of the include file name + while (i<inc.length() && inc.at(i)!='"' && inc.at(i)!='>') i++; + + if (s<inc.length() && i>s) // valid include file name found + { + // extract include path+name + QCString incFileName=inc.mid(s,i-s).stripWhiteSpace(); + + QCString dosExt = incFileName.right(4); + if (dosExt==".exe" || dosExt==".dll" || dosExt==".tbl") + { + // skip imported binary files (e.g. M$ type libraries) + return; + } + + QCString oldFileName = g_yyFileName; + FileDef *oldFileDef = g_yyFileDef; + int oldLineNr = g_yyLineNr; + //printf("Searching for `%s'\n",incFileName.data()); + + // findFile will overwrite g_yyFileDef if found + FileState *fs; + bool alreadyIncluded = FALSE; + //printf("calling findFile(%s)\n",incFileName.data()); + if ((fs=findFile(incFileName,localInclude,alreadyIncluded))) // see if the include file can be found + { + //printf("Found include file!\n"); + if (Debug::isFlagSet(Debug::Preprocessor)) + { + for (i=0;i<g_includeStack.count();i++) msg(" "); + //msg("#include %s: parsing...\n",incFileName.data()); + } + if (oldFileDef) + { + // add include dependency to the file in which the #include was found + bool ambig; + // change to local name for bug 641336 + FileDef *incFd = findFileDef(Doxygen::inputNameDict,incFileName,ambig); + oldFileDef->addIncludeDependency(ambig ? 0 : incFd,incFileName,localInclude,g_isImported); + // add included by dependency + if (g_yyFileDef) + { + //printf("Adding include dependency %s->%s\n",oldFileDef->name().data(),incFileName.data()); + g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->docName(),localInclude,g_isImported); + } + } + fs->bufState = YY_CURRENT_BUFFER; + fs->lineNr = oldLineNr; + fs->fileName = oldFileName; + // push the state on the stack + g_includeStack.push(fs); + // set the scanner to the include file + + // Deal with file changes due to + // #include's within { .. } blocks + QCString lineStr(g_yyFileName.length()+20); + lineStr.sprintf("# 1 \"%s\" 1\n",g_yyFileName.data()); + outputArray(lineStr.data(),lineStr.length()); + + //fprintf(stderr,"Switching to include file %s\n",incFileName.data()); + g_expectGuard=TRUE; + g_inputBuf = &fs->fileBuf; + g_inputBufPos=0; + preYY_switch_to_buffer(preYY_create_buffer(0,YY_BUF_SIZE)); + } + else + { + //printf(" calling findFile(%s) alreadyInc=%d\n",incFileName.data(),alreadyIncluded); + if (oldFileDef) + { + bool ambig; + //QCString absPath = incFileName; + //if (QDir::isRelativePath(incFileName)) + //{ + // absPath = QDir::cleanDirPath(oldFileDef->getPath()+"/"+incFileName); + // //printf("%s + %s -> resolved path %s\n",oldFileDef->getPath().data(),incFileName.data(),absPath.data()); + //} + + // change to local name for bug 641336 + FileDef *fd = findFileDef(Doxygen::inputNameDict,incFileName,ambig); + //printf("%s::findFileDef(%s)=%p\n",oldFileDef->name().data(),incFileName.data(),fd); + // add include dependency to the file in which the #include was found + oldFileDef->addIncludeDependency(ambig ? 0 : fd,incFileName,localInclude,g_isImported); + // add included by dependency + if (fd) + { + //printf("Adding include dependency (2) %s->%s ambig=%d\n",oldFileDef->name().data(),fd->name().data(),ambig); + fd->addIncludedByDependency(oldFileDef,oldFileDef->docName(),localInclude,g_isImported); + } + } + if (Debug::isFlagSet(Debug::Preprocessor)) + { + msg("#include %s: not found or already included! skipping...\n",incFileName.data()); + //printf("error: include file %s not found\n",preYYtext); + } + if (g_curlyCount>0 && !alreadyIncluded) // failed to find #include inside { ... } + { + warn(g_yyFileName,g_yyLineNr,"Warning: include file %s not found, perhaps you forgot to add its directory to INCLUDE_PATH?",incFileName.data()); + } + } + } +} + +/* ----------------------------------------------------------------- */ + +static void startCondSection(const char *sectId) +{ + g_condStack.push(new bool(g_skip)); + if (Config_getList("ENABLED_SECTIONS").find(sectId)==-1) + { + g_skip=TRUE; + } +} + +static void endCondSection() +{ + if (g_condStack.isEmpty()) + { + g_skip=FALSE; + } + else + { + bool *ctx = g_condStack.pop(); + g_skip=*ctx; + } +} + +static void forceEndCondSection() +{ + while (!g_condStack.isEmpty()) + { + g_condStack.pop(); + } + g_skip=FALSE; +} + +static QCString escapeAt(const char *text) +{ + QCString result; + if (text) + { + char c; + const char *p=text; + while ((c=*p++)) + { + if (c=='@') result+="@@"; else result+=c; + } + } + return result; +} + +static char resolveTrigraph(char c) +{ + switch (c) + { + case '=': return '#'; + case '/': return '\\'; + case '\'': return '^'; + case '(': return '['; + case ')': return ']'; + case '!': return '|'; + case '<': return '{'; + case '>': return '}'; + case '-': return '~'; + } + return '?'; +} + +/* ----------------------------------------------------------------- */ + +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); + +static int yyread(char *buf,int max_size) +{ + int bytesInBuf = g_inputBuf->curPos()-g_inputBufPos; + int bytesToCopy = QMIN(max_size,bytesInBuf); + memcpy(buf,g_inputBuf->data()+g_inputBufPos,bytesToCopy); + g_inputBufPos+=bytesToCopy; + return bytesToCopy; +} + +/* ----------------------------------------------------------------- */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#line 3680 "<stdout>" + +#define INITIAL 0 +#define Start 1 +#define Command 2 +#define SkipCommand 3 +#define SkipLine 4 +#define SkipString 5 +#define CopyLine 6 +#define CopyString 7 +#define Include 8 +#define IncludeID 9 +#define EndImport 10 +#define DefName 11 +#define DefineArg 12 +#define DefineText 13 +#define SkipCPPBlock 14 +#define Ifdef 15 +#define Ifndef 16 +#define SkipCComment 17 +#define CopyCComment 18 +#define SkipVerbatim 19 +#define SkipCPPComment 20 +#define RemoveCComment 21 +#define RemoveCPPComment 22 +#define Guard 23 +#define DefinedExpr1 24 +#define DefinedExpr2 25 +#define SkipDoubleQuote 26 +#define SkipSingleQuote 27 +#define UndefName 28 +#define IgnoreLine 29 +#define FindDefineArgs 30 +#define ReadString 31 +#define CondLine 32 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include <unistd.h> +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int preYYlex_destroy (void ); + +int preYYget_debug (void ); + +void preYYset_debug (int debug_flag ); + +YY_EXTRA_TYPE preYYget_extra (void ); + +void preYYset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *preYYget_in (void ); + +void preYYset_in (FILE * in_str ); + +FILE *preYYget_out (void ); + +void preYYset_out (FILE * out_str ); + +yy_size_t preYYget_leng (void ); + +char *preYYget_text (void ); + +int preYYget_lineno (void ); + +void preYYset_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int preYYwrap (void ); +#else +extern int preYYwrap (void ); +#endif +#endif + + static void yyunput (int c,char *buf_ptr ); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 262144 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO fwrite( preYYtext, preYYleng, 1, preYYout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( preYYin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( preYYin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, preYYin))==0 && ferror(preYYin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(preYYin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int preYYlex (void); + +#define YY_DECL int preYYlex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after preYYtext and preYYleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( preYYleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (preYYtext[preYYleng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 1458 "pre.l" + + +#line 3900 "<stdout>" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + /* Create the reject buffer large enough to save one state per allowed character. */ + if ( ! (yy_state_buf) ) + (yy_state_buf) = (yy_state_type *)preYYalloc(YY_STATE_BUF_SIZE ); + if ( ! (yy_state_buf) ) + YY_FATAL_ERROR( "out of dynamic memory in preYYlex()" ); + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! preYYin ) + preYYin = stdin; + + if ( ! preYYout ) + preYYout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + preYYensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + preYY_create_buffer(preYYin,YY_BUF_SIZE ); + } + + preYY_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of preYYtext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1157 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *(yy_state_ptr)++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 5434 ); + +yy_find_action: + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; +goto find_rule; /* Shut up GCC warning -Wall */ +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[(yy_lp)]; + if ( yy_act & YY_TRAILING_HEAD_MASK || + (yy_looking_for_trail_begin) ) + { + if ( yy_act == (yy_looking_for_trail_begin) ) + { + (yy_looking_for_trail_begin) = 0; + yy_act &= ~YY_TRAILING_HEAD_MASK; + break; + } + } + else if ( yy_act & YY_TRAILING_MASK ) + { + (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK; + (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK; + (yy_full_match) = yy_cp; + (yy_full_state) = (yy_state_ptr); + (yy_full_lp) = (yy_lp); + } + else + { + (yy_full_match) = yy_cp; + (yy_full_state) = (yy_state_ptr); + (yy_full_lp) = (yy_lp); + break; + } + ++(yy_lp); + goto find_rule; + } + --yy_cp; + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +#line 1460 "pre.l" + + YY_BREAK +case 2: +YY_RULE_SETUP +#line 1461 "pre.l" + + YY_BREAK +case 3: +YY_RULE_SETUP +#line 1462 "pre.l" + + YY_BREAK +case 4: +YY_RULE_SETUP +#line 1463 "pre.l" +{ // Trigraph + unput(resolveTrigraph(preYYtext[2])); + } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 1466 "pre.l" +{ BEGIN(Command); } + YY_BREAK +case 6: +/* rule 6 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1467 "pre.l" +{ + outputArray(preYYtext,preYYleng); + BEGIN(CopyLine); + } + YY_BREAK +case 7: +/* rule 7 can match eol */ +YY_RULE_SETUP +#line 1471 "pre.l" +{ // constructors? + int i; + for (i=preYYleng-1;i>=0;i--) + { + unput(preYYtext[i]); + } + BEGIN(CopyLine); + } + YY_BREAK +case 8: +/* rule 8 can match eol */ +#line 1480 "pre.l" +case 9: +/* rule 9 can match eol */ +YY_RULE_SETUP +#line 1480 "pre.l" +{ // function like macro + static bool skipFuncMacros = Config_getBool("SKIP_FUNCTION_MACROS"); + QCString name(preYYtext); + name=name.left(name.find('(')).stripWhiteSpace(); + + Define *def=0; + if (skipFuncMacros && + name!="Q_PROPERTY" && + !( + (g_includeStack.isEmpty() || g_curlyCount>0) && + g_macroExpansion && + (def=g_globalDefineDict->find(name)) && + macroIsAccessible(def) && + (!g_expandOnlyPredef || def->isPredefined) + ) + ) + { + outputChar('\n'); + g_yyLineNr++; + } + else // don't skip + { + int i; + for (i=preYYleng-1;i>=0;i--) + { + unput(preYYtext[i]); + } + BEGIN(CopyLine); + } + } + YY_BREAK +case 10: +/* rule 10 can match eol */ +YY_RULE_SETUP +#line 1510 "pre.l" +{ + QCString text=preYYtext; + g_yyLineNr+=text.contains('\n'); + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 1515 "pre.l" +{ // count brackets inside the main file + if (g_includeStack.isEmpty()) + { + g_curlyCount++; + } + outputChar(*preYYtext); + } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 1522 "pre.l" +{ // count brackets inside the main file + if (g_includeStack.isEmpty() && g_curlyCount>0) + { + g_curlyCount--; + } + outputChar(*preYYtext); + } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 1529 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 1532 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 1535 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 1538 "pre.l" +{ + outputChar(*preYYtext); + BEGIN( CopyString ); + } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 1542 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 1545 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 1548 "pre.l" +{ + outputChar(*preYYtext); + BEGIN( CopyLine ); + } + YY_BREAK +case 20: +/* rule 20 can match eol */ +YY_RULE_SETUP +#line 1552 "pre.l" +{ + g_expectGuard = FALSE; + Define *def=0; + //def=g_globalDefineDict->find(preYYtext); + //printf("Search for define %s found=%d g_includeStack.isEmpty()=%d " + // "g_curlyCount=%d g_macroExpansion=%d g_expandOnlyPredef=%d " + // "isPreDefined=%d\n",preYYtext,def ? 1 : 0, + // g_includeStack.isEmpty(),g_curlyCount,g_macroExpansion,g_expandOnlyPredef, + // def ? def->isPredefined : -1 + // ); + if ((g_includeStack.isEmpty() || g_curlyCount>0) && + g_macroExpansion && + (def=g_globalDefineDict->find(preYYtext)) && + (def->isPredefined || macroIsAccessible(def)) && + (!g_expandOnlyPredef || def->isPredefined) + ) + { + //printf("Found it! #args=%d\n",def->nargs); + g_roundCount=0; + g_defArgsStr=preYYtext; + if (def->nargs==-1) // no function macro + { + QCString result = def->isPredefined ? def->definition : expandMacro(g_defArgsStr); + outputArray(result,result.length()); + } + else // zero or more arguments + { + g_findDefArgContext = CopyLine; + BEGIN(FindDefineArgs); + } + } + else + { + outputArray(preYYtext,preYYleng); + } + } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 1588 "pre.l" +{ + Define *def=0; + if ((g_includeStack.isEmpty() || g_curlyCount>0) && + g_macroExpansion && + (def=g_globalDefineDict->find(preYYtext)) && + def->nargs==-1 && + (def->isPredefined || macroIsAccessible(def)) && + (!g_expandOnlyPredef || def->isPredefined) + ) + { + QCString result=def->isPredefined ? def->definition : expandMacro(preYYtext); + outputArray(result,result.length()); + } + else + { + outputArray(preYYtext,preYYleng); + } + } + YY_BREAK +case 22: +/* rule 22 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1606 "pre.l" +{ // strip line continuation characters + } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 1608 "pre.l" +{ + outputChar(*preYYtext); + } + YY_BREAK +case 24: +/* rule 24 can match eol */ +YY_RULE_SETUP +#line 1611 "pre.l" +{ + outputChar('\n'); + BEGIN(Start); + g_yyLineNr++; + } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 1616 "pre.l" +{ + g_defArgsStr+='('; + g_roundCount++; + } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 1620 "pre.l" +{ + g_defArgsStr+=')'; + g_roundCount--; + if (g_roundCount==0) + { + QCString result=expandMacro(g_defArgsStr); + //printf("g_defArgsStr=`%s'->`%s'\n",g_defArgsStr.data(),result.data()); + if (g_findDefArgContext==CopyLine) + { + outputArray(result,result.length()); + BEGIN(g_findDefArgContext); + } + else // g_findDefArgContext==IncludeID + { + readIncludeFile(result); + g_nospaces=FALSE; + BEGIN(Start); + } + } + } + YY_BREAK +/* +<FindDefineArgs>")"{B}*"(" { + g_defArgsStr+=preYYtext; + } + */ +case 27: +YY_RULE_SETUP +#line 1645 "pre.l" +{ + g_defArgsStr+=preYYtext; + } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 1648 "pre.l" +{ + g_defArgsStr+=*preYYtext; + BEGIN(ReadString); + } + YY_BREAK +case 29: +/* rule 29 can match eol */ +YY_RULE_SETUP +#line 1652 "pre.l" +{ + g_yyLineNr++; + outputChar('\n'); + } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 1656 "pre.l" +{ + g_defArgsStr+="@@"; + } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 1659 "pre.l" +{ + g_defArgsStr+=*preYYtext; + } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 1662 "pre.l" +{ + g_defArgsStr+=*preYYtext; + BEGIN(FindDefineArgs); + } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 1666 "pre.l" +{ + g_defArgsStr+=preYYtext; + } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 1669 "pre.l" +{ + g_defArgsStr+=preYYtext; + } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 1672 "pre.l" +{ + g_defArgsStr+=*preYYtext; + } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 1675 "pre.l" +{ + g_isImported = preYYtext[1]=='m'; + if (g_macroExpansion) + BEGIN(IncludeID); + } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 1680 "pre.l" +{ + g_isImported = preYYtext[1]=='m'; + char c[2]; + c[0]=preYYtext[preYYleng-1];c[1]='\0'; + g_incName=c; + BEGIN(Include); + } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 1687 "pre.l" +{ + //printf("!!!DefName\n"); + BEGIN(DefName); + } + YY_BREAK +case 39: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 5; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1691 "pre.l" +{ + incrLevel(); + g_guardExpr.resize(0); + BEGIN(DefinedExpr2); + } + YY_BREAK +case 40: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 5; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1696 "pre.l" +{ + //printf("Pre.l: ifdef\n"); + incrLevel(); + g_guardExpr.resize(0); + BEGIN(DefinedExpr1); + } + YY_BREAK +case 41: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 6; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1702 "pre.l" +{ + incrLevel(); + g_guardExpr="! "; + BEGIN(DefinedExpr2); + } + YY_BREAK +case 42: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 6; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1707 "pre.l" +{ + incrLevel(); + g_guardExpr="! "; + BEGIN(DefinedExpr1); + } + YY_BREAK +case 43: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 2; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1712 "pre.l" +{ + incrLevel(); + g_guardExpr.resize(0); + BEGIN(Guard); + } + YY_BREAK +case 44: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1717 "pre.l" +{ + if (!otherCaseDone()) + { + g_guardExpr.resize(0); + BEGIN(Guard); + } + else + { + g_ifcount=0; + BEGIN(SkipCPPBlock); + } + } + YY_BREAK +case 45: +/* rule 45 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 4; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1729 "pre.l" +{ + //printf("else g_levelGuard[%d]=%d\n",g_level-1,g_levelGuard[g_level-1]); + if (otherCaseDone()) + { + g_ifcount=0; + BEGIN(SkipCPPBlock); + } + else + { + setCaseDone(TRUE); + //g_levelGuard[g_level-1]=TRUE; + } + } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 1742 "pre.l" +{ + BEGIN(UndefName); + } + YY_BREAK +case 47: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1745 "pre.l" +{ + if (!otherCaseDone()) + { + g_guardExpr.resize(0); + BEGIN(Guard); + } + } + YY_BREAK +case 48: +/* rule 48 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 5; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1752 "pre.l" +{ + //printf("Pre.l: #endif\n"); + decrLevel(); + } + YY_BREAK +case 49: +/* rule 49 can match eol */ +YY_RULE_SETUP +#line 1756 "pre.l" +{ + outputChar('\n'); + BEGIN(Start); + g_yyLineNr++; + } + YY_BREAK +case 50: +YY_RULE_SETUP +#line 1761 "pre.l" +{ // unknown directive + BEGIN(IgnoreLine); + } + YY_BREAK +case 51: +/* rule 51 can match eol */ +YY_RULE_SETUP +#line 1764 "pre.l" +{ + outputChar('\n'); + g_yyLineNr++; + } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 1768 "pre.l" + + YY_BREAK +case 53: +YY_RULE_SETUP +#line 1769 "pre.l" + + YY_BREAK +case 54: +YY_RULE_SETUP +#line 1770 "pre.l" +{ + Define *def; + if ((def=isDefined(preYYtext)) + /*&& !def->isPredefined*/ + && !def->nonRecursive + ) + { + //printf("undefining %s\n",preYYtext); + def->undef=TRUE; + } + BEGIN(Start); + } + YY_BREAK +case 55: +/* rule 55 can match eol */ +YY_RULE_SETUP +#line 1782 "pre.l" +{ + outputChar('\n'); + g_guardExpr+=' '; + g_yyLineNr++; + } + YY_BREAK +case 56: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 7; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1787 "pre.l" +{ + BEGIN(DefinedExpr2); + } + YY_BREAK +case 57: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 7; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1790 "pre.l" +{ + BEGIN(DefinedExpr1); + } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 1793 "pre.l" +{ g_guardExpr+=preYYtext; } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 1794 "pre.l" +{ g_guardExpr+=*preYYtext; } + YY_BREAK +case 60: +/* rule 60 can match eol */ +YY_RULE_SETUP +#line 1795 "pre.l" +{ + unput(*preYYtext); + //printf("Guard: `%s'\n", + // g_guardExpr.data()); + bool guard=computeExpression(g_guardExpr); + setCaseDone(guard); + //printf("if g_levelGuard[%d]=%d\n",g_level-1,g_levelGuard[g_level-1]); + if (guard) + { + BEGIN(Start); + } + else + { + g_ifcount=0; + BEGIN(SkipCPPBlock); + } + } + YY_BREAK +case 61: +/* rule 61 can match eol */ +YY_RULE_SETUP +#line 1812 "pre.l" +{ g_yyLineNr++; outputChar('\n'); } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 1813 "pre.l" +{ + if (isDefined(preYYtext)) + g_guardExpr+=" 1L "; + else + g_guardExpr+=" 0L "; + g_lastGuardName=preYYtext; + BEGIN(Guard); + } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 1821 "pre.l" +{ + if (isDefined(preYYtext)) + g_guardExpr+=" 1L "; + else + g_guardExpr+=" 0L "; + g_lastGuardName=preYYtext; + } + YY_BREAK +case 64: +/* rule 64 can match eol */ +YY_RULE_SETUP +#line 1828 "pre.l" +{ // should not happen, handle anyway + g_yyLineNr++; + g_ifcount=0; + BEGIN(SkipCPPBlock); + } + YY_BREAK +case 65: +YY_RULE_SETUP +#line 1833 "pre.l" +{ + BEGIN(Guard); + } + YY_BREAK +case 66: +YY_RULE_SETUP +#line 1836 "pre.l" + + YY_BREAK +case 67: +YY_RULE_SETUP +#line 1837 "pre.l" +{ BEGIN(SkipCommand); } + YY_BREAK +case 68: +/* rule 68 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1838 "pre.l" +{ BEGIN(SkipLine); } + YY_BREAK +case 69: +/* rule 69 can match eol */ +YY_RULE_SETUP +#line 1839 "pre.l" +{ g_yyLineNr++; outputChar('\n'); } + YY_BREAK +case 70: +YY_RULE_SETUP +#line 1840 "pre.l" + + YY_BREAK +case 71: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1841 "pre.l" +{ + incrLevel(); + g_ifcount++; + //printf("#if... depth=%d\n",g_ifcount); + } + YY_BREAK +case 72: +YY_RULE_SETUP +#line 1846 "pre.l" +{ + //printf("Else! g_ifcount=%d otherCaseDone=%d\n",g_ifcount,otherCaseDone()); + if (g_ifcount==0 && !otherCaseDone()) + { + setCaseDone(TRUE); + //outputChar('\n'); + BEGIN(Start); + } + } + YY_BREAK +case 73: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1855 "pre.l" +{ + if (g_ifcount==0) + { + if (!otherCaseDone()) + { + g_guardExpr.resize(0); + g_lastGuardName.resize(0); + BEGIN(Guard); + } + else + { + BEGIN(SkipCPPBlock); + } + } + } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 1870 "pre.l" +{ + g_expectGuard = FALSE; + decrLevel(); + if (--g_ifcount<0) + { + //outputChar('\n'); + BEGIN(Start); + } + } + YY_BREAK +case 75: +/* rule 75 can match eol */ +YY_RULE_SETUP +#line 1879 "pre.l" +{ + outputChar('\n'); + g_yyLineNr++; + BEGIN(SkipCPPBlock); + } + YY_BREAK +case 76: +YY_RULE_SETUP +#line 1884 "pre.l" +{ // unknown directive + BEGIN(SkipLine); + } + YY_BREAK +case 77: +YY_RULE_SETUP +#line 1887 "pre.l" + + YY_BREAK +case 78: +YY_RULE_SETUP +#line 1888 "pre.l" + + YY_BREAK +case 79: +YY_RULE_SETUP +#line 1889 "pre.l" +{ } + YY_BREAK +case 80: +YY_RULE_SETUP +#line 1890 "pre.l" +{ + BEGIN(SkipString); + } + YY_BREAK +case 81: +YY_RULE_SETUP +#line 1893 "pre.l" + + YY_BREAK +case 82: +YY_RULE_SETUP +#line 1894 "pre.l" +{ + g_lastCPPContext=YY_START; + BEGIN(RemoveCPPComment); + } + YY_BREAK +case 83: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 2; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1898 "pre.l" +{ + g_lastCContext=YY_START; + BEGIN(RemoveCComment); + } + YY_BREAK +case 84: +/* rule 84 can match eol */ +YY_RULE_SETUP +#line 1902 "pre.l" +{ + outputChar('\n'); + g_yyLineNr++; + BEGIN(SkipCPPBlock); + } + YY_BREAK +case 85: +YY_RULE_SETUP +#line 1907 "pre.l" +{ } + YY_BREAK +case 86: +YY_RULE_SETUP +#line 1908 "pre.l" +{ } + YY_BREAK +case 87: +YY_RULE_SETUP +#line 1909 "pre.l" +{ + BEGIN(SkipLine); + } + YY_BREAK +case 88: +YY_RULE_SETUP +#line 1912 "pre.l" +{ } + YY_BREAK +case 89: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1913 "pre.l" +{ + g_nospaces=TRUE; + g_roundCount=0; + g_defArgsStr=preYYtext; + g_findDefArgContext = IncludeID; + BEGIN(FindDefineArgs); + } + YY_BREAK +case 90: +YY_RULE_SETUP +#line 1920 "pre.l" +{ + g_nospaces=TRUE; + readIncludeFile(expandMacro(preYYtext)); + BEGIN(Start); + } + YY_BREAK +case 91: +YY_RULE_SETUP +#line 1925 "pre.l" +{ + g_incName+=preYYtext; + readIncludeFile(g_incName); + if (g_isImported) + { + BEGIN(EndImport); + } + else + { + BEGIN(Start); + } + } + YY_BREAK +case 92: +/* rule 92 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 1937 "pre.l" +{ + BEGIN(Start); + } + YY_BREAK +case 93: +/* rule 93 can match eol */ +YY_RULE_SETUP +#line 1940 "pre.l" +{ + outputChar('\n'); + g_yyLineNr++; + } + YY_BREAK +case 94: +YY_RULE_SETUP +#line 1944 "pre.l" +{ + } + YY_BREAK +case 95: +/* rule 95 can match eol */ +YY_RULE_SETUP +#line 1946 "pre.l" +{ // define with argument + //printf("Define() `%s'\n",preYYtext); + g_argDict = new QDict<int>(31); + g_argDict->setAutoDelete(TRUE); + g_defArgs = 0; + g_defArgsStr.resize(0); + g_defText.resize(0); + g_defLitText.resize(0); + g_defName = preYYtext; + g_defVarArgs = FALSE; + g_defExtraSpacing.resize(0); + BEGIN(DefineArg); + } + YY_BREAK +case 96: +YY_RULE_SETUP +#line 1959 "pre.l" +{ // special case: define with 1 -> can be "guard" + //printf("Define `%s'\n",preYYtext); + g_argDict = 0; + g_defArgs = -1; + g_defArgsStr.resize(0); + g_defName = preYYtext; + g_defName = g_defName.left(g_defName.length()-1).stripWhiteSpace(); + g_defVarArgs = FALSE; + if ( g_defName!=g_lastGuardName || !g_expectGuard) + { // define may appear in the output + QCString tmp=(QCString)"#define "+g_defName; + outputArray(tmp.data(),tmp.length()); + g_quoteArg=FALSE; + g_insideComment=FALSE; + g_lastGuardName.resize(0); + g_defText="1"; + g_defLitText="1"; + BEGIN(DefineText); + } + else // define is a guard => hide + { + g_defText.resize(0); + g_defLitText.resize(0); + BEGIN(Start); + } + } + YY_BREAK +case 97: +YY_RULE_SETUP +#line 1985 "pre.l" +{ // define with content + //printf("Define `%s'\n",preYYtext); + g_argDict = 0; + g_defArgs = -1; + g_defArgsStr.resize(0); + g_defText.resize(0); + g_defLitText.resize(0); + g_defName = preYYtext; + g_defVarArgs = FALSE; + QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr; + outputArray(tmp.data(),tmp.length()); + g_quoteArg=FALSE; + g_insideComment=FALSE; + BEGIN(DefineText); + } + YY_BREAK +case 98: +/* rule 98 can match eol */ +YY_RULE_SETUP +#line 2000 "pre.l" +{ // empty define + g_argDict = 0; + g_defArgs = -1; + g_defName = preYYtext; + g_defArgsStr.resize(0); + g_defText.resize(0); + g_defLitText.resize(0); + g_defVarArgs = FALSE; + //printf("Guard check: %s!=%s || %d\n", + // g_defName.data(),g_lastGuardName.data(),g_expectGuard); + if ( g_defName!=g_lastGuardName || !g_expectGuard) + { // define may appear in the output + QCString tmp=(QCString)"#define "+g_defName; + outputArray(tmp.data(),tmp.length()); + g_quoteArg=FALSE; + g_insideComment=FALSE; + if (g_insideCS) g_defText="1"; // for C#, use "1" as define text + BEGIN(DefineText); + } + else // define is a guard => hide + { + //printf("Found a guard %s\n",preYYtext); + g_lastGuardName.resize(0); + BEGIN(Start); + } + g_expectGuard=FALSE; + } + YY_BREAK +case 99: +/* rule 99 can match eol */ +YY_RULE_SETUP +#line 2027 "pre.l" +{ + g_defExtraSpacing+="\n"; + g_yyLineNr++; + } + YY_BREAK +case 100: +YY_RULE_SETUP +#line 2031 "pre.l" +{ g_defArgsStr+=preYYtext; } + YY_BREAK +case 101: +YY_RULE_SETUP +#line 2032 "pre.l" +{ g_defArgsStr+=preYYtext; } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 2033 "pre.l" +{ + g_defArgsStr+=preYYtext; + QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr+g_defExtraSpacing; + outputArray(tmp.data(),tmp.length()); + g_quoteArg=FALSE; + g_insideComment=FALSE; + BEGIN(DefineText); + } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 2041 "pre.l" +{ // Variadic macro + g_defVarArgs = TRUE; + g_defArgsStr+=preYYtext; + g_argDict->insert("__VA_ARGS__",new int(g_defArgs)); + g_defArgs++; + } + YY_BREAK +case 104: +YY_RULE_SETUP +#line 2047 "pre.l" +{ + //printf("Define addArg(%s)\n",preYYtext); + QCString argName=preYYtext; + g_defVarArgs = preYYtext[preYYleng-1]=='.'; + if (g_defVarArgs) // strip ellipsis + { + argName=argName.left(argName.length()-3); + } + argName = argName.stripWhiteSpace(); + g_defArgsStr+=preYYtext; + g_argDict->insert(argName,new int(g_defArgs)); + g_defArgs++; + } + YY_BREAK +/* +<DefineText>"/ **"|"/ *!" { + g_defText+=preYYtext; + g_defLitText+=preYYtext; + g_insideComment=TRUE; + } +<DefineText>"* /" { + g_defText+=preYYtext; + g_defLitText+=preYYtext; + g_insideComment=FALSE; + } + */ +case 105: +YY_RULE_SETUP +#line 2072 "pre.l" +{ + g_defText+=preYYtext; + g_defLitText+=preYYtext; + g_lastCContext=YY_START; + g_commentCount=1; + BEGIN(CopyCComment); + } + YY_BREAK +case 106: +YY_RULE_SETUP +#line 2079 "pre.l" +{ + outputArray(preYYtext,preYYleng); + g_lastCPPContext=YY_START; + g_defLitText+=' '; + BEGIN(SkipCPPComment); + } + YY_BREAK +case 107: +YY_RULE_SETUP +#line 2085 "pre.l" +{ + if (preYYtext[0]=='/') outputChar('/'); + outputChar('*');outputChar('/'); + if (--g_commentCount<=0) + { + if (g_lastCContext==Start) + // small hack to make sure that ^... rule will + // match when going to Start... Example: "/*...*/ some stuff..." + { + YY_CURRENT_BUFFER->yy_at_bol=1; + } + BEGIN(g_lastCContext); + } + } + YY_BREAK +case 108: +YY_RULE_SETUP +#line 2099 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 109: +YY_RULE_SETUP +#line 2102 "pre.l" +{ + outputChar('/');outputChar('*'); + //g_commentCount++; + } + YY_BREAK +case 110: +YY_RULE_SETUP +#line 2106 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 111: +/* rule 111 can match eol */ +YY_RULE_SETUP +#line 2109 "pre.l" +{ + outputArray(preYYtext,preYYleng); + g_yyLineNr+=QCString(preYYtext).contains('\n'); + } + YY_BREAK +case 112: +/* rule 112 can match eol */ +YY_RULE_SETUP +#line 2113 "pre.l" +{ + outputArray(preYYtext,preYYleng); + g_yyLineNr+=QCString(preYYtext).contains('\n'); + if (preYYtext[1]=='f') + { + g_blockName="f"; + } + else + { + g_blockName=QCString(&preYYtext[1]).stripWhiteSpace(); + } + BEGIN(SkipVerbatim); + } + YY_BREAK +case 113: +YY_RULE_SETUP +#line 2126 "pre.l" +{ // conditional section + g_condCtx = YY_START; + outputArray(preYYtext,preYYleng); + BEGIN(CondLine); + } + YY_BREAK +case 114: +YY_RULE_SETUP +#line 2131 "pre.l" +{ + startCondSection(preYYtext); + outputArray(preYYtext,preYYleng); + BEGIN(g_condCtx); + } + YY_BREAK +case 115: +/* rule 115 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 2136 "pre.l" +{ + g_condCtx = YY_START; + outputArray(preYYtext,preYYleng); + BEGIN(CondLine); + } + YY_BREAK +case 116: +YY_RULE_SETUP +#line 2141 "pre.l" +{ + unput(*preYYtext); + startCondSection(" "); + BEGIN(g_condCtx); + } + YY_BREAK +case 117: +/* rule 117 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 8; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +YY_RULE_SETUP +#line 2146 "pre.l" +{ + outputArray(preYYtext,preYYleng); + endCondSection(); + } + YY_BREAK +case 118: +YY_RULE_SETUP +#line 2150 "pre.l" +{ /* end of verbatim block */ + outputArray(preYYtext,preYYleng); + if (preYYtext[1]=='f' && g_blockName=="f") + { + BEGIN(SkipCComment); + } + else if (&preYYtext[4]==g_blockName) + { + BEGIN(SkipCComment); + } + } + YY_BREAK +case 119: +YY_RULE_SETUP +#line 2161 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 120: +YY_RULE_SETUP +#line 2164 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 121: +/* rule 121 can match eol */ +YY_RULE_SETUP +#line 2167 "pre.l" +{ + g_yyLineNr++; + outputChar('\n'); + } + YY_BREAK +case 122: +YY_RULE_SETUP +#line 2171 "pre.l" +{ + outputChar(*preYYtext); + } + YY_BREAK +case 123: +YY_RULE_SETUP +#line 2174 "pre.l" +{ + g_defLitText+=preYYtext; + g_defText+=escapeAt(preYYtext); + } + YY_BREAK +case 124: +YY_RULE_SETUP +#line 2178 "pre.l" +{ + g_defLitText+=preYYtext; + g_defText+=preYYtext; + BEGIN(g_lastCContext); + } + YY_BREAK +case 125: +/* rule 125 can match eol */ +YY_RULE_SETUP +#line 2183 "pre.l" +{ + g_yyLineNr++; + g_defLitText+=preYYtext; + g_defText+=' '; + } + YY_BREAK +case 126: +YY_RULE_SETUP +#line 2188 "pre.l" +{ // see bug 594021 for a usecase for this rule + if (g_lastCContext==SkipCPPBlock) + { + BEGIN(SkipCommand); + } + else + { + REJECT; + } + } + YY_BREAK +case 127: +YY_RULE_SETUP +#line 2198 "pre.l" +{ BEGIN(g_lastCContext); } + YY_BREAK +case 128: +YY_RULE_SETUP +#line 2199 "pre.l" + + YY_BREAK +case 129: +YY_RULE_SETUP +#line 2200 "pre.l" + + YY_BREAK +case 130: +YY_RULE_SETUP +#line 2201 "pre.l" + + YY_BREAK +case 131: +/* rule 131 can match eol */ +YY_RULE_SETUP +#line 2202 "pre.l" +{ g_yyLineNr++; outputChar('\n'); } + YY_BREAK +case 132: +YY_RULE_SETUP +#line 2203 "pre.l" + + YY_BREAK +case 133: +YY_RULE_SETUP +#line 2204 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 134: +/* rule 134 can match eol */ +YY_RULE_SETUP +#line 2207 "pre.l" +{ + unput(*preYYtext); + BEGIN(g_lastCPPContext); + } + YY_BREAK +case 135: +YY_RULE_SETUP +#line 2211 "pre.l" +{ + outputChar('/');outputChar('*'); + } + YY_BREAK +case 136: +YY_RULE_SETUP +#line 2214 "pre.l" +{ + outputChar('/');outputChar('/'); + } + YY_BREAK +case 137: +YY_RULE_SETUP +#line 2217 "pre.l" +{ + outputArray(preYYtext,preYYleng); + } + YY_BREAK +case 138: +YY_RULE_SETUP +#line 2220 "pre.l" +{ + outputChar(*preYYtext); + } + YY_BREAK +case 139: +YY_RULE_SETUP +#line 2223 "pre.l" + + YY_BREAK +case 140: +YY_RULE_SETUP +#line 2224 "pre.l" + + YY_BREAK +case 141: +YY_RULE_SETUP +#line 2225 "pre.l" + + YY_BREAK +case 142: +YY_RULE_SETUP +#line 2226 "pre.l" + + YY_BREAK +case 143: +YY_RULE_SETUP +#line 2227 "pre.l" +{ + g_quoteArg=TRUE; + g_defLitText+=preYYtext; + } + YY_BREAK +case 144: +YY_RULE_SETUP +#line 2231 "pre.l" +{ + g_defLitText+=preYYtext; + if (g_quoteArg) + { + g_defText+="\""; + } + if (g_defArgs>0) + { + int *n; + if ((n=(*g_argDict)[preYYtext])) + { + //if (!g_quoteArg) g_defText+=' '; + g_defText+='@'; + QCString numStr; + numStr.sprintf("%d",*n); + g_defText+=numStr; + //if (!g_quoteArg) g_defText+=' '; + } + else + { + g_defText+=preYYtext; + } + } + else + { + g_defText+=preYYtext; + } + if (g_quoteArg) + { + g_defText+="\""; + } + g_quoteArg=FALSE; + } + YY_BREAK +case 145: +YY_RULE_SETUP +#line 2264 "pre.l" +{ + g_defLitText+=preYYtext; + g_defText+=preYYtext; + } + YY_BREAK +case 146: +/* rule 146 can match eol */ +YY_RULE_SETUP +#line 2268 "pre.l" +{ + g_defLitText+=preYYtext; + outputChar('\n'); + g_defText += ' '; g_yyLineNr++; + } + YY_BREAK +case 147: +/* rule 147 can match eol */ +YY_RULE_SETUP +#line 2273 "pre.l" +{ + QCString comment=extractTrailingComment(g_defLitText); + g_defLitText+=preYYtext; + if (!comment.isEmpty()) + { + outputArray(comment,comment.length()); + g_defLitText=g_defLitText.left(g_defLitText.length()-comment.length()-1); + } + outputChar('\n'); + Define *def=0; + //printf("Define name=`%s' text=`%s' litTexti=`%s'\n",g_defName.data(),g_defText.data(),g_defLitText.data()); + if (g_includeStack.isEmpty() || g_curlyCount>0) + { + addDefine(); + } + def=g_globalDefineDict->find(g_defName); + if (def==0) // new define + { + //printf("new define!\n"); + Define *nd = newDefine(); + g_globalDefineDict->insert(g_defName,nd); + // also add it to the local file list if it is a source file + if (g_isSource && g_includeStack.isEmpty()) + { + g_fileDefineDict->insert(g_defName,nd); + } + } + else if (def && macroIsAccessible(def)) + // name already exists + { + //printf("existing define!\n"); + //printf("define found\n"); + if (def->undef) // undefined name + { + def->undef = FALSE; + def->name = g_defName; + def->definition = g_defText.stripWhiteSpace(); + def->nargs = g_defArgs; + def->fileName = g_yyFileName.copy(); + def->lineNr = g_yyLineNr; + } + else + { + //printf("error: define %s is defined more than once!\n",g_defName.data()); + } + } + delete g_argDict; g_argDict=0; + g_yyLineNr++; + g_lastGuardName.resize(0); + BEGIN(Start); + } + YY_BREAK +case 148: +YY_RULE_SETUP +#line 2324 "pre.l" +{ g_defText += ' '; g_defLitText+=preYYtext; } + YY_BREAK +case 149: +YY_RULE_SETUP +#line 2325 "pre.l" +{ g_defText += "##"; g_defLitText+=preYYtext; } + YY_BREAK +case 150: +YY_RULE_SETUP +#line 2326 "pre.l" +{ g_defText += "@@"; g_defLitText+=preYYtext; } + YY_BREAK +case 151: +YY_RULE_SETUP +#line 2327 "pre.l" +{ + g_defText += *preYYtext; + g_defLitText+=preYYtext; + if (!g_insideComment) + { + BEGIN(SkipDoubleQuote); + } + } + YY_BREAK +case 152: +YY_RULE_SETUP +#line 2335 "pre.l" +{ g_defText += *preYYtext; + g_defLitText+=preYYtext; + if (!g_insideComment) + { + BEGIN(SkipSingleQuote); + } + } + YY_BREAK +case 153: +YY_RULE_SETUP +#line 2342 "pre.l" +{ g_defText += preYYtext; g_defLitText+=preYYtext; } + YY_BREAK +case 154: +YY_RULE_SETUP +#line 2343 "pre.l" +{ g_defText += preYYtext; g_defLitText+=preYYtext; } + YY_BREAK +case 155: +YY_RULE_SETUP +#line 2344 "pre.l" +{ + g_defText += *preYYtext; g_defLitText+=preYYtext; + BEGIN(DefineText); + } + YY_BREAK +case 156: +YY_RULE_SETUP +#line 2348 "pre.l" +{ + g_defText += preYYtext; g_defLitText+=preYYtext; + } + YY_BREAK +case 157: +YY_RULE_SETUP +#line 2351 "pre.l" +{ + g_defText += *preYYtext; g_defLitText+=preYYtext; + BEGIN(DefineText); + } + YY_BREAK +case 158: +YY_RULE_SETUP +#line 2355 "pre.l" +{ g_defText += *preYYtext; g_defLitText+=preYYtext; } + YY_BREAK +case 159: +YY_RULE_SETUP +#line 2356 "pre.l" +{ g_defText += *preYYtext; g_defLitText+=preYYtext; } + YY_BREAK +case 160: +YY_RULE_SETUP +#line 2357 "pre.l" +{ g_defText += *preYYtext; g_defLitText+=preYYtext; } + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(Start): +case YY_STATE_EOF(Command): +case YY_STATE_EOF(SkipCommand): +case YY_STATE_EOF(SkipLine): +case YY_STATE_EOF(SkipString): +case YY_STATE_EOF(CopyLine): +case YY_STATE_EOF(CopyString): +case YY_STATE_EOF(Include): +case YY_STATE_EOF(IncludeID): +case YY_STATE_EOF(EndImport): +case YY_STATE_EOF(DefName): +case YY_STATE_EOF(DefineArg): +case YY_STATE_EOF(DefineText): +case YY_STATE_EOF(SkipCPPBlock): +case YY_STATE_EOF(Ifdef): +case YY_STATE_EOF(Ifndef): +case YY_STATE_EOF(SkipCComment): +case YY_STATE_EOF(CopyCComment): +case YY_STATE_EOF(SkipVerbatim): +case YY_STATE_EOF(SkipCPPComment): +case YY_STATE_EOF(RemoveCComment): +case YY_STATE_EOF(RemoveCPPComment): +case YY_STATE_EOF(Guard): +case YY_STATE_EOF(DefinedExpr1): +case YY_STATE_EOF(DefinedExpr2): +case YY_STATE_EOF(SkipDoubleQuote): +case YY_STATE_EOF(SkipSingleQuote): +case YY_STATE_EOF(UndefName): +case YY_STATE_EOF(IgnoreLine): +case YY_STATE_EOF(FindDefineArgs): +case YY_STATE_EOF(ReadString): +case YY_STATE_EOF(CondLine): +#line 2358 "pre.l" +{ + //fprintf(stderr,"End of include file\n"); + //printf("Include stack depth=%d\n",g_includeStack.count()); + if (g_includeStack.isEmpty()) + { + //fprintf(stderr,"Terminating scanner!\n"); + yyterminate(); + } + else + { + FileState *fs=g_includeStack.pop(); + //fileDefineCache->merge(g_yyFileName,fs->fileName); + YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER; + preYY_switch_to_buffer(fs->bufState ); + preYY_delete_buffer(oldBuf ); + g_yyLineNr = fs->lineNr; + //preYYin = fs->oldYYin; + g_inputBuf = fs->oldFileBuf; + g_inputBufPos = fs->oldFileBufPos; + setFileName(fs->fileName); + //fprintf(stderr,"######## FileName %s\n",g_yyFileName.data()); + + // Deal with file changes due to + // #include's within { .. } blocks + QCString lineStr(15+g_yyFileName.length()); + lineStr.sprintf("# %d \"%s\" 2",g_yyLineNr,g_yyFileName.data()); + outputArray(lineStr.data(),lineStr.length()); + + delete fs; fs=0; + } + } + YY_BREAK +case 161: +*yy_cp = (yy_hold_char); /* undo effects of setting up preYYtext */ +(yy_c_buf_p) = yy_cp = yy_bp + 2; +YY_DO_BEFORE_ACTION; /* set up preYYtext again */ +#line 2390 "pre.l" +case 162: +YY_RULE_SETUP +#line 2390 "pre.l" +{ + outputArray(preYYtext,preYYleng); + g_lastCContext=YY_START; + g_commentCount=1; + if (preYYleng==3) g_lastGuardName.resize(0); // reset guard in case the #define is documented! + BEGIN(SkipCComment); + } + YY_BREAK +case 163: +YY_RULE_SETUP +#line 2397 "pre.l" +{ + outputArray(preYYtext,preYYleng); + g_lastCPPContext=YY_START; + if (preYYleng==3) g_lastGuardName.resize(0); // reset guard in case the #define is documented! + BEGIN(SkipCPPComment); + } + YY_BREAK +case 164: +/* rule 164 can match eol */ +YY_RULE_SETUP +#line 2403 "pre.l" +{ + outputChar('\n'); + g_yyLineNr++; + } + YY_BREAK +case 165: +YY_RULE_SETUP +#line 2407 "pre.l" +{ + g_expectGuard = FALSE; + outputChar(*preYYtext); + } + YY_BREAK +case 166: +YY_RULE_SETUP +#line 2412 "pre.l" +ECHO; + YY_BREAK +#line 5765 "<stdout>" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed preYYin at a new source and called + * preYYlex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = preYYin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( preYYwrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * preYYtext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of preYYlex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + preYYrestart(preYYin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) preYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 56); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1157 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *(yy_state_ptr)++ = yy_current_state; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + + register YY_CHAR yy_c = 56; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1157 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 1156); + if ( ! yy_is_jam ) + *(yy_state_ptr)++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; +} + + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up preYYtext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register yy_size_t number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + preYYrestart(preYYin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( preYYwrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve preYYtext */ + (yy_hold_char) = *++(yy_c_buf_p); + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void preYYrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + preYYensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + preYY_create_buffer(preYYin,YY_BUF_SIZE ); + } + + preYY_init_buffer(YY_CURRENT_BUFFER,input_file ); + preYY_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void preYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * preYYpop_buffer_state(); + * preYYpush_buffer_state(new_buffer); + */ + preYYensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + preYY_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (preYYwrap()) processing, but the only time this flag + * is looked at is after preYYwrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void preYY_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + preYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE preYY_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) preYYalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in preYY_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) preYYalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in preYY_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + preYY_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with preYY_create_buffer() + * + */ + void preYY_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + preYYfree((void *) b->yy_ch_buf ); + + preYYfree((void *) b ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a preYYrestart() or at EOF. + */ + static void preYY_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + preYY_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then preYY_init_buffer was _probably_ + * called from preYYrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void preYY_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + preYY_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void preYYpush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + preYYensure_buffer_stack(); + + /* This block is copied from preYY_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from preYY_switch_to_buffer. */ + preYY_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void preYYpop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + preYY_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + preYY_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void preYYensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)preYYalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in preYYensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)preYYrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in preYYensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE preYY_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) preYYalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in preYY_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + preYY_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to preYYlex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * preYY_scan_bytes() instead. + */ +YY_BUFFER_STATE preYY_scan_string (yyconst char * yystr ) +{ + + return preYY_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to preYYlex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE preYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n, i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) preYYalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in preYY_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = preYY_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in preYY_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up preYYtext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + preYYtext[preYYleng] = (yy_hold_char); \ + (yy_c_buf_p) = preYYtext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + preYYleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int preYYget_lineno (void) +{ + + return preYYlineno; +} + +/** Get the input stream. + * + */ +FILE *preYYget_in (void) +{ + return preYYin; +} + +/** Get the output stream. + * + */ +FILE *preYYget_out (void) +{ + return preYYout; +} + +/** Get the length of the current token. + * + */ +yy_size_t preYYget_leng (void) +{ + return preYYleng; +} + +/** Get the current token. + * + */ + +char *preYYget_text (void) +{ + return preYYtext; +} + +/** Set the current line number. + * @param line_number + * + */ +void preYYset_lineno (int line_number ) +{ + + preYYlineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see preYY_switch_to_buffer + */ +void preYYset_in (FILE * in_str ) +{ + preYYin = in_str ; +} + +void preYYset_out (FILE * out_str ) +{ + preYYout = out_str ; +} + +int preYYget_debug (void) +{ + return preYY_flex_debug; +} + +void preYYset_debug (int bdebug ) +{ + preYY_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from preYYlex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + + (yy_state_buf) = 0; + (yy_state_ptr) = 0; + (yy_full_match) = 0; + (yy_lp) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + preYYin = stdin; + preYYout = stdout; +#else + preYYin = (FILE *) 0; + preYYout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * preYYlex_init() + */ + return 0; +} + +/* preYYlex_destroy is for both reentrant and non-reentrant scanners. */ +int preYYlex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + preYY_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + preYYpop_buffer_state(); + } + + /* Destroy the stack itself. */ + preYYfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + preYYfree ( (yy_state_buf) ); + (yy_state_buf) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * preYYlex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *preYYalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *preYYrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void preYYfree (void * ptr ) +{ + free( (char *) ptr ); /* see preYYrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 2412 "pre.l" + + + +/*@ ---------------------------------------------------------------------------- + */ + +static int getNextChar(const QCString &expr,QCString *rest,uint &pos) +{ + //printf("getNextChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos); + if (pos<expr.length()) + { + //printf("%c=expr()\n",expr.at(pos)); + return expr.at(pos++); + } + else if (rest && !rest->isEmpty()) + { + int cc=rest->at(0); + *rest=rest->right(rest->length()-1); + //printf("%c=rest\n",cc); + return cc; + } + else + { + int cc=yyinput(); + //printf("%c=yyinput()\n",cc); + return cc; + } +} + +static int getCurrentChar(const QCString &expr,QCString *rest,uint pos) +{ + //printf("getCurrentChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos); + if (pos<expr.length()) + { + //printf("%c=expr()\n",expr.at(pos)); + return expr.at(pos); + } + else if (rest && !rest->isEmpty()) + { + int cc=rest->at(0); + //printf("%c=rest\n",cc); + return cc; + } + else + { + int cc=yyinput(); + returnCharToStream(cc); + //unput((char)cc); + //printf("%c=yyinput()\n",cc); + return cc; + } +} + +static void unputChar(const QCString &expr,QCString *rest,uint &pos,char c) +{ + //printf("unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c); + if (pos<expr.length()) + { + pos++; + } + else if (rest) + { + //printf("Prepending to rest!\n"); + char cs[2];cs[0]=c;cs[1]='\0'; + rest->prepend(cs); + } + else + { + //unput(c); + returnCharToStream(c); + } + //printf("result: unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c); +} + +void addSearchDir(const char *dir) +{ + QFileInfo fi(dir); + if (fi.isDir()) g_pathList->append(fi.absFilePath()); +} + +void initPreprocessor() +{ + g_pathList = new QStrList; + addSearchDir("."); + g_expandedDict = new DefineDict(17); +} + +void cleanUpPreprocessor() +{ + delete g_expandedDict; g_expandedDict=0; + delete g_pathList; g_pathList=0; +} + + +void preprocessFile(const char *fileName,BufStr &input,BufStr &output) +{ + uint orgOffset=output.curPos(); + //printf("##########################\n%s\n####################\n", + // input.data()); + + g_macroExpansion = Config_getBool("MACRO_EXPANSION"); + g_expandOnlyPredef = Config_getBool("EXPAND_ONLY_PREDEF"); + g_curlyCount=0; + g_nospaces=FALSE; + g_inputBuf=&input; + g_inputBufPos=0; + g_outputBuf=&output; + g_includeStack.setAutoDelete(TRUE); + g_includeStack.clear(); + g_expandedDict->setAutoDelete(FALSE); + g_expandedDict->clear(); + g_condStack.clear(); + g_condStack.setAutoDelete(TRUE); + g_fileDefineDict->clear(); + + static bool firstTime=TRUE; + if (firstTime) + { + // add predefined macros + char *defStr; + QStrList &predefList = Config_getList("PREDEFINED"); + QStrListIterator sli(predefList); + for (sli.toFirst();(defStr=sli.current());++sli) + { + QCString ds = defStr; + int i_equals=ds.find('='); + int i_obrace=ds.find('('); + int i_cbrace=ds.find(')'); + bool nonRecursive = i_equals>0 && ds.at(i_equals-1)==':'; + + if (i_obrace==0) continue; // no define name + + if (i_obrace<i_equals && i_cbrace<i_equals && + i_obrace!=-1 && i_cbrace!=-1 && + i_obrace<i_cbrace + ) // predefined function macro definition + { + //printf("predefined function macro '%s'\n",defStr); + QRegExp reId("[a-z_A-Z][a-z_A-Z0-9]*"); // regexp matching an id + QDict<int> argDict(17); + argDict.setAutoDelete(TRUE); + int i=i_obrace+1,p,l,count=0; + // gather the formal arguments in a dictionary + while (i<i_cbrace && (p=reId.match(ds,i,&l))) + { + argDict.insert(ds.mid(p,l),new int(count++)); + i=p+l; + } + // strip definition part + QCString tmp=ds.right(ds.length()-i_equals-1); + QCString definition; + i=0; + // substitute all occurrences of formal arguments by their + // corresponding markers + while ((p=reId.match(tmp,i,&l))!=-1) + { + if (p>i) definition+=tmp.mid(i,p-i); + int *argIndex; + if ((argIndex=argDict[tmp.mid(p,l)])!=0) + { + QCString marker; + marker.sprintf(" @%d ",*argIndex); + definition+=marker; + } + else + { + definition+=tmp.mid(p,l); + } + i=p+l; + } + if (i<(int)tmp.length()) definition+=tmp.mid(i,tmp.length()-i); + + // add define definition to the dictionary of defines for this file + QCString dname = ds.left(i_obrace); + if (!dname.isEmpty()) + { + Define *def = new Define; + def->name = dname; + def->definition = definition; + def->nargs = count; + def->isPredefined = TRUE; + def->nonRecursive = nonRecursive; + def->fileDef = g_yyFileDef; + def->fileName = fileName; + g_globalDefineDict->insert(def->name,def); + } + + //printf("#define `%s' `%s' #nargs=%d\n", + // def->name.data(),def->definition.data(),def->nargs); + } + else if ((i_obrace==-1 || i_obrace>i_equals) && + (i_cbrace==-1 || i_cbrace>i_equals) && + !ds.isEmpty() && (int)ds.length()>i_equals + ) // predefined non-function macro definition + { + //printf("predefined normal macro '%s'\n",defStr); + Define *def = new Define; + if (i_equals==-1) // simple define without argument + { + def->name = ds; + def->definition = "1"; // substitute occurrences by 1 (true) + } + else // simple define with argument + { + int ine=i_equals - (nonRecursive ? 1 : 0); + def->name = ds.left(ine); + def->definition = ds.right(ds.length()-i_equals-1); + } + if (!def->name.isEmpty()) + { + def->nargs = -1; + def->isPredefined = TRUE; + def->nonRecursive = nonRecursive; + def->fileDef = g_yyFileDef; + def->fileName = fileName; + g_globalDefineDict->insert(def->name,def); + } + else + { + delete def; + } + + //printf("#define `%s' `%s' #nargs=%d\n", + // def->name.data(),def->definition.data(),def->nargs); + } + } + //firstTime=FALSE; + } + + g_yyLineNr = 1; + g_level = 0; + g_ifcount = 0; + setFileName(fileName); + g_inputFileDef = g_yyFileDef; + + BEGIN( Start ); + + g_expectGuard = guessSection(fileName)==Entry::HEADER_SEC; + g_lastGuardName.resize(0); + g_guardExpr.resize(0); + + preYYlex(); + g_lexInit=TRUE; + + // make sure we don't extend a \cond with missing \endcond over multiple files (see bug 624829) + forceEndCondSection(); + + // remove locally defined macros so they can be redefined in another source file + if (g_fileDefineDict->count()>0) + { + QDictIterator<Define> di(*g_fileDefineDict); + Define *d; + for (di.toFirst();(d=di.current());++di) + { + g_globalDefineDict->remove(di.currentKey()); + } + g_fileDefineDict->clear(); + } + + if (Debug::isFlagSet(Debug::Preprocessor)) + { + char *orgPos=output.data()+orgOffset; + char *newPos=output.data()+output.curPos(); + msg("Preprocessor output (size: %d bytes):\n",newPos-orgPos); + int line=1; + msg("---------\n00001 "); + while (orgPos<newPos) + { + putchar(*orgPos); + if (*orgPos=='\n') printf("%05d ",++line); + orgPos++; + } + msg("\n---------\n"); + } +} + +void preFreeScanner() +{ +#if defined(YY_FLEX_SUBMINOR_VERSION) + if (g_lexInit) + { + preYYlex_destroy(); + } +#endif +} + +#if !defined(YY_FLEX_SUBMINOR_VERSION) +extern "C" { // some bogus code to keep the compiler happy +// int preYYwrap() { return 1 ; } + void preYYdummy() { yy_flex_realloc(0,0); } +} +#endif + + Index: branches/xZenu/src/util/doxygen/src/dbusxmlscanner.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/dbusxmlscanner.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/dbusxmlscanner.cpp (revision 1322) @@ -0,0 +1,891 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 2009 by Tobias Hunger <tobias@aquazul.com> + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include "dbusxmlscanner.h" + +#include "commentscan.h" +#include "entry.h" + +#include <qfile.h> +#include <qxml.h> +#include <qstring.h> + +#include "message.h" +#include "util.h" + +// ----------------------------------------------------------------------- +// Convenience defines: +// ----------------------------------------------------------------------- + +#define CONDITION(cond, msg) \ + do {\ + if (cond)\ + {\ + if (m_errorString.isEmpty()) { m_errorString = msg; }\ + return false;\ + }\ + }\ + while (0) + +#define DOC_ERROR(msg) \ + warn_doc_error(m_fileName.utf8().data(), lineNumber(), msg.utf8().data()) + +#define COND_DOC_ERROR(cond, msg) \ + do {\ + if (cond)\ + {\ + DOC_ERROR(msg);\ + return true;\ + }\ + }\ + while (0) + +#define DBUS(name) isDBusElement(namespaceURI, localName, qName, name) +#define EXTENSION(name) isExtensionElement(namespaceURI, localName, qName, name) + +// ----------------------------------------------------------------------- +// DBusXMLHandler class +// ----------------------------------------------------------------------- + +const QString EXTENSION_URI("http://psiamp.org/dtd/doxygen_dbusxml.dtd"); + +class DBusXMLHandler : public QXmlDefaultHandler +{ +public: + DBusXMLHandler(ParserInterface * parser, + QXmlSimpleReader * reader, + const char * file_name, + Entry * root) : + m_parser(parser), + m_locator(reader), + m_currentEntry(0), + m_currentInterface(0), + m_currentMethod(0), + m_currentArgument(0), + m_currentProperty(0), + m_currentEnum(0), + m_fileName(file_name), + m_currentComment(0) + { + setDocumentLocator(&m_locator); + + m_scopeCount = 0; + + // Set up stack cleanup: + m_structStack.setAutoDelete(TRUE); + m_elementStack.setAutoDelete(TRUE); + m_scopeStack.setAutoDelete(TRUE); + + openScopes(root); + } + + ~DBusXMLHandler() + { closeScopes(); } + + QString errorString() + { return m_errorString; } + + bool startElement(const QString &namespaceURI, + const QString &localName, + const QString &qName, + const QXmlAttributes &attributes) + { + // add to elements stack: + m_elementStack.append(new ElementData(qName)); + + // First we need a node. + if (DBUS("node")) + { + CONDITION(!m_currentNode.isEmpty(), "Node inside a node."); + + const int idx(indexOf(attributes, "name")); + COND_DOC_ERROR(idx < 0, QString("Anonymous node found.")); + + m_currentNode = attributes.value(idx); + // A node is actually of little interest, so do nothing here. + return true; + } + + // Then we need an interface. + if (DBUS("interface")) + { + // We need a nodeName for interfaces: + CONDITION(m_currentNode.isEmpty(), "Interface without a node."); + CONDITION(m_currentInterface, "Interface within another interface."); + + const int idx(indexOf(attributes, "name")); + COND_DOC_ERROR(idx < 0, QString("Interface without a name found.")); + + // A interface is roughly equivalent to a class: + m_currentInterface = createEntry(); + + m_currentInterface->section = Entry::CLASS_SEC; + m_currentInterface->spec |= Entry::Interface; + m_currentInterface->type = "Interface"; + m_currentInterface->name = substitute(attributes.value(idx), ".", "::"); + + openScopes(m_currentInterface); + + return true; + } + + if (DBUS("method") || DBUS("signal")) + { + // We need a interfaceName for methods and signals: + CONDITION(!m_currentInterface, "Method or signal found outside a interface."); + CONDITION(m_currentMethod, "Method or signal found inside another method or signal."); + CONDITION(m_currentProperty, "Methor or signal found inside a property."); + CONDITION(!m_structStack.isEmpty(), "Method or signal found inside a struct."); + CONDITION(m_currentEnum, "Methor or signal found inside a enum."); + + const int idx(indexOf(attributes, "name")); + COND_DOC_ERROR(idx < 0, QString("Method or signal without a name found.")); + + m_currentMethod = createEntry(); + + m_currentMethod->section = Entry::FUNCTION_SEC; + m_currentMethod->name = attributes.value(idx); + m_currentMethod->mtype = Method; + m_currentMethod->type = "void"; + + if (DBUS("signal")) + { m_currentMethod->mtype = Signal; } + } + + if (DBUS("arg")) + { + // We need a method for arguments: + CONDITION(!m_currentMethod, "Argument found outside a method or signal."); + CONDITION(m_currentArgument, "Argument found inside another argument."); + + const int name_idx(indexOf(attributes, "name")); + COND_DOC_ERROR(name_idx < 0, QString("Argument without a name found.")); + COND_DOC_ERROR(!hasType(attributes), QString("Argument without a type found.")); + + const int direction_idx(indexOf(attributes, "direction")); + + if ((m_currentMethod->mtype == Signal && + direction_idx >= 0 && + attributes.value(direction_idx) != "in") || + (m_currentMethod->mtype == Method && + direction_idx >= 0 && + attributes.value(direction_idx) != "in" && + attributes.value(direction_idx) != "out")) + { + m_errorString = "Invalid direction found."; + return false; + } + + m_currentArgument = new Argument; + m_currentArgument->type = getType(attributes); + m_currentArgument->name = attributes.value(name_idx); + if (direction_idx >= 0) + { m_currentArgument->attrib = attributes.value(direction_idx); } + else + { + if (m_currentMethod->mtype == Signal) + { m_currentArgument->attrib = "in"; } + else + { m_currentArgument->attrib = "out"; } + } + } + + if (DBUS("property")) + { + CONDITION(m_currentMethod, "Property found inside a method or signal."); + CONDITION(!m_currentInterface, "Property found outside an interface."); + CONDITION(m_currentProperty, "Property found inside another property."); + CONDITION(!m_structStack.isEmpty(), "Property found inside a struct."); + CONDITION(m_currentEnum, "Property found inside a enum."); + + const int name_idx(indexOf(attributes, "name")); + COND_DOC_ERROR(name_idx < 0, QString("Anonymous property found.")); + COND_DOC_ERROR(!hasType(attributes), QString("Property without a type found.")); + + const int access_idx(indexOf(attributes, "access")); + COND_DOC_ERROR(access_idx < 0, QString("Property without a access attribute found.")); + COND_DOC_ERROR(attributes.value(access_idx) != "read" && + attributes.value(access_idx) != "write" && + attributes.value(access_idx) != "readwrite", + QString("Property with invalid access attribute \"%1\" found."). + arg(attributes.value(access_idx))); + + m_currentProperty = createEntry(); + + m_currentProperty->section = Entry::FUNCTION_SEC; + + if (attributes.value(access_idx) == "read" || + attributes.value(access_idx) == "readwrite") + { m_currentProperty->spec |= Entry::Readable; } + + if (attributes.value(access_idx) == "write" || + attributes.value(access_idx) == "readwrite") + { m_currentProperty->spec |= Entry::Writable; } + + m_currentProperty->name = attributes.value(name_idx); + m_currentProperty->mtype = Property; + m_currentProperty->type = getType(attributes); + } + + if (EXTENSION("namespace")) + { + CONDITION(m_currentNode.isEmpty(), "Namespace found outside a node."); + CONDITION(m_currentInterface, "Namespace found inside an interface."); + + const int idx(indexOf(attributes, "name")); + COND_DOC_ERROR(idx < 0, QString("Anonymous namespace found.")); + + m_namespaceStack.append(openNamespace(attributes.value(idx))); + openScopes(m_namespaceStack.last()); + } + + if (EXTENSION("struct")) + { + CONDITION(m_currentMethod, "Struct found inside a method or signal."); + CONDITION(m_currentProperty, "Struct found inside a property."); + CONDITION(m_currentEnum, "Struct found inside an enum."); + + const int idx(indexOf(attributes, "name")); + COND_DOC_ERROR(idx < 0, QString("Anonymous struct found.")); + + Entry * current_struct = createEntry(); + current_struct->section = Entry::CLASS_SEC; + current_struct->spec = Entry::Struct; + current_struct->name = attributes.value(idx); + + openScopes(current_struct); + + current_struct->type = current_struct->name + " struct"; + + m_structStack.append(new StructData(current_struct)); + } + + if (EXTENSION("member")) + { + CONDITION(m_structStack.isEmpty(), "Member found outside of struct."); + + const int name_idx(indexOf(attributes, "name")); + COND_DOC_ERROR(name_idx < 0, QString("Anonymous member found.")); + COND_DOC_ERROR(!hasType(attributes), QString("Member without a type found.")); + + createEntry(); + + m_currentEntry->section = Entry::VARIABLE_SEC; + m_currentEntry->name = attributes.value(name_idx); + m_currentEntry->type = getType(attributes); + + QString type(getDBusType(m_currentEntry->type)); + m_structStack.last()->type.append(type); + } + + if (EXTENSION("enum") || EXTENSION("flagset")) + { + CONDITION(m_currentMethod, "Enum found inside a method or signal."); + CONDITION(m_currentProperty, "Enum found inside a property."); + + const int name_idx(indexOf(attributes, "name")); + COND_DOC_ERROR(name_idx < 0, QString("Anonymous enum found.")); + + const int type_idx(indexOf(attributes, "type")); + QString type = "u"; + if (type_idx >= 0) + { type = attributes.value(type_idx); } + if (type != "y" && type != "q" && type != "u" && type != "t") + { DOC_ERROR(QString("Invalid enum type \"%1\" found.").arg(type)); } + + m_currentEnum = createEntry(); + m_currentEnum->section = Entry::ENUM_SEC; + m_currentEnum->name = attributes.value(name_idx); + + openScopes(m_currentEnum); + + m_currentEnum->type = m_currentEntry->name + " enum"; + + addNamedType(type); + } + + if (EXTENSION("value")) + { + CONDITION(!m_currentEnum, "Value found outside an enum."); + + const int name_idx(indexOf(attributes, "name")); + COND_DOC_ERROR(name_idx < 0, QString("Anonymous value found.")); + + const int value_idx(indexOf(attributes, "value")); + + createEntry(); + + m_currentEntry->section = Entry::VARIABLE_SEC; + m_currentEntry->name = attributes.value(name_idx); + m_currentEntry->type = m_currentEnum->name; // "@"; // enum marker! + if (value_idx >= 0) + { m_currentEntry->initializer = attributes.value(value_idx); } + } + + return true; + } + + bool endElement(const QString &namespaceURI, + const QString &localName, + const QString &qName) + { + // Clean up elements stack: + // Since we made sure to get the elements in the proper order when + // adding we do not need to do so again here. + COND_DOC_ERROR(m_elementStack.last()->element != qName, + QString("Malformed XML: Unexpected closing element found."). + arg(m_elementStack.last()->element)); + m_elementStack.removeLast(); + + // Interface: + if (DBUS("interface")) + { + CONDITION(m_currentInterface, "end of interface found without start."); + m_currentInterface->endBodyLine = lineNumber(); + closeScopes(); + m_currentInterface = 0; + } + + if (DBUS("method") || DBUS("signal")) + { + CONDITION(m_currentMethod, "end of method found without start."); + CONDITION(m_currentInterface, "end of method found outside interface."); + m_currentMethod->endBodyLine = lineNumber(); + m_currentInterface->addSubEntry(m_currentMethod); + m_currentMethod = 0; + } + + if (DBUS("property")) + { + CONDITION(m_currentMethod, "end of property found without start."); + CONDITION(m_currentInterface, "end of property found outside interface."); + m_currentProperty->endBodyLine = lineNumber(); + m_currentInterface->addSubEntry(m_currentProperty); + m_currentProperty = 0; + } + + if (DBUS("arg")) + { + CONDITION(m_currentMethod, "end of arg found outside method."); + m_currentMethod->argList->append(m_currentArgument); + m_currentArgument = 0; + } + + if (EXTENSION("namespace")) + { + Entry * current = m_namespaceStack.last(); + CONDITION(current, "end of namespace without start."); + m_namespaceStack.removeLast(); + + current->endBodyLine = lineNumber(); + closeScopes(); + } + + if (EXTENSION("struct")) + { + StructData * data = m_structStack.last(); + CONDITION(data, "end of struct without start."); + + data->entry->endBodyLine = lineNumber(); + + QString current_type; + current_type.append(QString("(")); + current_type.append(data->type); + current_type.append(QString(")")); + + addNamedType(current_type); + + closeScopes(); + + m_structStack.removeLast(); + } + + if (EXTENSION("member")) + { + StructData * data = m_structStack.last(); + CONDITION(data, "end of struct without start"); + data->entry->addSubEntry(m_currentEntry); + } + + if (EXTENSION("enum") || EXTENSION("flagset")) + { + CONDITION(m_currentEnum, "end of enum without start"); + m_currentEnum->endBodyLine = lineNumber(); + closeScopes(); + + m_currentEnum = 0; + } + + if (EXTENSION("value")) + { + CONDITION(m_currentEntry, "end of value without start"); + m_currentEntry->endBodyLine = lineNumber(); + + m_currentEnum->addSubEntry(m_currentEntry); + } + + return true; + } + + bool characters(const QString & /*chars*/) + { return true; } + + bool comment(const QString & comment_) + { + if (m_currentComment) + { handleComment(); } + + m_currentComment = new CommentData(m_fileName, lineNumber(), comment_); + + if (!m_currentComment->shouldIgnore) + { + delete m_currentComment; + m_currentComment = 0; + return true; + } + + if (m_currentComment->associateWithPrevious) + { handleComment(); } + + return true; + } + + void handleComment() + { + if (m_currentComment == 0 || m_currentEntry == 0) + { return; } + + QCString text(m_currentComment->text); + + m_currentEntry->docFile = m_currentComment->fileName; + m_currentEntry->docLine = m_currentComment->line; + + int position(0); + bool needs_entry(false); + bool brief(false); + Protection prot(Public); + int lineNr = lineNumber(); + + while (parseCommentBlock(m_parser, + m_currentEntry, + text, m_fileName.utf8().data(), + lineNr, + brief, m_currentComment->isJavaStyle, + false, + prot, + position, + needs_entry)) + { + if (needs_entry) { createEntry(); } + } + if (needs_entry) { createEntry(); } + + delete m_currentComment; + m_currentComment = 0; + } + + QXmlLocator * locator() + { return &m_locator; } + + int lineNumber() + { return m_locator.lineNumber(); } + + void setSection() + { + Entry * current = createEntry(); + current->reset(); + + current->name = m_fileName.utf8(); + current->section = Entry::SOURCE_SEC; + + // Open/Close the scope to do the bookkeeping: + openScopes(current); + closeScopes(); + } + +private: + bool isDBusElement(const QString & namespaceURI, + const QString & localName, + const QString & qName, + const QString & element) + { + return (namespaceURI.isEmpty() && localName == element && qName == element) || + (namespaceURI.isEmpty() && localName.isEmpty() && qName == element); + } + + bool isExtensionElement(const QString & namespaceURI, + const QString & localName, + const QString & qName, + const QString & element) + { + // isNull happens in startelement if no URI is used. + if (namespaceURI.isNull()) + { return false; } + + // We are in a endElement: URI is always empty there:-( + if (namespaceURI.isEmpty()) + { return qName == m_scopeStack.last()->extensionPrefix + element; } + + // startElemennt: We need to save the qName prefix + // since endElement will forget about the namespaceURi:-( + if (namespaceURI == EXTENSION_URI) + { + int pos = qName.find(':'); + m_scopeStack.last()->extensionPrefix = qName.left(pos + 1); + } + + return namespaceURI == EXTENSION_URI && localName == element; + } + + bool hasType(const QXmlAttributes & attributes) + { + const int type_idx(indexOf(attributes, "type")); + const int named_type_idx(indexOf(attributes, "named-type")); + + return named_type_idx >= 0 || type_idx >= 0; + } + + QString getType(const QXmlAttributes & attributes) + { + const int type_idx(indexOf(attributes, "type")); + const int named_type_idx(indexOf(attributes, "named-type")); + + QString type; + + if (named_type_idx >= 0) + { + type = attributes.value(named_type_idx); + if (!type.startsWith("::")) + { type = getCurrentScope(attributes.value(named_type_idx)); } + else + { type = type.mid(2); } + if (m_namedTypeMap.contains(type)) + { + if (type_idx >= 0) + { + const QString dbus_type(attributes.value(type_idx)); + if (dbus_type != m_namedTypeMap[type]) + { + DOC_ERROR(QString("Type \"%1\" does not match up with " + "previous definition of named type \"%2\" (which was \"%3\"."). + arg(dbus_type). + arg(type). + arg(m_namedTypeMap[type])); + } + } + return type; + } + + DOC_ERROR(QString("Undefined named type \"%1\" used.").arg(type)); + } + + if (type_idx >= 0) + { + type = attributes.value(type_idx); + + QRegExp reg_exp(QCString("(a?[ybnqiuxdtsogv]|a[{]sv[}])")); + if (reg_exp.match(type.data())) + { return type; } + + DOC_ERROR(QString("Unnamed complex D-Bus type \"%1\" found.").arg(type)); + } + + return QString(); + } + + QString getDBusType(const QString & type) + { + QString scoped_type = type; + if (!scoped_type.contains("::")) + { scoped_type = getCurrentScope(type); } + + if (m_namedTypeMap.contains(scoped_type)) + { return m_namedTypeMap[scoped_type]; } + else + { return type; } + } + + void addNamedType(const QString type) + { + QString scoped_name(getCurrentScope()); + + if (m_namedTypeMap.contains(scoped_name)) + { + DOC_ERROR(QString("Named type \"%1\" is already defined.").arg(scoped_name)); + return; + } + + m_namedTypeMap.insert(scoped_name, type); + } + + QString getCurrentScope(const QString & type = QString()) + { + QString scoped_name; + if (!m_scopeStack.isEmpty()) + { + scoped_name = m_scopeStack.last()->scope->name; + scoped_name.append("::"); + } + if (!type.isEmpty()) + { scoped_name.append(type); } + else + { scoped_name = scoped_name.left(scoped_name.length() - 2); } + + return scoped_name; + } + + int indexOf(const QXmlAttributes & attributes, const QString & name, + const QString & type = "CDATA", const bool mandatory = true) + { + const int idx(attributes.index(name)); + if (idx < 0 || idx > attributes.length()) { return -1; } + if (attributes.type(idx) != type) { return -1; } + if (mandatory && attributes.value(idx).isEmpty()) { return -1; } + + return idx; + } + + Entry * createEntry() + { + Entry * entry = new Entry(); + + entry->protection = Public ; + entry->virt = Normal; + entry->stat = false; + entry->lang = SrcLangExt_XML; + entry->spec = 0; + + entry->fileName = m_fileName; + entry->startLine = lineNumber(); + entry->bodyLine = lineNumber(); + + entry->callGraph = false; + entry->callerGraph = false; + + initGroupInfo(entry); + + m_currentEntry = entry; + + handleComment(); + + return entry; + } + + void openScopes(Entry * object) + { + int cur_scope_separator_pos = 0; + int last_scope_separator_pos = 0; + while (0 <= (cur_scope_separator_pos = object->name.find("::", last_scope_separator_pos))) + { + QString scope = object->name.mid(last_scope_separator_pos, + cur_scope_separator_pos - last_scope_separator_pos); + last_scope_separator_pos = cur_scope_separator_pos + 2; + + Entry * current_namespace = openNamespace(scope); + + if (!m_scopeStack.isEmpty()) + { m_scopeStack.last()->scope->addSubEntry(current_namespace); } + + m_scopeStack.append(new ScopeData(current_namespace, m_scopeCount)); + } + + QString scoped_name(getCurrentScope()); + if (!scoped_name.isEmpty()) + { scoped_name.append("::"); } + scoped_name.append(object->name.mid(last_scope_separator_pos)); + + object->name = scoped_name; + + if (!m_scopeStack.isEmpty()) + { m_scopeStack.last()->scope->addSubEntry(object); } + m_scopeStack.append(new ScopeData(object, m_scopeCount)); + + ++m_scopeCount; + } + + Entry * openNamespace(const QString & name) + { + Entry * current_namespace = createEntry(); + QString scoped_name(getCurrentScope()); + if (!scoped_name.isEmpty()) + { scoped_name.append("::"); } + scoped_name.append(name); + current_namespace->name = scoped_name; + current_namespace->section = Entry::NAMESPACE_SEC; + current_namespace->type = "namespace" ; + + return current_namespace; + } + + void closeScopes() + { + const int current_scope_count(m_scopeStack.last()->count); + + // Do not close the root scope. + if (current_scope_count == 0) + { return; } + + while (current_scope_count == m_scopeStack.last()->count) + { m_scopeStack.removeLast(); } + } + + ParserInterface * m_parser; + + QXmlLocator m_locator; + QString m_currentNode; // Nodes can not be nested, no entry necessary. + + struct ElementData + { + ElementData(const QString & e) : + element(e) + { } + ~ElementData() { } + + QString element; //*< The element name + QString extensionPrefix; //*< The prefix used for our extension. + QString text; //*< The actual xml code. + }; + QList<ElementData> m_elementStack; + + Entry * m_currentEntry; // The currently open entry. + + Entry * m_currentInterface; // Interfaces can not be nested. + Entry * m_currentMethod; // Methods can not be nested. + Argument * m_currentArgument; // Arguments can not be nested. + Entry * m_currentProperty; // Properties can not be nested. + Entry * m_currentEnum; // Enums can not be nested. + QList<Entry> m_namespaceStack; + + struct StructData + { + StructData(Entry * e) : entry(e) { } + ~StructData() { } + + QString type; + Entry * entry; + }; + QList<StructData> m_structStack; // Structs can be nested. + + struct ScopeData + { + ScopeData(Entry * s, int c) : + scope(s), + count(c) + { } + ~ScopeData() { } + + Entry * scope; + QString extensionPrefix; + int count; + }; + QList<ScopeData> m_scopeStack; // Scopes are nested. + + QString m_fileName; + + struct CommentData + { + CommentData(const QString & f, const int l, const QString & t) : + isJavaStyle(false), + isQtStyle(false), + line(l), + fileName(f) + { + isJavaStyle = t.startsWith(QChar('*')); + isQtStyle = t.startsWith(QChar('!')); + shouldIgnore = (!isJavaStyle && !isQtStyle); + associateWithPrevious = (t.at(1) == QChar('<')); + if (associateWithPrevious) + { text = t.mid(2); } + else + { text = t.mid(1); } + } + ~CommentData() { } + + QString text; + bool isJavaStyle; + bool isQtStyle; + bool shouldIgnore; + bool associateWithPrevious; + int line; + QString fileName; + }; + CommentData * m_currentComment; + + int m_scopeCount; //*< unique scope id. + + QString m_errorString; + + QMap<QString, QString> m_namedTypeMap; +}; + +// ----------------------------------------------------------------------- +// DBusXMLScanner +// ----------------------------------------------------------------------- + +DBusXMLScanner::DBusXMLScanner() +{ } + +DBusXMLScanner::~DBusXMLScanner() +{ } + +void DBusXMLScanner::parseInput(const char * fileName, + const char * /* fileBuf */, + Entry * root) +{ + err("Note that the dbusxml parser seems to be broken :-(\nPlease help me to fix it!\n"); + QFile inputFile(fileName); + + QXmlInputSource inputSource(inputFile); + QXmlSimpleReader reader; + + DBusXMLHandler handler(this, &reader, fileName, root); + reader.setContentHandler(&handler); + reader.setErrorHandler(&handler); + reader.setLexicalHandler(&handler); + + groupEnterFile(fileName, 1); + handler.setSection(); + reader.parse(inputSource); + + if (handler.errorString()) + { err("DBus XML Parser: Error at line %d: %s\n", + handler.locator()->lineNumber(),handler.errorString().utf8().data()); } + + groupLeaveFile(fileName, 1); +} + +bool DBusXMLScanner::needsPreprocessing(const QCString & /* extension */) +{ return (false); } + +void DBusXMLScanner::parseCode(CodeOutputInterface & /* codeOutIntf */, + const char * /* scopeName */, + const QCString & /* input */, + bool /* isExampleBlock */, + const char * /* exampleName */, + FileDef * /* fileDef */, + int /* startLine */, + int /* endLine */, + bool /* inlineFragment */, + MemberDef * /* memberDef */, + bool /*showLineNumbers*/) +{ } + +void DBusXMLScanner::resetCodeParserState() +{ } + +void DBusXMLScanner::parsePrototype(const char * /* text */) +{ } Index: branches/xZenu/src/util/doxygen/src/definition.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/definition.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/definition.cpp (revision 1322) @@ -0,0 +1,1655 @@ +/****************************************************************************** + * + * $Id: index.cpp,v 1.30 1999/03/06 22:15:39 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include "qtbc.h" +#include <ctype.h> +#include <qregexp.h> +#include "md5.h" +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include "config.h" +#include "definition.h" +#include "doxygen.h" +#include "language.h" +#include "message.h" +#include "outputlist.h" +#include "code.h" +#include "util.h" +#include "groupdef.h" +#include "pagedef.h" +#include "section.h" +#include "htags.h" +#include "parserintf.h" +#include "marshal.h" +#include "debug.h" + +#define START_MARKER 0x4445465B // DEF[ +#define END_MARKER 0x4445465D // DEF] + +//----------------------------------------------------------------------------------------- + +class DefinitionImpl +{ + public: + DefinitionImpl(); + ~DefinitionImpl(); + void init(const char *df,int dl, + const char *n); + + SectionDict *sectionDict; // dictionary of all sections, not accessible + + MemberSDict *sourceRefByDict; + MemberSDict *sourceRefsDict; + QList<ListItemInfo> *xrefListItems; + GroupList *partOfGroups; + + DocInfo *details; // not exported + DocInfo *inbodyDocs; // not exported + BriefInfo *brief; // not exported + BodyInfo *body; // not exported + QCString docSignatures; + + QCString localName; // local (unqualified) name of the definition + // in the future m_name should become m_localName + QCString qualifiedName; + QCString ref; // reference to external documentation + + bool hidden; + bool isArtificial; + + Definition *outerScope; // not owner + + // where the item was found + QCString defFileName; + int defLine; + QCString defFileExt; +}; + +DefinitionImpl::DefinitionImpl() + : sectionDict(0), sourceRefByDict(0), sourceRefsDict(0), + xrefListItems(0), partOfGroups(0), + details(0), inbodyDocs(0), brief(0), body(0), + outerScope(0) +{ +} + +DefinitionImpl::~DefinitionImpl() +{ + delete sectionDict; + delete sourceRefByDict; + delete sourceRefsDict; + delete partOfGroups; + delete xrefListItems; + delete brief; + delete details; + delete body; + delete inbodyDocs; +} + +void DefinitionImpl::init(const char *df,int dl, + const char *n) +{ + defFileName = df; + int lastDot = defFileName.findRev('.'); + if (lastDot!=-1) + { + defFileExt = defFileName.mid(lastDot); + } + defLine = dl; + QCString name = n; + if (name!="<globalScope>") + { + //extractNamespaceName(m_name,m_localName,ns); + localName=stripScope(n); + } + else + { + localName=n; + } + //printf("m_localName=%s\n",m_localName.data()); + + brief = 0; + details = 0; + body = 0; + inbodyDocs = 0; + sourceRefByDict = 0; + sourceRefsDict = 0; + sectionDict = 0, + outerScope = Doxygen::globalScope; + partOfGroups = 0; + xrefListItems = 0; + hidden = FALSE; + isArtificial = FALSE; +} + +//----------------------------------------------------------------------------------------- + +static bool matchExcludedSymbols(const char *name) +{ + static QStrList &exclSyms = Config_getList("EXCLUDE_SYMBOLS"); + if (exclSyms.count()==0) return FALSE; // nothing specified + const char *pat = exclSyms.first(); + QCString symName = name; + while (pat) + { + QCString pattern = pat; + bool forceStart=FALSE; + bool forceEnd=FALSE; + if (pattern.at(0)=='^') + pattern=pattern.mid(1),forceStart=TRUE; + if (pattern.at(pattern.length()-1)=='$') + pattern=pattern.left(pattern.length()-1),forceEnd=TRUE; + if (pattern.find('*')!=-1) // wildcard mode + { + QRegExp re(substitute(pattern,"*",".*"),TRUE); + int i,pl; + i = re.match(symName,0,&pl); + //printf(" %d = re.match(%s) pattern=%s\n",i,symName.data(),pattern.data()); + if (i!=-1) // wildcard match + { + int sl=symName.length(); + // check if it is a whole word match + if ((i==0 || pattern.at(0)=='*' || (!isId(symName.at(i-1)) && !forceStart)) && + (i+pl==sl || pattern.at(i+pl)=='*' || (!isId(symName.at(i+pl)) && !forceEnd)) + ) + { + //printf("--> name=%s pattern=%s match at %d\n",symName.data(),pattern.data(),i); + return TRUE; + } + } + } + else if (!pattern.isEmpty()) // match words + { + int i = symName.find(pattern); + if (i!=-1) // we have a match! + { + int pl=pattern.length(); + int sl=symName.length(); + // check if it is a whole word match + if ((i==0 || (!isId(symName.at(i-1)) && !forceStart)) && + (i+pl==sl || (!isId(symName.at(i+pl)) && !forceEnd)) + ) + { + //printf("--> name=%s pattern=%s match at %d\n",symName.data(),pattern.data(),i); + return TRUE; + } + } + } + pat = exclSyms.next(); + } + //printf("--> name=%s: no match\n",name); + return FALSE; +} + +void Definition::addToMap(const char *name,Definition *d) +{ + bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); + QCString symbolName = name; + int index=computeQualifiedIndex(symbolName); + if (!vhdlOpt && index!=-1) symbolName=symbolName.mid(index+2); + if (!symbolName.isEmpty()) + { + //printf("******* adding symbol `%s' (%p)\n",symbolName.data(),d); + DefinitionIntf *di=Doxygen::symbolMap->find(symbolName); + //printf(" addToMap(%p): looking for symbol %s: %p\n",d,symbolName.data(),di); + if (di==0) // new Symbol + { + //printf(" new symbol!\n"); + Doxygen::symbolMap->insert(symbolName,d); + } + else // existing symbol + { + //printf(" existing symbol: "); + if (di->definitionType()==DefinitionIntf::TypeSymbolList) // already multiple symbols + { + //printf("adding to exiting list\n"); + DefinitionList *dl = (DefinitionList*)di; + dl->append(d); + } + else // going from one to two symbols + { + Doxygen::symbolMap->take(symbolName); + DefinitionList *dl = new DefinitionList; + //printf("replacing symbol by list %p with elements %p and %p\n",dl,di,d); + dl->append((Definition*)di); + dl->append(d); + Doxygen::symbolMap->insert(symbolName,dl); + } + } + + // auto resize if needed + static int sizeIndex=9; + if (Doxygen::symbolMap->size()>SDict_primes[sizeIndex]) + { + Doxygen::symbolMap->resize(SDict_primes[++sizeIndex]); + } + + d->_setSymbolName(symbolName); + } +} + +void Definition::removeFromMap(Definition *d) +{ + QString symbolName = d->m_symbolName; + if (!symbolName.isEmpty()) + { + //printf("******* removing symbol `%s' (%p)\n",symbolName.data(),d); + DefinitionIntf *di=Doxygen::symbolMap->find(symbolName); + if (di) + { + if (di!=d) // symbolName not unique + { + //printf(" removing from list: %p!\n",di); + DefinitionList *dl = (DefinitionList*)di; + bool b = dl->removeRef(d); + ASSERT(b==TRUE); + if (dl->isEmpty()) + { + Doxygen::symbolMap->take(symbolName); + } + } + else // symbolName unique + { + //printf(" removing symbol %p\n",di); + Doxygen::symbolMap->take(symbolName); + } + } + } +} + +Definition::Definition(const char *df,int dl, + const char *name,const char *b, + const char *d,bool isSymbol) +{ + m_name = name; + m_impl = new DefinitionImpl; + m_impl->init(df,dl,name); + m_isSymbol = isSymbol; + if (isSymbol) addToMap(name,this); + _setBriefDescription(b,df,dl); + _setDocumentation(d,df,dl,TRUE,FALSE); + if (matchExcludedSymbols(name)) + { + m_impl->hidden = TRUE; + } +} + +Definition::~Definition() +{ + if (m_isSymbol) + { + removeFromMap(this); + } + if (m_impl) + { + delete m_impl; + m_impl=0; + } +} + +void Definition::setName(const char *name) +{ + if (name==0) return; + m_name = name; +} + +void Definition::addSectionsToDefinition(QList<SectionInfo> *anchorList) +{ + if (!anchorList) return; + makeResident(); + //printf("%s: addSectionsToDefinition(%d)\n",name().data(),anchorList->count()); + SectionInfo *si=anchorList->first(); + while (si) + { + //printf("Add section `%s' to definition `%s'\n", + // si->label.data(),name().data()); + SectionInfo *gsi=Doxygen::sectionDict.find(si->label); + if (gsi==0) + { + gsi = new SectionInfo(*si); + Doxygen::sectionDict.insert(si->label,gsi); + } + if (m_impl->sectionDict==0) + { + m_impl->sectionDict = new SectionDict(17); + } + if (m_impl->sectionDict->find(gsi->label)==0) + { + m_impl->sectionDict->insert(gsi->label,gsi); + gsi->definition = this; + } + si=anchorList->next(); + } +} + +void Definition::writeDocAnchorsToTagFile() +{ + makeResident(); + if (!Config_getString("GENERATE_TAGFILE").isEmpty() && m_impl->sectionDict) + { + //printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_sectionDict->count()); + QDictIterator<SectionInfo> sdi(*m_impl->sectionDict); + SectionInfo *si; + for (;(si=sdi.current());++sdi) + { + if (!si->generated) + { + //printf("write an entry!\n"); + if (definitionType()==TypeMember) Doxygen::tagFile << " "; + Doxygen::tagFile << " <docanchor file=\"" + << si->fileName << "\">" << si->label + << "</docanchor>" << endl; + } + } + } +} + +bool Definition::_docsAlreadyAdded(const QCString &doc) +{ + uchar md5_sig[16]; + QCString sigStr(33); + // to avoid mismatches due to differences in indenting, we first remove + // double whitespaces... + QCString docStr = doc.simplifyWhiteSpace(); + MD5Buffer((const unsigned char *)docStr.data(),docStr.length(),md5_sig); + MD5SigToString(md5_sig,sigStr.data(),33); + if (m_impl->docSignatures.find(sigStr)==-1) // new docs, add signature to prevent re-adding it + { + m_impl->docSignatures+=":"+sigStr; + return FALSE; + } + else + { + return TRUE; + } +} + +void Definition::_setDocumentation(const char *d,const char *docFile,int docLine, + bool stripWhiteSpace,bool atTop) +{ + if (d==0) return; + //printf("Definition::setDocumentation(%s,%s,%d,%d)\n",d,docFile,docLine,stripWhiteSpace); + QCString doc = d; + if (stripWhiteSpace) + { + doc = stripLeadingAndTrailingEmptyLines(doc); + } + else // don't strip whitespace + { + doc=d; + } + if (!_docsAlreadyAdded(doc)) + { + //printf("setting docs for %s: `%s'\n",name().data(),m_doc.data()); + if (m_impl->details==0) + { + m_impl->details = new DocInfo; + } + if (m_impl->details->doc.isEmpty()) // fresh detailed description + { + m_impl->details->doc = doc; + } + else if (atTop) // another detailed description, append it to the start + { + m_impl->details->doc = doc+"\n\n"+m_impl->details->doc; + } + else // another detailed description, append it to the end + { + m_impl->details->doc += "\n\n"+doc; + } + if (docLine!=-1) // store location if valid + { + m_impl->details->file = docFile; + m_impl->details->line = docLine; + } + else + { + m_impl->details->file = docFile; + m_impl->details->line = 1; + } + } +} + +void Definition::setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace) +{ + if (d==0) return; + makeResident(); + _setDocumentation(d,docFile,docLine,stripWhiteSpace,FALSE); +} + +#define uni_isupper(c) (QChar(c).category()==QChar::Letter_Uppercase) + +// do a UTF-8 aware search for the last real character and return TRUE +// if that is a multibyte one. +static bool lastCharIsMultibyte(const QCString &s) +{ + int l = s.length(); + int p = 0; + int pp = -1; + while ((p=nextUtf8CharPosition(s,l,p))<l) pp=p; + if (pp==-1 || ((uchar)s[pp])<0x80) return FALSE; + return TRUE; +} + +void Definition::_setBriefDescription(const char *b,const char *briefFile,int briefLine) +{ + static QCString outputLanguage = Config_getEnum("OUTPUT_LANGUAGE"); + static bool needsDot = outputLanguage!="Japanese" && + outputLanguage!="Chinese" && + outputLanguage!="Korean"; + QCString brief = b; + brief = brief.stripWhiteSpace(); + if (brief.isEmpty()) return; + int bl = brief.length(); + if (bl>0 && needsDot) // add punctuation if needed + { + int c = brief.at(bl-1); + switch(c) + { + case '.': case '!': case '?': case '>': case ':': case ')': break; + default: + if (uni_isupper(brief.at(0)) && !lastCharIsMultibyte(brief)) brief+='.'; + break; + } + } + + if (m_impl->brief && !m_impl->brief->doc.isEmpty()) + { + //printf("adding to details\n"); + _setDocumentation(brief,briefFile,briefLine,FALSE,TRUE); + } + else if (!_docsAlreadyAdded(brief)) + { + //fprintf(stderr,"Definition::setBriefDescription(%s,%s,%d)\n",b,briefFile,briefLine); + if (m_impl->brief==0) + { + m_impl->brief = new BriefInfo; + } + m_impl->brief->doc=brief; + if (briefLine!=-1) + { + m_impl->brief->file = briefFile; + m_impl->brief->line = briefLine; + } + else + { + m_impl->brief->file = briefFile; + m_impl->brief->line = 1; + } + } +} + +void Definition::setBriefDescription(const char *b,const char *briefFile,int briefLine) +{ + if (b==0) return; + makeResident(); + _setBriefDescription(b,briefFile,briefLine); +} + +void Definition::_setInbodyDocumentation(const char *doc,const char *inbodyFile,int inbodyLine) +{ + if (m_impl->inbodyDocs==0) + { + m_impl->inbodyDocs = new DocInfo; + } + if (m_impl->inbodyDocs->doc.isEmpty()) // fresh inbody docs + { + m_impl->inbodyDocs->doc = doc; + m_impl->inbodyDocs->file = inbodyFile; + m_impl->inbodyDocs->line = inbodyLine; + } + else // another inbody documentation fragment, append this to the end + { + m_impl->inbodyDocs->doc += QCString("\n\n")+doc; + } +} + +void Definition::setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine) +{ + if (d==0) return; + makeResident(); + _setInbodyDocumentation(d,inbodyFile,inbodyLine); +} + +/*! Reads a fragment of code from file \a fileName starting at + * line \a startLine and ending at line \a endLine (inclusive). The fragment is + * stored in \a result. If FALSE is returned the code fragment could not be + * found. + * + * The file is scanned for a opening bracket ('{') from \a startLine onward + * The line actually containing the bracket is returned via startLine. + * The file is scanned for a closing bracket ('}') from \a endLine backward. + * The line actually containing the bracket is returned via endLine. + * Note that for VHDL code the bracket search is not done. + */ +static bool readCodeFragment(const char *fileName, + int &startLine,int &endLine,QCString &result) +{ + static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); + static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES"); + //printf("readCodeFragment(%s,%d,%d)\n",fileName,startLine,endLine); + if (fileName==0 || fileName[0]==0) return FALSE; // not a valid file name + QCString filter = getFileFilter(fileName,TRUE); + FILE *f=0; + bool usePipe = !filter.isEmpty() && filterSourceFiles; + if (!usePipe) // no filter given or wanted + { + f = portable_fopen(fileName,"r"); + } + else // use filter + { + QCString cmd=filter+" \""+fileName+"\""; + Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data()); + f = portable_popen(cmd,"r"); + } + bool found=vhdlOpt; // for VHDL no bracket search is possible + if (f) + { + int c=0; + int col=0; + int lineNr=1; + // skip until the startLine has reached + while (lineNr<startLine && !feof(f)) + { + while ((c=fgetc(f))!='\n' && c!=EOF) /* skip */; + lineNr++; + } + if (!feof(f)) + { + // skip until the opening bracket or lonely : is found + char cn=0; + while (lineNr<=endLine && !feof(f) && !found) + { + int pc=0; + while ((c=fgetc(f))!='{' && c!=':' && c!=EOF) + { + //printf("parsing char `%c'\n",c); + if (c=='\n') + { + lineNr++,col=0; + } + else if (c=='\t') + { + col+=Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE")); + } + else if (pc=='/' && c=='/') // skip single line comment + { + while ((c=fgetc(f))!='\n' && c!=EOF) pc=c; + if (c=='\n') lineNr++,col=0; + } + else if (pc=='/' && c=='*') // skip C style comment + { + while (((c=fgetc(f))!='/' || pc!='*') && c!=EOF) + { + if (c=='\n') lineNr++,col=0; + pc=c; + } + } + else + { + col++; + } + pc = c; + } + if (c==':') + { + cn=fgetc(f); + if (cn!=':') found=TRUE; + } + else if (c=='{') + { + found=TRUE; + } + } + //printf(" -> readCodeFragment(%s,%d,%d) lineNr=%d\n",fileName,startLine,endLine,lineNr); + if (found) + { + // For code with more than one line, + // fill the line with spaces until we are at the right column + // so that the opening brace lines up with the closing brace + if (endLine!=startLine) + { + QCString spaces; + spaces.fill(' ',col); + result+=spaces; + } + // copy until end of line + result+=c; + if (c==':') + { + result+=cn; + if (cn=='\n') lineNr++; + } + startLine=lineNr; + const int maxLineLength=4096; + char lineStr[maxLineLength]; + do + { + //printf("reading line %d in range %d-%d\n",lineNr,startLine,endLine); + int size_read; + do + { + // read up to maxLineLength-1 bytes, the last byte being zero + char *p = fgets(lineStr, maxLineLength,f); + //printf(" read %s",p); + if (p) + { + size_read=qstrlen(p); + } + else // nothing read + { + size_read=-1; + lineStr[0]='\0'; + } + result+=lineStr; + } while (size_read == (maxLineLength-1)); + + lineNr++; + } while (lineNr<=endLine && !feof(f)); + + // strip stuff after closing bracket + int newLineIndex = result.findRev('\n'); + int braceIndex = result.findRev('}'); + if (braceIndex > newLineIndex) + { + result.truncate(braceIndex+1); + } + endLine=lineNr-1; + } + } + if (usePipe) + { + portable_pclose(f); + } + else + { + fclose(f); + } + } + result = transcodeCharacterStringToUTF8(result); + return found; +} + +/*! Write a reference to the source code defining this definition */ +void Definition::writeSourceDef(OutputList &ol,const char *) +{ + static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); + static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); + makeResident(); + ol.pushGeneratorState(); + //printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef); + if (sourceBrowser && + m_impl->body && m_impl->body->startLine!=-1 && m_impl->body->fileDef) + { + QCString refText = theTranslator->trDefinedAtLineInSourceFile(); + int lineMarkerPos = refText.find("@0"); + int fileMarkerPos = refText.find("@1"); + if (lineMarkerPos!=-1 && fileMarkerPos!=-1) // should always pass this. + { + QCString lineStr,anchorStr; + lineStr.sprintf("%d",m_impl->body->startLine); + anchorStr.sprintf(Htags::useHtags ? "L%d" : "l%05d",m_impl->body->startLine); + ol.startParagraph(); + if (lineMarkerPos<fileMarkerPos) // line marker before file marker + { + // write text left from linePos marker + ol.parseText(refText.left(lineMarkerPos)); + ol.pushGeneratorState(); + ol.disable(OutputGenerator::RTF); + ol.disable(OutputGenerator::Man); + if (!latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + // write line link (HTML, LaTeX optionally) + ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(), + anchorStr,lineStr); + ol.enableAll(); + ol.disable(OutputGenerator::Html); + if (latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + // write normal text (Man/RTF, Latex optionally) + ol.docify(lineStr); + ol.popGeneratorState(); + + // write text between markers + ol.parseText(refText.mid(lineMarkerPos+2, + fileMarkerPos-lineMarkerPos-2)); + + ol.pushGeneratorState(); + ol.disable(OutputGenerator::RTF); + ol.disable(OutputGenerator::Man); + if (!latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + // write line link (HTML, LaTeX optionally) + ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(), + 0,m_impl->body->fileDef->name()); + ol.enableAll(); + ol.disable(OutputGenerator::Html); + if (latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + // write normal text (Man/RTF, Latex optionally) + ol.docify(m_impl->body->fileDef->name()); + ol.popGeneratorState(); + + // write text right from file marker + ol.parseText(refText.right( + refText.length()-fileMarkerPos-2)); + } + else // file marker before line marker + { + // write text left from file marker + ol.parseText(refText.left(fileMarkerPos)); + ol.pushGeneratorState(); + ol.disable(OutputGenerator::RTF); + ol.disable(OutputGenerator::Man); + if (!latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + // write file link (HTML only) + ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(), + 0,m_impl->body->fileDef->name()); + ol.enableAll(); + ol.disable(OutputGenerator::Html); + if (latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + // write normal text (Latex/Man only) + ol.docify(m_impl->body->fileDef->name()); + ol.popGeneratorState(); + + // write text between markers + ol.parseText(refText.mid(fileMarkerPos+2, + lineMarkerPos-fileMarkerPos-2)); + + ol.pushGeneratorState(); + ol.disable(OutputGenerator::RTF); + ol.disable(OutputGenerator::Man); + if (!latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + ol.disableAllBut(OutputGenerator::Html); + // write line link (HTML only) + ol.writeObjectLink(0,m_impl->body->fileDef->getSourceFileBase(), + anchorStr,lineStr); + ol.enableAll(); + ol.disable(OutputGenerator::Html); + if (latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + // write normal text (Latex/Man only) + ol.docify(lineStr); + ol.popGeneratorState(); + + // write text right from linePos marker + ol.parseText(refText.right( + refText.length()-lineMarkerPos-2)); + } + ol.endParagraph(); + } + else + { + err("error: translation error: invalid markers in trDefinedInSourceFile()\n"); + } + } + ol.popGeneratorState(); +} + +void Definition::setBodySegment(int bls,int ble) +{ + //printf("setBodySegment(%d,%d) for %s\n",bls,ble,name().data()); + makeResident(); + if (m_impl->body==0) m_impl->body = new BodyInfo; + m_impl->body->startLine=bls; + m_impl->body->endLine=ble; +} + +void Definition::setBodyDef(FileDef *fd) +{ + makeResident(); + if (m_impl->body==0) m_impl->body = new BodyInfo; + m_impl->body->fileDef=fd; +} + +/*! Write code of this definition into the documentation */ +void Definition::writeInlineCode(OutputList &ol,const char *scopeName) +{ + makeResident(); + ol.pushGeneratorState(); + //printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(), + // m_startBodyLine,m_endBodyLine,m_bodyDef); + if (Config_getBool("INLINE_SOURCES") && + m_impl->body && m_impl->body->startLine!=-1 && + m_impl->body->endLine>=m_impl->body->startLine && m_impl->body->fileDef) + { + QCString codeFragment; + int actualStart=m_impl->body->startLine,actualEnd=m_impl->body->endLine; + if (readCodeFragment(m_impl->body->fileDef->absFilePath(), + actualStart,actualEnd,codeFragment) + ) + { + //printf("Adding code fragement '%s' ext='%s'\n", + // codeFragment.data(),m_impl->defFileExt.data()); + ParserInterface *pIntf = Doxygen::parserManager->getParser(m_impl->defFileExt); + pIntf->resetCodeParserState(); + //printf("Read:\n`%s'\n\n",codeFragment.data()); + MemberDef *thisMd = 0; + if (definitionType()==TypeMember) thisMd = (MemberDef *)this; + ol.startCodeFragment(); + pIntf->parseCode(ol, // codeOutIntf + scopeName, // scope + codeFragment, // input + FALSE, // isExample + 0, // exampleName + m_impl->body->fileDef, // fileDef + actualStart, // startLine + actualEnd, // endLine + TRUE, // inlineFragment + thisMd, // memberDef + FALSE // show line numbers + ); + ol.endCodeFragment(); + } + } + ol.popGeneratorState(); +} + +/*! Write a reference to the source code fragments in which this + * definition is used. + */ +void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName, + const QCString &text,MemberSDict *members,bool /*funcOnly*/) +{ + static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); + static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); + static bool refLinkSource = Config_getBool("REFERENCES_LINK_SOURCE"); + ol.pushGeneratorState(); + if (members) + { + ol.startParagraph(); + ol.parseText(text); + ol.docify(" "); + + QCString ldefLine=theTranslator->trWriteList(members->count()); + + QRegExp marker("@[0-9]+"); + int index=0,newIndex,matchLen; + // now replace all markers in inheritLine with links to the classes + while ((newIndex=marker.match(ldefLine,index,&matchLen))!=-1) + { + bool ok; + ol.parseText(ldefLine.mid(index,newIndex-index)); + uint entryIndex = ldefLine.mid(newIndex+1,matchLen-1).toUInt(&ok); + MemberDef *md=members->at(entryIndex); + if (ok && md) + { + QCString scope=md->getScopeString(); + QCString name=md->name(); + //printf("class=%p scope=%s scopeName=%s\n",md->getClassDef(),scope.data(),scopeName); + if (!scope.isEmpty() && scope!=scopeName) + { + if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) + { + name.prepend(scope+"."); + } + else + { + name.prepend(scope+"::"); + } + } + if (!md->isObjCMethod() && + (md->isFunction() || md->isSlot() || + md->isPrototype() || md->isSignal() + ) + ) + { + name+="()"; + } + //Definition *d = md->getOutputFileBase(); + //if (d==Doxygen::globalScope) d=md->getBodyDef(); + if (sourceBrowser && + !(md->isLinkable() && !refLinkSource) && + md->getStartBodyLine()!=-1 && + md->getBodyDef() + ) + { + //printf("md->getBodyDef()=%p global=%p\n",md->getBodyDef(),Doxygen::globalScope); + // for HTML write a real link + ol.pushGeneratorState(); + //ol.disableAllBut(OutputGenerator::Html); + + ol.disable(OutputGenerator::RTF); + ol.disable(OutputGenerator::Man); + if (!latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + QCString lineStr,anchorStr; + anchorStr.sprintf("l%05d",md->getStartBodyLine()); + //printf("Write object link to %s\n",md->getBodyDef()->getSourceFileBase().data()); + ol.writeObjectLink(0,md->getBodyDef()->getSourceFileBase(),anchorStr,name); + ol.popGeneratorState(); + + // for the other output formats just mention the name + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Html); + if (latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + ol.docify(name); + ol.popGeneratorState(); + } + else if (md->isLinkable() /*&& d && d->isLinkable()*/) + { + // for HTML write a real link + ol.pushGeneratorState(); + //ol.disableAllBut(OutputGenerator::Html); + ol.disable(OutputGenerator::RTF); + ol.disable(OutputGenerator::Man); + if (!latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + + ol.writeObjectLink(md->getReference(), + md->getOutputFileBase(), + md->anchor(),name); + ol.popGeneratorState(); + + // for the other output formats just mention the name + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Html); + if (latexSourceCode) + { + ol.disable(OutputGenerator::Latex); + } + ol.docify(name); + ol.popGeneratorState(); + } + else + { + ol.docify(name); + } + } + index=newIndex+matchLen; + } + ol.parseText(ldefLine.right(ldefLine.length()-index)); + ol.writeString("."); + ol.endParagraph(); + } + ol.popGeneratorState(); +} + +void Definition::writeSourceReffedBy(OutputList &ol,const char *scopeName) +{ + makeResident(); + if (Config_getBool("REFERENCED_BY_RELATION")) + { + _writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_impl->sourceRefByDict,FALSE); + } +} + +void Definition::writeSourceRefs(OutputList &ol,const char *scopeName) +{ + makeResident(); + if (Config_getBool("REFERENCES_RELATION")) + { + _writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_impl->sourceRefsDict,TRUE); + } +} + +bool Definition::hasDocumentation() const +{ + static bool extractAll = Config_getBool("EXTRACT_ALL"); + //static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); + makeResident(); + bool hasDocs = + (m_impl->details && !m_impl->details->doc.isEmpty()) || // has detailed docs + (m_impl->brief && !m_impl->brief->doc.isEmpty()) || // has brief description + (m_impl->inbodyDocs && !m_impl->inbodyDocs->doc.isEmpty()) || // has inbody docs + extractAll //|| // extract everything + // (sourceBrowser && m_impl->body && + // m_impl->body->startLine!=-1 && m_impl->body->fileDef) + ; // link to definition + return hasDocs; +} + +bool Definition::hasUserDocumentation() const +{ + makeResident(); + bool hasDocs = + (m_impl->details && !m_impl->details->doc.isEmpty()) || + (m_impl->brief && !m_impl->brief->doc.isEmpty()) || + (m_impl->inbodyDocs && !m_impl->inbodyDocs->doc.isEmpty()); + return hasDocs; +} + +void Definition::addSourceReferencedBy(MemberDef *md) +{ + if (md) + { + makeResident(); + QCString name = md->name(); + QCString scope = md->getScopeString(); + + if (!scope.isEmpty()) + { + name.prepend(scope+"::"); + } + + if (m_impl->sourceRefByDict==0) + { + m_impl->sourceRefByDict = new MemberSDict; + } + if (m_impl->sourceRefByDict->find(name)==0) + { + m_impl->sourceRefByDict->inSort(name,md); + } + } +} + +void Definition::addSourceReferences(MemberDef *md) +{ + if (md) + { + QCString name = md->name(); + QCString scope = md->getScopeString(); + makeResident(); + + if (!scope.isEmpty()) + { + name.prepend(scope+"::"); + } + + if (m_impl->sourceRefsDict==0) + { + m_impl->sourceRefsDict = new MemberSDict; + } + if (m_impl->sourceRefsDict->find(name)==0) + { + m_impl->sourceRefsDict->inSort(name,md); + } + } +} + +Definition *Definition::findInnerCompound(const char *) +{ + return 0; +} + +void Definition::addInnerCompound(Definition *) +{ + err("error: Definition::addInnerCompound() called\n"); +} + +QCString Definition::qualifiedName() const +{ + static int count=0; + count++; + makeResident(); + if (!m_impl->qualifiedName.isEmpty()) + { + count--; + return m_impl->qualifiedName; + } +#if 0 + if (count>20) + { + printf("Definition::qualifiedName() Infinite recursion detected! Type=%d\n",definitionType()); + printf("Trace:\n"); + Definition *d = (Definition *)this; + for (int i=0;d && i<20;i++) + { + printf(" %s\n",d->name().data()); + d = d->getOuterScope(); + } + } +#endif + + //printf("start %s::qualifiedName() localName=%s\n",name().data(),m_impl->localName.data()); + if (m_impl->outerScope==0) + { + if (m_impl->localName=="<globalScope>") + { + count--; + return ""; + } + else + { + count--; + return m_impl->localName; + } + } + + if (m_impl->outerScope->name()=="<globalScope>") + { + m_impl->qualifiedName = m_impl->localName; + } + else + { + m_impl->qualifiedName = m_impl->outerScope->qualifiedName()+"::"+m_impl->localName; + } + //printf("end %s::qualifiedName()=%s\n",name().data(),m_impl->qualifiedName.data()); + count--; + return m_impl->qualifiedName; +}; + +void Definition::setOuterScope(Definition *d) +{ + makeResident(); + if (m_impl->outerScope!=d) + { + m_impl->qualifiedName.resize(0); // flush cached scope name + m_impl->outerScope = d; + } + m_impl->hidden = m_impl->hidden || d->isHidden(); +} + +QCString Definition::localName() const +{ + makeResident(); + return m_impl->localName; +} + +void Definition::makePartOfGroup(GroupDef *gd) +{ + makeResident(); + if (m_impl->partOfGroups==0) m_impl->partOfGroups = new GroupList; + m_impl->partOfGroups->append(gd); +} + +void Definition::setRefItems(const QList<ListItemInfo> *sli) +{ + //printf("%s::setRefItems()\n",name().data()); + if (sli) + { + makeResident(); + // deep copy the list + if (m_impl->xrefListItems==0) + { + m_impl->xrefListItems=new QList<ListItemInfo>; + m_impl->xrefListItems->setAutoDelete(TRUE); + } + QListIterator<ListItemInfo> slii(*sli); + ListItemInfo *lii; + for (slii.toFirst();(lii=slii.current());++slii) + { + m_impl->xrefListItems->append(new ListItemInfo(*lii)); + } + } +} + +void Definition::mergeRefItems(Definition *d) +{ + //printf("%s::mergeRefItems()\n",name().data()); + LockingPtr< QList<ListItemInfo> > xrefList = d->xrefListItems(); + if (xrefList!=0) + { + makeResident(); + // deep copy the list + if (m_impl->xrefListItems==0) + { + m_impl->xrefListItems=new QList<ListItemInfo>; + m_impl->xrefListItems->setAutoDelete(TRUE); + } + QListIterator<ListItemInfo> slii(*xrefList); + ListItemInfo *lii; + for (slii.toFirst();(lii=slii.current());++slii) + { + if (_getXRefListId(lii->type)==-1) + { + m_impl->xrefListItems->append(new ListItemInfo(*lii)); + } + } + } +} + +int Definition::_getXRefListId(const char *listName) const +{ + makeResident(); + if (m_impl->xrefListItems) + { + QListIterator<ListItemInfo> slii(*m_impl->xrefListItems); + ListItemInfo *lii; + for (slii.toFirst();(lii=slii.current());++slii) + { + if (strcmp(lii->type,listName)==0) + { + return lii->itemId; + } + } + } + return -1; +} + +LockingPtr< QList<ListItemInfo> > Definition::xrefListItems() const +{ + makeResident(); + return LockingPtr< QList<ListItemInfo> >(this,m_impl->xrefListItems); +} + + +QCString Definition::convertNameToFile(const char *name,bool allowDots) const +{ + makeResident(); + if (!m_impl->ref.isEmpty()) + { + return name; + } + else + { + return ::convertNameToFile(name,allowDots); + } +} + +QCString Definition::pathFragment() const +{ + makeResident(); + QCString result; + if (m_impl->outerScope && m_impl->outerScope!=Doxygen::globalScope) + { + result = m_impl->outerScope->pathFragment(); + } + if (isLinkable()) + { + if (!result.isEmpty()) result+="/"; + if (definitionType()==Definition::TypeGroup && ((const GroupDef*)this)->groupTitle()) + { + result+=((const GroupDef*)this)->groupTitle(); + } + else if (definitionType()==Definition::TypePage && !((const PageDef*)this)->title().isEmpty()) + { + result+=((const PageDef*)this)->title(); + } + else + { + result+=m_impl->localName; + } + } + else + { + result+=m_impl->localName; + } + return result; +} + +void Definition::writePathFragment(OutputList &ol) const +{ + makeResident(); + if (m_impl->outerScope && m_impl->outerScope!=Doxygen::globalScope) + { + m_impl->outerScope->writePathFragment(ol); + } + ol.writeString(" <li class=\"navelem\">"); + if (isLinkable()) + { + if (definitionType()==Definition::TypeGroup && ((const GroupDef*)this)->groupTitle()) + { + ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const GroupDef*)this)->groupTitle()); + } + else if (definitionType()==Definition::TypePage && !((const PageDef*)this)->title().isEmpty()) + { + ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const PageDef*)this)->title()); + } + else if (definitionType()==Definition::TypeClass) + { + QCString name = m_impl->localName; + if (name.right(2)=="-p" || name.right(2)=="-g") + { + name = name.left(name.length()-2); + } + ol.writeObjectLink(getReference(),getOutputFileBase(),0,name); + } + else + { + ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_impl->localName); + } + } + else + { + ol.startBold(); + ol.docify(m_impl->localName); + ol.endBold(); + } + ol.writeString(" </li>\n"); +} + +void Definition::writeNavigationPath(OutputList &ol) const +{ + static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); + static bool hasCustomFooter = !Config_getString("HTML_FOOTER").isEmpty(); + + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + + if (generateTreeView) + { + ol.writeString("</div>\n"); + } + + ol.writeString(" <div id=\"nav-path\" class=\"navpath\">\n"); + ol.writeString(" <ul>\n"); + writePathFragment(ol); + if (!hasCustomFooter && generateTreeView) // write the doxygen logo as part of the navigation bar + { + ol.writeString(" <li class=\"footer\">"); + ol.writeLogo(); + ol.writeString("</li>\n"); + } + if (!hasCustomFooter || !generateTreeView) + { + ol.writeString(" </ul>\n"); + ol.writeString(" </div>\n"); + } + + ol.popGeneratorState(); +} + +QCString Definition::symbolName() const +{ + return m_symbolName; +} + +//---------------------- + +QCString Definition::documentation() const +{ + makeResident(); + return m_impl->details ? m_impl->details->doc : QCString(""); +} + +int Definition::docLine() const +{ + makeResident(); + return m_impl->details ? m_impl->details->line : 1; +} + +QCString Definition::docFile() const +{ + makeResident(); + return m_impl->details ? m_impl->details->file : QCString("<"+m_name+">"); +} + +//---------------------- + +QCString Definition::briefDescription() const +{ + makeResident(); + return m_impl->brief ? m_impl->brief->doc : QCString(""); +} + +QCString Definition::briefDescriptionAsTooltip() const +{ + makeResident(); + if (m_impl->brief) + { + if (m_impl->brief->tooltip.isEmpty() && !m_impl->brief->doc.isEmpty()) + { + static bool reentering=FALSE; + if (!reentering) + { + MemberDef *md = definitionType()==TypeMember ? (MemberDef*)this : 0; + const Definition *scope = definitionType()==TypeMember ? getOuterScope() : this; + reentering=TRUE; // prevent requests for tooltips while parsing a tooltip + m_impl->brief->tooltip = parseCommentAsText( + scope,md, + m_impl->brief->doc, + m_impl->brief->file, + m_impl->brief->line); + reentering=FALSE; + } + } + return m_impl->brief->tooltip; + } + return QCString(""); +} + +int Definition::briefLine() const +{ + makeResident(); + return m_impl->brief ? m_impl->brief->line : 1; +} + +QCString Definition::briefFile() const +{ + makeResident(); + return m_impl->brief ? m_impl->brief->file : QCString("<"+m_name+">"); +} + +//---------------------- + +QCString Definition::inbodyDocumentation() const +{ + makeResident(); + return m_impl->inbodyDocs ? m_impl->inbodyDocs->doc : QCString(""); +} + +int Definition::inbodyLine() const +{ + makeResident(); + return m_impl->inbodyDocs ? m_impl->inbodyDocs->line : 1; +} + +QCString Definition::inbodyFile() const +{ + makeResident(); + return m_impl->inbodyDocs ? m_impl->inbodyDocs->file : QCString("<"+m_name+">"); +} + + +//---------------------- + +QCString Definition::getDefFileName() const +{ + makeResident(); + return m_impl->defFileName; +} + +QCString Definition::getDefFileExtension() const +{ + makeResident(); + return m_impl->defFileExt; +} + +int Definition::getDefLine() const +{ + makeResident(); + return m_impl->defLine; +} + +bool Definition::isHidden() const +{ + makeResident(); + return m_impl->hidden; +} + +bool Definition::isVisibleInProject() const +{ + return isLinkableInProject() && !m_impl->hidden; +} + +bool Definition::isVisible() const +{ + return isLinkable() && !m_impl->hidden; +} + +bool Definition::isArtificial() const +{ + return m_impl->isArtificial; +} + +QCString Definition::getReference() const +{ + makeResident(); + return m_impl->ref; +} + +bool Definition::isReference() const +{ + makeResident(); + return !m_impl->ref.isEmpty(); +} + +int Definition::getStartBodyLine() const +{ + makeResident(); + return m_impl->body ? m_impl->body->startLine : -1; +} + +int Definition::getEndBodyLine() const +{ + makeResident(); + return m_impl->body ? m_impl->body->endLine : -1; +} + +FileDef *Definition::getBodyDef() +{ + makeResident(); + return m_impl->body ? m_impl->body->fileDef : 0; +} + +LockingPtr<GroupList> Definition::partOfGroups() const +{ + makeResident(); + return LockingPtr<GroupList>(this,m_impl->partOfGroups); +} + +Definition *Definition::getOuterScope() const +{ + makeResident(); + return m_impl->outerScope; +} + +LockingPtr<MemberSDict> Definition::getReferencesMembers() const +{ + makeResident(); + return LockingPtr<MemberSDict>(this,m_impl->sourceRefsDict); +} + +LockingPtr<MemberSDict> Definition::getReferencedByMembers() const +{ + makeResident(); + return LockingPtr<MemberSDict>(this,m_impl->sourceRefByDict); +} + +void Definition::setReference(const char *r) +{ + makeResident(); + m_impl->ref=r; +} + +void Definition::_setSymbolName(const QCString &name) +{ + m_symbolName=name; +} + +void Definition::setHidden(bool b) +{ + makeResident(); + m_impl->hidden = m_impl->hidden || b; +} + +void Definition::setArtificial(bool b) +{ + makeResident(); + m_impl->isArtificial = b; +} + +void Definition::setLocalName(const QCString name) +{ + makeResident(); + m_impl->localName=name; +} + +void Definition::makeResident() const +{ +} + + +void Definition::flushToDisk() const +{ + //printf("%p: Definition::flushToDisk()\n",this); + Definition *that = (Definition *)this; + //printf("Definition::flushToDisk(): pos=%d\n",(int)m_storagePos); + marshalUInt(Doxygen::symbolStorage,START_MARKER); + marshalSectionDict (Doxygen::symbolStorage,m_impl->sectionDict); + marshalMemberSDict (Doxygen::symbolStorage,m_impl->sourceRefByDict); + marshalMemberSDict (Doxygen::symbolStorage,m_impl->sourceRefsDict); + marshalItemInfoList (Doxygen::symbolStorage,m_impl->xrefListItems); + marshalGroupList (Doxygen::symbolStorage,m_impl->partOfGroups); + marshalDocInfo (Doxygen::symbolStorage,m_impl->details); + marshalDocInfo (Doxygen::symbolStorage,m_impl->inbodyDocs); + marshalBriefInfo (Doxygen::symbolStorage,m_impl->brief); + marshalBodyInfo (Doxygen::symbolStorage,m_impl->body); + marshalQCString (Doxygen::symbolStorage,m_impl->docSignatures); + marshalQCString (Doxygen::symbolStorage,m_impl->localName); + marshalQCString (Doxygen::symbolStorage,m_impl->qualifiedName); + marshalQCString (Doxygen::symbolStorage,m_impl->ref); + marshalBool (Doxygen::symbolStorage,m_impl->hidden); + marshalBool (Doxygen::symbolStorage,m_impl->isArtificial); + marshalObjPointer (Doxygen::symbolStorage,m_impl->outerScope); + marshalQCString (Doxygen::symbolStorage,m_impl->defFileName); + marshalInt (Doxygen::symbolStorage,m_impl->defLine); + marshalQCString (Doxygen::symbolStorage,m_impl->defFileExt); + marshalUInt(Doxygen::symbolStorage,END_MARKER); + delete that->m_impl; + that->m_impl = 0; +} + +void Definition::loadFromDisk() const +{ + //printf("%p: Definition::loadFromDisk()\n",this); + Definition *that = (Definition *)this; + assert(m_impl==0); + that->m_impl = new DefinitionImpl; + uint marker = unmarshalUInt(Doxygen::symbolStorage); + assert(marker==START_MARKER); + m_impl->sectionDict = unmarshalSectionDict (Doxygen::symbolStorage); + m_impl->sourceRefByDict = unmarshalMemberSDict (Doxygen::symbolStorage); + m_impl->sourceRefsDict = unmarshalMemberSDict (Doxygen::symbolStorage); + m_impl->xrefListItems = unmarshalItemInfoList (Doxygen::symbolStorage); + m_impl->partOfGroups = unmarshalGroupList (Doxygen::symbolStorage); + m_impl->details = unmarshalDocInfo (Doxygen::symbolStorage); + m_impl->inbodyDocs = unmarshalDocInfo (Doxygen::symbolStorage); + m_impl->brief = unmarshalBriefInfo (Doxygen::symbolStorage); + m_impl->body = unmarshalBodyInfo (Doxygen::symbolStorage); + m_impl->docSignatures = unmarshalQCString (Doxygen::symbolStorage); + m_impl->localName = unmarshalQCString (Doxygen::symbolStorage); + m_impl->qualifiedName = unmarshalQCString (Doxygen::symbolStorage); + m_impl->ref = unmarshalQCString (Doxygen::symbolStorage); + m_impl->hidden = unmarshalBool (Doxygen::symbolStorage); + m_impl->isArtificial = unmarshalBool (Doxygen::symbolStorage); + m_impl->outerScope = (Definition *)unmarshalObjPointer (Doxygen::symbolStorage); + m_impl->defFileName = unmarshalQCString (Doxygen::symbolStorage); + m_impl->defLine = unmarshalInt (Doxygen::symbolStorage); + m_impl->defFileExt = unmarshalQCString (Doxygen::symbolStorage); + marker = unmarshalUInt(Doxygen::symbolStorage); + assert(marker==END_MARKER); +} + Index: branches/xZenu/src/util/doxygen/src/qhp.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/qhp.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/qhp.cpp (revision 1322) @@ -0,0 +1,334 @@ +/* + * Copyright (C) 2008 by Sebastian Pipping. + * Copyright (C) 2008 Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + * Sebastian Pipping <sebastian@pipping.org> + */ + +#include "qhp.h" +#include "qhpxmlwriter.h" +#include "message.h" +#include "config.h" +#include "memberdef.h" +#include "groupdef.h" +#include "filedef.h" + +#include <qstringlist.h> +#include <string.h> + +static QCString makeFileName(const char * withoutExtension) +{ + if (!withoutExtension) return QCString(); + return QCString(withoutExtension)+".html"; +} + +static QCString makeRef(const char * withoutExtension, const char * anchor) +{ + if (!withoutExtension) return QCString(); + QCString result = makeFileName(withoutExtension); + if (!anchor) return result; + return result+"#"+anchor; +} + +Qhp::Qhp() : m_prevSectionLevel(0), m_sectionLevel(0) +{ + m_doc.setIndentLevel(0); + m_toc.setIndentLevel(2); + m_index.setIndentLevel(2); + m_files.setIndentLevel(2); +} + +Qhp::~Qhp() +{ + clearPrevSection(); +} + +void Qhp::initialize() +{ + /* + <QtHelpProject version="1.0"> + <namespace>mycompany.com.myapplication.1_0</namespace> + <virtualFolder>doc</virtualFolder> + <customFilter name="My Application 1.0"> + <filterAttribute>myapp</filterAttribute> + <filterAttribute>1.0</filterAttribute> + </customFilter> + <filterSection> + <filterAttribute>myapp</filterAttribute> + <filterAttribute>1.0</filterAttribute> + .. + */ + QCString nameSpace = Config_getString("QHP_NAMESPACE"); + QCString virtualFolder = Config_getString("QHP_VIRTUAL_FOLDER"); + + const char * rootAttributes[] = + { "version", "1.0", 0 }; + + m_doc.open("QtHelpProject", rootAttributes); + m_doc.openCloseContent("namespace", nameSpace); + m_doc.openCloseContent("virtualFolder", virtualFolder); + + // Add custom filter + QCString filterName = Config_getString("QHP_CUST_FILTER_NAME"); + if (!filterName.isEmpty()) + { + const char * tagAttributes[] = + { "name", filterName, 0 }; + m_doc.open("customFilter", tagAttributes); + + QStringList customFilterAttributes = QStringList::split(QChar(' '), Config_getString("QHP_CUST_FILTER_ATTRS")); + for (int i = 0; i < (int)customFilterAttributes.count(); i++) + { + m_doc.openCloseContent("filterAttribute", customFilterAttributes[i]); + } + m_doc.close("customFilter"); + } + + m_doc.open("filterSection"); + + // Add section attributes + QStringList sectionFilterAttributes = QStringList::split(QChar(' '), + Config_getString("QHP_SECT_FILTER_ATTRS")); + if (!sectionFilterAttributes.contains(QString("doxygen"))) + { + sectionFilterAttributes << "doxygen"; + } + for (int i = 0; i < (int)sectionFilterAttributes.count(); i++) + { + m_doc.openCloseContent("filterAttribute", sectionFilterAttributes[i]); + } + + m_toc.open("toc"); + + // Add extra root node + QCString fullProjectname = getFullProjectName(); + const char * const attributes[] = + { "title", fullProjectname, + "ref", "index.html", + NULL + }; + m_toc.open("section", attributes); + m_prevSectionLevel = 1; + m_sectionLevel = 1; + + m_index.open("keywords"); + m_files.open("files"); +} + +void Qhp::finalize() +{ + // Finish TOC + handlePrevSection(); + for (int i = m_prevSectionLevel; i > 0; i--) + { + m_toc.close("section"); + } + m_toc.close("toc"); + m_doc.insert(m_toc); + + // Finish index + m_index.close("keywords"); + m_doc.insert(m_index); + + // Finish files + m_files.close("files"); + m_doc.insert(m_files); + + m_doc.close("filterSection"); + m_doc.close("QtHelpProject"); + + QCString fileName = Config_getString("HTML_OUTPUT") + "/" + getQhpFileName(); + QFile file(fileName); + if (!file.open(IO_WriteOnly)) + { + err("Could not open file %s for writing\n", fileName.data()); + exit(1); + } + m_doc.dumpTo(file); +} + +void Qhp::incContentsDepth() +{ + m_sectionLevel++; +} + +void Qhp::decContentsDepth() +{ + if (m_sectionLevel <= 0) + { + return; + } + m_sectionLevel--; +} + +void Qhp::addContentsItem(bool /*isDir*/, const char * name, + const char * /*ref*/, const char * file, + const char * /*anchor*/) +{ + // Backup difference before modification + int diff = m_prevSectionLevel - m_sectionLevel; + + handlePrevSection(); + setPrevSection(name, file, m_sectionLevel); + + // Close sections as needed + for (; diff > 0; diff--) + { + m_toc.close("section"); + } +} + +void Qhp::addIndexItem(Definition *context,MemberDef *md, + const char *word) +{ + (void)word; + + if (md) // member + { + static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES"); + if (context==0) // global member + { + if (md->getGroupDef()) + context = md->getGroupDef(); + else if (md->getFileDef()) + context = md->getFileDef(); + } + if (context==0) return; // should not happen + QCString cfname = md->getOutputFileBase(); + QCString cfiname = context->getOutputFileBase(); + QCString level1 = context->name(); + QCString level2 = word ? QCString(word) : md->name(); + QCString contRef = separateMemberPages ? cfname : cfiname; + QCString anchor = md->anchor(); + + QCString ref; + + // <keyword name="foo" id="MyApplication::foo" ref="doc.html#foo"/> + ref = makeRef(contRef, anchor); + QCString id = level1+"::"+level2; + const char * attributes[] = + { + "name", level2, + "id", id, + "ref", ref, + 0 + }; + m_index.openClose("keyword", attributes); + } + else if (context) // container + { + // <keyword name="Foo" id="Foo" ref="doc.html"/> + QCString contRef = context->getOutputFileBase(); + QCString level1 = word ? QCString(word) : context->name(); + QCString ref = makeFileName(contRef); + const char * attributes[] = + { + "name", level1, + "id", level1, + "ref", ref, + 0 + }; + m_index.openClose("keyword", attributes); + } +} + +void Qhp::addIndexFile(const char * name) +{ + addFile(name); +} + +QCString Qhp::getQhpFileName() +{ + return "index.qhp"; +} + +QCString Qhp::getFullProjectName() +{ + QCString projectName = Config_getString("PROJECT_NAME"); + QCString versionText = Config_getString("PROJECT_NUMBER"); + if (projectName.isEmpty()) projectName="Root"; + return projectName + (versionText.isEmpty() + ? QCString("") + : QCString(" ") + versionText); +} + +void Qhp::handlePrevSection() +{ + /* + <toc> + <section title="My Application Manual" ref="index.html"> + <section title="Chapter 1" ref="doc.html#chapter1"/> + <section title="Chapter 2" ref="doc.html#chapter2"/> + <section title="Chapter 3" ref="doc.html#chapter3"/> + </section> + </toc> + */ + + if (m_prevSectionTitle.isNull()) + { + return; + } + + // We skip "Main Page" as our extra root is pointing to that + if (!((m_prevSectionLevel==1) && (m_prevSectionTitle=="Main Page"))) + { + QCString finalRef = makeFileName(m_prevSectionRef); + + const char * const attributes[] = + { "title", m_prevSectionTitle, + "ref", finalRef, + NULL + }; + + if (m_prevSectionLevel < m_sectionLevel) + { + // Section with children + m_toc.open("section", attributes); + } + else + { + // Section without children + m_toc.openClose("section", attributes); + } + } + + clearPrevSection(); +} + +void Qhp::setPrevSection(const char * title, const char * ref, int level) +{ + m_prevSectionTitle = title; + m_prevSectionRef = ref; + m_prevSectionLevel = level; +} + +void Qhp::clearPrevSection() +{ + m_prevSectionTitle.resize(0); + m_prevSectionRef.resize(0); +} + +void Qhp::addFile(const char * fileName) +{ + m_files.openCloseContent("file", fileName); +} + +void Qhp::addImageFile(const char *fileName) +{ + addFile(fileName); +} + +void Qhp::addStyleSheetFile(const char *fileName) +{ + addFile(fileName); +} + Index: branches/xZenu/src/util/doxygen/src/membergroup.h =================================================================== --- branches/xZenu/src/util/doxygen/src/membergroup.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/membergroup.h (revision 1322) @@ -0,0 +1,153 @@ +/****************************************************************************** + * + * $Id: membergroup.h,v 1.13 2001/03/19 19:27:41 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef MEMBERGROUP_H +#define MEMBERGROUP_H + +#include "qtbc.h" +#include <qlist.h> +#include <qfile.h> +#include "sortdict.h" + +#define DOX_NOGROUP -1 + +class MemberDef; +class ClassDef; +class NamespaceDef; +class FileDef; +class MemberList; +class GroupDef; +class OutputList; +class Definition; +class StorageIntf; +struct ListItemInfo; + +class MemberGroup +{ + public: + MemberGroup(); + MemberGroup(Definition *parent,int id,const char *header, + const char *docs,const char *docFile); + ~MemberGroup(); + QCString header() const { return grpHeader; } + int groupId() const { return grpId; } + void insertMember(MemberDef *md); + void setAnchors(ClassDef *); + void writePlainDeclarations(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); + void writeDeclarations(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, + bool showInline=FALSE); + + void writeDocumentation(OutputList &ol,const char *scopeName, + Definition *container,bool showEnumValues,bool showInline); + void writeDocumentationPage(OutputList &ol,const char *scopeName, + Definition *container); + QCString documentation() { return doc; } + bool allMembersInSameSection() { return inSameSection; } + void addToDeclarationSection(); + int countDecMembers(GroupDef *gd=0); + int countDocMembers(); + void distributeMemberGroupDocumentation(); + void findSectionsInDocumentation(); + int varCount() const; + int funcCount() const; + int enumCount() const; + int enumValueCount() const; + int typedefCount() const; + int protoCount() const; + int defineCount() const; + int friendCount() const; + int numDecMembers() const; + int numDocMembers() const; + void setInGroup(bool b); + void addListReferences(Definition *d); + void setRefItems(const QList<ListItemInfo> *sli); + MemberList *members() const { return memberList; } + Definition *parent() const { return m_parent; } + QCString anchor() const; + + void marshal(StorageIntf *s); + void unmarshal(StorageIntf *s); + + private: + MemberList *memberList; // list of all members in the group + MemberList *inDeclSection; + int grpId; + QCString grpHeader; + QCString fileName; // base name of the generated file + Definition *scope; + QCString doc; + bool inSameSection; + int m_numDecMembers; + int m_numDocMembers; + Definition *m_parent; + QCString m_docFile; + QList<ListItemInfo> *m_xrefListItems; +}; + +class MemberGroupList : public QList<MemberGroup> +{ +}; + +class MemberGroupListIterator : public QListIterator<MemberGroup> +{ + public: + MemberGroupListIterator(const MemberGroupList &l) : + QListIterator<MemberGroup>(l) {} +}; + +class MemberGroupSDict : public SIntDict<MemberGroup> +{ + public: + MemberGroupSDict(int size=17) : SIntDict<MemberGroup>(size) {} + ~MemberGroupSDict() {} + int compareItems(GCI item1,GCI item2) + { + return ((MemberGroup *)item1)->groupId() - ((MemberGroup*)item2)->groupId(); + } +}; + + +struct MemberGroupInfo +{ + MemberGroupInfo() : m_sli(0) {} + ~MemberGroupInfo() { delete m_sli; m_sli=0; } + void setRefItems(const QList<ListItemInfo> *sli); + QCString header; + QCString doc; + QCString docFile; + QCString compoundName; + QList<ListItemInfo> *m_sli; +}; + +//class MemberGroupDict : public QIntDict<MemberGroup> +//{ +// public: +// MemberGroupDict(int size) : QIntDict<MemberGroup>(size) {} +// ~MemberGroupDict() {} +//}; + +//class MemberGroupDictIterator : public QIntDictIterator<MemberGroup> +//{ +// public: +// MemberGroupDictIterator(const MemberGroupDict &d) : +// QIntDictIterator<MemberGroup>(d) {} +// ~MemberGroupDictIterator() {} +//}; + +#endif Index: branches/xZenu/src/util/doxygen/src/translator_sk.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator_sk.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator_sk.h (revision 1322) @@ -0,0 +1,1836 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + * ----------------------------------------------------------------------------*/ + +// Updates: +// -------- +// 2010/06/04 - big leap from 1.2.18 to 1.6.3+ +// +// Slovak translation started by Stanislav Kudlac (skudlac at pobox dot sk). +// He resigned in March 2008 (thanks for the work). Until a "native Slovak" +// maintainer is found, the TranslatorSlovak is maintained by Petr Prikryl with +// Slovak speaking Kali and Laco Å vec. +// ---------------------------------------------------------------------------- + +#ifndef TRANSLATOR_SK_H +#define TRANSLATOR_SK_H + +class TranslatorSlovak : public Translator +{ + public: + // --- Language control methods ------------------- + + virtual QCString idLanguage() + { return "slovak"; } + + virtual QCString latexLanguageSupportCommand() + { return "\\usepackage[slovak]{babel}\n"; } + + /*! return the language charset. This will be used for the HTML output */ + virtual QCString idLanguageCharset() + { + return "utf-8"; + } + + // --- Language translation methods ------------------- + + /*! used in the compound documentation before a list of related functions. */ + virtual QCString trRelatedFunctions() + { return "Súvisiace funkcie"; } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return "(Uvedené funkcie niesú Älenskými funkciami.)"; } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return "Detailný popis"; } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return "Dokumentácia k Älenským typom"; } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + { return "Dokumentácia k Älenským enumeráciám"; } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { return "Dokumentácia k metódam"; } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dokumentácia k položkám"; + } + else + { + return "Dokumentácia k dátovým Älenom"; + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return "..."; } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return "Zoznam vÅ¡etkých Älenov."; } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return "Zoznam Älenov triedy"; } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return "Tu nájdete úplný zoznam Älenov triedy "; } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return ", vrátane vÅ¡etkých zdedených Älenov."; } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ + virtual QCString trGeneratedAutomatically(const char *s) + { QCString result("Generované automaticky programom Doxygen " + "zo zdrojových textov"); + if (s) + result+=(QCString)" projektu "+s; + result+="."; + return result; + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return "meno enumerácie"; } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return "hodnota enumerácie"; } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return "definovaný v"; } + + // quick reference sections + + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \\group command). + */ + virtual QCString trModules() + { return "Moduly"; } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return "Hierarchia tried"; } + + /*! This is put above each page as a link to the list of annotated classes */ + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dátové Å¡truktúry"; + } + else + { + return "Zoznam tried"; + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return "Zoznam súborov"; } + + /*! This is put above each page as a link to all members of compounds. */ + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dátové položky"; + } + else + { + return "Zoznam Älenov tried"; + } + } + + /*! This is put above each page as a link to all members of files. */ + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Globálne symboly"; + } + else + { + return "Symboly v súboroch"; + } + } + + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return "Ostatné stránky"; } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return "Príklady"; } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return "HľadaÅ¥"; } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { return "Tu nájdete zoznam, vyjadrujúci vzÅ¥ah dediÄnosti tried. " + "Je zoradený približne (ale nie úplne) podľa abecedy:"; + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool extractAll) + { + QCString result("Tu nájdete zoznam vÅ¡etkých "); + if (!extractAll) result+="dokumentovaných "; + result+="súborov so struÄnými popismi:"; + return result; + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Nasledujúci zoznam obsahuje identifikáciu dátových " + "Å¡truktúr a ich struÄné popisy:"; + } + else + { + return "Nasledujúci zoznam obsahuje predovÅ¡etkým identifikáciu " + "tried, ale nachádzajú sa tu i ÄalÅ¡ie netriviálne prvky, " + "ako sú Å¡truktúry (struct), uniony (union) a rozhrania " + "(interface). V zozname sú uvedené ich struÄné " + "popisy:"; + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result= "Tu nájdete zoznam vÅ¡etkých "; + if (!extractAll) + { + result += "dokumentovaných "; + } + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result += "položiek Å¡truktúr (struct) a unionov (union) "; + } + else + { + result += "Älenov tried "; + } + + result += "s odkazmi na "; + + if (!extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result += "dokumentáciu Å¡truktúr/unionov, ku ktorým prislúchajú:"; + } + else + { + result += "dokumentáciu tried, ku ktorým prislúchajú:"; + } + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="Å¡truktúry/uniony, ku ktorým prislúchajú:"; + } + else + { + result+="triedy, ku ktorým prislúchajú:"; + } + } + + return result; + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool extractAll) + { + QCString result="Tu nájdete zoznam vÅ¡etkých "; + if (!extractAll) result+="dokumentovaných "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="funkcií, premenných, makier, enumerácií a definícií typov (typedef) " + "s odkazmi na "; + } + else + { + result+="symbolov, ktoré sú definované na úrovni svojich súborov. " + "Pre každý symbol je uvedený odkaz na "; + } + + if (extractAll) + result+="súbory, ku ktorým prislúchajú:"; + else + result+="dokumentáciu:"; + + return result; + } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return "Tu nájdete zoznam vÅ¡etkých príkladov:"; } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return "Nasledujúci zoznam odkazuje na ÄalÅ¡ie stránky projektu, " + "ktoré majú charakter usporiadaných zoznamov informácií, " + "pozbieraných z rôznych miest v zdrojových súboroch:"; } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return "Tu nájdete zoznam vÅ¡etkých modulov:"; } + + // index titles (the project name is prepended for these) + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return "Dokumentácia"; } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return "Register modulov"; } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return "Register hierarchie tried"; } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Register dátových Å¡truktúr"; + } + else + { + return "Register tried"; + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return "Register súborov"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return "Dokumentácia modulov"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ + virtual QCString trClassDocumentation() + { return "Dokumentácia tried"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return "Dokumentácia súborov"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return "Dokumentácia príkladov"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return "Dokumentácia súvisiacich stránok"; } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return "ReferenÄná príruÄka"; } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return "Definícia makier"; } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return "Prototypy"; } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return "Definícia typov"; } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return "Enumerácie"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return "Funkcie"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return "Premenné"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return "Hodnoty enumerácií"; } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return "Dokumentácia k definíciám makier"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return "Dokumentácia prototypov"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return "Dokumentácia definícií typov"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return "Dokumentácia enumeraÄných typov"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return "Dokumentácia funkcií"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return "Dokumentácia premenných"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dátové Å¡truktúry"; + } + else + { + return "Triedy"; + } + } + + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ + virtual QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result=(QCString)"Generované "+date; + if (projName) result+=(QCString)" pre projekt "+projName; + result+=(QCString)" programom"; + return result; + } + + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return " -- autor "; + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return (QCString)"Diagram dediÄnosti pre triedu "+clName; + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return "Iba pre interné použitie."; } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return "Pozor"; } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return "Verzia"; } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return "Dátum"; } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return "Návratová hodnota"; } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return "Viz tiež"; } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return "Parametre"; } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return "Výnimky"; } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return "Generované programom"; } + + // new since 0.49-990307 + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return "Zoznam priestorov mien"; } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool extractAll) + { + QCString result="Tu nájdete zoznam vÅ¡etkých "; + if (!extractAll) result+="dokumentovaných "; + result+="priestorov mien so struÄným popisom:"; + return result; + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return "Priatelia (friends)"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return "Dokumentácia k priateľom (friends)"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result("Dokumentácia "); + if (isTemplate) result+="Å¡ablóny "; + switch(compType) + { + case ClassDef::Class: result+="triedy "; break; + case ClassDef::Struct: result+="Å¡truktúry "; break; + case ClassDef::Union: result+="unionu "; break; + case ClassDef::Interface: result+="rozhrania "; break; + case ClassDef::Protocol: result+="protokol "; break; + case ClassDef::Category: result+="kategória "; break; + case ClassDef::Exception: result+="výnimky "; break; + } + result+=clName; + return result; + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result("Dokumentácia súboru "); + result+=fileName; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result("Dokumentácia priestoru mien "); + result+=namespaceName; + return result; + } + + /* these are for the member sections of a class, struct or union */ + virtual QCString trPublicMembers() + { return "Verejné metódy"; } + virtual QCString trPublicSlots() + { return "Verejné sloty"; } + virtual QCString trSignals() + { return "Signály"; } + virtual QCString trStaticPublicMembers() + { return "Statické verejné metódy"; } + virtual QCString trProtectedMembers() + { return "Chránené metódy"; } + virtual QCString trProtectedSlots() + { return "Chránené sloty"; } + virtual QCString trStaticProtectedMembers() + { return "Statické chránené metódy"; } + virtual QCString trPrivateMembers() + { return "Privátne metódy"; } + virtual QCString trPrivateSlots() + { return "Privátne sloty"; } + virtual QCString trStaticPrivateMembers() + { return "Statické privátne metódy"; } + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + virtual QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i<numEntries;i++) + { + // use generateMarker to generate placeholders for the class links! + result+=generateMarker(i); // generate marker for entry i in the list + // (order is left to right) + + if (i!=numEntries-1) // not the last entry, so we need a separator + { + if (i<numEntries-2) // not the fore last entry + result+=", "; + else // the fore last entry + result+=" a "; + } + } + return result; + } + + /*! used in class documentation to produce a list of base classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritsList(int numEntries) + { + QCString result("Dedí od "); + result += (numEntries == 1) ? "bázovej triedy " : "bázových tried "; + result += trWriteList(numEntries)+"."; + return result; + } + + /*! used in class documentation to produce a list of super classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritedByList(int numEntries) + { + QCString result("Zdedená "); + result += (numEntries == 1) ? "triedou " : "triedami "; + result += trWriteList(numEntries)+"."; + return result; + } + + /*! used in member documentation blocks to produce a list of + * members that are hidden by this one. + */ + virtual QCString trReimplementedFromList(int numEntries) + { + QCString result("Reimplementuje "); + result += (numEntries == 1) ? "metódu triedy " : "metódy tried "; + result += trWriteList(numEntries)+"."; + return result; + } + + /*! used in member documentation blocks to produce a list of + * all member that overwrite the implementation of this member. + */ + virtual QCString trReimplementedInList(int numEntries) + { + QCString result("Reimplementované "); + result += (numEntries == 1) ? "triedou " : "triedami "; + result += trWriteList(numEntries)+"."; + return result; + } + + /*! This is put above each page as a link to all members of namespaces. */ + virtual QCString trNamespaceMembers() + { return "Symboly v priestoroch mien"; } + + /*! This is an introduction to the page with all namespace members */ + virtual QCString trNamespaceMemberDescription(bool extractAll) + { + QCString result="Tu nájdete zoznam vÅ¡etkých "; + if (!extractAll) result+="dokumentovaných "; + result+="symbolov, ktoré sú definované vo svojich priestoroch mien. " + "U každého je uvedený odkaz na "; + if (extractAll) + result+="dokumentáciu prísluÅ¡ného priestoru mien:"; + else + result+="prísluÅ¡ný priestor mien:"; + return result; + } + /*! This is used in LaTeX as the title of the chapter with the + * index of all namespaces. + */ + virtual QCString trNamespaceIndex() + { return "Register priestorov mien"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all namespaces. + */ + virtual QCString trNamespaceDocumentation() + { return "Dokumentácia priestorov mien"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + virtual QCString trNamespaces() + { return "Priestory mien"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Class", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Dokumentácia pre "; + switch(compType) + { + case ClassDef::Class: result+="túto triedu"; break; + case ClassDef::Struct: result+="túto Å¡truktúru (struct)"; break; + case ClassDef::Union: result+="tento union"; break; + case ClassDef::Interface: result+="toto rozhranie"; break; + case ClassDef::Protocol: result+="protokol"; break; + case ClassDef::Category: result+="kategória"; break; + case ClassDef::Exception: result+="túto výnimku"; break; + } + result+=" bola generovaná z "; + if (single) result+="nasledujúceho súboru:"; + else result+="nasledujúcich súborov:"; + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + virtual QCString trAlphabeticalList() + { return "Register tried"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + virtual QCString trReturnValues() + { return "Návratové hodnoty"; } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + virtual QCString trMainPage() + { return "Hlavná stránka"; } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + virtual QCString trPageAbbreviation() + { return "s."; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDefinedAtLineInSourceFile() + { + return "Definícia je uvedená na riadku @0 v súbore @1."; + } + virtual QCString trDefinedInSourceFile() + { + return "Definícia v súbore @0."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() + { + return "Zastaralé"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + virtual QCString trCollaborationDiagram(const char *clName) + { + return (QCString)"Diagram tried pre "+clName+":"; + } + /*! this text is put before an include dependency graph */ + virtual QCString trInclDepGraph(const char *fName) + { + return (QCString)"Graf závislostí na vkladaných súboroch " + "pre "+fName+":"; + } + /*! header that is put before the list of constructor/destructors. */ + virtual QCString trConstructorDocumentation() + { + return "Dokumentácia konÅ¡truktoru a deÅ¡truktoru"; + } + /*! Used in the file documentation to point to the corresponding sources. */ + virtual QCString trGotoSourceCode() + { + return "ZobraziÅ¥ zdrojový text tohoto súboru."; + } + /*! Used in the file sources to point to the corresponding documentation. */ + virtual QCString trGotoDocumentation() + { + return "ZobraziÅ¥ dokumentáciu tohoto súboru."; + } + /*! Text for the \\pre command */ + virtual QCString trPrecondition() + { + return "Prepodmienka"; + } + /*! Text for the \\post command */ + virtual QCString trPostcondition() + { + return "Postpodmienka"; + } + /*! Text for the \\invariant command */ + virtual QCString trInvariant() + { + return "Invariant"; + } + /*! Text shown before a multi-line variable/enum initialization */ + virtual QCString trInitialValue() + { + return "Inicializátor:"; + } + /*! Text used the source code in the file index */ + virtual QCString trCode() + { + return "zdrojový text"; + } + virtual QCString trGraphicalHierarchy() + { + return "Grafické zobrazenie hierarchie tried"; + } + virtual QCString trGotoGraphicalHierarchy() + { + return "ZobraziÅ¥ grafickú podobu hierarchie tried"; + } + virtual QCString trGotoTextualHierarchy() + { + return "ZobraziÅ¥ textovú podobu hierarchie tried"; + } + virtual QCString trPageIndex() + { + return "Register stránok"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() + { + return "Poznámka"; + } + virtual QCString trPublicTypes() + { + return "Verejné typy"; + } + virtual QCString trPublicAttribs() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dátové položky"; + } + else + { + return "Verejné atribúty"; + } + } + virtual QCString trStaticPublicAttribs() + { + return "Statické verejné atribúty"; + } + virtual QCString trProtectedTypes() + { + return "Chránené typy"; + } + virtual QCString trProtectedAttribs() + { + return "Chránené atribúty"; + } + virtual QCString trStaticProtectedAttribs() + { + return "Statické chránené atribúty"; + } + virtual QCString trPrivateTypes() + { + return "Privátne typy"; + } + virtual QCString trPrivateAttribs() + { + return "Privátne atribúty"; + } + virtual QCString trStaticPrivateAttribs() + { + return "Statické privátne atribúty"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a todo item */ + virtual QCString trTodo() + { + return "Plánované úpravy"; + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return "Zoznam plánovaných úprav"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { + return "Používa sa v"; + } + virtual QCString trRemarks() + { + return "Poznámky"; + } + virtual QCString trAttention() + { + return "Upozornenie"; + } + virtual QCString trInclByDepGraph() + { + return "Nasledujúci graf ukazuje, ktoré súbory priamo alebo " + "nepriamo vkladajú tento súbor:"; + } + virtual QCString trSince() + { + return "Od"; + } + +//////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return "Vysvetlivky ku grafu"; + } + /*! page explaining how the dot graph's should be interpreted */ + virtual QCString trLegendDocs() + { + return + "Tu nájdete vysvetlenie, ako majú byÅ¥ interpretované grafy, " + "ktoré boli generované programom doxygen.<p>\n" + "Uvažujte nasledujúci príklad:\n" + "\\code\n" + "/*! Neviditelná trieda, ktorá sa v grafe nezobrazuje, pretože " + "doÅ¡lo k orezaniu grafu. */\n" + "class Invisible { };\n\n" + "/*! Trieda, u ktorej doÅ¡lo k orezaniu grafu. VzÅ¥ah dediÄnosti " + "je skrytý. */\n" + "class Truncated : public Invisible { };\n\n" + "/* Trieda, ktorá nieje dokumentovaná komentármi programu doxygen. */\n" + "class Undocumented { };\n\n" + "/*! Odvodená trieda s verejným (public) dedením bázovej triedy. */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! Å ablóna triedy. */\n" + "template<class T> class Templ { };\n\n" + "/*! Odvodená trieda s chráneným (protected) dedením bázovej triedy. */\n" + "class ProtectedBase { };\n\n" + "/*! Odvodená trieda s privátnym dedením bázovej triedy. */\n" + "class PrivateBase { };\n\n" + "/*! Trieda, ktorá je využívaná triedou Inherited. */\n" + "class Used { };\n\n" + "/*! Odvodená trieda, ktorá rôznym spôsobom dedí od viacerých bázových " + "tried. */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented,\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "K vyÅ¡Å¡ie uvedenému bude vygenerovaný nasledujúci graf:" + "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "Bloky (tj. uzly) v uvedenom grafe majú nasledujúci význam:\n" + "<ul>\n" + "<li>ÄŒierne vyplnený obdĺžnik reprezentuje Å¡truktúru alebo triedu, " + "pre ktorú bol graf generovaný.\n" + "<li>Obdĺžnik s Äiernym obrysom oznaÄuje dokumentovanú " + "Å¡truktúru alebo triedu.\n" + "<li>Obdĺžnik so Å¡edým obrysom oznaÄuje nedokumentovanú " + "Å¡truktúru alebo triedu.\n" + "<li>Obdĺžnik s Äerveným obrysom oznaÄuje dokumentovanú " + "Å¡truktúru alebo triedu, pre ktorú\n" + "niesú zobrazené vÅ¡etky vzÅ¥ahy dediÄnosti alebo obsiahnutia. " + "Graf je orezaný v prípade, kedy ho\n" + "nieje možné umiestniÅ¥ do vymedzených hraníc.\n" + "</ul>\n" + "Šípky (tj. hrany grafu) majú nasledujúcí význam:\n" + "<ul>\n" + "<li>Tmavo modrá šípka sa používa pre oznaÄenie vzÅ¥ahu verejnej " + "dediÄnosti medzi dvoma triedami.\n" + "<li>Tmavo zelená šípka oznaÄuje vzÅ¥ah chránenej dediÄnosti " + "(protected).\n" + "<li>Tmavo Äervená šípka oznaÄuje vzÅ¥ah privátnej dediÄnosti.\n" + "<li>Purpurová šípka kreslená Äiarkovane sa používa v prípade, " + "ak je trieda obsiahnutá v inej triede,\n" + "alebo ak je používaná inou triedou. Je oznaÄená identifikátorom " + "jednej alebo viacerých premenných (objektov), cez ktoré\n" + "je trieda alebo Å¡truktúra zprístupnena.\n" + "</ul>\n"; + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return "vysvetlivky"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return "Test"; + } + + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return "Zoznam testov"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return "Metódy DCOP"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return "Vlastnosti"; + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return "Dokumentácia k vlastnosti"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + return "Triedy"; + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)"Balík "+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return "Zoznam balíkov"; + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return "Tu nájdete zoznam balíkov so struÄným popisom " + "(pokiaľ bol uvedený):"; + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return "Balíky"; + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return "Hodnota:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return "Chyba"; + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return "Zoznam chýb"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6-20010422 +////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file */ + virtual QCString trRTFansicp() + { + return "1250"; + } + + /*! Used as ansicpg for RTF fcharset */ + virtual QCString trRTFCharSet() + { + return "3"; + } + + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return "Index"; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + QCString result((first_capital ? "Tried" : "tried")); + result+=(singular ? "a" : "y"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + QCString result((first_capital ? "Súbor" : "súbor")); + if (!singular) result+="y"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + QCString result((first_capital ? "Priestor" : "priestor")); + if (!singular) result+="y"; + result+=" mien"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + QCString result((first_capital ? "Skupin" : "skupin")); + result+=(singular ? "a" : "y"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + QCString result((first_capital ? "Stránk" : "stránk")); + result+=(singular ? "a" : "y"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + QCString result((first_capital ? "ÄŒlen" : "Älen")); + if (!singular) result+="y"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + QCString result((first_capital ? "Globáln" : "globáln")); + result+=(singular ? "y" : "e"); + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + QCString result((first_capital ? "Auto" : "auto")); + result += (singular) ? "r" : "ri"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return "Odkazuje sa na"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Implementuje " + trWriteList(numEntries) + "."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Implementované v " + trWriteList(numEntries) + "."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return "Obsah"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Zastarané metódy"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Udalosti"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Dokumentácia udalostí"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return "Typy v balíku"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return "Funkcie v balíku"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return "Statické funkcie v balíku"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return "Atribúty balíku"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return "Statické atribúty balíku"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "VÅ¡etko"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Táto funkcia volá..."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the index + * of each page before the search field. + */ + virtual QCString trSearchForIndex() + { + return "VyhľadaÅ¥"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "Výsledky vyhľadávania"; + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return "Ľutujem. Vášmu dotazu neodpovedá žiadny dokument."; + } + else if (numDocuments==1) + { + return "Bol nájdený jediný dokument, ktorý vyhovuje vášmu dotazu."; + } + else + { + return "Bolo nájdených <b>$num</b> dokumentov, ktoré vyhovujú vášmu " + "dotazu. Najviac odpovedajúce dokumenty sú ako prvé."; + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "Nájdené slová:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return QCString("Zdrojový súbor ") + filename; + } + + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return "Hierarchia adresárov"; } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return "Dokumentácia k adresárom"; } + + /*! This is used as the title of the directory index and also in the + * Quick links of a HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return "Adresáre"; } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { + return "Následujúca hierarchia adresárov je zhruba, " + "ale nie úplne, zoradená podľa abecedy:"; + } + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { + QCString result = "Referencia k adresáru "; + result += dirName; + return result; + } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool first_capital, bool singular) + { + QCString result((first_capital ? "Adresár" : "adresár")); + if ( ! singular) + result += "e"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return "Ide o preÅ¥aženú (overloaded) metódu, " + "ktorá má uľahÄiÅ¥ používanie. Od vyÅ¡Å¡ie uvedenej metódy sa odliÅ¡uje " + "iba inak zadávanými argumentami."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trCallerGraph() + { return "Túto funkciu volajú..."; } + + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { return "Dokumentácia enumeraÄných hodnôt"; } + + +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 (mainly for Fortran) +////////////////////////////////////////////////////////////////////////// + + /*! header that is put before the list of member subprograms (Fortran). */ + virtual QCString trMemberFunctionDocumentationFortran() + { return "Dokumentácia Älenských funkcií/podprogramov"; } + + /*! This is put above each page as a link to the list of annotated data types (Fortran). */ + virtual QCString trCompoundListFortran() + { return "Zoznam dátových typov"; } + + /*! This is put above each page as a link to all members of compounds (Fortran). */ + virtual QCString trCompoundMembersFortran() + { return "Dátové polia"; } + + /*! This is an introduction to the annotated compound list (Fortran). */ + virtual QCString trCompoundListDescriptionFortran() + { return "Dátové typy so struÄnými popismi:"; } + + /*! This is an introduction to the page with all data types (Fortran). */ + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) + { + + QCString result="Nasleduje zoznam vÅ¡etkých "; + if (!extractAll) + { + result+="dokumentovaných "; + } + result+="zložiek dátových typov"; + result+=" s odkazmi na "; + if (!extractAll) + { + result+="dokumentáciu dátovej Å¡truktúry pre každú zložku:"; + } + else + { + result+="přísluÅ¡né dátové typy:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index (Fortran). + */ + virtual QCString trCompoundIndexFortran() + { return "Register dátových typov"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all data types (Fortran). + */ + virtual QCString trTypeDocumentation() + { return "Dokumentácia k dátovým typom"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) subprograms (Fortran). + */ + virtual QCString trSubprograms() + { return "Funkcie/podprogramy"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for subprograms (Fortran) + */ + virtual QCString trSubprogramDocumentation() + { return "Dokumentácia funkcie/podprogramu"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds (Fortran) + */ + virtual QCString trDataTypes() + { return "Dátové typy"; } + + /*! used as the title of page containing all the index of all modules (Fortran). */ + virtual QCString trModulesList() + { return "Zoznam modulov"; } + + /*! used as an introduction to the modules list (Fortran) */ + virtual QCString trModulesListDescription(bool extractAll) + { + QCString result="Nasleduje zoznam vÅ¡etkých "; + if (!extractAll) result+="dokumentovaných "; + result+="modulov so struÄnými popismi:"; + return result; + } + + /*! used as the title of the HTML page of a module/type (Fortran) */ + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result("Dokumentácia "); + if (isTemplate) result += "Å¡ablóny "; + switch(compType) + { + case ClassDef::Class: result += "triedy "; break; + case ClassDef::Struct: result += "typu "; break; + case ClassDef::Union: result += "únie "; break; + case ClassDef::Interface: result += "rozhrania "; break; + case ClassDef::Protocol: result += "protokolu "; break; + case ClassDef::Category: result += "kategórie "; break; + case ClassDef::Exception: result += "výnimky "; break; + } + result += clName; + return result; + + } + /*! used as the title of the HTML page of a module (Fortran) */ + virtual QCString trModuleReference(const char *namespaceName) + { + QCString result="Dokumentácia modulu "; + result += namespaceName; + return result; + } + + /*! This is put above each page as a link to all members of modules. (Fortran) */ + virtual QCString trModulesMembers() + { return "ÄŒasti modulu"; } + + /*! This is an introduction to the page with all modules members (Fortran) */ + virtual QCString trModulesMemberDescription(bool extractAll) + { + QCString result="Nasleduje zoznam vÅ¡etkých "; + if (!extractAll) result+="dokumentovaných "; + result+="Äastí modulov s odkazmi "; + if (extractAll) + { + result+="na dokumentáciu modulov pre danú ÄasÅ¥:"; + } + else + { + result+="na moduly, ku ktorým ÄasÅ¥ patrí:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all modules (Fortran). + */ + virtual QCString trModulesIndex() + { return "Register modulov"; } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trModule(bool first_capital, bool singular) + { + QCString result((first_capital ? "Modul" : "modul")); + if (!singular) result+="y"; + return result; + } + /*! This is put at the bottom of a module documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Module", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Dokumentácia "; + switch(compType) + { + case ClassDef::Class: result+="k tomuto modulu"; break; + case ClassDef::Struct: result+="k tomuto typu"; break; + case ClassDef::Union: result+="k tejto únii"; break; + case ClassDef::Interface: result+="k tomuto rozhraniu"; break; + case ClassDef::Protocol: result+="k tomuto protokolu"; break; + case ClassDef::Category: result+="k tejto kategórii"; break; + case ClassDef::Exception: result+="k tejto výnimke"; break; + } + result+=" bola vygenerovaná z "; + if (single) result+="nasledujúceho súboru:"; + else result+="nasledujúcich súborov:"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trType(bool first_capital, bool singular) + { + QCString result((first_capital ? "Typ" : "typ")); + if (!singular) result+="y"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trSubprogram(bool first_capital, bool singular) + { + QCString result((first_capital ? "Podprogram" : "podprogram")); + if (!singular) result+="y"; + return result; + } + + /*! C# Type Contraint list */ + virtual QCString trTypeConstraints() + { + return "Obmedzenie typov (Type Constraints)"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.0 (mainly for the new search engine) +////////////////////////////////////////////////////////////////////////// + + /*! directory relation for \a name */ + virtual QCString trDirRelation(const char *name) + { + return "Relácia " + QCString(name); + } + + /*! Loading message shown when loading search results */ + virtual QCString trLoading() + { + return "NaÄítam..."; + } + + /*! Label used for search results in the global namespace */ + virtual QCString trGlobalNamespace() + { + return "Globálny priestor mien"; + } + + /*! Message shown while searching */ + virtual QCString trSearching() + { + return "Vyhľadávam..."; + } + + /*! Text shown when no search results are found */ + virtual QCString trNoMatches() + { + return "NiÄ sa nenaÅ¡lo"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Graf závislosti adresárov pre "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"Súbor v "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Vkladá (include) súbor z "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "po","ut","st","Å¡t","pi","so","ne" }; + static const char *months[] = { "jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec" }; + QCString sdate; + sdate.sprintf("%s %d. %s %d",days[dayOfWeek-1],day,months[month-1],year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d.%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + +}; + +#endif // TRANSLATOR_SK_H Index: branches/xZenu/src/util/doxygen/src/tagreader.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/tagreader.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/tagreader.cpp (revision 1322) @@ -0,0 +1,1406 @@ +/****************************************************************************** + * + * $Id: tagreader.cpp,v 1.2 2001/03/19 19:27:41 root Exp $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include "tagreader.h" + +#include <stdio.h> +#include <stdarg.h> + +#include <qxml.h> +#include <qstack.h> +#include <qdict.h> +#include <qfileinfo.h> +#include <qlist.h> +#include <qstring.h> +#include <qstringlist.h> + +#include "entry.h" +#include "classdef.h" +#include "doxygen.h" +#include "util.h" +#include "message.h" +#include "defargs.h" +//#include "reflist.h" + +/*! Information about an linkable anchor */ +class TagAnchorInfo +{ + public: + TagAnchorInfo(const QString &f,const QString &l) : label(l), fileName(f) {} + QString label; + QString fileName; +}; + +class TagAnchorInfoList : public QList<TagAnchorInfo> +{ + public: + TagAnchorInfoList() : QList<TagAnchorInfo>() { setAutoDelete(TRUE); } + virtual ~TagAnchorInfoList() {} +}; + +/*! Container for member specific info that can be read from a tagfile */ +class TagMemberInfo +{ + public: + TagMemberInfo() : prot(Public), virt(Normal), isStatic(FALSE) {} + QString type; + QString name; + QString anchorFile; + QString anchor; + QString arglist; + QString kind; + TagAnchorInfoList docAnchors; + Protection prot; + Specifier virt; + bool isStatic; +}; + +/*! Container for class specific info that can be read from a tagfile */ +class TagClassInfo +{ + public: + enum Kind { Class, Struct, Union, Interface, Exception, Protocol, Category }; + TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); isObjC=FALSE; } + ~TagClassInfo() { delete bases; delete templateArguments; } + QString name; + QString filename; + TagAnchorInfoList docAnchors; + QList<BaseInfo> *bases; + QList<TagMemberInfo> members; + QList<QString> *templateArguments; + QStringList classList; + Kind kind; + bool isObjC; +}; + +/*! Container for namespace specific info that can be read from a tagfile */ +class TagNamespaceInfo +{ + public: + TagNamespaceInfo() { members.setAutoDelete(TRUE); } + QString name; + QString filename; + QStringList classList; + QStringList namespaceList; + TagAnchorInfoList docAnchors; + QList<TagMemberInfo> members; +}; + +/*! Container for package specific info that can be read from a tagfile */ +class TagPackageInfo +{ + public: + TagPackageInfo() { members.setAutoDelete(TRUE); } + QString name; + QString filename; + TagAnchorInfoList docAnchors; + QList<TagMemberInfo> members; + QStringList classList; +}; + +class TagIncludeInfo +{ + public: + QString id; + QString name; + QString text; + bool isLocal; + bool isImported; +}; + +/*! Container for file specific info that can be read from a tagfile */ +class TagFileInfo +{ + public: + TagFileInfo() { members.setAutoDelete(TRUE); includes.setAutoDelete(TRUE); } + QString name; + QString path; + QString filename; + TagAnchorInfoList docAnchors; + QList<TagMemberInfo> members; + QStringList classList; + QStringList namespaceList; + QList<TagIncludeInfo> includes; +}; + +/*! Container for group specific info that can be read from a tagfile */ +class TagGroupInfo +{ + public: + TagGroupInfo() { members.setAutoDelete(TRUE); } + QString name; + QString title; + QString filename; + TagAnchorInfoList docAnchors; + QList<TagMemberInfo> members; + QStringList subgroupList; + QStringList classList; + QStringList namespaceList; + QStringList fileList; + QStringList pageList; + QStringList dirList; +}; + +/*! Container for page specific info that can be read from a tagfile */ +class TagPageInfo +{ + public: + QString name; + QString title; + QString filename; + TagAnchorInfoList docAnchors; +}; + +/*! Container for directory specific info that can be read from a tagfile */ +class TagDirInfo +{ + public: + QString name; + QString filename; + QString path; + QStringList subdirList; + QStringList fileList; + TagAnchorInfoList docAnchors; +}; + +/*! Tag file parser. + * Reads an XML-structured tagfile and builds up the structure in + * memory. The method buildLists() is used to transfer/translate + * the structures to the doxygen engine. + */ +class TagFileParser : public QXmlDefaultHandler +{ + enum State { Invalid, + InClass, + InFile, + InNamespace, + InGroup, + InPage, + InMember, + InPackage, + InDir, + InTempArgList + }; + class StartElementHandler + { + typedef void (TagFileParser::*Handler)(const QXmlAttributes &attrib); + public: + StartElementHandler(TagFileParser *parent, Handler h) : m_parent(parent), m_handler(h) {} + void operator()(const QXmlAttributes &attrib) { (m_parent->*m_handler)(attrib); } + private: + TagFileParser *m_parent; + Handler m_handler; + }; + + class EndElementHandler + { + typedef void (TagFileParser::*Handler)(); + public: + EndElementHandler(TagFileParser *parent, Handler h) : m_parent(parent), m_handler(h) {} + void operator()() { (m_parent->*m_handler)(); } + private: + TagFileParser *m_parent; + Handler m_handler; + }; + + public: + TagFileParser(const char *tagName) : m_startElementHandlers(17), + m_endElementHandlers(17), + m_tagName(tagName) + { + m_startElementHandlers.setAutoDelete(TRUE); + m_endElementHandlers.setAutoDelete(TRUE); + } + + void setDocumentLocator ( QXmlLocator * locator ) + { + m_locator = locator; + } + + void setFileName( const QString &fileName ) + { + m_inputFileName = fileName; + } + + void warn(const char *fmt) + { + ::warn(m_inputFileName,m_locator->lineNumber(),fmt); + } + void warn(const char *fmt,const char *s) + { + ::warn(m_inputFileName,m_locator->lineNumber(),fmt,s); + } + + void startCompound( const QXmlAttributes& attrib ) + { + m_curString = ""; + QString kind = attrib.value("kind"); + QString isObjC = attrib.value("objc"); + if (kind=="class") + { + m_curClass = new TagClassInfo; + m_curClass->kind = TagClassInfo::Class; + m_state = InClass; + } + else if (kind=="struct") + { + m_curClass = new TagClassInfo; + m_curClass->kind = TagClassInfo::Struct; + m_state = InClass; + } + else if (kind=="union") + { + m_curClass = new TagClassInfo; + m_curClass->kind = TagClassInfo::Union; + m_state = InClass; + } + else if (kind=="interface") + { + m_curClass = new TagClassInfo; + m_curClass->kind = TagClassInfo::Interface; + m_state = InClass; + } + else if (kind=="exception") + { + m_curClass = new TagClassInfo; + m_curClass->kind = TagClassInfo::Exception; + m_state = InClass; + } + else if (kind=="protocol") + { + m_curClass = new TagClassInfo; + m_curClass->kind = TagClassInfo::Protocol; + m_state = InClass; + } + else if (kind=="category") + { + m_curClass = new TagClassInfo; + m_curClass->kind = TagClassInfo::Category; + m_state = InClass; + } + else if (kind=="file") + { + m_curFile = new TagFileInfo; + m_state = InFile; + } + else if (kind=="namespace") + { + m_curNamespace = new TagNamespaceInfo; + m_state = InNamespace; + } + else if (kind=="group") + { + m_curGroup = new TagGroupInfo; + m_state = InGroup; + } + else if (kind=="page") + { + m_curPage = new TagPageInfo; + m_state = InPage; + } + else if (kind=="package") + { + m_curPackage = new TagPackageInfo; + m_state = InPackage; + } + else if (kind=="dir") + { + m_curDir = new TagDirInfo; + m_state = InDir; + } + else + { + warn("warning: Unknown compound attribute `%s' found!\n",kind.data()); + } + if (isObjC=="yes" && m_curClass) + { + m_curClass->isObjC = TRUE; + } + } + + void endCompound() + { + switch (m_state) + { + case InClass: m_tagFileClasses.append(m_curClass); + m_curClass=0; break; + case InFile: m_tagFileFiles.append(m_curFile); + m_curFile=0; break; + case InNamespace: m_tagFileNamespaces.append(m_curNamespace); + m_curNamespace=0; break; + case InGroup: m_tagFileGroups.append(m_curGroup); + m_curGroup=0; break; + case InPage: m_tagFilePages.append(m_curPage); + m_curPage=0; break; + case InDir: m_tagFileDirs.append(m_curDir); + m_curDir=0; break; + case InPackage: m_tagFilePackages.append(m_curPackage); + m_curPackage=0; break; + default: + warn("warning: tag `compound' was not expected!\n"); + } + } + + void startMember( const QXmlAttributes& attrib) + { + m_curMember = new TagMemberInfo; + m_curMember->kind = attrib.value("kind"); + QString protStr = attrib.value("protection"); + QString virtStr = attrib.value("virtualness"); + QString staticStr = attrib.value("static"); + if (protStr=="protected") + { + m_curMember->prot = Protected; + } + else if (protStr=="private") + { + m_curMember->prot = Private; + } + if (virtStr=="virtual") + { + m_curMember->virt = Virtual; + } + else if (virtStr=="pure") + { + m_curMember->virt = Pure; + } + if (staticStr=="yes") + { + m_curMember->isStatic = TRUE; + } + m_stateStack.push(new State(m_state)); + m_state = InMember; + } + + void endMember() + { + m_state = *m_stateStack.top(); + m_stateStack.remove(); + switch(m_state) + { + case InClass: m_curClass->members.append(m_curMember); break; + case InFile: m_curFile->members.append(m_curMember); break; + case InNamespace: m_curNamespace->members.append(m_curMember); break; + case InGroup: m_curGroup->members.append(m_curMember); break; + case InPackage: m_curPackage->members.append(m_curMember); break; + default: warn("warning: Unexpected tag `member' found\n"); break; + } + } + + void endDocAnchor() + { + switch(m_state) + { + case InClass: m_curClass->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; + case InFile: m_curFile->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; + case InNamespace: m_curNamespace->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; + case InGroup: m_curGroup->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; + case InPage: m_curPage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; + case InMember: m_curMember->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; + case InPackage: m_curPackage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; + case InDir: m_curDir->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; + default: warn("warning: Unexpected tag `member' found\n"); break; + } + } + + void endClass() + { + switch(m_state) + { + case InClass: m_curClass->classList.append(m_curString); break; + case InFile: m_curFile->classList.append(m_curString); break; + case InNamespace: m_curNamespace->classList.append(m_curString); break; + case InGroup: m_curGroup->classList.append(m_curString); break; + case InPackage: m_curPackage->classList.append(m_curString); break; + default: warn("warning: Unexpected tag `class' found\n"); break; + } + } + + void endNamespace() + { + switch(m_state) + { + case InNamespace: m_curNamespace->classList.append(m_curString); break; + case InFile: m_curFile->namespaceList.append(m_curString); break; + case InGroup: m_curGroup->namespaceList.append(m_curString); break; + default: warn("warning: Unexpected tag `namespace' found\n"); break; + } + } + + void endFile() + { + switch(m_state) + { + case InGroup: m_curGroup->fileList.append(m_curString); break; + case InDir: m_curDir->fileList.append(m_curString); break; + default: warn("warning: Unexpected tag `file' found\n"); break; + } + } + + void endPage() + { + switch(m_state) + { + case InGroup: m_curGroup->fileList.append(m_curString); break; + default: warn("warning: Unexpected tag `page' found\n"); break; + } + } + + void endDir() + { + switch(m_state) + { + case InDir: m_curDir->subdirList.append(m_curString); break; + default: warn("warning: Unexpected tag `page' found\n"); break; + } + } + + void startStringValue(const QXmlAttributes& ) + { + m_curString = ""; + } + + void startDocAnchor(const QXmlAttributes& attrib ) + { + m_fileName = attrib.value("file"); + m_curString = ""; + } + + void endType() + { + if (m_state==InMember) + { + m_curMember->type = m_curString; + } + else + { + warn("warning: Unexpected tag `type' found\n"); + } + } + + void endName() + { + switch (m_state) + { + case InClass: m_curClass->name = m_curString; break; + case InFile: m_curFile->name = m_curString; break; + case InNamespace: m_curNamespace->name = m_curString; break; + case InGroup: m_curGroup->name = m_curString; break; + case InPage: m_curPage->name = m_curString; break; + case InDir: m_curDir->name = m_curString; break; + case InMember: m_curMember->name = m_curString; break; + case InPackage: m_curPackage->name = m_curString; break; + default: warn("warning: Unexpected tag `name' found\n"); break; + } + } + + void startBase(const QXmlAttributes& attrib ) + { + m_curString=""; + if (m_state==InClass && m_curClass) + { + QString protStr = attrib.value("protection"); + QString virtStr = attrib.value("virtualness"); + Protection prot = Public; + Specifier virt = Normal; + if (protStr=="protected") + { + prot = Protected; + } + else if (protStr=="private") + { + prot = Private; + } + if (virtStr=="virtual") + { + virt = Virtual; + } + if (m_curClass->bases==0) + { + m_curClass->bases = new QList<BaseInfo>; + m_curClass->bases->setAutoDelete(TRUE); + } + m_curClass->bases->append(new BaseInfo(m_curString,prot,virt)); + } + else + { + warn("warning: Unexpected tag `base' found\n"); + } + } + + void endBase() + { + if (m_state==InClass && m_curClass) + { + m_curClass->bases->getLast()->name = m_curString; + } + else + { + warn("warning: Unexpected tag `base' found\n"); + } + } + + void startIncludes(const QXmlAttributes& attrib ) + { + if (m_state==InFile && m_curFile) + { + m_curIncludes = new TagIncludeInfo; + m_curIncludes->id = attrib.value("id"); + m_curIncludes->name = attrib.value("name"); + m_curIncludes->isLocal = attrib.value("local")=="yes" ? TRUE : FALSE; + m_curIncludes->isImported = attrib.value("imported")=="yes" ? TRUE : FALSE; + m_curFile->includes.append(m_curIncludes); + } + else + { + warn("warning: Unexpected tag `includes' found\n"); + } + m_curString=""; + } + + void endIncludes() + { + m_curIncludes->text = m_curString; + } + + void endTemplateArg() + { + if (m_state==InClass && m_curClass) + { + if (m_curClass->templateArguments==0) + { + m_curClass->templateArguments = new QList<QString>; + m_curClass->templateArguments->setAutoDelete(TRUE); + } + m_curClass->templateArguments->append(new QString(m_curString)); + } + else + { + warn("warning: Unexpected tag `templarg' found\n"); + } + } + + void endFilename() + { + switch (m_state) + { + case InClass: m_curClass->filename = m_curString; break; + case InNamespace: m_curNamespace->filename = m_curString; break; + case InFile: m_curFile->filename = m_curString; break; + case InGroup: m_curGroup->filename = m_curString; break; + case InPage: m_curPage->filename = m_curString; break; + case InPackage: m_curPackage->filename = m_curString; break; + case InDir: m_curDir->filename = m_curString; break; + default: warn("warning: Unexpected tag `filename' found\n"); break; + } + } + + void endPath() + { + switch (m_state) + { + case InFile: m_curFile->path = m_curString; break; + case InDir: m_curDir->path = m_curString; break; + default: warn("warning: Unexpected tag `path' found\n"); break; + } + } + + void endAnchor() + { + if (m_state==InMember) + { + m_curMember->anchor = m_curString; + } + else + { + warn("warning: Unexpected tag `anchor' found\n"); + } + } + + void endAnchorFile() + { + if (m_state==InMember) + { + m_curMember->anchorFile = m_curString; + } + else + { + warn("warning: Unexpected tag `anchorfile' found\n"); + } + } + + void endArglist() + { + if (m_state==InMember) + { + m_curMember->arglist = m_curString; + } + else + { + warn("warning: Unexpected tag `arglist' found\n"); + } + } + void endTitle() + { + switch (m_state) + { + case InGroup: m_curGroup->title = m_curString; break; + case InPage: m_curPage->title = m_curString; break; + default: warn("warning: Unexpected tag `title' found\n"); break; + } + } + + void endSubgroup() + { + if (m_state==InGroup) + { + m_curGroup->subgroupList.append(m_curString); + } + else + { + warn("warning: Unexpected tag `subgroup' found\n"); + } + } + + void startIgnoreElement(const QXmlAttributes& ) + { + } + + void endIgnoreElement() + { + } + + bool startDocument() + { + m_state = Invalid; + + m_curClass=0; + m_curNamespace=0; + m_curFile=0; + m_curGroup=0; + m_curPage=0; + m_curPackage=0; + m_curDir=0; + + m_stateStack.setAutoDelete(TRUE); + m_tagFileClasses.setAutoDelete(TRUE); + m_tagFileFiles.setAutoDelete(TRUE); + m_tagFileNamespaces.setAutoDelete(TRUE); + m_tagFileGroups.setAutoDelete(TRUE); + m_tagFilePages.setAutoDelete(TRUE); + m_tagFilePackages.setAutoDelete(TRUE); + m_tagFileDirs.setAutoDelete(TRUE); + + m_startElementHandlers.insert("compound", new StartElementHandler(this,&TagFileParser::startCompound)); + m_startElementHandlers.insert("member", new StartElementHandler(this,&TagFileParser::startMember)); + m_startElementHandlers.insert("name", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("base", new StartElementHandler(this,&TagFileParser::startBase)); + m_startElementHandlers.insert("filename", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("includes", new StartElementHandler(this,&TagFileParser::startIncludes)); + m_startElementHandlers.insert("path", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("anchorfile", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("anchor", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("arglist", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("title", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("subgroup", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("class", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("namespace", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("file", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("dir", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("page", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("docanchor", new StartElementHandler(this,&TagFileParser::startDocAnchor)); + m_startElementHandlers.insert("tagfile", new StartElementHandler(this,&TagFileParser::startIgnoreElement)); + m_startElementHandlers.insert("templarg", new StartElementHandler(this,&TagFileParser::startStringValue)); + m_startElementHandlers.insert("type", new StartElementHandler(this,&TagFileParser::startStringValue)); + + m_endElementHandlers.insert("compound", new EndElementHandler(this,&TagFileParser::endCompound)); + m_endElementHandlers.insert("member", new EndElementHandler(this,&TagFileParser::endMember)); + m_endElementHandlers.insert("name", new EndElementHandler(this,&TagFileParser::endName)); + m_endElementHandlers.insert("base", new EndElementHandler(this,&TagFileParser::endBase)); + m_endElementHandlers.insert("filename", new EndElementHandler(this,&TagFileParser::endFilename)); + m_endElementHandlers.insert("includes", new EndElementHandler(this,&TagFileParser::endIncludes)); + m_endElementHandlers.insert("path", new EndElementHandler(this,&TagFileParser::endPath)); + m_endElementHandlers.insert("anchorfile", new EndElementHandler(this,&TagFileParser::endAnchorFile)); + m_endElementHandlers.insert("anchor", new EndElementHandler(this,&TagFileParser::endAnchor)); + m_endElementHandlers.insert("arglist", new EndElementHandler(this,&TagFileParser::endArglist)); + m_endElementHandlers.insert("title", new EndElementHandler(this,&TagFileParser::endTitle)); + m_endElementHandlers.insert("subgroup", new EndElementHandler(this,&TagFileParser::endSubgroup)); + m_endElementHandlers.insert("class" , new EndElementHandler(this,&TagFileParser::endClass)); + m_endElementHandlers.insert("namespace", new EndElementHandler(this,&TagFileParser::endNamespace)); + m_endElementHandlers.insert("file", new EndElementHandler(this,&TagFileParser::endFile)); + m_endElementHandlers.insert("dir", new EndElementHandler(this,&TagFileParser::endDir)); + m_endElementHandlers.insert("page", new EndElementHandler(this,&TagFileParser::endPage)); + m_endElementHandlers.insert("docanchor", new EndElementHandler(this,&TagFileParser::endDocAnchor)); + m_endElementHandlers.insert("tagfile", new EndElementHandler(this,&TagFileParser::endIgnoreElement)); + m_endElementHandlers.insert("templarg", new EndElementHandler(this,&TagFileParser::endTemplateArg)); + m_endElementHandlers.insert("type", new EndElementHandler(this,&TagFileParser::endType)); + + return TRUE; + } + + bool startElement( const QString&, const QString&, + const QString&name, const QXmlAttributes& attrib ) + { + //printf("startElement `%s'\n",name.data()); + StartElementHandler *handler = m_startElementHandlers[name]; + if (handler) + { + (*handler)(attrib); + } + else + { + warn("warning: Unknown tag `%s' found!\n",name.data()); + } + return TRUE; + } + + bool endElement( const QString&, const QString&, const QString& name ) + { + //printf("endElement `%s'\n",name.data()); + EndElementHandler *handler = m_endElementHandlers[name]; + if (handler) + { + (*handler)(); + } + else + { + warn("warning: Unknown tag `%s' found!\n",name.data()); + } + return TRUE; + } + + bool characters ( const QString & ch ) + { + m_curString+=ch; + return TRUE; + } + + void dump(); + void buildLists(Entry *root); + void addIncludes(); + + private: + void buildMemberList(Entry *ce,QList<TagMemberInfo> &members); + void addDocAnchors(Entry *e,const TagAnchorInfoList &l); + QList<TagClassInfo> m_tagFileClasses; + QList<TagFileInfo> m_tagFileFiles; + QList<TagNamespaceInfo> m_tagFileNamespaces; + QList<TagGroupInfo> m_tagFileGroups; + QList<TagPageInfo> m_tagFilePages; + QList<TagPackageInfo> m_tagFilePackages; + QList<TagDirInfo> m_tagFileDirs; + QDict<StartElementHandler> m_startElementHandlers; + QDict<EndElementHandler> m_endElementHandlers; + TagClassInfo *m_curClass; + TagFileInfo *m_curFile; + TagNamespaceInfo *m_curNamespace; + TagPackageInfo *m_curPackage; + TagGroupInfo *m_curGroup; + TagPageInfo *m_curPage; + TagDirInfo *m_curDir; + TagMemberInfo *m_curMember; + TagIncludeInfo *m_curIncludes; + QCString m_curString; + QString m_tagName; + QString m_fileName; + State m_state; + QStack<State> m_stateStack; + QXmlLocator *m_locator; + QString m_inputFileName; +}; + +/*! Error handler for the XML tag file parser. + * Basically dumps all fatal error to stderr using err(). + */ +class TagFileErrorHandler : public QXmlErrorHandler +{ + public: + virtual ~TagFileErrorHandler() {} + bool warning( const QXmlParseException & ) + { + return FALSE; + } + bool error( const QXmlParseException & ) + { + return FALSE; + } + bool fatalError( const QXmlParseException &exception ) + { + err("Fatal error at line %d column %d: %s\n", + exception.lineNumber(),exception.columnNumber(), + exception.message().data()); + return FALSE; + } + QString errorString() { return ""; } + + private: + QString errorMsg; +}; + +/*! Dumps the internal structures. For debugging only! */ +void TagFileParser::dump() +{ + msg("Result:\n"); + QListIterator<TagClassInfo> lci(m_tagFileClasses); + + //============== CLASSES + TagClassInfo *cd; + for (;(cd=lci.current());++lci) + { + msg("class `%s'\n",cd->name.data()); + msg(" filename `%s'\n",cd->filename.data()); + if (cd->bases) + { + QListIterator<BaseInfo> bii(*cd->bases); + BaseInfo *bi; + for ( bii.toFirst() ; (bi=bii.current()) ; ++bii) + { + msg( " base: %s \n", bi->name.data() ); + } + } + + QListIterator<TagMemberInfo> mci(cd->members); + TagMemberInfo *md; + for (;(md=mci.current());++mci) + { + msg(" member:\n"); + msg(" kind: `%s'\n",md->kind.data()); + msg(" name: `%s'\n",md->name.data()); + msg(" anchor: `%s'\n",md->anchor.data()); + msg(" arglist: `%s'\n",md->arglist.data()); + } + } + //============== NAMESPACES + QListIterator<TagNamespaceInfo> lni(m_tagFileNamespaces); + TagNamespaceInfo *nd; + for (;(nd=lni.current());++lni) + { + msg("namespace `%s'\n",nd->name.data()); + msg(" filename `%s'\n",nd->filename.data()); + QStringList::Iterator it; + for ( it = nd->classList.begin(); + it != nd->classList.end(); ++it ) + { + msg( " class: %s \n", (*it).latin1() ); + } + + QListIterator<TagMemberInfo> mci(nd->members); + TagMemberInfo *md; + for (;(md=mci.current());++mci) + { + msg(" member:\n"); + msg(" kind: `%s'\n",md->kind.data()); + msg(" name: `%s'\n",md->name.data()); + msg(" anchor: `%s'\n",md->anchor.data()); + msg(" arglist: `%s'\n",md->arglist.data()); + } + } + //============== FILES + QListIterator<TagFileInfo> lfi(m_tagFileFiles); + TagFileInfo *fd; + for (;(fd=lfi.current());++lfi) + { + msg("file `%s'\n",fd->name.data()); + msg(" filename `%s'\n",fd->filename.data()); + QStringList::Iterator it; + for ( it = fd->namespaceList.begin(); + it != fd->namespaceList.end(); ++it ) + { + msg( " namespace: %s \n", (*it).latin1() ); + } + for ( it = fd->classList.begin(); + it != fd->classList.end(); ++it ) + { + msg( " class: %s \n", (*it).latin1() ); + } + + QListIterator<TagMemberInfo> mci(fd->members); + TagMemberInfo *md; + for (;(md=mci.current());++mci) + { + msg(" member:\n"); + msg(" kind: `%s'\n",md->kind.data()); + msg(" name: `%s'\n",md->name.data()); + msg(" anchor: `%s'\n",md->anchor.data()); + msg(" arglist: `%s'\n",md->arglist.data()); + } + + QListIterator<TagIncludeInfo> mii(fd->includes); + TagIncludeInfo *ii; + for (;(ii=mii.current());++mii) + { + msg(" includes id: %s name: %s\n",ii->id.data(),ii->name.data()); + } + } + + //============== GROUPS + QListIterator<TagGroupInfo> lgi(m_tagFileGroups); + TagGroupInfo *gd; + for (;(gd=lgi.current());++lgi) + { + msg("group `%s'\n",gd->name.data()); + msg(" filename `%s'\n",gd->filename.data()); + QStringList::Iterator it; + for ( it = gd->namespaceList.begin(); + it != gd->namespaceList.end(); ++it ) + { + msg( " namespace: %s \n", (*it).latin1() ); + } + for ( it = gd->classList.begin(); + it != gd->classList.end(); ++it ) + { + msg( " class: %s \n", (*it).latin1() ); + } + for ( it = gd->fileList.begin(); + it != gd->fileList.end(); ++it ) + { + msg( " file: %s \n", (*it).latin1() ); + } + for ( it = gd->subgroupList.begin(); + it != gd->subgroupList.end(); ++it ) + { + msg( " subgroup: %s \n", (*it).latin1() ); + } + for ( it = gd->pageList.begin(); + it != gd->pageList.end(); ++it ) + { + msg( " page: %s \n", (*it).latin1() ); + } + + QListIterator<TagMemberInfo> mci(gd->members); + TagMemberInfo *md; + for (;(md=mci.current());++mci) + { + msg(" member:\n"); + msg(" kind: `%s'\n",md->kind.data()); + msg(" name: `%s'\n",md->name.data()); + msg(" anchor: `%s'\n",md->anchor.data()); + msg(" arglist: `%s'\n",md->arglist.data()); + } + } + //============== PAGES + QListIterator<TagPageInfo> lpi(m_tagFilePages); + TagPageInfo *pd; + for (;(pd=lpi.current());++lpi) + { + msg("page `%s'\n",pd->name.data()); + msg(" title `%s'\n",pd->title.data()); + msg(" filename `%s'\n",pd->filename.data()); + } + //============== DIRS + QListIterator<TagDirInfo> ldi(m_tagFileDirs); + TagDirInfo *dd; + for (;(dd=ldi.current());++ldi) + { + msg("dir `%s'\n",dd->name.data()); + msg(" path `%s'\n",dd->path.data()); + QStringList::Iterator it; + for ( it = dd->fileList.begin(); + it != dd->fileList.end(); ++it ) + { + msg( " file: %s \n", (*it).latin1() ); + } + for ( it = dd->subdirList.begin(); + it != dd->subdirList.end(); ++it ) + { + msg( " subdir: %s \n", (*it).latin1() ); + } + } +} + +void TagFileParser::addDocAnchors(Entry *e,const TagAnchorInfoList &l) +{ + QListIterator<TagAnchorInfo> tli(l); + TagAnchorInfo *ta; + for (tli.toFirst();(ta=tli.current());++tli) + { + if (Doxygen::sectionDict.find(ta->label)==0) + { + //printf("New sectionInfo file=%s anchor=%s\n", + // ta->fileName.data(),ta->label.data()); + SectionInfo *si=new SectionInfo(ta->fileName,ta->label,ta->label, + SectionInfo::Anchor,m_tagName); + Doxygen::sectionDict.insert(ta->label,si); + e->anchors->append(si); + } + else + { + warn("Duplicate anchor %s found\n",ta->label.data()); + } + } +} + +void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members) +{ + QListIterator<TagMemberInfo> mii(members); + TagMemberInfo *tmi; + for (;(tmi=mii.current());++mii) + { + Entry *me = new Entry; + me->type = tmi->type; + me->name = tmi->name; + me->args = tmi->arglist; + if (!me->args.isEmpty()) + { + delete me->argList; + me->argList = new ArgumentList; + stringToArgumentList(me->args,me->argList); + } + me->protection = tmi->prot; + me->virt = tmi->virt; + me->stat = tmi->isStatic; + me->fileName = ce->fileName; + if (ce->section == Entry::GROUPDOC_SEC) + { + me->groups->append(new Grouping(ce->name,Grouping::GROUPING_INGROUP)); + } + addDocAnchors(me,tmi->docAnchors); + TagInfo *ti = new TagInfo; + ti->tagName = m_tagName; + ti->anchor = tmi->anchor; + ti->fileName = tmi->anchorFile; + me->tagInfo = ti; + if (tmi->kind=="define") + { + me->type="#define"; + me->section = Entry::DEFINE_SEC; + } + else if (tmi->kind=="enumvalue") + { + me->section = Entry::VARIABLE_SEC; + me->mtype = Method; + } + else if (tmi->kind=="property") + { + me->section = Entry::VARIABLE_SEC; + me->mtype = Property; + } + else if (tmi->kind=="event") + { + me->section = Entry::VARIABLE_SEC; + me->mtype = Event; + } + else if (tmi->kind=="variable") + { + me->section = Entry::VARIABLE_SEC; + me->mtype = Method; + } + else if (tmi->kind=="typedef") + { + me->section = Entry::VARIABLE_SEC; //Entry::TYPEDEF_SEC; + me->type.prepend("typedef "); + me->mtype = Method; + } + else if (tmi->kind=="enumeration") + { + me->section = Entry::ENUM_SEC; + me->mtype = Method; + } + else if (tmi->kind=="function") + { + me->section = Entry::FUNCTION_SEC; + me->mtype = Method; + } + else if (tmi->kind=="signal") + { + me->section = Entry::FUNCTION_SEC; + me->mtype = Signal; + } + else if (tmi->kind=="prototype") + { + me->section = Entry::FUNCTION_SEC; + me->mtype = Method; + } + else if (tmi->kind=="friend") + { + me->section = Entry::FUNCTION_SEC; + me->type.prepend("friend "); + me->mtype = Method; + } + else if (tmi->kind=="dcop") + { + me->section = Entry::FUNCTION_SEC; + me->mtype = DCOP; + } + else if (tmi->kind=="slot") + { + me->section = Entry::FUNCTION_SEC; + me->mtype = Slot; + } + ce->addSubEntry(me); + } +} + +static QString stripPath(const QString &s) +{ + int i=s.findRev('/'); + if (i!=-1) + { + return s.right(s.length()-i-1); + } + else + { + return s; + } +} + +/*! Injects the info gathered by the XML parser into the Entry tree. + * This tree contains the information extracted from the input in a + * "unrelated" form. + */ +void TagFileParser::buildLists(Entry *root) +{ + // build class list + TagClassInfo *tci = m_tagFileClasses.first(); + while (tci) + { + Entry *ce = new Entry; + ce->section = Entry::CLASS_SEC; + switch (tci->kind) + { + case TagClassInfo::Class: break; + case TagClassInfo::Struct: ce->spec = Entry::Struct; break; + case TagClassInfo::Union: ce->spec = Entry::Union; break; + case TagClassInfo::Interface: ce->spec = Entry::Interface; break; + case TagClassInfo::Exception: ce->spec = Entry::Exception; break; + case TagClassInfo::Protocol: ce->spec = Entry::Protocol; break; + case TagClassInfo::Category: ce->spec = Entry::Category; break; + } + ce->name = tci->name; + if (tci->kind==TagClassInfo::Protocol) + { + ce->name+="-p"; + } + addDocAnchors(ce,tci->docAnchors); + TagInfo *ti = new TagInfo; + ti->tagName = m_tagName; + ti->fileName = tci->filename; + ce->tagInfo = ti; + ce->lang = tci->isObjC ? SrcLangExt_ObjC : SrcLangExt_Unknown; + // transfer base class list + if (tci->bases) + { + delete ce->extends; + ce->extends = tci->bases; tci->bases = 0; + } + if (tci->templateArguments) + { + if (ce->tArgLists==0) + { + ce->tArgLists = new QList<ArgumentList>; + ce->tArgLists->setAutoDelete(TRUE); + } + ArgumentList *al = new ArgumentList; + ce->tArgLists->append(al); + + QListIterator<QString> sli(*tci->templateArguments); + QString *argName; + for (;(argName=sli.current());++sli) + { + Argument *a = new Argument; + a->type = "class"; + a->name = *argName; + al->append(a); + } + } + + buildMemberList(ce,tci->members); + root->addSubEntry(ce); + tci = m_tagFileClasses.next(); + } + + // build file list + TagFileInfo *tfi = m_tagFileFiles.first(); + while (tfi) + { + Entry *fe = new Entry; + fe->section = guessSection(tfi->name); + fe->name = tfi->name; + addDocAnchors(fe,tfi->docAnchors); + TagInfo *ti = new TagInfo; + ti->tagName = m_tagName; + ti->fileName = tfi->filename; + fe->tagInfo = ti; + + QString fullName = m_tagName+":"+tfi->path+stripPath(tfi->name); + fe->fileName = fullName; + //printf("new FileDef() filename=%s\n",tfi->filename.data()); + FileDef *fd = new FileDef(m_tagName+":"+tfi->path, + tfi->name,m_tagName, + tfi->filename + ); + FileName *mn; + if ((mn=Doxygen::inputNameDict->find(tfi->name))) + { + mn->append(fd); + } + else + { + mn = new FileName(fullName,tfi->name); + mn->append(fd); + Doxygen::inputNameList->inSort(mn); + Doxygen::inputNameDict->insert(tfi->name,mn); + } + buildMemberList(fe,tfi->members); + root->addSubEntry(fe); + tfi = m_tagFileFiles.next(); + } + + // build namespace list + TagNamespaceInfo *tni = m_tagFileNamespaces.first(); + while (tni) + { + Entry *ne = new Entry; + ne->section = Entry::NAMESPACE_SEC; + ne->name = tni->name; + addDocAnchors(ne,tni->docAnchors); + TagInfo *ti = new TagInfo; + ti->tagName = m_tagName; + ti->fileName = tni->filename; + ne->tagInfo = ti; + + buildMemberList(ne,tni->members); + root->addSubEntry(ne); + tni = m_tagFileNamespaces.next(); + } + + // build package list + TagPackageInfo *tpgi = m_tagFilePackages.first(); + while (tpgi) + { + Entry *pe = new Entry; + pe->section = Entry::PACKAGE_SEC; + pe->name = tpgi->name; + addDocAnchors(pe,tpgi->docAnchors); + TagInfo *ti = new TagInfo; + ti->tagName = m_tagName; + ti->fileName = tpgi->filename; + pe->tagInfo = ti; + + buildMemberList(pe,tpgi->members); + root->addSubEntry(pe); + tpgi = m_tagFilePackages.next(); + } + + // build group list, but only if config file says to include it + //if (Config_getBool("EXTERNAL_GROUPS")) + //{ + TagGroupInfo *tgi = m_tagFileGroups.first(); + while (tgi) + { + Entry *ge = new Entry; + ge->section = Entry::GROUPDOC_SEC; + ge->name = tgi->name; + ge->type = tgi->title; + addDocAnchors(ge,tgi->docAnchors); + TagInfo *ti = new TagInfo; + ti->tagName = m_tagName; + ti->fileName = tgi->filename; + ge->tagInfo = ti; + + buildMemberList(ge,tgi->members); + root->addSubEntry(ge); + tgi = m_tagFileGroups.next(); + } + //} + + // build page list + TagPageInfo *tpi = m_tagFilePages.first(); + while (tpi) + { + Entry *pe = new Entry; + pe->section = Entry::PAGEDOC_SEC; + pe->name = tpi->name; + pe->args = tpi->title; + addDocAnchors(pe,tpi->docAnchors); + TagInfo *ti = new TagInfo; + ti->tagName = m_tagName; + ti->fileName = tpi->filename; + pe->tagInfo = ti; + + root->addSubEntry(pe); + tpi = m_tagFilePages.next(); + } +} + +void TagFileParser::addIncludes() +{ + TagFileInfo *tfi = m_tagFileFiles.first(); + while (tfi) + { + //printf("tag file tagName=%s path=%s name=%s\n",m_tagName.data(),tfi->path.data(),tfi->name.data()); + FileName *fn = Doxygen::inputNameDict->find(tfi->name); + if (fn) + { + //printf("found\n"); + FileNameIterator fni(*fn); + FileDef *fd; + for (;(fd=fni.current());++fni) + { + //printf("input file path=%s name=%s\n",fd->getPath().data(),fd->name().data()); + if (fd->getPath()==QCString(m_tagName+":"+tfi->path)) + { + //printf("found\n"); + QListIterator<TagIncludeInfo> mii(tfi->includes); + TagIncludeInfo *ii; + for (;(ii=mii.current());++mii) + { + //printf("ii->name=`%s'\n",ii->name.data()); + FileName *ifn = Doxygen::inputNameDict->find(ii->name); + ASSERT(ifn!=0); + if (ifn) + { + FileNameIterator ifni(*ifn); + FileDef *ifd; + for (;(ifd=ifni.current());++ifni) + { + //printf("ifd->getOutputFileBase()=%s ii->id=%s\n", + // ifd->getOutputFileBase().data(),ii->id.data()); + if (ifd->getOutputFileBase()==QCString(ii->id)) + { + fd->addIncludeDependency(ifd,ii->text,ii->isLocal,ii->isImported); + } + } + } + } + } + } + } + tfi = m_tagFileFiles.next(); + } +} + +void parseTagFile(Entry *root,const char *fullName,const char *tagName) +{ + QFileInfo fi(fullName); + if (!fi.exists()) return; + TagFileParser handler( tagName ); + handler.setFileName(fullName); + TagFileErrorHandler errorHandler; + QFile xmlFile( fullName ); + QXmlInputSource source( xmlFile ); + QXmlSimpleReader reader; + reader.setContentHandler( &handler ); + reader.setErrorHandler( &errorHandler ); + reader.parse( source ); + handler.buildLists(root); + handler.addIncludes(); + //handler.dump(); +} + + Index: branches/xZenu/src/util/doxygen/src/filedef.h =================================================================== --- branches/xZenu/src/util/doxygen/src/filedef.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/filedef.h (revision 1322) @@ -0,0 +1,324 @@ +/****************************************************************************** + * + * $Id: filedef.h,v 1.32 2001/03/19 19:27:40 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef FILEDEF_H +#define FILEDEF_H + +#include "index.h" +#include <qlist.h> +#include <qintdict.h> +#include <qdict.h> +#include "config.h" +#include "definition.h" +#include "memberlist.h" +#include "util.h" + +class FileDef; +class FileList; +class ClassSDict; +class ClassDef; +class ClassList; +class MemberDef; +class OutputList; +class NamespaceDef; +class NamespaceSDict; +class MemberGroupSDict; +class PackageDef; +class DirDef; + +struct IncludeInfo +{ + IncludeInfo() { fileDef=0; local=FALSE; } + ~IncludeInfo() {} + FileDef *fileDef; + QCString includeName; + bool local; + bool imported; +}; + +/*! \class FileDef filedef.h + \brief A File definition. + + An object of this class contains all file information that is gathered. + This includes the members and compounds defined in the file. + + The member writeDocumentation() can be used to generate the page of + documentation to HTML and LaTeX. +*/ + +class FileDef : public Definition +{ + friend class FileName; + + public: + //enum FileType { Source, Header, Unknown }; + + FileDef(const char *p,const char *n,const char *ref=0,const char *dn=0); + ~FileDef(); + DefType definitionType() const { return TypeFile; } + + /*! Returns the unique file name (this may include part of the path). */ + QCString name() const + { + if (Config_getBool("FULL_PATH_NAMES")) + return filename; + else + return Definition::name(); + } + + QCString fileName() const + { + return filename; + } + + QCString getOutputFileBase() const + { return convertNameToFile(diskname); } + + QCString getFileBase() const + { return diskname; } + + QCString getSourceFileBase() const; + + /*! Returns the name of the verbatim copy of this file (if any). */ + QCString includeName() const; + + /*! Returns the absolute path including the file name. */ + QCString absFilePath() const { return filepath; } + + + /*! Returns the name as it is used in the documentation */ + QCString docName() const { return docname; } + + void addSourceRef(int line,Definition *d,MemberDef *md); + Definition *getSourceDefinition(int lineNr); + MemberDef *getSourceMember(int lineNr); + + /* Sets the name of the include file to \a n. */ + //void setIncludeName(const char *n_) { incName=n_; } + + /*! Returns the absolute path of this file. */ + QCString getPath() const { return path; } + + /*! Returns version of this file. */ + QCString getVersion() const { return fileVersion; } + + bool isLinkableInProject() const; + + bool isLinkable() const + { + return isLinkableInProject() || isReference(); + } + bool isIncluded(const QCString &name) const; + + bool isJava() const { return m_isJava; } + bool isCSharp() const { return m_isCSharp; } + + void writeDocumentation(OutputList &ol); + void writeMemberPages(OutputList &ol); + void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const; + void writeSummaryLinks(OutputList &ol); + + void writeSource(OutputList &ol); + void parseSource(); + friend void generatedFileNames(); + void insertMember(MemberDef *md); + void insertClass(ClassDef *cd); + void insertNamespace(NamespaceDef *nd); + void computeAnchors(); + + void setPackageDef(PackageDef *pd) { package=pd; } + PackageDef *packageDef() const { return package; } + + void setDirDef(DirDef *dd) { dir=dd; } + DirDef *getDirDef() const { return dir; } + + void addUsingDirective(NamespaceDef *nd); + NamespaceSDict *getUsedNamespaces() const; + void addUsingDeclaration(Definition *def); + SDict<Definition> *getUsedClasses() const { return usingDeclList; } + void combineUsingRelations(); + + bool generateSourceFile() const; + void sortMemberLists(); + + void addIncludeDependency(FileDef *fd,const char *incName,bool local,bool imported); + void addIncludedByDependency(FileDef *fd,const char *incName,bool local,bool imported); + QList<IncludeInfo> *includeFileList() const { return includeList; } + QList<IncludeInfo> *includedByFileList() const { return includedByList; } + + void addMembersToMemberGroup(); + void distributeMemberGroupDocumentation(); + void findSectionsInDocumentation(); + void addIncludedUsingDirectives(); + + void addListReferences(); + bool isDocumentationFile() const; + bool includes(FileDef *incFile,QDict<FileDef> *includedFiles) const; + + MemberList *getMemberList(MemberList::ListType lt) const; + const QList<MemberList> &getMemberLists() const { return m_memberLists; } + + /* user defined member groups */ + MemberGroupSDict *getMemberGroupSDict() const { return memberGroupSDict; } + NamespaceSDict *getNamespaceSDict() const { return namespaceSDict; } + ClassSDict *getClassSDict() const { return classSDict; } + + bool visited; + + protected: + /** + * Retrieves the file version from version control system. + */ + void acquireFileVersion(); + + private: + MemberList *createMemberList(MemberList::ListType lt); + void addMemberToList(MemberList::ListType lt,MemberDef *md); + void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title); + void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title); + void writeIncludeFiles(OutputList &ol); + void writeIncludeGraph(OutputList &ol); + void writeIncludedByGraph(OutputList &ol); + void writeMemberGroups(OutputList &ol); + void writeAuthorSection(OutputList &ol); + void writeSourceLink(OutputList &ol); + void writeNamespaceDeclarations(OutputList &ol,const QCString &title); + void writeClassDeclarations(OutputList &ol,const QCString &title); + void startMemberDeclarations(OutputList &ol); + void endMemberDeclarations(OutputList &ol); + void startMemberDocumentation(OutputList &ol); + void endMemberDocumentation(OutputList &ol); + void writeDetailedDescription(OutputList &ol,const QCString &title); + void writeBriefDescription(OutputList &ol); + + QDict<IncludeInfo> *includeDict; + QList<IncludeInfo> *includeList; + QDict<IncludeInfo> *includedByDict; + QList<IncludeInfo> *includedByList; + NamespaceSDict *usingDirList; + SDict<Definition> *usingDeclList; + QCString path; + QCString filepath; + QCString diskname; + QCString filename; + QCString docname; + QIntDict<Definition> *srcDefDict; + QIntDict<MemberDef> *srcMemberDict; + bool isSource; + bool m_isJava; + bool m_isCSharp; + QCString fileVersion; + PackageDef *package; + DirDef *dir; + QList<MemberList> m_memberLists; + MemberGroupSDict *memberGroupSDict; + NamespaceSDict *namespaceSDict; + ClassSDict *classSDict; + bool m_subGrouping; +}; + + +class FileList : public QList<FileDef> +{ + public: + FileList() : m_pathName("tmp") {} + FileList(const char *path) : QList<FileDef>(), m_pathName(path) {} + ~FileList() {} + QCString path() const { return m_pathName; } + int compareItems(GCI item1,GCI item2) + { + FileDef *md1 = (FileDef *)item1; + FileDef *md2 = (FileDef *)item2; + return stricmp(md1->name(),md2->name()); + } + private: + QCString m_pathName; +}; + +class OutputNameList : public QList<FileList> +{ + public: + OutputNameList() : QList<FileList>() {} + ~OutputNameList() {} + int compareItems(GCI item1,GCI item2) + { + FileList *fl1 = (FileList *)item1; + FileList *fl2 = (FileList *)item2; + return stricmp(fl1->path(),fl2->path()); + } +}; + +class OutputNameDict : public QDict<FileList> +{ + public: + OutputNameDict(int size) : QDict<FileList>(size) {} + ~OutputNameDict() {} +}; + +class Directory; + +class DirEntry +{ + public: + enum EntryKind { Dir, File }; + DirEntry(DirEntry *parent,FileDef *fd) + : m_parent(parent), m_name(fd->name()), m_kind(File), m_fd(fd), + m_isLast(FALSE) { } + DirEntry(DirEntry *parent,QCString name) + : m_parent(parent), m_name(name), m_kind(Dir), + m_fd(0), m_isLast(FALSE) { } + virtual ~DirEntry() { } + EntryKind kind() const { return m_kind; } + FileDef *file() const { return m_fd; } + bool isLast() const { return m_isLast; } + void setLast(bool b) { m_isLast=b; } + DirEntry *parent() const { return m_parent; } + QCString name() const { return m_name; } + QCString path() const { return parent() ? parent()->path()+"/"+name() : name(); } + + protected: + DirEntry *m_parent; + QCString m_name; + + private: + EntryKind m_kind; + FileDef *m_fd; + int num; + bool m_isLast; +}; + +class Directory : public DirEntry +{ + public: + Directory(Directory *parent,const QCString &name) + : DirEntry(parent,name) + { m_children.setAutoDelete(TRUE); } + virtual ~Directory() {} + void addChild(DirEntry *d) { m_children.append(d); d->setLast(TRUE); } + QList<DirEntry> &children() { return m_children; } + void rename(const QCString &name) { m_name=name; } + void reParent(Directory *parent) { m_parent=parent; } + + private: + QList<DirEntry> m_children; +}; + +//void generateFileTree(QTextStream &t); +void generateFileTree(); + +#endif + Index: branches/xZenu/src/util/doxygen/src/printdocvisitor.h =================================================================== --- branches/xZenu/src/util/doxygen/src/printdocvisitor.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/printdocvisitor.h (revision 1322) @@ -0,0 +1,691 @@ +/****************************************************************************** + * + * $Id: $ + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef _PRINTDOCVISITOR_H +#define _PRINTDOCVISITOR_H + +#include "docvisitor.h" + +/*! Concrete visitor implementation for pretty printing */ +class PrintDocVisitor : public DocVisitor +{ + public: + PrintDocVisitor() : DocVisitor(DocVisitor_Other), m_indent(0), + m_needsEnter(FALSE), m_insidePre(FALSE) {} + + //-------------------------------------- + + void visit(DocWord *w) + { + indent_leaf(); + printf("%s",w->word().data()); + } + void visit(DocLinkedWord *w) + { + indent_leaf(); + printf("%s",w->word().data()); + } + void visit(DocWhiteSpace *w) + { + indent_leaf(); + if (m_insidePre) + { + printf("%s",w->chars().data()); + } + else + { + printf(" "); + } + } + void visit(DocSymbol *s) + { + indent_leaf(); + switch(s->symbol()) + { + case DocSymbol::BSlash: printf("\\"); break; + case DocSymbol::At: printf("@"); break; + case DocSymbol::Less: printf("<"); break; + case DocSymbol::Greater: printf(">"); break; + case DocSymbol::Amp: printf("&"); break; + case DocSymbol::Dollar: printf("$"); break; + case DocSymbol::Hash: printf("#"); break; + case DocSymbol::Percent: printf("%%"); break; + case DocSymbol::Copy: printf("©"); break; + case DocSymbol::Apos: printf("'"); break; + case DocSymbol::Quot: printf("\""); break; + case DocSymbol::Lsquo: printf("‘"); break; + case DocSymbol::Rsquo: printf("’"); break; + case DocSymbol::Ldquo: printf("“"); break; + case DocSymbol::Rdquo: printf("”"); break; + case DocSymbol::Ndash: printf("–"); break; + case DocSymbol::Mdash: printf("—"); break; + case DocSymbol::Uml: printf("&%cuml;",s->letter()); break; + case DocSymbol::Acute: printf("&%cacute;",s->letter()); break; + case DocSymbol::Grave: printf("&%cgrave;",s->letter()); break; + case DocSymbol::Circ: printf("&%ccirc;",s->letter()); break; + case DocSymbol::Tilde: printf("&%ctilde;",s->letter()); break; + case DocSymbol::Szlig: printf("ß"); break; + case DocSymbol::Cedil: printf("&%ccedul;",s->letter()); break; + case DocSymbol::Ring: printf("&%cring;",s->letter()); break; + case DocSymbol::Nbsp: printf(" "); break; + case DocSymbol::Aelig: printf("æ"); break; + case DocSymbol::AElig: printf("Æ"); break; + default: + printf("Error: unknown symbol found\n"); + } + } + void visit(DocURL *u) + { + indent_leaf(); + printf("%s",u->url().data()); + } + void visit(DocLineBreak *) + { + indent_leaf(); + printf("<br/>"); + } + void visit(DocHorRuler *) + { + indent_leaf(); + printf("<hr>"); + } + void visit(DocStyleChange *s) + { + indent_leaf(); + switch (s->style()) + { + case DocStyleChange::Bold: + if (s->enable()) printf("<bold>"); else printf("</bold>"); + break; + case DocStyleChange::Italic: + if (s->enable()) printf("<italic>"); else printf("</italic>"); + break; + case DocStyleChange::Code: + if (s->enable()) printf("<code>"); else printf("</code>"); + break; + case DocStyleChange::Subscript: + if (s->enable()) printf("<sub>"); else printf("</sub>"); + break; + case DocStyleChange::Superscript: + if (s->enable()) printf("<sup>"); else printf("</sup>"); + break; + case DocStyleChange::Center: + if (s->enable()) printf("<center>"); else printf("</center>"); + break; + case DocStyleChange::Small: + if (s->enable()) printf("<small>"); else printf("</small>"); + break; + case DocStyleChange::Preformatted: + if (s->enable()) printf("<pre>"); else printf("</pre>"); + break; + case DocStyleChange::Div: + if (s->enable()) printf("<div>"); else printf("</div>"); + break; + case DocStyleChange::Span: + if (s->enable()) printf("<span>"); else printf("</span>"); + break; + } + } + void visit(DocVerbatim *s) + { + indent_leaf(); + switch(s->type()) + { + case DocVerbatim::Code: printf("<code>"); break; + case DocVerbatim::Verbatim: printf("<verbatim>"); break; + case DocVerbatim::HtmlOnly: printf("<htmlonly>"); break; + case DocVerbatim::ManOnly: printf("<manonly>"); break; + case DocVerbatim::LatexOnly: printf("<latexonly>"); break; + case DocVerbatim::XmlOnly: printf("<xmlonly>"); break; + case DocVerbatim::Dot: printf("<dot>"); break; + case DocVerbatim::Msc: printf("<msc>"); break; + } + printf("%s",s->text().data()); + switch(s->type()) + { + case DocVerbatim::Code: printf("</code>"); break; + case DocVerbatim::Verbatim: printf("</verbatim>"); break; + case DocVerbatim::HtmlOnly: printf("</htmlonly>"); break; + case DocVerbatim::ManOnly: printf("</manonly>"); break; + case DocVerbatim::LatexOnly: printf("</latexonly>"); break; + case DocVerbatim::XmlOnly: printf("</xmlonly>"); break; + case DocVerbatim::Dot: printf("</dot>"); break; + case DocVerbatim::Msc: printf("</msc>"); break; + } + } + void visit(DocAnchor *a) + { + indent_leaf(); + printf("<anchor name=\"%s\"/>",a->anchor().data()); + } + void visit(DocInclude *inc) + { + indent_leaf(); + printf("<include file=\"%s\" type=\"",inc->file().data()); + switch(inc->type()) + { + case DocInclude::Include: printf("include"); break; + case DocInclude::IncWithLines: printf("incwithlines"); break; + case DocInclude::DontInclude: printf("dontinclude"); break; + case DocInclude::HtmlInclude: printf("htmlinclude"); break; + case DocInclude::VerbInclude: printf("verbinclude"); break; + } + printf("\"/>"); + } + void visit(DocIncOperator *op) + { + indent_leaf(); + printf("<incoperator pattern=\"%s\" type=\"",op->pattern().data()); + switch(op->type()) + { + case DocIncOperator::Line: printf("line"); break; + case DocIncOperator::Skip: printf("skip"); break; + case DocIncOperator::SkipLine: printf("skipline"); break; + case DocIncOperator::Until: printf("until"); break; + } + printf("\"/>"); + } + void visit(DocFormula *f) + { + indent_leaf(); + printf("<formula name=%s test=%s/>",f->name().data(),f->text().data()); + } + void visit(DocIndexEntry *i) + { + indent_leaf(); + printf("<indexentry>%s</indexentry\n",i->entry().data()); + } + void visit(DocSimpleSectSep *) + { + indent_leaf(); + printf("<simplesectsep/>"); + } + + //-------------------------------------- + + void visitPre(DocAutoList *l) + { + indent_pre(); + if (l->isEnumList()) + { + printf("<ol>\n"); + } + else + { + printf("<ul>\n"); + } + } + void visitPost(DocAutoList *l) + { + indent_post(); + if (l->isEnumList()) + { + printf("</ol>\n"); + } + else + { + printf("</ul>\n"); + } + } + void visitPre(DocAutoListItem *) + { + indent_pre(); + printf("<li>\n"); + } + void visitPost(DocAutoListItem *) + { + indent_post(); + printf("</li>\n"); + } + void visitPre(DocPara *) + { + indent_pre(); + printf("<para>\n"); + } + void visitPost(DocPara *) + { + indent_post(); + printf("</para>\n"); + } + void visitPre(DocRoot *) + { + indent_pre(); + printf("<root>\n"); + } + void visitPost(DocRoot *) + { + indent_post(); + printf("</root>\n"); + } + void visitPre(DocSimpleSect *s) + { + indent_pre(); + printf("<simplesect type="); + switch(s->type()) + { + case DocSimpleSect::See: printf("see"); break; + case DocSimpleSect::Return: printf("return"); break; + case DocSimpleSect::Author: printf("author"); break; + case DocSimpleSect::Authors: printf("authors"); break; + case DocSimpleSect::Version: printf("version"); break; + case DocSimpleSect::Since: printf("since"); break; + case DocSimpleSect::Date: printf("date"); break; + case DocSimpleSect::Note: printf("note"); break; + case DocSimpleSect::Warning: printf("warning"); break; + case DocSimpleSect::Pre: printf("pre"); break; + case DocSimpleSect::Post: printf("post"); break; + case DocSimpleSect::Invar: printf("invar"); break; + case DocSimpleSect::Remark: printf("remark"); break; + case DocSimpleSect::Attention: printf("attention"); break; + case DocSimpleSect::User: printf("user"); break; + case DocSimpleSect::Rcs: printf("rcs"); break; + case DocSimpleSect::Unknown: printf("unknown"); break; + } + printf(">\n"); + } + void visitPost(DocSimpleSect *) + { + indent_post(); + printf("</simplesect>\n"); + } + void visitPre(DocTitle *) + { + indent_pre(); + printf("<title>\n"); + } + void visitPost(DocTitle *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocSimpleList *) + { + indent_pre(); + printf("
      \n"); + } + void visitPost(DocSimpleList *) + { + indent_post(); + printf("
    \n"); + } + void visitPre(DocSimpleListItem *) + { + indent_pre(); + printf("
  • \n"); + } + void visitPost(DocSimpleListItem *) + { + indent_post(); + printf("
  • \n"); + } + void visitPre(DocSection *s) + { + indent_pre(); + printf("\n",s->level()); + } + void visitPost(DocSection *s) + { + indent_post(); + printf("\n",s->level()); + } + void visitPre(DocHtmlList *s) + { + indent_pre(); + if (s->type()==DocHtmlList::Ordered) printf("
      \n"); else printf("
        \n"); + } + void visitPost(DocHtmlList *s) + { + indent_post(); + if (s->type()==DocHtmlList::Ordered) printf("
    \n"); else printf("\n"); + } + void visitPre(DocHtmlListItem *) + { + indent_pre(); + printf("
  • \n"); + } + void visitPost(DocHtmlListItem *) + { + indent_post(); + printf("
  • \n"); + } + //void visitPre(DocHtmlPre *) + //{ + // indent_pre(); + // printf("
    \n");
    +    //  m_insidePre=TRUE;
    +    //}
    +    //void visitPost(DocHtmlPre *) 
    +    //{
    +    //  m_insidePre=FALSE;
    +    //  indent_post();
    +    //  printf("
    \n"); + //} + void visitPre(DocHtmlDescList *) + { + indent_pre(); + printf("
    \n"); + } + void visitPost(DocHtmlDescList *) + { + indent_post(); + printf("
    \n"); + } + void visitPre(DocHtmlDescTitle *) + { + indent_pre(); + printf("
    \n"); + } + void visitPost(DocHtmlDescTitle *) + { + indent_post(); + printf("
    \n"); + } + void visitPre(DocHtmlDescData *) + { + indent_pre(); + printf("
    \n"); + } + void visitPost(DocHtmlDescData *) + { + indent_post(); + printf("
    \n"); + } + void visitPre(DocHtmlTable *t) + { + indent_pre(); + printf("\n", + t->numRows(),t->numCols()); + } + void visitPost(DocHtmlTable *) + { + indent_post(); + printf("
    \n"); + } + void visitPre(DocHtmlRow *) + { + indent_pre(); + printf("\n"); + } + void visitPost(DocHtmlRow *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocHtmlCell *c) + { + indent_pre(); + printf("\n",c->isHeading()?'h':'d'); + } + void visitPost(DocHtmlCell *c) + { + indent_post(); + printf("\n",c->isHeading()?'h':'d'); + } + void visitPre(DocHtmlCaption *) + { + indent_pre(); + printf("\n"); + } + void visitPost(DocHtmlCaption *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocInternal *) + { + indent_pre(); + printf("\n"); + } + void visitPost(DocInternal *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocHRef *href) + { + indent_pre(); + printf("\n",href->url().data()); + } + void visitPost(DocHRef *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocHtmlHeader *header) + { + indent_pre(); + printf("\n",header->level()); + } + void visitPost(DocHtmlHeader *header) + { + indent_post(); + printf("\n",header->level()); + } + void visitPre(DocImage *img) + { + indent_pre(); + printf("name().data()); + switch(img->type()) + { + case DocImage::Html: printf("html"); break; + case DocImage::Latex: printf("latex"); break; + case DocImage::Rtf: printf("rtf"); break; + } + printf("\" width=%s height=%s>\n",img->width().data(),img->height().data()); + } + void visitPost(DocImage *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocDotFile *df) + { + indent_pre(); + printf("\n",df->name().data()); + } + void visitPost(DocDotFile *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocMscFile *df) + { + indent_pre(); + printf("\n",df->name().data()); + } + void visitPost(DocMscFile *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocLink *lnk) + { + indent_pre(); + printf("\n", + lnk->ref().data(),lnk->file().data(),lnk->anchor().data()); + } + void visitPost(DocLink *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocRef *ref) + { + indent_pre(); + printf("\n", + ref->ref().data(),ref->file().data(),ref->anchor().data(), + ref->targetTitle().data(),ref->hasLinkText()?"yes":"no", + ref->refToAnchor()?"yes":"no", ref->refToSection()?"yes":"no"); + } + void visitPost(DocRef *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocSecRefItem *ref) + { + indent_pre(); + printf("\n",ref->target().data()); + } + void visitPost(DocSecRefItem *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocSecRefList *) + { + indent_pre(); + printf("\n"); + } + void visitPost(DocSecRefList *) + { + indent_post(); + printf("\n"); + } + //void visitPre(DocLanguage *l) + //{ + // indent_pre(); + // printf("\n",l->id().data()); + //} + //void visitPost(DocLanguage *) + //{ + // indent_post(); + // printf("\n"); + //} + void visitPre(DocParamList *pl) + { + indent_pre(); + //QStrListIterator sli(pl->parameters()); + QListIterator sli(pl->parameters()); + //const char *s; + DocNode *param; + printf(""); + for (sli.toFirst();(param=sli.current());++sli) + { + printf(""); + if (param->kind()==DocNode::Kind_Word) + { + visit((DocWord*)param); + } + else if (param->kind()==DocNode::Kind_LinkedWord) + { + visit((DocLinkedWord*)param); + } + printf(""); + } + printf("\n"); + } + void visitPost(DocParamList *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocParamSect *ps) + { + indent_pre(); + printf("\n"); + } + void visitPost(DocParamSect *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocXRefItem *x) + { + indent_pre(); + printf("\n", + x->file().data(),x->anchor().data(),x->title().data()); + } + void visitPost(DocXRefItem *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocInternalRef *r) + { + indent_pre(); + printf("\n",r->file().data(),r->anchor().data()); + } + void visitPost(DocInternalRef *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocCopy *c) + { + indent_pre(); + printf("\n",c->link().data()); + } + void visitPost(DocCopy *) + { + indent_post(); + printf("\n"); + } + void visitPre(DocText *) + { + indent_pre(); + printf("\n"); + } + void visitPost(DocText *) + { + indent_post(); + printf("\n"); + } + + private: + // helper functions + void indent() + { + if (m_needsEnter) printf("\n"); + for (int i=0;i)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); Index: branches/xZenu/src/util/doxygen/src/mangen.h =================================================================== --- branches/xZenu/src/util/doxygen/src/mangen.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/mangen.h (revision 1322) @@ -0,0 +1,253 @@ +/****************************************************************************** + * + * $Id: htmlgen.h,v 1.15 1998/11/28 11:33:19 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef MANGEN_H +#define MANGEN_H + +#include "outputgen.h" + +class QFile; + +class ManGenerator : public OutputGenerator +{ + public: + ManGenerator(); + ~ManGenerator(); + + //OutputGenerator *copy() { return new ManGenerator; } + //OutputGenerator *clone() { return new ManGenerator(*this); } + //void append(const OutputGenerator *o); + void enable() + { if (genStack->top()) active=*genStack->top(); else active=TRUE; } + void disable() { active=FALSE; } + void enableIf(OutputType o) { if (o==Man) active=TRUE; } + void disableIf(OutputType o) { if (o==Man) active=FALSE; } + void disableIfNot(OutputType o) { if (o!=Man) active=FALSE; } + bool isEnabled(OutputType o) { return (o==Man && active); } + OutputGenerator *get(OutputType o) { return (o==Man) ? this : 0; } + + void printDoc(DocNode *,const char *); + + static void init(); + void startFile(const char *name,const char *manName,const char *title); + void writeFooter() {} + void endFile(); + void clearBuffer(); + + void startIndexSection(IndexSections) {} + void endIndexSection(IndexSections) {} + void writePageLink(const char *,bool) {} + void startProjectNumber() {} + void endProjectNumber() {} + void writeStyleInfo(int) {} + void startTitleHead(const char *) {} + void endTitleHead(const char *,const char *); + void startTitle(); + void endTitle(); + + void newParagraph(); + void startParagraph(); + void endParagraph(); + void writeString(const char *text); + void startIndexListItem() {} + void endIndexListItem() {} + void startIndexList() {} + void endIndexList() { newParagraph(); } + void startIndexKey() {} + void endIndexKey() {} + void startIndexValue(bool) {} + void endIndexValue(const char *,bool) {} + void startItemList() {} + void endItemList() { newParagraph(); } + void startIndexItem(const char *ref,const char *file); + void endIndexItem(const char *ref,const char *file); + void docify(const char *text); + void codify(const char *text); + void writeObjectLink(const char *ref,const char *file, + const char *anchor,const char *name); + void writeCodeLink(const char *ref,const char *file, + const char *anchor,const char *name, + const char *tooltip); + void startTextLink(const char *,const char *) {} + void endTextLink() {} + void startHtmlLink(const char *url); + void endHtmlLink(); + void startTypewriter() { t << "\\fC"; firstCol=FALSE; } + void endTypewriter() { t << "\\fP"; firstCol=FALSE; } + void startGroupHeader(int); + void endGroupHeader(int); + void startMemberSections() {} + void endMemberSections() {} + void startHeaderSection() {} + void endHeaderSection() {} + void startMemberHeader(const char *); + void endMemberHeader(); + void insertMemberAlign(bool) {} + void startMemberSubtitle() {} + void endMemberSubtitle() {} + //void writeListItem(); + void startItemListItem(); + void endItemListItem(); + void startMemberDocList() {} + void endMemberDocList() {} + void startMemberList(); + void endMemberList(); + void startInlineDescription(); + void endInlineDescription(); + void startInlineHeader(); + void endInlineHeader(); + void startAnonTypeScope(int); + void endAnonTypeScope(int); + void startMemberItem(int); + void endMemberItem(); + void startMemberTemplateParams() {} + void endMemberTemplateParams() {} + + void startMemberGroupHeader(bool); + void endMemberGroupHeader(); + void startMemberGroupDocs(); + void endMemberGroupDocs(); + void startMemberGroup(); + void endMemberGroup(bool); + + void writeRuler() {} + void writeAnchor(const char *,const char *) {} + void startCodeFragment(); + void endCodeFragment(); + void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } + void startCodeLine() {} + void endCodeLine() { codify("\n"); col=0; } + void startEmphasis() { t << "\\fI"; firstCol=FALSE; } + void endEmphasis() { t << "\\fP"; firstCol=FALSE; } + void startBold() { t << "\\fB"; firstCol=FALSE; } + void endBold() { t << "\\fP"; firstCol=FALSE; } + void startDescription() {} + void endDescription() {} + void startDescItem(); + void endDescItem(); + void lineBreak(const char *) { t << "\n.br" << endl; } + void writeChar(char c); + void startMemberDoc(const char *,const char *,const char *,const char *,bool); + void endMemberDoc(bool); + void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *); + void endDoxyAnchor(const char *,const char *) {} + void startCodeAnchor(const char *) {} + void endCodeAnchor() {} + void writeLatexSpacing() {} + void writeStartAnnoItem(const char *type,const char *file, + const char *path,const char *name); + void writeEndAnnoItem(const char *) { t << endl; firstCol=TRUE; } + void startSubsection(); + void endSubsection(); + void startSubsubsection(); + void endSubsubsection(); + void startCenter() {} + void endCenter() {} + void startSmall() {} + void endSmall() {} + void startMemberDescription() { t << "\n.RI \"\\fI"; firstCol=FALSE; } + void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; } + void startDescList(SectionTypes); + void endDescList() {} + void startSimpleSect(SectionTypes,const char *,const char *,const char *); + void endSimpleSect(); + void startParamList(ParamListTypes,const char *title); + void endParamList(); + //void writeDescItem(); + void startDescForItem(); + void endDescForItem(); + void startSection(const char *,const char *,SectionInfo::SectionType); + void endSection(const char *,SectionInfo::SectionType); + void addIndexItem(const char *,const char *) {} + void startIndent() {} + void endIndent() {} + void writeSynopsis(); + void startClassDiagram() {} + void endClassDiagram(const ClassDiagram &,const char *,const char *) {} + void startPageRef() {} + void endPageRef(const char *,const char *) {} + void startQuickIndices() {} + void endQuickIndices() {} + void writeSplitBar(const char *) {} + void writeLogo() {} + void writeQuickLinks(bool,HighlightedItem) {} + void startContents() {} + void endContents() {} + void writeNonBreakableSpace(int n) { int i; for (i=0;i +#include + +class FTextStream; +class CodeOutputInterface; +class QCString; + +/*! @brief Concrete visitor implementation for XML output. */ +class XmlDocVisitor : public DocVisitor +{ + public: + XmlDocVisitor(FTextStream &t,CodeOutputInterface &ci); + + //-------------------------------------- + // visitor functions for leaf nodes + //-------------------------------------- + + void visit(DocWord *); + void visit(DocLinkedWord *); + void visit(DocWhiteSpace *); + void visit(DocSymbol *); + void visit(DocURL *); + void visit(DocLineBreak *); + void visit(DocHorRuler *); + void visit(DocStyleChange *); + void visit(DocVerbatim *); + void visit(DocAnchor *); + void visit(DocInclude *); + void visit(DocIncOperator *); + void visit(DocFormula *); + void visit(DocIndexEntry *); + void visit(DocSimpleSectSep *); + + //-------------------------------------- + // visitor functions for compound nodes + //-------------------------------------- + + void visitPre(DocAutoList *); + void visitPost(DocAutoList *); + void visitPre(DocAutoListItem *); + void visitPost(DocAutoListItem *); + void visitPre(DocPara *) ; + void visitPost(DocPara *); + void visitPre(DocRoot *); + void visitPost(DocRoot *); + void visitPre(DocSimpleSect *); + void visitPost(DocSimpleSect *); + void visitPre(DocTitle *); + void visitPost(DocTitle *); + void visitPre(DocSimpleList *); + void visitPost(DocSimpleList *); + void visitPre(DocSimpleListItem *); + void visitPost(DocSimpleListItem *); + void visitPre(DocSection *); + void visitPost(DocSection *); + void visitPre(DocHtmlList *); + void visitPost(DocHtmlList *) ; + void visitPre(DocHtmlListItem *); + void visitPost(DocHtmlListItem *); + //void visitPre(DocHtmlPre *); + //void visitPost(DocHtmlPre *); + void visitPre(DocHtmlDescList *); + void visitPost(DocHtmlDescList *); + void visitPre(DocHtmlDescTitle *); + void visitPost(DocHtmlDescTitle *); + void visitPre(DocHtmlDescData *); + void visitPost(DocHtmlDescData *); + void visitPre(DocHtmlTable *); + void visitPost(DocHtmlTable *); + void visitPre(DocHtmlRow *); + void visitPost(DocHtmlRow *) ; + void visitPre(DocHtmlCell *); + void visitPost(DocHtmlCell *); + void visitPre(DocHtmlCaption *); + void visitPost(DocHtmlCaption *); + void visitPre(DocInternal *); + void visitPost(DocInternal *); + void visitPre(DocHRef *); + void visitPost(DocHRef *); + void visitPre(DocHtmlHeader *); + void visitPost(DocHtmlHeader *); + void visitPre(DocImage *); + void visitPost(DocImage *); + void visitPre(DocDotFile *); + void visitPost(DocDotFile *); + + void visitPre(DocMscFile *); + void visitPost(DocMscFile *); + void visitPre(DocLink *); + void visitPost(DocLink *); + void visitPre(DocRef *); + void visitPost(DocRef *); + void visitPre(DocSecRefItem *); + void visitPost(DocSecRefItem *); + void visitPre(DocSecRefList *); + void visitPost(DocSecRefList *); + //void visitPre(DocLanguage *); + //void visitPost(DocLanguage *); + void visitPre(DocParamSect *); + void visitPost(DocParamSect *); + void visitPre(DocParamList *); + void visitPost(DocParamList *); + void visitPre(DocXRefItem *); + void visitPost(DocXRefItem *); + void visitPre(DocInternalRef *); + void visitPost(DocInternalRef *); + void visitPre(DocCopy *); + void visitPost(DocCopy *); + void visitPre(DocText *); + void visitPost(DocText *); + + private: + + //-------------------------------------- + // helper functions + //-------------------------------------- + + void filter(const char *str); + void startLink(const QCString &ref,const QCString &file, + const QCString &anchor); + void endLink(); + + void pushEnabled(); + void popEnabled(); + + //-------------------------------------- + // state variables + //-------------------------------------- + + FTextStream &m_t; + CodeOutputInterface &m_ci; + bool m_insidePre; + bool m_hide; + QStack m_enabled; + QCString m_langExt; +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/namespacedef.h =================================================================== --- branches/xZenu/src/util/doxygen/src/namespacedef.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/namespacedef.h (revision 1322) @@ -0,0 +1,167 @@ +/****************************************************************************** + * + * $Id: namespacedef.h,v 1.18 2001/03/19 19:27:41 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef NAMESPACEDEF_H +#define NAMESPACEDEF_H + +#include "qtbc.h" +#include +#include +#include "sortdict.h" +#include "definition.h" +#include "memberlist.h" + +class ClassDef; +class ClassList; +class OutputList; +class ClassSDict; +class MemberDef; +class NamespaceList; +class MemberGroupSDict; +class NamespaceSDict; + +class NamespaceDef : public Definition +{ + public: + NamespaceDef(const char *defFileName,int defLine, + const char *name,const char *ref=0, + const char *refFile=0); + ~NamespaceDef(); + DefType definitionType() const { return TypeNamespace; } + QCString getOutputFileBase() const; + void insertUsedFile(const char *fname); + + void writeDocumentation(OutputList &ol); + void writeMemberPages(OutputList &ol); + void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const; + + void insertClass(ClassDef *cd); + void insertNamespace(NamespaceDef *nd); + void insertMember(MemberDef *md); + + void computeAnchors(); + int countMembers(); + void addUsingDirective(NamespaceDef *nd); + NamespaceSDict *getUsedNamespaces() const; + void addUsingDeclaration(Definition *def); + SDict *getUsedClasses() const { return usingDeclList; } + void combineUsingRelations(); + QCString displayName() const; + + bool isLinkableInProject() const; + bool isLinkable() const; + void addMembersToMemberGroup(); + void distributeMemberGroupDocumentation(); + void findSectionsInDocumentation(); + void sortMemberLists(); + + virtual Definition *findInnerCompound(const char *name); + void addInnerCompound(Definition *d); + void addListReferences(); + + MemberList *getMemberList(MemberList::ListType lt) const; + const QList &getMemberLists() const { return m_memberLists; } + MemberDef *getMemberByName(const QCString &) const; + + /*! Returns the user defined member groups */ + MemberGroupSDict *getMemberGroupSDict() const { return memberGroupSDict; } + + /*! Returns the classes contained in this namespace */ + ClassSDict *getClassSDict() const { return classSDict; } + + /*! Returns the namespaces contained in this namespace */ + NamespaceSDict *getNamespaceSDict() const { return namespaceSDict; } + + bool visited; + + private: + MemberList *createMemberList(MemberList::ListType lt); + void addMemberToList(MemberList::ListType lt,MemberDef *md); + void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title); + void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title); + void writeDetailedDescription(OutputList &ol,const QCString &title); + void writeBriefDescription(OutputList &ol); + void startMemberDeclarations(OutputList &ol); + void endMemberDeclarations(OutputList &ol); + void writeClassDeclarations(OutputList &ol,const QCString &title); + void writeNamespaceDeclarations(OutputList &ol,const QCString &title); + void writeMemberGroups(OutputList &ol); + void writeAuthorSection(OutputList &ol); + void startMemberDocumentation(OutputList &ol); + void endMemberDocumentation(OutputList &ol); + void writeSummaryLinks(OutputList &ol); + + QCString fileName; + QStrList files; + + NamespaceSDict *usingDirList; + SDict *usingDeclList; + SDict *m_innerCompounds; + + MemberSDict *m_allMembersDict; + QList m_memberLists; + MemberGroupSDict *memberGroupSDict; + ClassSDict *classSDict; + NamespaceSDict *namespaceSDict; + bool m_subGrouping; + bool m_isCSharp; +}; + +class NamespaceList : public QList +{ + public: + ~NamespaceList() {} + int compareItems(GCI item1,GCI item2) + { + return stricmp(((NamespaceDef *)item1)->name(), + ((NamespaceDef *)item2)->name() + ); + } +}; + +class NamespaceListIterator : public QListIterator +{ + public: + NamespaceListIterator(const NamespaceList &l) : + QListIterator(l) {} +}; + +class NamespaceDict : public QDict +{ + public: + NamespaceDict(int size) : QDict(size) {} + ~NamespaceDict() {} +}; + +class NamespaceSDict : public SDict +{ + public: + NamespaceSDict(int size=17) : SDict(size) {} + ~NamespaceSDict() {} + int compareItems(GCI item1,GCI item2) + { + return stricmp(((NamespaceDef *)item1)->name(), + ((NamespaceDef *)item2)->name() + ); + } + void writeDeclaration(OutputList &ol,const char *title,bool localName=FALSE); + bool declVisible() const; +}; + + + +#endif Index: branches/xZenu/src/util/doxygen/src/configoptions.cpp =================================================================== --- branches/xZenu/src/util/doxygen/src/configoptions.cpp (revision 0) +++ branches/xZenu/src/util/doxygen/src/configoptions.cpp (revision 1322) @@ -0,0 +1,2386 @@ +/* WARNING: This file is generated! + * Do not edit this file, but edit config.xml instead and run + * python configgen.py to regenerate this file! + */ + +#include "configoptions.h" +#include "config.h" +#include "portable.h" + +void addConfigOptions(Config *cfg) +{ + ConfigString *cs; + ConfigEnum *ce; + ConfigList *cl; + ConfigInt *ci; + ConfigBool *cb; + + //--------------------------------------------------------------------------- + cfg->addInfo("Project","Project related configuration options"); + //--------------------------------------------------------------------------- + + //---- + cs = cfg->addString( + "DOXYFILE_ENCODING", + "This tag specifies the encoding used for all characters in the config file\n" + "that follow. The default is UTF-8 which is also the encoding used for all\n" + "text before the first occurrence of this tag. Doxygen uses libiconv (or the\n" + "iconv built into libc) for the transcoding. See\n" + "http://www.gnu.org/software/libiconv for the list of possible encodings." + ); + cs->setDefaultValue("UTF-8"); + //---- + cs = cfg->addString( + "PROJECT_NAME", + "The PROJECT_NAME tag is a single word (or a sequence of words surrounded\n" + "by quotes) that should identify the project." + ); + //---- + cs = cfg->addString( + "PROJECT_NUMBER", + "The PROJECT_NUMBER tag can be used to enter a project or revision number.\n" + "This could be handy for archiving the generated documentation or\n" + "if some version control system is used." + ); + //---- + cs = cfg->addString( + "PROJECT_BRIEF", + "Using the PROJECT_BRIEF tag one can provide an optional one line description\n" + "for a project that appears at the top of each page and should give viewer\n" + "a quick idea about the purpose of the project. Keep the description short." + ); + //---- + cs = cfg->addString( + "PROJECT_LOGO", + "With the PROJECT_LOGO tag one can specify an logo or icon that is\n" + "included in the documentation. The maximum height of the logo should not\n" + "exceed 55 pixels and the maximum width should not exceed 200 pixels.\n" + "Doxygen will copy the logo to the output directory." + ); + cs->setWidgetType(ConfigString::File); + //---- + cs = cfg->addString( + "OUTPUT_DIRECTORY", + "The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)\n" + "base path where the generated documentation will be put.\n" + "If a relative path is entered, it will be relative to the location\n" + "where doxygen was started. If left blank the current directory will be used." + ); + cs->setWidgetType(ConfigString::Dir); + //---- + cb = cfg->addBool( + "CREATE_SUBDIRS", + "If the CREATE_SUBDIRS tag is set to YES, then doxygen will create\n" + "4096 sub-directories (in 2 levels) under the output directory of each output\n" + "format and will distribute the generated files over these directories.\n" + "Enabling this option can be useful when feeding doxygen a huge amount of\n" + "source files, where putting all generated files in the same directory would\n" + "otherwise cause performance problems for the file system.", + FALSE + ); + //---- + ce = cfg->addEnum( + "OUTPUT_LANGUAGE", + "The OUTPUT_LANGUAGE tag is used to specify the language in which all\n" + "documentation generated by doxygen is written. Doxygen will use this\n" + "information to generate all constant output in the proper language.\n" + "The default language is English, other supported languages are:\n" + "Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,\n" + "Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,\n" + "Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English\n" + "messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,\n" + "Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,\n" + "Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.", + "English" + ); + ce->addValue("Afrikaans"); + ce->addValue("Arabic"); + ce->addValue("Brazilian"); + ce->addValue("Catalan"); + ce->addValue("Chinese"); + ce->addValue("Chinese-Traditional"); + ce->addValue("Croatian"); + ce->addValue("Czech"); + ce->addValue("Danish"); + ce->addValue("Dutch"); + ce->addValue("English"); + ce->addValue("Esperanto"); + ce->addValue("Farsi"); + ce->addValue("Finnish"); + ce->addValue("French"); + ce->addValue("German"); + ce->addValue("Greek"); + ce->addValue("Hungarian"); + ce->addValue("Italian"); + ce->addValue("Japanese"); + ce->addValue("Japanese-en"); + ce->addValue("Korean"); + ce->addValue("Korean-en"); + ce->addValue("Norwegian"); + ce->addValue("Macedonian"); + ce->addValue("Persian"); + ce->addValue("Polish"); + ce->addValue("Portuguese"); + ce->addValue("Romanian"); + ce->addValue("Russian"); + ce->addValue("Serbian"); + ce->addValue("Slovak"); + ce->addValue("Slovene"); + ce->addValue("Spanish"); + ce->addValue("Swedish"); + ce->addValue("Turkish"); + ce->addValue("Ukrainian"); + ce->addValue("Vietnamese"); + //---- + cb = cfg->addBool( + "BRIEF_MEMBER_DESC", + "If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will\n" + "include brief member descriptions after the members that are listed in\n" + "the file and class documentation (similar to JavaDoc).\n" + "Set to NO to disable this.", + TRUE + ); + //---- + cb = cfg->addBool( + "REPEAT_BRIEF", + "If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend\n" + "the brief description of a member or function before the detailed description.\n" + "Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the\n" + "brief descriptions will be completely suppressed.", + TRUE + ); + //---- + cl = cfg->addList( + "ABBREVIATE_BRIEF", + "This tag implements a quasi-intelligent brief description abbreviator\n" + "that is used to form the text in various listings. Each string\n" + "in this list, if found as the leading text of the brief description, will be\n" + "stripped from the text and the result after processing the whole list, is\n" + "used as the annotated text. Otherwise, the brief description is used as-is.\n" + "If left blank, the following values are used (\"$name\" is automatically\n" + "replaced with the name of the entity): \"The $name class\" \"The $name widget\"\n" + "\"The $name file\" \"is\" \"provides\" \"specifies\" \"contains\"\n" + "\"represents\" \"a\" \"an\" \"the\"" + ); + cl->addValue("The $name class"); + cl->addValue("The $name widget"); + cl->addValue("The $name file"); + cl->addValue("is"); + cl->addValue("provides"); + cl->addValue("specifies"); + cl->addValue("contains"); + cl->addValue("represents"); + cl->addValue("a"); + cl->addValue("an"); + cl->addValue("the"); + //---- + cb = cfg->addBool( + "ALWAYS_DETAILED_SEC", + "If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then\n" + "Doxygen will generate a detailed section even if there is only a brief\n" + "description.", + FALSE + ); + //---- + cb = cfg->addBool( + "INLINE_INHERITED_MEMB", + "If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all\n" + "inherited members of a class in the documentation of that class as if those\n" + "members were ordinary class members. Constructors, destructors and assignment\n" + "operators of the base classes will not be shown.", + FALSE + ); + //---- + cb = cfg->addBool( + "FULL_PATH_NAMES", + "If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full\n" + "path before files name in the file list and in the header files. If set\n" + "to NO the shortest path that makes the file name unique will be used.", + TRUE + ); + //---- + cl = cfg->addList( + "STRIP_FROM_PATH", + "If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag\n" + "can be used to strip a user-defined part of the path. Stripping is\n" + "only done if one of the specified strings matches the left-hand part of\n" + "the path. The tag can be used to show relative paths in the file list.\n" + "If left blank the directory from which doxygen is run is used as the\n" + "path to strip." + ); + cl->addValue(""); + cl->addDependency("FULL_PATH_NAMES"); + //---- + cl = cfg->addList( + "STRIP_FROM_INC_PATH", + "The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of\n" + "the path mentioned in the documentation of a class, which tells\n" + "the reader which header file to include in order to use a class.\n" + "If left blank only the name of the header file containing the class\n" + "definition is used. Otherwise one should specify the include paths that\n" + "are normally passed to the compiler using the -I flag." + ); + //---- + cb = cfg->addBool( + "SHORT_NAMES", + "If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter\n" + "(but less readable) file names. This can be useful if your file system\n" + "doesn't support long names like on DOS, Mac, or CD-ROM.", + FALSE + ); + //---- + cb = cfg->addBool( + "JAVADOC_AUTOBRIEF", + "If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen\n" + "will interpret the first line (until the first dot) of a JavaDoc-style\n" + "comment as the brief description. If set to NO, the JavaDoc\n" + "comments will behave just like regular Qt-style comments\n" + "(thus requiring an explicit @brief command for a brief description.)", + FALSE + ); + //---- + cb = cfg->addBool( + "QT_AUTOBRIEF", + "If the QT_AUTOBRIEF tag is set to YES then Doxygen will\n" + "interpret the first line (until the first dot) of a Qt-style\n" + "comment as the brief description. If set to NO, the comments\n" + "will behave just like regular Qt-style comments (thus requiring\n" + "an explicit \\brief command for a brief description.)", + FALSE + ); + //---- + cb = cfg->addBool( + "MULTILINE_CPP_IS_BRIEF", + "The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen\n" + "treat a multi-line C++ special comment block (i.e. a block of //! or ///\n" + "comments) as a brief description. This used to be the default behaviour.\n" + "The new default is to treat a multi-line C++ comment block as a detailed\n" + "description. Set this tag to YES if you prefer the old behaviour instead.", + FALSE + ); + //---- + cb = cfg->addBool( + "INHERIT_DOCS", + "If the INHERIT_DOCS tag is set to YES (the default) then an undocumented\n" + "member inherits the documentation from any documented member that it\n" + "re-implements.", + TRUE + ); + //---- + cb = cfg->addBool( + "SEPARATE_MEMBER_PAGES", + "If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce\n" + "a new page for each member. If set to NO, the documentation of a member will\n" + "be part of the file/class/namespace that contains it.", + FALSE + ); + //---- + ci = cfg->addInt( + "TAB_SIZE", + "The TAB_SIZE tag can be used to set the number of spaces in a tab.\n" + "Doxygen uses this value to replace tabs by spaces in code fragments.", + 1,16,8 + ); + //---- + cl = cfg->addList( + "ALIASES", + "This tag can be used to specify a number of aliases that acts\n" + "as commands in the documentation. An alias has the form \"name=value\".\n" + "For example adding \"sideeffect=\\par Side Effects:\\n\" will allow you to\n" + "put the command \\sideeffect (or @sideeffect) in the documentation, which\n" + "will result in a user-defined paragraph with heading \"Side Effects:\".\n" + "You can put \\n's in the value part of an alias to insert newlines." + ); + //---- + cb = cfg->addBool( + "OPTIMIZE_OUTPUT_FOR_C", + "Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C\n" + "sources only. Doxygen will then generate output that is more tailored for C.\n" + "For instance, some of the names that are used will be different. The list\n" + "of all members will be omitted, etc.", + FALSE + ); + //---- + cb = cfg->addBool( + "OPTIMIZE_OUTPUT_JAVA", + "Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java\n" + "sources only. Doxygen will then generate output that is more tailored for\n" + "Java. For instance, namespaces will be presented as packages, qualified\n" + "scopes will look different, etc.", + FALSE + ); + //---- + cb = cfg->addBool( + "OPTIMIZE_FOR_FORTRAN", + "Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran\n" + "sources only. Doxygen will then generate output that is more tailored for\n" + "Fortran.", + FALSE + ); + //---- + cb = cfg->addBool( + "OPTIMIZE_OUTPUT_VHDL", + "Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL\n" + "sources. Doxygen will then generate output that is tailored for\n" + "VHDL.", + FALSE + ); + //---- + cl = cfg->addList( + "EXTENSION_MAPPING", + "Doxygen selects the parser to use depending on the extension of the files it\n" + "parses. With this tag you can assign which parser to use for a given extension.\n" + "Doxygen has a built-in mapping, but you can override or extend it using this\n" + "tag. The format is ext=language, where ext is a file extension, and language\n" + "is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,\n" + "C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make\n" + "doxygen treat .inc files as Fortran files (default is PHP), and .f files as C\n" + "(default is Fortran), use: inc=Fortran f=C. Note that for custom extensions\n" + "you also need to set FILE_PATTERNS otherwise the files are not read by doxygen." + ); + //---- + cb = cfg->addBool( + "BUILTIN_STL_SUPPORT", + "If you use STL classes (i.e. std::string, std::vector, etc.) but do not want\n" + "to include (a tag file for) the STL sources as input, then you should\n" + "set this tag to YES in order to let doxygen match functions declarations and\n" + "definitions whose arguments contain STL classes (e.g. func(std::string); v.s.\n" + "func(std::string) {}). This also makes the inheritance and collaboration\n" + "diagrams that involve STL classes more complete and accurate.", + FALSE + ); + //---- + cb = cfg->addBool( + "CPP_CLI_SUPPORT", + "If you use Microsoft's C++/CLI language, you should set this option to YES to\n" + "enable parsing support.", + FALSE + ); + //---- + cb = cfg->addBool( + "SIP_SUPPORT", + "Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.\n" + "Doxygen will parse them like normal C++ but will assume all classes use public\n" + "instead of private inheritance when no explicit protection keyword is present.", + FALSE + ); + //---- + cb = cfg->addBool( + "IDL_PROPERTY_SUPPORT", + "For Microsoft's IDL there are propget and propput attributes to indicate getter\n" + "and setter methods for a property. Setting this option to YES (the default)\n" + "will make doxygen replace the get and set methods by a property in the\n" + "documentation. This will only work if the methods are indeed getting or\n" + "setting a simple type. If this is not the case, or you want to show the\n" + "methods anyway, you should set this option to NO.", + TRUE + ); + //---- + cb = cfg->addBool( + "DISTRIBUTE_GROUP_DOC", + "If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC\n" + "tag is set to YES, then doxygen will reuse the documentation of the first\n" + "member in the group (if any) for the other members of the group. By default\n" + "all members of a group must be documented explicitly.", + FALSE + ); + //---- + cb = cfg->addBool( + "SUBGROUPING", + "Set the SUBGROUPING tag to YES (the default) to allow class member groups of\n" + "the same type (for instance a group of public functions) to be put as a\n" + "subgroup of that type (e.g. under the Public Functions section). Set it to\n" + "NO to prevent subgrouping. Alternatively, this can be done per class using\n" + "the \\nosubgrouping command.", + TRUE + ); + //---- + cb = cfg->addBool( + "INLINE_GROUPED_CLASSES", + "When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and\n" + "unions are shown inside the group in which they are included (e.g. using\n" + "@ingroup) instead of on a separate page (for HTML and Man pages) or\n" + "section (for LaTeX and RTF).", + FALSE + ); + //---- + cb = cfg->addBool( + "TYPEDEF_HIDES_STRUCT", + "When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum\n" + "is documented as struct, union, or enum with the name of the typedef. So\n" + "typedef struct TypeS {} TypeT, will appear in the documentation as a struct\n" + "with name TypeT. When disabled the typedef will appear as a member of a file,\n" + "namespace, or class. And the struct will be named TypeS. This can typically\n" + "be useful for C code in case the coding convention dictates that all compound\n" + "types are typedef'ed and only the typedef is referenced, never the tag name.", + FALSE + ); + //---- + ci = cfg->addInt( + "SYMBOL_CACHE_SIZE", + "The SYMBOL_CACHE_SIZE determines the size of the internal cache use to\n" + "determine which symbols to keep in memory and which to flush to disk.\n" + "When the cache is full, less often used symbols will be written to disk.\n" + "For small to medium size projects (<1000 input files) the default value is\n" + "probably good enough. For larger projects a too small cache size can cause\n" + "doxygen to be busy swapping symbols to and from disk most of the time\n" + "causing a significant performance penalty.\n" + "If the system has enough physical memory increasing the cache will improve the\n" + "performance by keeping more symbols in memory. Note that the value works on\n" + "a logarithmic scale so increasing the size by one will roughly double the\n" + "memory usage. The cache size is given by this formula:\n" + "2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,\n" + "corresponding to a cache size of 2^16 = 65536 symbols", + 0,9,0 + ); + //--------------------------------------------------------------------------- + cfg->addInfo("Build","Build related configuration options"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "EXTRACT_ALL", + "If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in\n" + "documentation are documented, even if no documentation was available.\n" + "Private class members and static file members will be hidden unless\n" + "the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES", + FALSE + ); + //---- + cb = cfg->addBool( + "EXTRACT_PRIVATE", + "If the EXTRACT_PRIVATE tag is set to YES all private members of a class\n" + "will be included in the documentation.", + FALSE + ); + //---- + cb = cfg->addBool( + "EXTRACT_STATIC", + "If the EXTRACT_STATIC tag is set to YES all static members of a file\n" + "will be included in the documentation.", + FALSE + ); + //---- + cb = cfg->addBool( + "EXTRACT_LOCAL_CLASSES", + "If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)\n" + "defined locally in source files will be included in the documentation.\n" + "If set to NO only classes defined in header files are included.", + TRUE + ); + //---- + cb = cfg->addBool( + "EXTRACT_LOCAL_METHODS", + "This flag is only useful for Objective-C code. When set to YES local\n" + "methods, which are defined in the implementation section but not in\n" + "the interface are included in the documentation.\n" + "If set to NO (the default) only methods in the interface are included.", + FALSE + ); + //---- + cb = cfg->addBool( + "EXTRACT_ANON_NSPACES", + "If this flag is set to YES, the members of anonymous namespaces will be\n" + "extracted and appear in the documentation as a namespace called\n" + "'anonymous_namespace{file}', where file will be replaced with the base\n" + "name of the file that contains the anonymous namespace. By default\n" + "anonymous namespaces are hidden.", + FALSE + ); + //---- + cb = cfg->addBool( + "HIDE_UNDOC_MEMBERS", + "If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all\n" + "undocumented members of documented classes, files or namespaces.\n" + "If set to NO (the default) these members will be included in the\n" + "various overviews, but no documentation section is generated.\n" + "This option has no effect if EXTRACT_ALL is enabled.", + FALSE + ); + //---- + cb = cfg->addBool( + "HIDE_UNDOC_CLASSES", + "If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all\n" + "undocumented classes that are normally visible in the class hierarchy.\n" + "If set to NO (the default) these classes will be included in the various\n" + "overviews. This option has no effect if EXTRACT_ALL is enabled.", + FALSE + ); + //---- + cb = cfg->addBool( + "HIDE_FRIEND_COMPOUNDS", + "If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all\n" + "friend (class|struct|union) declarations.\n" + "If set to NO (the default) these declarations will be included in the\n" + "documentation.", + FALSE + ); + //---- + cb = cfg->addBool( + "HIDE_IN_BODY_DOCS", + "If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any\n" + "documentation blocks found inside the body of a function.\n" + "If set to NO (the default) these blocks will be appended to the\n" + "function's detailed documentation block.", + FALSE + ); + //---- + cb = cfg->addBool( + "INTERNAL_DOCS", + "The INTERNAL_DOCS tag determines if documentation\n" + "that is typed after a \\internal command is included. If the tag is set\n" + "to NO (the default) then the documentation will be excluded.\n" + "Set it to YES to include the internal documentation.", + FALSE + ); + //---- + cb = cfg->addBool( + "CASE_SENSE_NAMES", + "If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate\n" + "file names in lower-case letters. If set to YES upper-case letters are also\n" + "allowed. This is useful if you have classes or files whose names only differ\n" + "in case and if your file system supports case sensitive file names. Windows\n" + "and Mac users are advised to set this option to NO.", + portable_fileSystemIsCaseSensitive() + ); + //---- + cb = cfg->addBool( + "HIDE_SCOPE_NAMES", + "If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen\n" + "will show members with their full class and namespace scopes in the\n" + "documentation. If set to YES the scope will be hidden.", + FALSE + ); + //---- + cb = cfg->addBool( + "SHOW_INCLUDE_FILES", + "If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen\n" + "will put a list of the files that are included by a file in the documentation\n" + "of that file.", + TRUE + ); + //---- + cb = cfg->addBool( + "FORCE_LOCAL_INCLUDES", + "If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen\n" + "will list include files with double quotes in the documentation\n" + "rather than with sharp brackets.", + FALSE + ); + //---- + cb = cfg->addBool( + "INLINE_INFO", + "If the INLINE_INFO tag is set to YES (the default) then a tag [inline]\n" + "is inserted in the documentation for inline members.", + TRUE + ); + //---- + cb = cfg->addBool( + "SORT_MEMBER_DOCS", + "If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen\n" + "will sort the (detailed) documentation of file and class members\n" + "alphabetically by member name. If set to NO the members will appear in\n" + "declaration order.", + TRUE + ); + //---- + cb = cfg->addBool( + "SORT_BRIEF_DOCS", + "If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the\n" + "brief documentation of file, namespace and class members alphabetically\n" + "by member name. If set to NO (the default) the members will appear in\n" + "declaration order.", + FALSE + ); + //---- + cb = cfg->addBool( + "SORT_MEMBERS_CTORS_1ST", + "If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen\n" + "will sort the (brief and detailed) documentation of class members so that\n" + "constructors and destructors are listed first. If set to NO (the default)\n" + "the constructors will appear in the respective orders defined by\n" + "SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.\n" + "This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO\n" + "and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.", + FALSE + ); + //---- + cb = cfg->addBool( + "SORT_GROUP_NAMES", + "If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the\n" + "hierarchy of group names into alphabetical order. If set to NO (the default)\n" + "the group names will appear in their defined order.", + FALSE + ); + //---- + cb = cfg->addBool( + "SORT_BY_SCOPE_NAME", + "If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be\n" + "sorted by fully-qualified names, including namespaces. If set to\n" + "NO (the default), the class list will be sorted only by class name,\n" + "not including the namespace part.\n" + "Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\n" + "Note: This option applies only to the class list, not to the\n" + "alphabetical list.", + FALSE + ); + //---- + cb = cfg->addBool( + "STRICT_PROTO_MATCHING", + "If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to\n" + "do proper type resolution of all parameters of a function it will reject a\n" + "match between the prototype and the implementation of a member function even\n" + "if there is only one candidate or it is obvious which candidate to choose\n" + "by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen\n" + "will still accept a match between prototype and implementation in such cases.", + FALSE + ); + //---- + cb = cfg->addBool( + "GENERATE_TODOLIST", + "The GENERATE_TODOLIST tag can be used to enable (YES) or\n" + "disable (NO) the todo list. This list is created by putting \\todo\n" + "commands in the documentation.", + TRUE + ); + //---- + cb = cfg->addBool( + "GENERATE_TESTLIST", + "The GENERATE_TESTLIST tag can be used to enable (YES) or\n" + "disable (NO) the test list. This list is created by putting \\test\n" + "commands in the documentation.", + TRUE + ); + //---- + cb = cfg->addBool( + "GENERATE_BUGLIST", + "The GENERATE_BUGLIST tag can be used to enable (YES) or\n" + "disable (NO) the bug list. This list is created by putting \\bug\n" + "commands in the documentation.", + TRUE + ); + //---- + cb = cfg->addBool( + "GENERATE_DEPRECATEDLIST", + "The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or\n" + "disable (NO) the deprecated list. This list is created by putting\n" + "\\deprecated commands in the documentation.", + TRUE + ); + //---- + cl = cfg->addList( + "ENABLED_SECTIONS", + "The ENABLED_SECTIONS tag can be used to enable conditional\n" + "documentation sections, marked by \\if sectionname ... \\endif." + ); + //---- + ci = cfg->addInt( + "MAX_INITIALIZER_LINES", + "The MAX_INITIALIZER_LINES tag determines the maximum number of lines\n" + "the initial value of a variable or macro consists of for it to appear in\n" + "the documentation. If the initializer consists of more lines than specified\n" + "here it will be hidden. Use a value of 0 to hide initializers completely.\n" + "The appearance of the initializer of individual variables and macros in the\n" + "documentation can be controlled using \\showinitializer or \\hideinitializer\n" + "command in the documentation regardless of this setting.", + 0,10000,30 + ); + //---- + cb = cfg->addBool( + "SHOW_USED_FILES", + "Set the SHOW_USED_FILES tag to NO to disable the list of files generated\n" + "at the bottom of the documentation of classes and structs. If set to YES the\n" + "list will mention the files that were used to generate the documentation.", + TRUE + ); + //---- + cb = cfg->addBool( + "SHOW_DIRECTORIES", + "If the sources in your project are distributed over multiple directories\n" + "then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy\n" + "in the documentation. The default is NO.", + FALSE + ); + //---- + cb = cfg->addBool( + "SHOW_FILES", + "Set the SHOW_FILES tag to NO to disable the generation of the Files page.\n" + "This will remove the Files entry from the Quick Index and from the\n" + "Folder Tree View (if specified). The default is YES.", + TRUE + ); + //---- + cb = cfg->addBool( + "SHOW_NAMESPACES", + "Set the SHOW_NAMESPACES tag to NO to disable the generation of the\n" + "Namespaces page.\n" + "This will remove the Namespaces entry from the Quick Index\n" + "and from the Folder Tree View (if specified). The default is YES.", + TRUE + ); + //---- + cs = cfg->addString( + "FILE_VERSION_FILTER", + "The FILE_VERSION_FILTER tag can be used to specify a program or script that\n" + "doxygen should invoke to get the current version for each file (typically from\n" + "the version control system). Doxygen will invoke the program by executing (via\n" + "popen()) the command , where is the value of\n" + "the FILE_VERSION_FILTER tag, and is the name of an input file\n" + "provided by doxygen. Whatever the program writes to standard output\n" + "is used as the file version. See the manual for examples." + ); + cs->setWidgetType(ConfigString::File); + //---- + cs = cfg->addString( + "LAYOUT_FILE", + "The LAYOUT_FILE tag can be used to specify a layout file which will be parsed\n" + "by doxygen. The layout file controls the global structure of the generated\n" + "output files in an output format independent way. The create the layout file\n" + "that represents doxygen's defaults, run doxygen with the -l option.\n" + "You can optionally specify a file name after the option, if omitted\n" + "DoxygenLayout.xml will be used as the name of the layout file." + ); + cs->setWidgetType(ConfigString::File); + //--------------------------------------------------------------------------- + cfg->addInfo("Messages","configuration options related to warning and progress messages"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "QUIET", + "The QUIET tag can be used to turn on/off the messages that are generated\n" + "by doxygen. Possible values are YES and NO. If left blank NO is used.", + FALSE + ); + //---- + cb = cfg->addBool( + "WARNINGS", + "The WARNINGS tag can be used to turn on/off the warning messages that are\n" + "generated by doxygen. Possible values are YES and NO. If left blank\n" + "NO is used.", + TRUE + ); + //---- + cb = cfg->addBool( + "WARN_IF_UNDOCUMENTED", + "If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings\n" + "for undocumented members. If EXTRACT_ALL is set to YES then this flag will\n" + "automatically be disabled.", + TRUE + ); + //---- + cb = cfg->addBool( + "WARN_IF_DOC_ERROR", + "If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for\n" + "potential errors in the documentation, such as not documenting some\n" + "parameters in a documented function, or documenting parameters that\n" + "don't exist or using markup commands wrongly.", + TRUE + ); + //---- + cb = cfg->addBool( + "WARN_NO_PARAMDOC", + "The WARN_NO_PARAMDOC option can be enabled to get warnings for\n" + "functions that are documented, but have no documentation for their parameters\n" + "or return value. If set to NO (the default) doxygen will only warn about\n" + "wrong or incomplete parameter documentation, but not about the absence of\n" + "documentation.", + FALSE + ); + //---- + cs = cfg->addString( + "WARN_FORMAT", + "The WARN_FORMAT tag determines the format of the warning messages that\n" + "doxygen can produce. The string should contain the $file, $line, and $text\n" + "tags, which will be replaced by the file and line number from which the\n" + "warning originated and the warning text. Optionally the format may contain\n" + "$version, which will be replaced by the version of the file (if it could\n" + "be obtained via FILE_VERSION_FILTER)" + ); + cs->setDefaultValue("$file:$line: $text"); + //---- + cs = cfg->addString( + "WARN_LOGFILE", + "The WARN_LOGFILE tag can be used to specify a file to which warning\n" + "and error messages should be written. If left blank the output is written\n" + "to stderr." + ); + cs->setWidgetType(ConfigString::File); + //--------------------------------------------------------------------------- + cfg->addInfo("Input","configuration options related to the input files"); + //--------------------------------------------------------------------------- + + //---- + cl = cfg->addList( + "INPUT", + "The INPUT tag can be used to specify the files and/or directories that contain\n" + "documented source files. You may enter file names like \"myfile.cpp\" or\n" + "directories like \"/usr/src/myproject\". Separate the files or directories\n" + "with spaces." + ); + cl->addValue(""); + cl->setWidgetType(ConfigList::FileAndDir); + //---- + cs = cfg->addString( + "INPUT_ENCODING", + "This tag can be used to specify the character encoding of the source files\n" + "that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is\n" + "also the default input encoding. Doxygen uses libiconv (or the iconv built\n" + "into libc) for the transcoding. See http://www.gnu.org/software/libiconv for\n" + "the list of possible encodings." + ); + cs->setDefaultValue("UTF-8"); + //---- + cl = cfg->addList( + "FILE_PATTERNS", + "If the value of the INPUT tag contains directories, you can use the\n" + "FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp\n" + "and *.h) to filter out the source-files in the directories. If left\n" + "blank the following patterns are tested:\n" + "*.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh\n" + "*.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py\n" + "*.f90 *.f *.for *.vhd *.vhdl" + ); + cl->addValue("*.c"); + cl->addValue("*.cc"); + cl->addValue("*.cxx"); + cl->addValue("*.cpp"); + cl->addValue("*.c++"); + cl->addValue("*.d"); + cl->addValue("*.java"); + cl->addValue("*.ii"); + cl->addValue("*.ixx"); + cl->addValue("*.ipp"); + cl->addValue("*.i++"); + cl->addValue("*.inl"); + cl->addValue("*.h"); + cl->addValue("*.hh"); + cl->addValue("*.hxx"); + cl->addValue("*.hpp"); + cl->addValue("*.h++"); + cl->addValue("*.idl"); + cl->addValue("*.odl"); + cl->addValue("*.cs"); + cl->addValue("*.php"); + cl->addValue("*.php3"); + cl->addValue("*.inc"); + cl->addValue("*.m"); + cl->addValue("*.mm"); + cl->addValue("*.dox"); + cl->addValue("*.py"); + cl->addValue("*.f90"); + cl->addValue("*.f"); + cl->addValue("*.for"); + cl->addValue("*.vhd"); + cl->addValue("*.vhdl"); + //---- + cb = cfg->addBool( + "RECURSIVE", + "The RECURSIVE tag can be used to turn specify whether or not subdirectories\n" + "should be searched for input files as well. Possible values are YES and NO.\n" + "If left blank NO is used.", + FALSE + ); + //---- + cl = cfg->addList( + "EXCLUDE", + "The EXCLUDE tag can be used to specify files and/or directories that should\n" + "excluded from the INPUT source files. This way you can easily exclude a\n" + "subdirectory from a directory tree whose root is specified with the INPUT tag." + ); + cl->setWidgetType(ConfigList::FileAndDir); + //---- + cb = cfg->addBool( + "EXCLUDE_SYMLINKS", + "The EXCLUDE_SYMLINKS tag can be used select whether or not files or\n" + "directories that are symbolic links (a Unix file system feature) are excluded\n" + "from the input.", + FALSE + ); + //---- + cl = cfg->addList( + "EXCLUDE_PATTERNS", + "If the value of the INPUT tag contains directories, you can use the\n" + "EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude\n" + "certain files from those directories. Note that the wildcards are matched\n" + "against the file with absolute path, so to exclude all test directories\n" + "for example use the pattern */test/*" + ); + //---- + cl = cfg->addList( + "EXCLUDE_SYMBOLS", + "The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n" + "(namespaces, classes, functions, etc.) that should be excluded from the\n" + "output. The symbol name can be a fully qualified name, a word, or if the\n" + "wildcard * is used, a substring. Examples: ANamespace, AClass,\n" + "AClass::ANamespace, ANamespace::*Test" + ); + //---- + cl = cfg->addList( + "EXAMPLE_PATH", + "The EXAMPLE_PATH tag can be used to specify one or more files or\n" + "directories that contain example code fragments that are included (see\n" + "the \\include command)." + ); + cl->setWidgetType(ConfigList::Dir); + //---- + cl = cfg->addList( + "EXAMPLE_PATTERNS", + "If the value of the EXAMPLE_PATH tag contains directories, you can use the\n" + "EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp\n" + "and *.h) to filter out the source-files in the directories. If left\n" + "blank all files are included." + ); + cl->addValue("*"); + //---- + cb = cfg->addBool( + "EXAMPLE_RECURSIVE", + "If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be\n" + "searched for input files to be used with the \\include or \\dontinclude\n" + "commands irrespective of the value of the RECURSIVE tag.\n" + "Possible values are YES and NO. If left blank NO is used.", + FALSE + ); + //---- + cl = cfg->addList( + "IMAGE_PATH", + "The IMAGE_PATH tag can be used to specify one or more files or\n" + "directories that contain image that are included in the documentation (see\n" + "the \\image command)." + ); + cl->setWidgetType(ConfigList::Dir); + //---- + cs = cfg->addString( + "INPUT_FILTER", + "The INPUT_FILTER tag can be used to specify a program that doxygen should\n" + "invoke to filter for each input file. Doxygen will invoke the filter program\n" + "by executing (via popen()) the command , where \n" + "is the value of the INPUT_FILTER tag, and is the name of an\n" + "input file. Doxygen will then use the output that the filter program writes\n" + "to standard output.\n" + "If FILTER_PATTERNS is specified, this tag will be\n" + "ignored." + ); + cs->setWidgetType(ConfigString::File); + //---- + cl = cfg->addList( + "FILTER_PATTERNS", + "The FILTER_PATTERNS tag can be used to specify filters on a per file pattern\n" + "basis.\n" + "Doxygen will compare the file name with each pattern and apply the\n" + "filter if there is a match.\n" + "The filters are a list of the form:\n" + "pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further\n" + "info on how filters are used. If FILTER_PATTERNS is empty or if\n" + "non of the patterns match the file name, INPUT_FILTER is applied." + ); + //---- + cb = cfg->addBool( + "FILTER_SOURCE_FILES", + "If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using\n" + "INPUT_FILTER) will be used to filter the input files when producing source\n" + "files to browse (i.e. when SOURCE_BROWSER is set to YES).", + FALSE + ); + //---- + cl = cfg->addList( + "FILTER_SOURCE_PATTERNS", + "The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file\n" + "pattern. A pattern will override the setting for FILTER_PATTERN (if any)\n" + "and it is also possible to disable source filtering for a specific pattern\n" + "using *.ext= (so without naming a filter). This option only has effect when\n" + "FILTER_SOURCE_FILES is enabled." + ); + cl->addDependency("FILTER_SOURCE_FILES"); + //--------------------------------------------------------------------------- + cfg->addInfo("Source Browser","configuration options related to source browsing"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "SOURCE_BROWSER", + "If the SOURCE_BROWSER tag is set to YES then a list of source files will\n" + "be generated. Documented entities will be cross-referenced with these sources.\n" + "Note: To get rid of all source code in the generated output, make sure also\n" + "VERBATIM_HEADERS is set to NO.", + FALSE + ); + //---- + cb = cfg->addBool( + "INLINE_SOURCES", + "Setting the INLINE_SOURCES tag to YES will include the body\n" + "of functions and classes directly in the documentation.", + FALSE + ); + //---- + cb = cfg->addBool( + "STRIP_CODE_COMMENTS", + "Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct\n" + "doxygen to hide any special comment blocks from generated source code\n" + "fragments. Normal C and C++ comments will always remain visible.", + TRUE + ); + //---- + cb = cfg->addBool( + "REFERENCED_BY_RELATION", + "If the REFERENCED_BY_RELATION tag is set to YES\n" + "then for each documented function all documented\n" + "functions referencing it will be listed.", + FALSE + ); + //---- + cb = cfg->addBool( + "REFERENCES_RELATION", + "If the REFERENCES_RELATION tag is set to YES\n" + "then for each documented function all documented entities\n" + "called/used by that function will be listed.", + FALSE + ); + //---- + cb = cfg->addBool( + "REFERENCES_LINK_SOURCE", + "If the REFERENCES_LINK_SOURCE tag is set to YES (the default)\n" + "and SOURCE_BROWSER tag is set to YES, then the hyperlinks from\n" + "functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will\n" + "link to the source code.\n" + "Otherwise they will link to the documentation.", + TRUE + ); + //---- + cb = cfg->addBool( + "USE_HTAGS", + "If the USE_HTAGS tag is set to YES then the references to source code\n" + "will point to the HTML generated by the htags(1) tool instead of doxygen\n" + "built-in source browser. The htags tool is part of GNU's global source\n" + "tagging system (see http://www.gnu.org/software/global/global.html). You\n" + "will need version 4.8.6 or higher.", + FALSE + ); + cb->addDependency("SOURCE_BROWSER"); + //---- + cb = cfg->addBool( + "VERBATIM_HEADERS", + "If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen\n" + "will generate a verbatim copy of the header file for each class for\n" + "which an include is specified. Set to NO to disable this.", + TRUE + ); + //--------------------------------------------------------------------------- + cfg->addInfo("Index","configuration options related to the alphabetical class index"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "ALPHABETICAL_INDEX", + "If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index\n" + "of all compounds will be generated. Enable this if the project\n" + "contains a lot of classes, structs, unions or interfaces.", + TRUE + ); + //---- + ci = cfg->addInt( + "COLS_IN_ALPHA_INDEX", + "If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then\n" + "the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns\n" + "in which this list will be split (can be a number in the range [1..20])", + 1,20,5 + ); + //---- + cl = cfg->addList( + "IGNORE_PREFIX", + "In case all classes in a project start with a common prefix, all\n" + "classes will be put under the same header in the alphabetical index.\n" + "The IGNORE_PREFIX tag can be used to specify one or more prefixes that\n" + "should be ignored while generating the index headers." + ); + //--------------------------------------------------------------------------- + cfg->addInfo("HTML","configuration options related to the HTML output"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "GENERATE_HTML", + "If the GENERATE_HTML tag is set to YES (the default) Doxygen will\n" + "generate HTML output.", + TRUE + ); + //---- + cs = cfg->addString( + "HTML_OUTPUT", + "The HTML_OUTPUT tag is used to specify where the HTML docs will be put.\n" + "If a relative path is entered the value of OUTPUT_DIRECTORY will be\n" + "put in front of it. If left blank `html' will be used as the default path." + ); + cs->setDefaultValue("html"); + cs->setWidgetType(ConfigString::Dir); + cs->addDependency("GENERATE_HTML"); + //---- + cs = cfg->addString( + "HTML_FILE_EXTENSION", + "The HTML_FILE_EXTENSION tag can be used to specify the file extension for\n" + "each generated HTML page (for example: .htm,.php,.asp). If it is left blank\n" + "doxygen will generate files with .html extension." + ); + cs->setDefaultValue(".html"); + cs->addDependency("GENERATE_HTML"); + //---- + cs = cfg->addString( + "HTML_HEADER", + "The HTML_HEADER tag can be used to specify a personal HTML header for\n" + "each generated HTML page. If it is left blank doxygen will generate a\n" + "standard header. Note that when using a custom header you are responsible\n" + "for the proper inclusion of any scripts and style sheets that doxygen\n" + "needs, which is dependent on the configuration options used.\n" + "It is adviced to generate a default header using \"doxygen -w html\n" + "header.html footer.html stylesheet.css YourConfigFile\" and then modify\n" + "that header. Note that the header is subject to change so you typically\n" + "have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW!" + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_HTML"); + //---- + cs = cfg->addString( + "HTML_FOOTER", + "The HTML_FOOTER tag can be used to specify a personal HTML footer for\n" + "each generated HTML page. If it is left blank doxygen will generate a\n" + "standard footer." + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_HTML"); + //---- + cs = cfg->addString( + "HTML_STYLESHEET", + "The HTML_STYLESHEET tag can be used to specify a user-defined cascading\n" + "style sheet that is used by each HTML page. It can be used to\n" + "fine-tune the look of the HTML output. If the tag is left blank doxygen\n" + "will generate a default style sheet. Note that doxygen will try to copy\n" + "the style sheet file to the HTML output directory, so don't put your own\n" + "stylesheet in the HTML output directory as well, or it will be erased!" + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_HTML"); + //---- + cl = cfg->addList( + "HTML_EXTRA_FILES", + "The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\n" + "other source files which should be copied to the HTML output directory. Note\n" + "that these files will be copied to the base HTML output directory. Use the\n" + "$relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n" + "files. In the HTML_STYLESHEET file, use the file name only. Also note that\n" + "the files will be copied as-is; there are no commands or markers available." + ); + cl->addDependency("GENERATE_HTML"); + cl->setWidgetType(ConfigList::File); + //---- + ci = cfg->addInt( + "HTML_COLORSTYLE_HUE", + "The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.\n" + "Doxygen will adjust the colors in the stylesheet and background images\n" + "according to this color. Hue is specified as an angle on a colorwheel,\n" + "see http://en.wikipedia.org/wiki/Hue for more information.\n" + "For instance the value 0 represents red, 60 is yellow, 120 is green,\n" + "180 is cyan, 240 is blue, 300 purple, and 360 is red again.\n" + "The allowed range is 0 to 359.", + 0,359,220 + ); + ci->addDependency("GENERATE_HTML"); + //---- + ci = cfg->addInt( + "HTML_COLORSTYLE_SAT", + "The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of\n" + "the colors in the HTML output. For a value of 0 the output will use\n" + "grayscales only. A value of 255 will produce the most vivid colors.", + 0,255,100 + ); + ci->addDependency("GENERATE_HTML"); + //---- + ci = cfg->addInt( + "HTML_COLORSTYLE_GAMMA", + "The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to\n" + "the luminance component of the colors in the HTML output. Values below\n" + "100 gradually make the output lighter, whereas values above 100 make\n" + "the output darker. The value divided by 100 is the actual gamma applied,\n" + "so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,\n" + "and 100 does not change the gamma.", + 40,240,80 + ); + //---- + cb = cfg->addBool( + "HTML_TIMESTAMP", + "If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML\n" + "page will contain the date and time when the page was generated. Setting\n" + "this to NO can help when comparing the output of multiple runs.", + TRUE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cb = cfg->addBool( + "HTML_ALIGN_MEMBERS", + "If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,\n" + "files or namespaces will be aligned in HTML using tables. If set to\n" + "NO a bullet list will be used.", + TRUE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cb = cfg->addBool( + "HTML_DYNAMIC_SECTIONS", + "If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML\n" + "documentation will contain sections that can be hidden and shown after the\n" + "page has loaded. For this to work a browser that supports\n" + "JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox\n" + "Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).", + FALSE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cb = cfg->addBool( + "GENERATE_DOCSET", + "If the GENERATE_DOCSET tag is set to YES, additional index files\n" + "will be generated that can be used as input for Apple's Xcode 3\n" + "integrated development environment, introduced with OSX 10.5 (Leopard).\n" + "To create a documentation set, doxygen will generate a Makefile in the\n" + "HTML output directory. Running make will produce the docset in that\n" + "directory and running \"make install\" will install the docset in\n" + "~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find\n" + "it at startup.\n" + "See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html\n" + "for more information.", + FALSE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cs = cfg->addString( + "DOCSET_FEEDNAME", + "When GENERATE_DOCSET tag is set to YES, this tag determines the name of the\n" + "feed. A documentation feed provides an umbrella under which multiple\n" + "documentation sets from a single provider (such as a company or product suite)\n" + "can be grouped." + ); + cs->setDefaultValue("Doxygen generated docs"); + cs->addDependency("GENERATE_DOCSET"); + //---- + cs = cfg->addString( + "DOCSET_BUNDLE_ID", + "When GENERATE_DOCSET tag is set to YES, this tag specifies a string that\n" + "should uniquely identify the documentation set bundle. This should be a\n" + "reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen\n" + "will append .docset to the name." + ); + cs->setDefaultValue("org.doxygen.Project"); + cs->addDependency("GENERATE_DOCSET"); + //---- + cs = cfg->addString( + "DOCSET_PUBLISHER_ID", + "When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify\n" + "the documentation publisher. This should be a reverse domain-name style\n" + "string, e.g. com.mycompany.MyDocSet.documentation." + ); + cs->setDefaultValue("org.doxygen.Publisher"); + cs->addDependency("GENERATE_DOCSET"); + //---- + cs = cfg->addString( + "DOCSET_PUBLISHER_NAME", + "The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher." + ); + cs->setDefaultValue("Publisher"); + cs->addDependency("GENERATE_DOCSET"); + //---- + cb = cfg->addBool( + "GENERATE_HTMLHELP", + "If the GENERATE_HTMLHELP tag is set to YES, additional index files\n" + "will be generated that can be used as input for tools like the\n" + "Microsoft HTML help workshop to generate a compiled HTML help file (.chm)\n" + "of the generated HTML documentation.", + FALSE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cs = cfg->addString( + "CHM_FILE", + "If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can\n" + "be used to specify the file name of the resulting .chm file. You\n" + "can add a path in front of the file if the result should not be\n" + "written to the html output directory." + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_HTMLHELP"); + //---- + cs = cfg->addString( + "HHC_LOCATION", + "If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can\n" + "be used to specify the location (absolute path including file name) of\n" + "the HTML help compiler (hhc.exe). If non-empty doxygen will try to run\n" + "the HTML help compiler on the generated index.hhp." + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_HTMLHELP"); + //---- + cb = cfg->addBool( + "GENERATE_CHI", + "If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag\n" + "controls if a separate .chi index file is generated (YES) or that\n" + "it should be included in the master .chm file (NO).", + FALSE + ); + cb->addDependency("GENERATE_HTMLHELP"); + //---- + cs = cfg->addString( + "CHM_INDEX_ENCODING", + "If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING\n" + "is used to encode HtmlHelp index (hhk), content (hhc) and project file\n" + "content." + ); + cs->addDependency("GENERATE_HTMLHELP"); + //---- + cb = cfg->addBool( + "BINARY_TOC", + "If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag\n" + "controls whether a binary table of contents is generated (YES) or a\n" + "normal table of contents (NO) in the .chm file.", + FALSE + ); + cb->addDependency("GENERATE_HTMLHELP"); + //---- + cb = cfg->addBool( + "TOC_EXPAND", + "The TOC_EXPAND flag can be set to YES to add extra items for group members\n" + "to the contents of the HTML help documentation and to the tree view.", + FALSE + ); + cb->addDependency("GENERATE_HTMLHELP"); + //---- + cb = cfg->addBool( + "GENERATE_QHP", + "If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and\n" + "QHP_VIRTUAL_FOLDER are set, an additional index file will be generated\n" + "that can be used as input for Qt's qhelpgenerator to generate a\n" + "Qt Compressed Help (.qch) of the generated HTML documentation.", + FALSE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cs = cfg->addString( + "QCH_FILE", + "If the QHG_LOCATION tag is specified, the QCH_FILE tag can\n" + "be used to specify the file name of the resulting .qch file.\n" + "The path specified is relative to the HTML output folder." + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_QHP"); + //---- + cs = cfg->addString( + "QHP_NAMESPACE", + "The QHP_NAMESPACE tag specifies the namespace to use when generating\n" + "Qt Help Project output. For more information please see\n" + "http://doc.trolltech.com/qthelpproject.html#namespace" + ); + cs->setDefaultValue("org.doxygen.Project"); + cs->addDependency("GENERATE_QHP"); + //---- + cs = cfg->addString( + "QHP_VIRTUAL_FOLDER", + "The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating\n" + "Qt Help Project output. For more information please see\n" + "http://doc.trolltech.com/qthelpproject.html#virtual-folders" + ); + cs->setDefaultValue("doc"); + cs->addDependency("GENERATE_QHP"); + //---- + cs = cfg->addString( + "QHP_CUST_FILTER_NAME", + "If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to\n" + "add. For more information please see\n" + "http://doc.trolltech.com/qthelpproject.html#custom-filters" + ); + cs->addDependency("GENERATE_QHP"); + //---- + cs = cfg->addString( + "QHP_CUST_FILTER_ATTRS", + "The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the\n" + "custom filter to add. For more information please see\n" + "\n" + "Qt Help Project / Custom Filters." + ); + cs->addDependency("GENERATE_QHP"); + //---- + cs = cfg->addString( + "QHP_SECT_FILTER_ATTRS", + "The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this\n" + "project's\n" + "filter section matches.\n" + "\n" + "Qt Help Project / Filter Attributes." + ); + cs->addDependency("GENERATE_QHP"); + //---- + cs = cfg->addString( + "QHG_LOCATION", + "If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can\n" + "be used to specify the location of Qt's qhelpgenerator.\n" + "If non-empty doxygen will try to run qhelpgenerator on the generated\n" + ".qhp file." + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_QHP"); + //---- + cb = cfg->addBool( + "GENERATE_ECLIPSEHELP", + "If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files\n" + " will be generated, which together with the HTML files, form an Eclipse help\n" + "plugin. To install this plugin and make it available under the help contents\n" + "menu in Eclipse, the contents of the directory containing the HTML and XML\n" + "files needs to be copied into the plugins directory of eclipse. The name of\n" + "the directory within the plugins directory should be the same as\n" + "the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before\n" + "the help appears.", + FALSE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cs = cfg->addString( + "ECLIPSE_DOC_ID", + "A unique identifier for the eclipse help plugin. When installing the plugin\n" + "the directory name containing the HTML and XML files should also have\n" + "this name." + ); + cs->setDefaultValue("org.doxygen.Project"); + cs->addDependency("GENERATE_ECLIPSEHELP"); + //---- + cb = cfg->addBool( + "DISABLE_INDEX", + "The DISABLE_INDEX tag can be used to turn on/off the condensed index at\n" + "top of each HTML page. The value NO (the default) enables the index and\n" + "the value YES disables it.", + FALSE + ); + cb->addDependency("GENERATE_HTML"); + //---- + ci = cfg->addInt( + "ENUM_VALUES_PER_LINE", + "The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values\n" + "(range [0,1..20]) that doxygen will group on one line in the generated HTML\n" + "documentation. Note that a value of 0 will completely suppress the enum\n" + "values from appearing in the overview section.", + 0,20,4 + ); + ci->addDependency("GENERATE_HTML"); + //---- + cb = cfg->addBool( + "GENERATE_TREEVIEW", + "The GENERATE_TREEVIEW tag is used to specify whether a tree-like index\n" + "structure should be generated to display hierarchical information.\n" + "If the tag value is set to YES, a side panel will be generated\n" + "containing a tree-like index structure (just like the one that\n" + "is generated for HTML Help). For this to work a browser that supports\n" + "JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).\n" + "Windows users are probably better off using the HTML help feature.", + FALSE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cb = cfg->addBool( + "USE_INLINE_TREES", + "By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,\n" + "and Class Hierarchy pages using a tree view instead of an ordered list.", + FALSE + ); + cb->addDependency("GENERATE_HTML"); + //---- + ci = cfg->addInt( + "TREEVIEW_WIDTH", + "If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be\n" + "used to set the initial width (in pixels) of the frame in which the tree\n" + "is shown.", + 0,1500,250 + ); + ci->addDependency("GENERATE_HTML"); + //---- + cb = cfg->addBool( + "EXT_LINKS_IN_WINDOW", + "When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open\n" + "links to external symbols imported via tag files in a separate window.", + FALSE + ); + cb->addDependency("GENERATE_HTML"); + //---- + ci = cfg->addInt( + "FORMULA_FONTSIZE", + "Use this tag to change the font size of Latex formulas included\n" + "as images in the HTML documentation. The default is 10. Note that\n" + "when you change the font size after a successful doxygen run you need\n" + "to manually remove any form_*.png images from the HTML output directory\n" + "to force them to be regenerated.", + 8,50,10 + ); + ci->addDependency("GENERATE_HTML"); + //---- + cb = cfg->addBool( + "FORMULA_TRANSPARENT", + "Use the FORMULA_TRANPARENT tag to determine whether or not the images\n" + "generated for formulas are transparent PNGs. Transparent PNGs are\n" + "not supported properly for IE 6.0, but are supported on all modern browsers.\n" + "Note that when changing this option you need to delete any form_*.png files\n" + "in the HTML output before the changes have effect.", + TRUE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cb = cfg->addBool( + "USE_MATHJAX", + "Enable the USE_MATHJAX option to render LaTeX formulas using MathJax\n" + "(see http://www.mathjax.org) which uses client side Javascript for the\n" + "rendering instead of using prerendered bitmaps. Use this if you do not\n" + "have LaTeX installed or if you want to formulas look prettier in the HTML\n" + "output. When enabled you also need to install MathJax separately and\n" + "configure the path to it using the MATHJAX_RELPATH option.", + FALSE + ); + //---- + cs = cfg->addString( + "MATHJAX_RELPATH", + "When MathJax is enabled you need to specify the location relative to the\n" + "HTML output directory using the MATHJAX_RELPATH option. The destination\n" + "directory should contain the MathJax.js script. For instance, if the mathjax\n" + "directory is located at the same level as the HTML output directory, then\n" + "MATHJAX_RELPATH should be ../mathjax. The default value points to the\n" + "mathjax.org site, so you can quickly see the result without installing\n" + "MathJax, but it is strongly recommended to install a local copy of MathJax\n" + "before deployment." + ); + cs->setDefaultValue("http://www.mathjax.org/mathjax"); + //---- + cb = cfg->addBool( + "SEARCHENGINE", + "When the SEARCHENGINE tag is enabled doxygen will generate a search box\n" + "for the HTML output. The underlying search engine uses javascript\n" + "and DHTML and should work on any modern browser. Note that when using\n" + "HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets\n" + "(GENERATE_DOCSET) there is already a search function so this one should\n" + "typically be disabled. For large projects the javascript based search engine\n" + "can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.", + TRUE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cb = cfg->addBool( + "SERVER_BASED_SEARCH", + "When the SERVER_BASED_SEARCH tag is enabled the search engine will be\n" + "implemented using a PHP enabled web server instead of at the web client\n" + "using Javascript. Doxygen will generate the search PHP script and index\n" + "file to put on the web server. The advantage of the server\n" + "based approach is that it scales better to large projects and allows\n" + "full text search. The disadvantages are that it is more difficult to setup\n" + "and does not have live searching capabilities.", + FALSE + ); + cb->addDependency("SEARCHENGINE"); + //--------------------------------------------------------------------------- + cfg->addInfo("LaTeX","configuration options related to the LaTeX output"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "GENERATE_LATEX", + "If the GENERATE_LATEX tag is set to YES (the default) Doxygen will\n" + "generate Latex output.", + TRUE + ); + //---- + cs = cfg->addString( + "LATEX_OUTPUT", + "The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.\n" + "If a relative path is entered the value of OUTPUT_DIRECTORY will be\n" + "put in front of it. If left blank `latex' will be used as the default path." + ); + cs->setDefaultValue("latex"); + cs->setWidgetType(ConfigString::Dir); + cs->addDependency("GENERATE_LATEX"); + //---- + cs = cfg->addString( + "LATEX_CMD_NAME", + "The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be\n" + "invoked. If left blank `latex' will be used as the default command name.\n" + "Note that when enabling USE_PDFLATEX this option is only used for\n" + "generating bitmaps for formulas in the HTML output, but not in the\n" + "Makefile that is written to the output directory." + ); + cs->setDefaultValue("latex"); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_LATEX"); + //---- + cs = cfg->addString( + "MAKEINDEX_CMD_NAME", + "The MAKEINDEX_CMD_NAME tag can be used to specify the command name to\n" + "generate index for LaTeX. If left blank `makeindex' will be used as the\n" + "default command name." + ); + cs->setDefaultValue("makeindex"); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_LATEX"); + //---- + cb = cfg->addBool( + "COMPACT_LATEX", + "If the COMPACT_LATEX tag is set to YES Doxygen generates more compact\n" + "LaTeX documents. This may be useful for small projects and may help to\n" + "save some trees in general.", + FALSE + ); + cb->addDependency("GENERATE_LATEX"); + //---- + ce = cfg->addEnum( + "PAPER_TYPE", + "The PAPER_TYPE tag can be used to set the paper type that is used\n" + "by the printer. Possible values are: a4, letter, legal and\n" + "executive. If left blank a4wide will be used.", + "a4" + ); + ce->addValue("a4"); + ce->addValue("a4wide"); + ce->addValue("letter"); + ce->addValue("legal"); + ce->addValue("executive"); + ce->addDependency("GENERATE_LATEX"); + //---- + cl = cfg->addList( + "EXTRA_PACKAGES", + "The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX\n" + "packages that should be included in the LaTeX output." + ); + cl->addDependency("GENERATE_LATEX"); + //---- + cs = cfg->addString( + "LATEX_HEADER", + "The LATEX_HEADER tag can be used to specify a personal LaTeX header for\n" + "the generated latex document. The header should contain everything until\n" + "the first chapter. If it is left blank doxygen will generate a\n" + "standard header. Notice: only use this tag if you know what you are doing!" + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_LATEX"); + //---- + cs = cfg->addString( + "LATEX_FOOTER", + "The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for\n" + "the generated latex document. The footer should contain everything after\n" + "the last chapter. If it is left blank doxygen will generate a\n" + "standard footer. Notice: only use this tag if you know what you are doing!" + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_LATEX"); + //---- + cb = cfg->addBool( + "PDF_HYPERLINKS", + "If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated\n" + "is prepared for conversion to pdf (using ps2pdf). The pdf file will\n" + "contain links (just like the HTML output) instead of page references\n" + "This makes the output suitable for online browsing using a pdf viewer.", + TRUE + ); + cb->addDependency("GENERATE_LATEX"); + //---- + cb = cfg->addBool( + "USE_PDFLATEX", + "If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of\n" + "plain latex in the generated Makefile. Set this option to YES to get a\n" + "higher quality PDF documentation.", + TRUE + ); + cb->addDependency("GENERATE_LATEX"); + //---- + cb = cfg->addBool( + "LATEX_BATCHMODE", + "If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\\\batchmode.\n" + "command to the generated LaTeX files. This will instruct LaTeX to keep\n" + "running if errors occur, instead of asking the user for help.\n" + "This option is also used when generating formulas in HTML.", + FALSE + ); + cb->addDependency("GENERATE_LATEX"); + //---- + cb = cfg->addBool( + "LATEX_HIDE_INDICES", + "If LATEX_HIDE_INDICES is set to YES then doxygen will not\n" + "include the index chapters (such as File Index, Compound Index, etc.)\n" + "in the output.", + FALSE + ); + cb->addDependency("GENERATE_LATEX"); + //---- + cb = cfg->addBool( + "LATEX_SOURCE_CODE", + "If LATEX_SOURCE_CODE is set to YES then doxygen will include\n" + "source code with syntax highlighting in the LaTeX output.\n" + "Note that which sources are shown also depends on other settings\n" + "such as SOURCE_BROWSER.", + FALSE + ); + cb->addDependency("GENERATE_LATEX"); + //--------------------------------------------------------------------------- + cfg->addInfo("RTF","configuration options related to the RTF output"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "GENERATE_RTF", + "If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output\n" + "The RTF output is optimized for Word 97 and may not look very pretty with\n" + "other RTF readers or editors.", + FALSE + ); + //---- + cs = cfg->addString( + "RTF_OUTPUT", + "The RTF_OUTPUT tag is used to specify where the RTF docs will be put.\n" + "If a relative path is entered the value of OUTPUT_DIRECTORY will be\n" + "put in front of it. If left blank `rtf' will be used as the default path." + ); + cs->setDefaultValue("rtf"); + cs->setWidgetType(ConfigString::Dir); + cs->addDependency("GENERATE_RTF"); + //---- + cb = cfg->addBool( + "COMPACT_RTF", + "If the COMPACT_RTF tag is set to YES Doxygen generates more compact\n" + "RTF documents. This may be useful for small projects and may help to\n" + "save some trees in general.", + FALSE + ); + cb->addDependency("GENERATE_RTF"); + //---- + cb = cfg->addBool( + "RTF_HYPERLINKS", + "If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated\n" + "will contain hyperlink fields. The RTF file will\n" + "contain links (just like the HTML output) instead of page references.\n" + "This makes the output suitable for online browsing using WORD or other\n" + "programs which support those fields.\n" + "Note: wordpad (write) and others do not support links.", + FALSE + ); + cb->addDependency("GENERATE_RTF"); + //---- + cs = cfg->addString( + "RTF_STYLESHEET_FILE", + "Load stylesheet definitions from file. Syntax is similar to doxygen's\n" + "config file, i.e. a series of assignments. You only have to provide\n" + "replacements, missing definitions are set to their default value." + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_RTF"); + //---- + cs = cfg->addString( + "RTF_EXTENSIONS_FILE", + "Set optional variables used in the generation of an rtf document.\n" + "Syntax is similar to doxygen's config file." + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_RTF"); + //--------------------------------------------------------------------------- + cfg->addInfo("Man","configuration options related to the man page output"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "GENERATE_MAN", + "If the GENERATE_MAN tag is set to YES (the default) Doxygen will\n" + "generate man pages", + FALSE + ); + //---- + cs = cfg->addString( + "MAN_OUTPUT", + "The MAN_OUTPUT tag is used to specify where the man pages will be put.\n" + "If a relative path is entered the value of OUTPUT_DIRECTORY will be\n" + "put in front of it. If left blank `man' will be used as the default path." + ); + cs->setDefaultValue("man"); + cs->setWidgetType(ConfigString::Dir); + cs->addDependency("GENERATE_MAN"); + //---- + cs = cfg->addString( + "MAN_EXTENSION", + "The MAN_EXTENSION tag determines the extension that is added to\n" + "the generated man pages (default is the subroutine's section .3)" + ); + cs->setDefaultValue(".3"); + cs->addDependency("GENERATE_MAN"); + //---- + cb = cfg->addBool( + "MAN_LINKS", + "If the MAN_LINKS tag is set to YES and Doxygen generates man output,\n" + "then it will generate one additional man file for each entity\n" + "documented in the real man page(s). These additional files\n" + "only source the real man page, but without them the man command\n" + "would be unable to find the correct page. The default is NO.", + FALSE + ); + cb->addDependency("GENERATE_MAN"); + //--------------------------------------------------------------------------- + cfg->addInfo("XML","configuration options related to the XML output"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "GENERATE_XML", + "If the GENERATE_XML tag is set to YES Doxygen will\n" + "generate an XML file that captures the structure of\n" + "the code including all documentation.", + FALSE + ); + //---- + cs = cfg->addString( + "XML_OUTPUT", + "The XML_OUTPUT tag is used to specify where the XML pages will be put.\n" + "If a relative path is entered the value of OUTPUT_DIRECTORY will be\n" + "put in front of it. If left blank `xml' will be used as the default path." + ); + cs->setDefaultValue("xml"); + cs->setWidgetType(ConfigString::Dir); + cs->addDependency("GENERATE_XML"); + //---- + cs = cfg->addString( + "XML_SCHEMA", + "The XML_SCHEMA tag can be used to specify an XML schema,\n" + "which can be used by a validating XML parser to check the\n" + "syntax of the XML files." + ); + cs->addDependency("GENERATE_XML"); + //---- + cs = cfg->addString( + "XML_DTD", + "The XML_DTD tag can be used to specify an XML DTD,\n" + "which can be used by a validating XML parser to check the\n" + "syntax of the XML files." + ); + cs->addDependency("GENERATE_XML"); + //---- + cb = cfg->addBool( + "XML_PROGRAMLISTING", + "If the XML_PROGRAMLISTING tag is set to YES Doxygen will\n" + "dump the program listings (including syntax highlighting\n" + "and cross-referencing information) to the XML output. Note that\n" + "enabling this will significantly increase the size of the XML output.", + TRUE + ); + cb->addDependency("GENERATE_XML"); + //--------------------------------------------------------------------------- + cfg->addInfo("DEF","configuration options for the AutoGen Definitions output"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "GENERATE_AUTOGEN_DEF", + "If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will\n" + "generate an AutoGen Definitions (see autogen.sf.net) file\n" + "that captures the structure of the code including all\n" + "documentation. Note that this feature is still experimental\n" + "and incomplete at the moment.", + FALSE + ); + //--------------------------------------------------------------------------- + cfg->addInfo("PerlMod","configuration options related to the Perl module output"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "GENERATE_PERLMOD", + "If the GENERATE_PERLMOD tag is set to YES Doxygen will\n" + "generate a Perl module file that captures the structure of\n" + "the code including all documentation. Note that this\n" + "feature is still experimental and incomplete at the\n" + "moment.", + FALSE + ); + //---- + cb = cfg->addBool( + "PERLMOD_LATEX", + "If the PERLMOD_LATEX tag is set to YES Doxygen will generate\n" + "the necessary Makefile rules, Perl scripts and LaTeX code to be able\n" + "to generate PDF and DVI output from the Perl module output.", + FALSE + ); + cb->addDependency("GENERATE_PERLMOD"); + //---- + cb = cfg->addBool( + "PERLMOD_PRETTY", + "If the PERLMOD_PRETTY tag is set to YES the Perl module output will be\n" + "nicely formatted so it can be parsed by a human reader.\n" + "This is useful\n" + "if you want to understand what is going on.\n" + "On the other hand, if this\n" + "tag is set to NO the size of the Perl module output will be much smaller\n" + "and Perl will parse it just the same.", + TRUE + ); + cb->addDependency("GENERATE_PERLMOD"); + //---- + cs = cfg->addString( + "PERLMOD_MAKEVAR_PREFIX", + "The names of the make variables in the generated doxyrules.make file\n" + "are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.\n" + "This is useful so different doxyrules.make files included by the same\n" + "Makefile don't overwrite each other's variables." + ); + cs->addDependency("GENERATE_PERLMOD"); + //--------------------------------------------------------------------------- + cfg->addInfo("Preprocessor","Configuration options related to the preprocessor"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "ENABLE_PREPROCESSING", + "If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will\n" + "evaluate all C-preprocessor directives found in the sources and include\n" + "files.", + TRUE + ); + //---- + cb = cfg->addBool( + "MACRO_EXPANSION", + "If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro\n" + "names in the source code. If set to NO (the default) only conditional\n" + "compilation will be performed. Macro expansion can be done in a controlled\n" + "way by setting EXPAND_ONLY_PREDEF to YES.", + FALSE + ); + cb->addDependency("ENABLE_PREPROCESSING"); + //---- + cb = cfg->addBool( + "EXPAND_ONLY_PREDEF", + "If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES\n" + "then the macro expansion is limited to the macros specified with the\n" + "PREDEFINED and EXPAND_AS_DEFINED tags.", + FALSE + ); + cb->addDependency("ENABLE_PREPROCESSING"); + //---- + cb = cfg->addBool( + "SEARCH_INCLUDES", + "If the SEARCH_INCLUDES tag is set to YES (the default) the includes files\n" + "pointed to by INCLUDE_PATH will be searched when a #include is found.", + TRUE + ); + cb->addDependency("ENABLE_PREPROCESSING"); + //---- + cl = cfg->addList( + "INCLUDE_PATH", + "The INCLUDE_PATH tag can be used to specify one or more directories that\n" + "contain include files that are not input files but should be processed by\n" + "the preprocessor." + ); + cl->addDependency("ENABLE_PREPROCESSING"); + cl->setWidgetType(ConfigList::Dir); + //---- + cl = cfg->addList( + "INCLUDE_FILE_PATTERNS", + "You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard\n" + "patterns (like *.h and *.hpp) to filter out the header-files in the\n" + "directories. If left blank, the patterns specified with FILE_PATTERNS will\n" + "be used." + ); + cl->addDependency("ENABLE_PREPROCESSING"); + //---- + cl = cfg->addList( + "PREDEFINED", + "The PREDEFINED tag can be used to specify one or more macro names that\n" + "are defined before the preprocessor is started (similar to the -D option of\n" + "gcc). The argument of the tag is a list of macros of the form: name\n" + "or name=definition (no spaces). If the definition and the = are\n" + "omitted =1 is assumed. To prevent a macro definition from being\n" + "undefined via #undef or recursively expanded use the := operator\n" + "instead of the = operator." + ); + cl->addDependency("ENABLE_PREPROCESSING"); + //---- + cl = cfg->addList( + "EXPAND_AS_DEFINED", + "If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then\n" + "this tag can be used to specify a list of macro names that should be expanded.\n" + "The macro definition that is found in the sources will be used.\n" + "Use the PREDEFINED tag if you want to use a different macro definition that\n" + "overrules the definition found in the source code." + ); + cl->addDependency("ENABLE_PREPROCESSING"); + //---- + cb = cfg->addBool( + "SKIP_FUNCTION_MACROS", + "If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then\n" + "doxygen's preprocessor will remove all references to function-like macros\n" + "that are alone on a line, have an all uppercase name, and do not end with a\n" + "semicolon, because these will confuse the parser if not removed.", + TRUE + ); + cb->addDependency("ENABLE_PREPROCESSING"); + //--------------------------------------------------------------------------- + cfg->addInfo("External","Configuration::additions related to external references"); + //--------------------------------------------------------------------------- + + //---- + cl = cfg->addList( + "TAGFILES", + "The TAGFILES option can be used to specify one or more tagfiles.\n" + "Optionally an initial location of the external documentation\n" + "can be added for each tagfile. The format of a tag file without\n" + "this location is as follows:\n" + "\n" + "TAGFILES = file1 file2 ...\n" + "Adding location for the tag files is done as follows:\n" + "\n" + "TAGFILES = file1=loc1 \"file2 = loc2\" ...\n" + "where \"loc1\" and \"loc2\" can be relative or absolute paths or\n" + "URLs. If a location is present for each tag, the installdox tool\n" + "does not have to be run to correct the links.\n" + "Note that each tag file must have a unique name\n" + "(where the name does NOT include the path)\n" + "If a tag file is not located in the directory in which doxygen\n" + "is run, you must also specify the path to the tagfile here." + ); + cl->setWidgetType(ConfigList::File); + //---- + cs = cfg->addString( + "GENERATE_TAGFILE", + "When a file name is specified after GENERATE_TAGFILE, doxygen will create\n" + "a tag file that is based on the input files it reads." + ); + cs->setWidgetType(ConfigString::File); + //---- + cb = cfg->addBool( + "ALLEXTERNALS", + "If the ALLEXTERNALS tag is set to YES all external classes will be listed\n" + "in the class index. If set to NO only the inherited external classes\n" + "will be listed.", + FALSE + ); + //---- + cb = cfg->addBool( + "EXTERNAL_GROUPS", + "If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed\n" + "in the modules index. If set to NO, only the current project's groups will\n" + "be listed.", + TRUE + ); + //---- + cs = cfg->addString( + "PERL_PATH", + "The PERL_PATH should be the absolute path and name of the perl script\n" + "interpreter (i.e. the result of `which perl')." + ); + cs->setDefaultValue("/usr/bin/perl"); + cs->setWidgetType(ConfigString::Dir); + //--------------------------------------------------------------------------- + cfg->addInfo("Dot","Configuration options related to the dot tool"); + //--------------------------------------------------------------------------- + + //---- + cb = cfg->addBool( + "CLASS_DIAGRAMS", + "If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will\n" + "generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base\n" + "or super classes. Setting the tag to NO turns the diagrams off. Note that\n" + "this option also works with HAVE_DOT disabled, but it is recommended to\n" + "install and use dot, since it yields more powerful graphs.", + TRUE + ); + //---- + cs = cfg->addString( + "MSCGEN_PATH", + "You can define message sequence charts within doxygen comments using the \\msc\n" + "command. Doxygen will then run the mscgen tool (see\n" + "http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the\n" + "documentation. The MSCGEN_PATH tag allows you to specify the directory where\n" + "the mscgen tool resides. If left empty the tool is assumed to be found in the\n" + "default search path." + ); + //---- + cb = cfg->addBool( + "HIDE_UNDOC_RELATIONS", + "If set to YES, the inheritance and collaboration graphs will hide\n" + "inheritance and usage relations if the target is undocumented\n" + "or is not a class.", + TRUE + ); + //---- + cb = cfg->addBool( + "HAVE_DOT", + "If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is\n" + "available from the path. This tool is part of Graphviz, a graph visualization\n" + "toolkit from AT&T and Lucent Bell Labs. The other options in this section\n" + "have no effect if this option is set to NO (the default)", + FALSE + ); + //---- + ci = cfg->addInt( + "DOT_NUM_THREADS", + "The DOT_NUM_THREADS specifies the number of dot invocations doxygen is\n" + "allowed to run in parallel. When set to 0 (the default) doxygen will\n" + "base this on the number of processors available in the system. You can set it\n" + "explicitly to a value larger than 0 to get control over the balance\n" + "between CPU load and processing speed.", + 0,32,0 + ); + //---- + cs = cfg->addString( + "DOT_FONTNAME", + "By default doxygen will write a font called Helvetica to the output\n" + "directory and reference it in all dot files that doxygen generates.\n" + "When you want a differently looking font you can specify the font name\n" + "using DOT_FONTNAME. You need to make sure dot is able to find the font,\n" + "which can be done by putting it in a standard location or by setting the\n" + "DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory\n" + "containing the font." + ); + cs->setDefaultValue("Helvetica"); + cs->addDependency("HAVE_DOT"); + //---- + ci = cfg->addInt( + "DOT_FONTSIZE", + "The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.\n" + "The default size is 10pt.", + 4,24,10 + ); + ci->addDependency("HAVE_DOT"); + //---- + cs = cfg->addString( + "DOT_FONTPATH", + "By default doxygen will tell dot to use the output directory to look for the\n" + "FreeSans.ttf font (which doxygen will put there itself). If you specify a\n" + "different font using DOT_FONTNAME you can set the path where dot\n" + "can find it using this tag." + ); + cs->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "CLASS_GRAPH", + "If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen\n" + "will generate a graph for each documented class showing the direct and\n" + "indirect inheritance relations. Setting this tag to YES will force the\n" + "the CLASS_DIAGRAMS tag to NO.", + TRUE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "COLLABORATION_GRAPH", + "If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen\n" + "will generate a graph for each documented class showing the direct and\n" + "indirect implementation dependencies (inheritance, containment, and\n" + "class references variables) of the class with other documented classes.", + TRUE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "GROUP_GRAPHS", + "If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen\n" + "will generate a graph for groups, showing the direct groups dependencies", + TRUE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "UML_LOOK", + "If the UML_LOOK tag is set to YES doxygen will generate inheritance and\n" + "collaboration diagrams in a style similar to the OMG's Unified Modeling\n" + "Language.", + FALSE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "TEMPLATE_RELATIONS", + "If set to YES, the inheritance and collaboration graphs will show the\n" + "relations between templates and their instances.", + FALSE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "INCLUDE_GRAPH", + "If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT\n" + "tags are set to YES then doxygen will generate a graph for each documented\n" + "file showing the direct and indirect include dependencies of the file with\n" + "other documented files.", + TRUE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "INCLUDED_BY_GRAPH", + "If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and\n" + "HAVE_DOT tags are set to YES then doxygen will generate a graph for each\n" + "documented header file showing the documented files that directly or\n" + "indirectly include this file.", + TRUE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "CALL_GRAPH", + "If the CALL_GRAPH and HAVE_DOT options are set to YES then\n" + "doxygen will generate a call dependency graph for every global function\n" + "or class method. Note that enabling this option will significantly increase\n" + "the time of a run. So in most cases it will be better to enable call graphs\n" + "for selected functions only using the \\callgraph command.", + FALSE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "CALLER_GRAPH", + "If the CALLER_GRAPH and HAVE_DOT tags are set to YES then\n" + "doxygen will generate a caller dependency graph for every global function\n" + "or class method. Note that enabling this option will significantly increase\n" + "the time of a run. So in most cases it will be better to enable caller\n" + "graphs for selected functions only using the \\callergraph command.", + FALSE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "GRAPHICAL_HIERARCHY", + "If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen\n" + "will generate a graphical hierarchy of all classes instead of a textual one.", + TRUE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "DIRECTORY_GRAPH", + "If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES\n" + "then doxygen will show the dependencies a directory has on other directories\n" + "in a graphical way. The dependency relations are determined by the #include\n" + "relations between the files in the directories.", + TRUE + ); + cb->addDependency("HAVE_DOT"); + //---- + ce = cfg->addEnum( + "DOT_IMAGE_FORMAT", + "The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n" + "generated by dot. Possible values are svg, png, jpg, or gif.\n" + "If left blank png will be used.", + "png" + ); + ce->addValue("png"); + ce->addValue("jpg"); + ce->addValue("gif"); + ce->addValue("svg"); + ce->addDependency("HAVE_DOT"); + //---- + cs = cfg->addString( + "DOT_PATH", + "The tag DOT_PATH can be used to specify the path where the dot tool can be\n" + "found. If left blank, it is assumed the dot tool can be found in the path." + ); + cs->setWidgetType(ConfigString::Dir); + cs->addDependency("HAVE_DOT"); + //---- + cl = cfg->addList( + "DOTFILE_DIRS", + "The DOTFILE_DIRS tag can be used to specify one or more directories that\n" + "contain dot files that are included in the documentation (see the\n" + "\\dotfile command)." + ); + cl->addDependency("HAVE_DOT"); + cl->setWidgetType(ConfigList::Dir); + //---- + cl = cfg->addList( + "MSCFILE_DIRS", + "The MSCFILE_DIRS tag can be used to specify one or more directories that\n" + "contain msc files that are included in the documentation (see the\n" + "\\mscfile command)." + ); + cl->setWidgetType(ConfigList::Dir); + //---- + ci = cfg->addInt( + "DOT_GRAPH_MAX_NODES", + "The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of\n" + "nodes that will be shown in the graph. If the number of nodes in a graph\n" + "becomes larger than this value, doxygen will truncate the graph, which is\n" + "visualized by representing a node as a red box. Note that doxygen if the\n" + "number of direct children of the root node in a graph is already larger than\n" + "DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note\n" + "that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.", + 0,10000,50 + ); + ci->addDependency("HAVE_DOT"); + //---- + ci = cfg->addInt( + "MAX_DOT_GRAPH_DEPTH", + "The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the\n" + "graphs generated by dot. A depth value of 3 means that only nodes reachable\n" + "from the root by following a path via at most 3 edges will be shown. Nodes\n" + "that lay further from the root node will be omitted. Note that setting this\n" + "option to 1 or 2 may greatly reduce the computation time needed for large\n" + "code bases. Also note that the size of a graph can be further restricted by\n" + "DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.", + 0,1000,0 + ); + ci->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "DOT_TRANSPARENT", + "Set the DOT_TRANSPARENT tag to YES to generate images with a transparent\n" + "background. This is disabled by default, because dot on Windows does not\n" + "seem to support this out of the box. Warning: Depending on the platform used,\n" + "enabling this option may lead to badly anti-aliased labels on the edges of\n" + "a graph (i.e. they become hard to read).", + FALSE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "DOT_MULTI_TARGETS", + "Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output\n" + "files in one run (i.e. multiple -o and -T options on the command line). This\n" + "makes dot run faster, but since only newer versions of dot (>1.8.10)\n" + "support this, this feature is disabled by default.", + FALSE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "GENERATE_LEGEND", + "If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will\n" + "generate a legend page explaining the meaning of the various boxes and\n" + "arrows in the dot generated graphs.", + TRUE + ); + cb->addDependency("HAVE_DOT"); + //---- + cb = cfg->addBool( + "DOT_CLEANUP", + "If the DOT_CLEANUP tag is set to YES (the default) Doxygen will\n" + "remove the intermediate dot files that are used to generate\n" + "the various graphs.", + TRUE + ); + cb->addDependency("HAVE_DOT"); + //---- + cfg->addObsolete("USE_WINDOWS_ENCODING"); + //---- + cfg->addObsolete("DETAILS_AT_TOP"); + //---- + cfg->addObsolete("QTHELP_FILE"); + //---- + cfg->addObsolete("QTHELP_CONFIG"); + //---- + cfg->addObsolete("DOXYGEN2QTHELP_LOC"); + //---- + cfg->addObsolete("MAX_DOT_GRAPH_WIDTH"); + //---- + cfg->addObsolete("MAX_DOT_GRAPH_HEIGHT"); + //---- + cfg->addObsolete("CGI_NAME"); + //---- + cfg->addObsolete("CGI_URL"); + //---- + cfg->addObsolete("DOC_URL"); + //---- + cfg->addObsolete("DOC_ABSPATH"); + //---- + cfg->addObsolete("BIN_ABSPATH"); + //---- + cfg->addObsolete("EXT_DOC_PATHS"); +} Index: branches/xZenu/src/util/doxygen/src/parserintf.h =================================================================== --- branches/xZenu/src/util/doxygen/src/parserintf.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/parserintf.h (revision 1322) @@ -0,0 +1,171 @@ +/****************************************************************************** + * + * $Id: parserintf.h,v 1.15 2001/03/19 19:27:41 root Exp $ + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef PARSERINTF_H +#define PARSERINTF_H + +#include + +class Entry; +class FileDef; +class CodeOutputInterface; +class MemberDef; + +/** \brief Abstract interface for programming language parsers. + * + * By implementing the methods of this interface one can add + * a new language parser to doxygen. The parser can make use of the + * comment block parser to parse the contents of special comment blocks. + */ +class ParserInterface +{ + public: + virtual ~ParserInterface() {} + /** Parses a single input file with the goal to build an Entry tree. + * @param[in] fileName The full name of the file. + * @param[in] fileBuf The contents of the file (zero terminated). + * @param[in,out] root The root of the tree of Entry *nodes + * representing the information extracted from the file. + */ + virtual void parseInput(const char *fileName, + const char *fileBuf, + Entry *root) = 0; + + /** Returns TRUE if the language identified by \a extension needs + * the C preprocessor to be run before feed the result to the input + * parser. + * @see parseInput() + */ + virtual bool needsPreprocessing(const QCString &extension) = 0; + + /** Parses a source file or fragment with the goal to produce + * highlighted and cross-referenced output. + * @param[in] codeOutIntf Abstract interface for writing the result. + * @param[in] scopeName Name of scope to which the code belongs. + * @param[in] input Actual code in the form of a string + * @param[in] isExampleBlock TRUE iff the code is part of an example. + * @param[in] exampleName Name of the example. + * @param[in] fileDef File definition to which the code + * is associated. + * @param[in] startLine Starting line in case of a code fragment. + * @param[in] endLine Ending line of the code fragment. + * @param[in] inlineFragment Code fragment that is to be shown inline + * as part of the documentation. + * @param[in] memberDef Member definition to which the code + * is associated (non null in case of an inline fragment + * for a member). + * @param[in] showLineNumbers if set to TRUE and also fileDef is not 0, + * line numbers will be added to the source fragement + */ + virtual void parseCode(CodeOutputInterface &codeOutIntf, + const char *scopeName, + const QCString &input, + bool isExampleBlock, + const char *exampleName=0, + FileDef *fileDef=0, + int startLine=-1, + int endLine=-1, + bool inlineFragment=FALSE, + MemberDef *memberDef=0, + bool showLineNumbers=TRUE + ) = 0; + + /** Resets the state of the code parser. + * Since multiple code fragments can together form a single example, an + * explicit function is used to reset the code parser state. + * @see parseCode() + */ + virtual void resetCodeParserState() = 0; + + /** Callback function called by the comment block scanner. + * It provides a string \a text containing the prototype of a function + * or variable. The parser should parse this and store the information + * in the Entry node that corresponds with the node for which the + * comment block parser was invoked. + */ + virtual void parsePrototype(const char *text) = 0; + +}; + +//----------------------------------------------------------------------------- + +/** \brief Manages programming language parsers. + * + * This class manages the language parsers in the system. One can + * register parsers, and obtain a parser given a file extension. + */ +class ParserManager +{ + public: + /** Creates the parser manager object. + */ + ParserManager() + : m_defaultParser(0) { m_parsers.setAutoDelete(TRUE); } + + /** Registers an additional parser. + * @param[in] name A symbolic name of the parser, i.e. "c", + * "python", "fortran", "vhdl", ... + * @param[in] parser The parser that is to be used for the + * given extension. + * @param[in] defParser Use this parser as the default parser, using + * for unregistered file extensions. + */ + void registerParser(const char *name,ParserInterface *parser,bool defParser=FALSE) + { + if (defParser && m_defaultParser==0) m_defaultParser=parser; + m_parsers.insert(name,parser); + } + + /** Registers a file \a extension with a parser with name \a parserName. + * Returns TRUE if the extension was successfully registered. + */ + bool registerExtension(const char *extension, const char *parserName) + { + if (parserName==0 || extension==0) return FALSE; + ParserInterface *intf = m_parsers.find(parserName); + if (intf==0) return FALSE; + if (m_extensions.find(extension)!=0) // extension already exists + { + m_extensions.remove(extension); // remove it + } + m_extensions.insert(extension,intf); // add new mapping + return TRUE; + } + + /** Gets the interface to the parser associated with given \a extension. + * If there is no parser explicitly registered for the supplied extension, + * the interface to the default parser will be returned. + */ + ParserInterface *getParser(const char *extension) + { + if (extension==0) return m_defaultParser; + QCString ext = QCString(extension).lower(); + ParserInterface *intf = m_extensions.find(ext); + if (intf==0 && ext.length()>4) + { + intf = m_extensions.find(ext.left(4)); + } + return intf ? intf : m_defaultParser; + } + + private: + QDict m_parsers; + QDict m_extensions; + ParserInterface *m_defaultParser; +}; + +#endif Index: branches/xZenu/src/util/doxygen/src/index.xsd =================================================================== --- branches/xZenu/src/util/doxygen/src/index.xsd (revision 0) +++ branches/xZenu/src/util/doxygen/src/index.xsd (revision 1322) @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: branches/xZenu/src/util/doxygen/src/translator_za.h =================================================================== --- branches/xZenu/src/util/doxygen/src/translator_za.h (revision 0) +++ branches/xZenu/src/util/doxygen/src/translator_za.h (revision 1322) @@ -0,0 +1,1767 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2011 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + + /* + * Bronne vir hierdie vertaling (Sources for this translation): + * Die Stigting vir Afrikaans se rekenaartermelys: + * - http://www.afrikaans.com/rekenaarterme.html + * Werkgroep vir Afrikaanse IT-terme: + * - http://www.vertaal.org/index.html + */ + +#ifndef TRANSLATOR_ZA_H +#define TRANSLATOR_ZA_H + +class TranslatorAfrikaans : public TranslatorAdapter_1_6_0 +{ + public: + + // --- Language control methods ------------------- + + /*! Used for identification of the language. The identification + * should not be translated. It should be replaced by the name + * of the language in English using lower-case characters only + * (e.g. "czech", "japanese", "russian", etc.). It should be equal to + * the identification used in language.cpp. + */ + virtual QCString idLanguage() + { return "afrikaans"; } + + /*! Used to get the LaTeX command(s) for the language support. + * This method should return string with commands that switch + * LaTeX to the desired language. For example + *
    "\\usepackage[german]{babel}\n"
    +     *  
    + * or + *
    "\\usepackage{polski}\n"
    +     *  "\\usepackage[latin2]{inputenc}\n"
    +     *  "\\usepackage[T1]{fontenc}\n"
    +     *  
    + * + * The Afrikaans LaTeX does not use such commands. Because of this + * the empty string is returned in this implementation. + */ + virtual QCString latexLanguageSupportCommand() + { + //should we use return "\\usepackage[afrikaans]{babel}\n"; + // not sure - for now return an empty string + return ""; + } + + /*! return the language charset. This will be used for the HTML output */ + virtual QCString idLanguageCharset() + { + return "iso-8859-1"; + } + + // --- Language translation methods ------------------- + + /*! used in the compound documentation before a list of related functions. */ + virtual QCString trRelatedFunctions() + { return "Verwante Funksies"; } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return "(Let daarop dat hierdie nie lede funksies is nie.)"; } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return "Detail Beskrywing"; } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return "Lede Typedef Dokumentasie"; } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + { return "Lede Enumerasie Dokumentasie"; } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { return "Lede Funksie Dokumentasie"; } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Veld Dokumentasie"; + } + else + { + return "Lede Data Dokumentasie"; + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return "Meer detail..."; } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return "Lys van alle lede."; } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return "Lede Lys"; } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return "Hierdie is 'n volledige lys van lede vir "; } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return ", insluitend alle afgeleide lede."; } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ + virtual QCString trGeneratedAutomatically(const char *s) + { QCString result="Automaties gegenereer deur Doxygen"; + if (s) result+=(QCString)" vir "+s; + result+=" van die bron kode af."; + return result; + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return "enum naam"; } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return "enum waarde"; } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return "gedefinieër in"; } + + // quick reference sections + + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \\group command). + */ + virtual QCString trModules() + { return "Modules"; } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return "Klas Hierargie"; } + + /*! This is put above each page as a link to the list of annotated classes */ + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Strukture"; + } + else + { + return "Klas Lys"; + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return "Leër Lys"; } + + /*! This is put above each page as a link to all members of compounds. */ + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Velde"; + } + else + { + return "Klas Lede"; + } + } + + /*! This is put above each page as a link to all members of files. */ + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Globals"; + } + else + { + return "Leër Lede"; + } + } + + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return "Verwante Bladsye"; } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return "Voorbeelde"; } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return "Soek"; } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { + return "Hierdie afgeleide lys word rofweg gesorteer: "; + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool extractAll) + { + QCString result="Hier is 'n lys van alle "; + if (!extractAll) result+="gedokumenteerde "; + result+="leërs met kort beskrywings:"; + return result; + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return " Data strukture met kort beskrywings:"; + } + else + { + return "Klasse, structs, " + "unions en intervlakke met kort beskrywings:"; + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result="'n Lys van alle "; + if (!extractAll) + { + result+="gedokumenteerde "; + } + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="struct en union velde"; + } + else + { + result+="klas lede"; + } + result+=" met skakels na "; + if (!extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="die struct/union dokumentasie vir elke veld:"; + } + else + { + result+="die klas dokumentasie vir elke lid:"; + } + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="die structures/unions waaraan hulle behoort:"; + } + else + { + result+="die klasse waaraan hulle behoort:"; + } + } + return result; + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool extractAll) + { + QCString result="'n Lys van alle "; + if (!extractAll) result+="gedokumenteerde "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="funksies, veranderlikes, defines, enums, en typedefs"; + } + else + { + result+="leër lede"; + } + result+=" met skakels na "; + if (extractAll) + result+="die leërs waaraan hulle behoort:"; + else + result+="die dokumentasie:"; + return result; + } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return "'n Lys van alle voorbeelde:"; } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return "'n Lys van alle verwante dokumentasie:"; } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return "'n Lys van alle modules:"; } + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return "Dokumentasie"; } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return "Module Indeks"; } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return "Hierargiese Indeks"; } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Strukture Indeks"; + } + else + { + return "Klas Indeks"; + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return "Leër Indeks"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return "Module Dokumentasie"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Strukture Dokumentasie"; + } + else + { + return "Klas Dokumentasie"; + } + } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return "Leër Dokumentasie"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return "Voorbeeld Dokumentasie"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return "Bladsy Dokumentasie"; } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return "Verwysings Handleiding"; } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return "Definiesies"; } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return "Funksie Prototipes"; } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return "Typedefs"; } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return "Enumerations"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return "Funksies"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return "Veranderlikes"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return "Enumeration waardes"; } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return "Define Documentation"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return "Funksie Prototipe Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return "Typedef Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return "Enumeration Type Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return "Funksie Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return "Veranderlike Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Strukture"; + } + else + { + return "Klasse"; + } + } + + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ + virtual QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result=(QCString)"Gegenereer op "+date; + if (projName) result+=(QCString)" vir "+projName; + result+=(QCString)" deur"; + return result; + } + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return "geskryf deur"; + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return (QCString)"Afleidings diagram vir "+clName+":"; + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return "Slegs vir interne gebruik."; } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return "Waarskuwing"; } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return "Weergawe"; } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return "Datum"; } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return "Returns"; } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return "Sien ook"; } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return "Parameters"; } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return "Exceptions"; } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return "Gegenereer deur"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return "Namespace Lys"; } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool extractAll) + { + QCString result="'n Lys van alle "; + if (!extractAll) result+="gedokumenteerde "; + result+="namespaces met kort beskrywings:"; + return result; + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return "Friends"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return "Friends En Verwante Funksie Dokumentasie"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=(QCString)clName; + switch(compType) + { + case ClassDef::Class: result+=" klas"; break; + case ClassDef::Struct: result+=" Struct"; break; + case ClassDef::Union: result+=" Union"; break; + case ClassDef::Interface: result+=" Intervlak"; break; + case ClassDef::Protocol: result+=" Protocol"; break; + case ClassDef::Category: result+=" Kategorie"; break; + case ClassDef::Exception: result+=" Exception"; break; + } + if (isTemplate) result+=" Template"; + result+=" Verwysing"; + return result; + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result=fileName; + result+=" Leër Verwysing"; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" Namespace Verwysing"; + return result; + } + + virtual QCString trPublicMembers() + { return "Publieke Lede Funksies"; } + virtual QCString trPublicSlots() + { return "Publieke Slots"; } + virtual QCString trSignals() + { return "Signals"; } + virtual QCString trStaticPublicMembers() + { return "Statiese Publieke Lede Funksies"; } + virtual QCString trProtectedMembers() + { return "Beskermde Lede Funksies"; } + virtual QCString trProtectedSlots() + { return "Beskermde Slots"; } + virtual QCString trStaticProtectedMembers() + { return "Statiese Beskermde Lede Funksies"; } + virtual QCString trPrivateMembers() + { return "Private Lede Funksies"; } + virtual QCString trPrivateSlots() + { return "Private Slots"; } + virtual QCString trStaticPrivateMembers() + { return "Statiese Private Lede Funksies"; } + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + virtual QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i