@ -62,7 +62,7 @@ function will remove the duplicated directory path (by searching for a "//").
*/
*/
TQString sanitizeGpsimFile ( TQString file )
TQString sanitizeGpsimFile ( TQString file )
{
{
int pos = file . tq find( " // " ) ;
int pos = file . find( " // " ) ;
if ( pos ! = - 1 )
if ( pos ! = - 1 )
{
{
file . remove ( 0 , pos + 1 ) ;
file . remove ( 0 , pos + 1 ) ;
@ -304,7 +304,7 @@ GpsimProcessor::ProgramFileValidity GpsimProcessor::isValidProgramFile( const TQ
if ( ! KStandardDirs : : exists ( programFile ) )
if ( ! KStandardDirs : : exists ( programFile ) )
return DoesntExist ;
return DoesntExist ;
TQString extension = programFile . right ( programFile . length ( ) - programFile . tq findRev( ' . ' ) - 1 ) . lower ( ) ;
TQString extension = programFile . right ( programFile . length ( ) - programFile . findRev( ' . ' ) - 1 ) . lower ( ) ;
if ( extension = = " flowcode " | |
if ( extension = = " flowcode " | |
extension = = " asm " | |
extension = = " asm " | |
@ -313,7 +313,7 @@ GpsimProcessor::ProgramFileValidity GpsimProcessor::isValidProgramFile( const TQ
extension = = " c " )
extension = = " c " )
return Valid ;
return Valid ;
if ( extension = = " hex " & & TQFile : : exists ( TQString ( programFile ) . tq replace( " .hex " , " .cod " ) ) )
if ( extension = = " hex " & & TQFile : : exists ( TQString ( programFile ) . replace( " .hex " , " .cod " ) ) )
return Valid ;
return Valid ;
return IncorrectType ;
return IncorrectType ;
@ -325,7 +325,7 @@ TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject
if ( ! isValidProgramFile ( fileName ) )
if ( ! isValidProgramFile ( fileName ) )
return TQString ( ) ;
return TQString ( ) ;
TQString extension = fileName . right ( fileName . length ( ) - fileName . tq findRev( ' . ' ) - 1 ) . lower ( ) ;
TQString extension = fileName . right ( fileName . length ( ) - fileName . findRev( ' . ' ) - 1 ) . lower ( ) ;
if ( extension = = " cod " )
if ( extension = = " cod " )
{
{
@ -336,13 +336,13 @@ TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject
{
{
TQTimer : : singleShot ( 0 , receiver , successMember ) ;
TQTimer : : singleShot ( 0 , receiver , successMember ) ;
// We've already checked for the existance of the ".cod" file in GpsimProcessor::isValidProgramFile
// We've already checked for the existance of the ".cod" file in GpsimProcessor::isValidProgramFile
return TQString ( fileName ) . tq replace( " .hex " , " .cod " ) ;
return TQString ( fileName ) . replace( " .hex " , " .cod " ) ;
}
}
else if ( extension = = " basic " | | extension = = " microbe " )
else if ( extension = = " basic " | | extension = = " microbe " )
{
{
compileMicrobe ( fileName , receiver , successMember , failMember ) ;
compileMicrobe ( fileName , receiver , successMember , failMember ) ;
return TQString ( fileName ) . tq replace( " . " + extension , " .cod " ) ;
return TQString ( fileName ) . replace( " . " + extension , " .cod " ) ;
}
}
else if ( extension = = " flowcode " )
else if ( extension = = " flowcode " )
{
{
@ -364,13 +364,13 @@ TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject
connect ( pc , TQT_SIGNAL ( failed ( ) ) , receiver , failMember ) ;
connect ( pc , TQT_SIGNAL ( failed ( ) ) , receiver , failMember ) ;
}
}
return TQString ( hexFile ) . tq replace( " .hex " , " .cod " ) ;
return TQString ( hexFile ) . replace( " .hex " , " .cod " ) ;
}
}
else if ( extension = = " asm " )
else if ( extension = = " asm " )
{
{
ProcessOptions o ;
ProcessOptions o ;
o . b_addToProject = false ;
o . b_addToProject = false ;
o . setTargetFile ( TQString ( fileName ) . tq replace( " .asm " , " .hex " ) ) ;
o . setTargetFile ( TQString ( fileName ) . replace( " .asm " , " .hex " ) ) ;
o . setInputFiles ( fileName ) ;
o . setInputFiles ( fileName ) ;
o . setMethod ( ProcessOptions : : Method : : Forget ) ;
o . setMethod ( ProcessOptions : : Method : : Forget ) ;
o . setProcessPath ( ProcessOptions : : ProcessPath : : path ( ProcessOptions : : guessMediaType ( fileName ) , ProcessOptions : : ProcessPath : : Program ) ) ;
o . setProcessPath ( ProcessOptions : : ProcessPath : : path ( ProcessOptions : : guessMediaType ( fileName ) , ProcessOptions : : ProcessPath : : Program ) ) ;
@ -384,13 +384,13 @@ TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject
connect ( pc , TQT_SIGNAL ( failed ( ) ) , receiver , failMember ) ;
connect ( pc , TQT_SIGNAL ( failed ( ) ) , receiver , failMember ) ;
}
}
return TQString ( fileName ) . tq replace( " .asm " , " .cod " ) ;
return TQString ( fileName ) . replace( " .asm " , " .cod " ) ;
}
}
else if ( extension = = " c " )
else if ( extension = = " c " )
{
{
ProcessOptions o ;
ProcessOptions o ;
o . b_addToProject = false ;
o . b_addToProject = false ;
o . setTargetFile ( TQString ( fileName ) . tq replace( " .c " , " .hex " ) ) ;
o . setTargetFile ( TQString ( fileName ) . replace( " .c " , " .hex " ) ) ;
o . setInputFiles ( fileName ) ;
o . setInputFiles ( fileName ) ;
o . setMethod ( ProcessOptions : : Method : : Forget ) ;
o . setMethod ( ProcessOptions : : Method : : Forget ) ;
o . setProcessPath ( ProcessOptions : : ProcessPath : : C_Program ) ;
o . setProcessPath ( ProcessOptions : : ProcessPath : : C_Program ) ;
@ -404,7 +404,7 @@ TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject
connect ( pc , TQT_SIGNAL ( failed ( ) ) , receiver , failMember ) ;
connect ( pc , TQT_SIGNAL ( failed ( ) ) , receiver , failMember ) ;
}
}
return TQString ( fileName ) . tq replace( " .c " , " .cod " ) ;
return TQString ( fileName ) . replace( " .c " , " .cod " ) ;
}
}
if ( failMember )
if ( failMember )
@ -417,7 +417,7 @@ void GpsimProcessor::compileMicrobe( const TQString &filename, TQObject *receive
{
{
ProcessOptions o ;
ProcessOptions o ;
o . b_addToProject = false ;
o . b_addToProject = false ;
o . setTargetFile ( TQString ( filename ) . tq replace( " .microbe " , " .hex " ) ) ;
o . setTargetFile ( TQString ( filename ) . replace( " .microbe " , " .hex " ) ) ;
o . setInputFiles ( filename ) ;
o . setInputFiles ( filename ) ;
o . setMethod ( ProcessOptions : : Method : : Forget ) ;
o . setMethod ( ProcessOptions : : Method : : Forget ) ;
o . setProcessPath ( ProcessOptions : : ProcessPath : : Microbe_Program ) ;
o . setProcessPath ( ProcessOptions : : ProcessPath : : Microbe_Program ) ;
@ -506,7 +506,7 @@ void GpsimDebugger::associateLine( const TQString & sourceFile, int sourceLine,
SourceLine hllSource = SourceLine ( sourceFile , sourceLine ) ;
SourceLine hllSource = SourceLine ( sourceFile , sourceLine ) ;
SourceLine asmSource = SourceLine ( assemblyFile , assemblyLine ) ;
SourceLine asmSource = SourceLine ( assemblyFile , assemblyLine ) ;
if ( m_sourceLineMap . tq contains( asmSource ) )
if ( m_sourceLineMap . contains( asmSource ) )
{
{
kdWarning ( ) < < k_funcinfo < < " Already have an association for assembly ( \" " < < assemblyFile < < " \" , " < < assemblyLine < < " ) " < < endl ;
kdWarning ( ) < < k_funcinfo < < " Already have an association for assembly ( \" " < < assemblyFile < < " \" , " < < assemblyLine < < " ) " < < endl ;
return ;
return ;
@ -600,7 +600,7 @@ void GpsimDebugger::setBreakpoints( const TQString & path, const IntList & lines
if ( ! dl | | dl - > fileName ( ) ! = path )
if ( ! dl | | dl - > fileName ( ) ! = path )
continue ;
continue ;
dl - > setBreakpoint ( lines . tq contains( dl - > line ( ) ) ) ;
dl - > setBreakpoint ( lines . contains( dl - > line ( ) ) ) ;
}
}
}
}
@ -758,7 +758,7 @@ RegisterInfo * RegisterSet::fromAddress( unsigned address )
RegisterInfo * RegisterSet : : fromName ( const TQString & name )
RegisterInfo * RegisterSet : : fromName ( const TQString & name )
{
{
// First try the name as case sensitive, then as case insensitive.
// First try the name as case sensitive, then as case insensitive.
if ( m_nameToRegisterMap . tq contains( name ) )
if ( m_nameToRegisterMap . contains( name ) )
return m_nameToRegisterMap [ name ] ;
return m_nameToRegisterMap [ name ] ;
TQString nameLower = name . lower ( ) ;
TQString nameLower = name . lower ( ) ;