diff options
Diffstat (limited to 'src/coff/base/coff_archive.cpp')
-rw-r--r-- | src/coff/base/coff_archive.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/coff/base/coff_archive.cpp b/src/coff/base/coff_archive.cpp index 72a8883..ea9a2b9 100644 --- a/src/coff/base/coff_archive.cpp +++ b/src/coff/base/coff_archive.cpp @@ -9,35 +9,35 @@ #include "coff_archive.h" //---------------------------------------------------------------------------- -Coff::Member::Member(const QByteArray &data, uint &offset, Log::Base &log) +Coff::Member::Member(const TQByteArray &data, uint &offset, Log::Base &log) { // parse header - QString s; + TQString s; if ( !getString(data, offset, 256, log, s) ) return; - int i = s.find('/'); + int i = s.tqfind('/'); if ( i==-1 ) { - log.log(Log::LineType::Error, i18n("Member name not terminated by '/' (\"%1\").").arg(s)); + log.log(Log::LineType::Error, i18n("Member name not terminated by '/' (\"%1\").").tqarg(s)); return; } _name = s.mid(0, i); if ( !getString(data, offset, 12, log, s) ) return; // mtime if ( !getString(data, offset, 10, log, s) ) return; - i = s.find('l'); + i = s.tqfind('l'); if ( i==-1 ) { - log.log(Log::LineType::Error, i18n("File size not terminated by 'l' (\"%1\").").arg(s)); + log.log(Log::LineType::Error, i18n("File size not terminated by 'l' (\"%1\").").tqarg(s)); return; } bool ok; _nbBytes = s.mid(0, i).toUInt(&ok); if ( !ok ) { - log.log(Log::LineType::Error, i18n("Wrong format for file size \"%1\".").arg(s)); + log.log(Log::LineType::Error, i18n("Wrong format for file size \"%1\".").tqarg(s)); return; } - Q_UINT32 v; + TQ_UINT32 v; if ( !getULong(data, offset, 2, log, v) ) return; - log.log(Log::DebugLevel::Extra, i18n("Magic number: %1").arg(toHexLabel(v, 4))); + log.log(Log::DebugLevel::Extra, i18n("Magic number: %1").tqarg(toHexLabel(v, 4))); // if ( v!=0x600A ) { -// log.log(Log::LineType::Error, i18n("Wrong magic for Microchip archive (\"%1\").").arg(toHexLabel(v, 4))); +// log.log(Log::LineType::Error, i18n("Wrong magic for Microchip archive (\"%1\").").tqarg(toHexLabel(v, 4))); // return; // } offset += _nbBytes; @@ -50,7 +50,7 @@ Coff::Archive::Archive(const PURL::Url &url) bool Coff::Archive::parse(Log::Base &log) { - QByteArray data; + TQByteArray data; uint offset = 0, symbolEnd = 0; Member *symbol = 0; if ( !initParse(CoffType::Archive, data, offset, log) ) return false; @@ -76,26 +76,26 @@ bool Coff::Archive::parse(Log::Base &log) Coff::Archive::~Archive() { - QMap<QString, Member *>::const_iterator it; + TQMap<TQString, Member *>::const_iterator it; for (it=_members.begin(); it!=_members.end(); ++it) delete it.data(); } -bool Coff::Archive::readSymbols(const QByteArray &data, uint offset, Log::Base &log) +bool Coff::Archive::readSymbols(const TQByteArray &data, uint offset, Log::Base &log) { - Q_UINT32 nb; + TQ_UINT32 nb; if ( !getULong(data, offset, 4, log, nb) ) return false; - QValueVector<Member *> members(nb); + TQValueVector<Member *> members(nb); for (uint i=0; i<nb; i++) { - Q_UINT32 start; + TQ_UINT32 start; if ( !getULong(data, offset, 4, log, start) ) return false; - if ( !_offsets.contains(start) ) { - log.log(Log::LineType::Error, i18n("Unknown file member offset: %1").arg(toHexLabel(start, 8))); + if ( !_offsets.tqcontains(start) ) { + log.log(Log::LineType::Error, i18n("Unknown file member offset: %1").tqarg(toHexLabel(start, 8))); return false; } members[i] = _offsets[start]; } for (uint i=0; i<nb; i++) { - QString name(data.data() + offset); + TQString name(data.data() + offset); offset += name.length() + 1; _symbols[name] = members[i]; } @@ -105,24 +105,24 @@ bool Coff::Archive::readSymbols(const QByteArray &data, uint offset, Log::Base & Log::KeyList Coff::Archive::information() const { Log::KeyList keys(i18n("Information:")); - keys.append(i18n("No. of file members:"), QString::number(members().count())); - keys.append(i18n("No. of symbols:"), QString::number(symbols().count())); + keys.append(i18n("No. of file members:"), TQString::number(members().count())); + keys.append(i18n("No. of symbols:"), TQString::number(symbols().count())); return keys; } Log::KeyList Coff::Archive::membersInformation() const { Log::KeyList keys(i18n("File Members:")); - QMap<QString, Member *>::const_iterator it; + TQMap<TQString, Member *>::const_iterator it; for (it=members().begin(); it!=members().end(); ++it) - keys.append(it.key(), i18n("size: %1 bytes").arg(it.data()->nbBytes())); + keys.append(it.key(), i18n("size: %1 bytes").tqarg(it.data()->nbBytes())); return keys; } Log::KeyList Coff::Archive::symbolsInformation() const { Log::KeyList keys(i18n("Symbols:")); - QMap<QString, Member *>::const_iterator it; + TQMap<TQString, Member *>::const_iterator it; for (it=symbols().begin(); it!=symbols().end(); ++it) keys.append(it.key(), it.data()->name()); return keys; |