diff options
Diffstat (limited to 'src/coff/base/cdb_parser.cpp')
-rw-r--r-- | src/coff/base/cdb_parser.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/coff/base/cdb_parser.cpp b/src/coff/base/cdb_parser.cpp index 2e38b84..eb7495b 100644 --- a/src/coff/base/cdb_parser.cpp +++ b/src/coff/base/cdb_parser.cpp @@ -65,7 +65,7 @@ CDB::Object::Object(const PURL::Url &url, Log::Base &log) { PURL::File file(url, log); if ( !file.openForRead() ) return; - QStringList lines = file.readLines(); + TQStringList lines = file.readLines(); for (_line=0; _line<uint(lines.count()); _line++) { _col = 0; @@ -99,12 +99,12 @@ CDB::Object::~Object() for (uint i=0; i<uint(_records.count()); i++) delete _records[i]; } -void CDB::Object::log(Log::LineType type, const QString &message) +void CDB::Object::log(Log::LineType type, const TQString &message) { - _log.log(type, message + " " + i18n("at line #%1, column #%2").arg(_line+1).arg(_col+1)); + _log.log(type, message + " " + i18n("at line #%1, column #%2").tqarg(_line+1).tqarg(_col+1)); } -void CDB::Object::logMalformed(const QString &detail) +void CDB::Object::logMalformed(const TQString &detail) { log(Log::LineType::Error, i18n("Malformed record: ") + detail); } @@ -125,13 +125,13 @@ bool CDB::Object::readAndCheckChar(char c) char r; if ( !readChar(r) ) return false; if ( r!=c ) { - logMalformed(i18n("was expecting '%1'").arg(c)); + logMalformed(i18n("was expecting '%1'").tqarg(c)); return false; } return true; } -bool CDB::Object::getString(const QString &s, QString &r) +bool CDB::Object::getString(const TQString &s, TQString &r) { r = s; if ( r.isEmpty() ) { @@ -141,9 +141,9 @@ bool CDB::Object::getString(const QString &s, QString &r) return true; } -bool CDB::Object::readFixedLengthString(QString &s, uint size) +bool CDB::Object::readFixedLengthString(TQString &s, uint size) { - s = QString::null; + s = TQString(); for (uint i=0; i<size; i++) { char c; if ( !readChar(c) ) return false; @@ -152,9 +152,9 @@ bool CDB::Object::readFixedLengthString(QString &s, uint size) return true; } -bool CDB::Object::readStoppedString(QString &name, char stop) +bool CDB::Object::readStoppedString(TQString &name, char stop) { - QString s; + TQString s; for (;;) { if ( _col==uint(_current.length()) ) { if ( stop!=0 ) { @@ -170,7 +170,7 @@ bool CDB::Object::readStoppedString(QString &name, char stop) return getString(s, name); } -bool CDB::Object::getUInt(const QString &s, uint &v) +bool CDB::Object::getUInt(const TQString &s, uint &v) { bool ok; v = s.toUInt(&ok); @@ -180,7 +180,7 @@ bool CDB::Object::getUInt(const QString &s, uint &v) bool CDB::Object::readUInt(uint &v) { - QString s; + TQString s; for (;;) { if ( _col==uint(_current.length()) ) break; if ( !isdigit(_current[_col].latin1()) ) break; @@ -197,7 +197,7 @@ bool CDB::Object::readBool(bool &b) if ( c=='0' ) b = false; else if ( c=='1' ) b = true; else { - logMalformed(i18n("was expecting a bool ('%1')").arg(c)); + logMalformed(i18n("was expecting a bool ('%1')").tqarg(c)); return false; } return true; @@ -205,7 +205,7 @@ bool CDB::Object::readBool(bool &b) bool CDB::Object::readHex(uint &v) { - QString s; + TQString s; for (;;) { if ( _col==uint(_current.length()) ) break; if ( !isxdigit(_current[_col].latin1()) ) break; @@ -222,9 +222,9 @@ bool CDB::Object::parseModuleRecord(Record * &record) return readStoppedString(mr->filename, 0); } -bool CDB::Object::parse(Scope &scope, QString &name) +bool CDB::Object::parse(Scope &scope, TQString &name) { - QString s; + TQString s; if ( !readFixedLengthString(s, 1) ) return false; scope.type = ScopeType::fromKey(s); switch (scope.type.type()) { @@ -253,12 +253,12 @@ bool CDB::Object::parse(TypeChain &typeChain) if ( !readAndCheckChar('{') ) return false; if ( !readUInt(nb) ) return false; if ( !readAndCheckChar('}') ) return false; - QString s; + TQString s; if ( !readStoppedString(s, ':') ) return false; - QStringList list = QStringList::split(',', s, true); + TQStringList list = TQStringList::split(',', s, true); for (uint i=0; i<uint(list.count()); i++) { DCLType type; - QString key = list[i].mid(0, 2); + TQString key = list[i].mid(0, 2); type.type = VarType::fromKey(key); switch (type.type.type()) { case VarType::Array: @@ -287,7 +287,7 @@ bool CDB::Object::parse(TypeChain &typeChain) bool CDB::Object::parse(AddressSpace &as) { - QString s; + TQString s; if ( !readFixedLengthString(s, 1) ) return false; as.type = AddressSpaceType::fromKey(s); if ( as.type==AddressSpaceType::Nb_Types ) { @@ -302,7 +302,7 @@ bool CDB::Object::parse(AddressSpace &as) if ( !readAndCheckChar(',') ) return false; if ( !readAndCheckChar('[') ) return false; if ( !readStoppedString(s, ']') ) return false; - as.registers = QStringList::split(',', s, true); + as.registers = TQStringList::split(',', s, true); if ( as.registers.count()==0 ) { logMalformed(i18n("no register defined")); return false; |