diff options
Diffstat (limited to 'kdat/Archive.cpp')
-rw-r--r-- | kdat/Archive.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kdat/Archive.cpp b/kdat/Archive.cpp index 5e8ef65..1a78d44 100644 --- a/kdat/Archive.cpp +++ b/kdat/Archive.cpp @@ -94,7 +94,7 @@ void Archive::read( int version ) } } - // Number of immediate children (4 bytes). + // Number of immediate tqchildren (4 bytes). fread( &ival, sizeof( ival ), 1, _fptr ); //===== Read files ===== @@ -148,7 +148,7 @@ void Archive::write( FILE* fptr ) fwrite( &ival, sizeof( ival ), 1, _fptr ); } - // Number of immediate children (4 bytes). + // Number of immediate tqchildren (4 bytes). ival = getChildren().count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); @@ -202,7 +202,7 @@ const TQPtrList<File>& Archive::getChildren() { read(); - return _children; + return _tqchildren; } const TQPtrList<Range>& Archive::getRanges() @@ -255,7 +255,7 @@ void Archive::addChild( File* file ) { read(); - _children.append( file ); + _tqchildren.append( file ); } File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename ) @@ -266,7 +266,7 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con TQString fn( filename ); int idx = 0; - while ( ( idx = fn.find( '/' ) ) > -1 ) { + while ( ( idx = fn.tqfind( '/' ) ) > -1 ) { path.append( fn.left( idx + 1 ) ); fn.remove( 0, idx + 1 ); } @@ -289,40 +289,40 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con //path.remove(path.first()); path.remove(path.begin()); TQPtrListIterator<File> i( getChildren() ); - File* parent = 0; + File* tqparent = 0; for ( ; i.current() ; ++i ) { if ( i.current()->getName() == dir ) { - parent = i.current(); + tqparent = i.current(); break; } } - if ( parent == 0 ) { - parent = new File( 0, 0, 0, startRecord, endRecord, dir ); - addChild( parent ); + if ( tqparent == 0 ) { + tqparent = new File( 0, 0, 0, startRecord, endRecord, dir ); + addChild( tqparent ); } for ( TQStringList::Iterator j = path.begin(); j != path.end(); ++j ) { TQString dir = *j; - File* pparent = parent; - TQPtrListIterator<File> i( pparent->getChildren() ); - for ( parent = 0; i.current() ; ++i ) { + File* ptqparent = tqparent; + TQPtrListIterator<File> i( ptqparent->getChildren() ); + for ( tqparent = 0; i.current() ; ++i ) { if ( i.current()->getName() == dir ) { - parent = i.current(); + tqparent = i.current(); break; } } - if ( parent == 0 ) { - parent = new File( pparent, 0, 0, 0, 0, dir ); - pparent->addChild( parent ); + if ( tqparent == 0 ) { + tqparent = new File( ptqparent, 0, 0, 0, 0, dir ); + ptqparent->addChild( tqparent ); } } - file = new File( parent, size, mtime, startRecord, endRecord, fn ); - parent->addChild( file ); + file = new File( tqparent, size, mtime, startRecord, endRecord, fn ); + tqparent->addChild( file ); return file; } |