diff --git a/source/Applewin.cpp b/source/Applewin.cpp index ff266800..1e4c6229 100644 --- a/source/Applewin.cpp +++ b/source/Applewin.cpp @@ -767,7 +767,7 @@ LPSTR GetNextArg(LPSTR lpCmdLine) static int DoDiskInsert(const int nDrive, LPCSTR szFileName) { - string strPathName; + std::string strPathName; if (szFileName[0] == '\\' || szFileName[1] == ':') { diff --git a/source/Debugger/Debug.cpp b/source/Debugger/Debug.cpp index 604b70fc..51e4a2ad 100644 --- a/source/Debugger/Debug.cpp +++ b/source/Debugger/Debug.cpp @@ -56,7 +56,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA bool g_bDebuggerEatKey = false; // Bookmarks __________________________________________________________________ -// vector g_aBookmarks; int g_nBookmarks = 0; Bookmark_t g_aBookmarks[ MAX_BOOKMARKS ]; @@ -126,8 +125,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA int g_iCommand; // last command (enum) // used for consecutive commands - vector g_vPotentialCommands; // global, since TAB-completion also needs - vector g_vSortedCommands; + std::vector g_vPotentialCommands; // global, since TAB-completion also needs + std::vector g_vSortedCommands; // static const char g_aFlagNames[_6502_NUM_FLAGS+1] = TEXT("CZIDBRVN");// Reversed since arrays are from left-to-right @@ -1615,7 +1614,7 @@ void _BWZ_ListAll( const Breakpoint_t * aBreakWatchZero, const int nMax ) Update_t CmdBreakpointList (int nArgs) { // ConsoleBufferPush( ); -// vector vBreakpoints; +// std::vector vBreakpoints; // int iBreakpoint = MAX_BREAKPOINTS; // while (iBreakpoint--) // { @@ -1624,7 +1623,7 @@ Update_t CmdBreakpointList (int nArgs) // vBreakpoints.push_back( g_aBreakpoints[iBreakpoint].address ); // } // } -// sort( vBreakpoints.begin(), vBreakpoints.end() ); +// std::sort( vBreakpoints.begin(), vBreakpoints.end() ); // iBreakpoint = vBreakPoints.size(); if (! g_nBreakpoints) @@ -3194,7 +3193,7 @@ Update_t CmdCursorLineUp (int nArgs) const int MAX_LOOK_AHEAD = g_nDisasmWinHeight; - static vector aTopCandidates; + static std::vector aTopCandidates; LookAhead_t tCandidate; // if (! aBestTop.capacity() ) @@ -5256,9 +5255,7 @@ Update_t CmdOutputPrintf (int nArgs) TCHAR sText[ CONSOLE_WIDTH ] = TEXT(""); -// vector aValues; -// PrintFormat_t entry; - vector aValues; + std::vector aValues; Arg_t entry; int iValue = 0; int nValue = 0; @@ -6715,7 +6712,7 @@ int FindCommand( LPTSTR pName, CmdFuncPtr_t & pFunction_, int * iCommand_ ) g_iCommand = g_aCommands[iCommand].iCommand; // Don't push the same comamnd/alias if already on the list - if (find( g_vPotentialCommands.begin(), g_vPotentialCommands.end(), g_iCommand) == g_vPotentialCommands.end()) + if (std::find( g_vPotentialCommands.begin(), g_vPotentialCommands.end(), g_iCommand) == g_vPotentialCommands.end()) { nFound++; g_vPotentialCommands.push_back( g_iCommand ); @@ -7195,12 +7192,12 @@ void ProfileFormat( bool bExport, ProfileFormat_e eFormatMode ) bool bOpcodeGood = true; bool bOpmodeGood = true; - vector< ProfileOpcode_t > vProfileOpcode( &g_aProfileOpcodes[0], &g_aProfileOpcodes[ NUM_OPCODES ] ); - vector< ProfileOpmode_t > vProfileOpmode( &g_aProfileOpmodes[0], &g_aProfileOpmodes[ NUM_OPMODES ] ); + std::vector< ProfileOpcode_t > vProfileOpcode( &g_aProfileOpcodes[0], &g_aProfileOpcodes[ NUM_OPCODES ] ); + std::vector< ProfileOpmode_t > vProfileOpmode( &g_aProfileOpmodes[0], &g_aProfileOpmodes[ NUM_OPMODES ] ); // sort > - sort( vProfileOpcode.begin(), vProfileOpcode.end(), ProfileOpcode_t() ); - sort( vProfileOpmode.begin(), vProfileOpmode.end(), ProfileOpmode_t() ); + std::sort( vProfileOpcode.begin(), vProfileOpcode.end(), ProfileOpcode_t() ); + std::sort( vProfileOpmode.begin(), vProfileOpmode.end(), ProfileOpmode_t() ); Profile_t nOpcodeTotal = 0; Profile_t nOpmodeTotal = 0; diff --git a/source/Debugger/Debug.h b/source/Debugger/Debug.h index 24aec96e..084bbc0f 100644 --- a/source/Debugger/Debug.h +++ b/source/Debugger/Debug.h @@ -1,10 +1,5 @@ #pragma once -#include -#include // sort, find -#include -using namespace std; - #include "..\Structs.h" #include "..\Common.h" @@ -30,7 +25,6 @@ using namespace std; // Bookmarks extern int g_nBookmarks; extern Bookmark_t g_aBookmarks[ MAX_BOOKMARKS ]; -// extern vector g_aBookmarks; // Breakpoints enum BreakpointHit_t @@ -121,7 +115,7 @@ using namespace std; extern MemoryDump_t g_aMemDump[ NUM_MEM_DUMPS ]; // extern MemorySearchArray_t g_vMemSearchMatches; - extern vector g_vMemorySearchResults; + extern std::vector g_vMemorySearchResults; // Source Level Debugging extern TCHAR g_aSourceFileName[ MAX_PATH ]; diff --git a/source/Debugger/Debugger_Assembler.cpp b/source/Debugger/Debugger_Assembler.cpp index 4a42076e..ece67732 100644 --- a/source/Debugger/Debugger_Assembler.cpp +++ b/source/Debugger/Debugger_Assembler.cpp @@ -75,7 +75,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Disassembler Data _____________________________________________________________________________ - vector g_aDisassemblerData; + std::vector g_aDisassemblerData; // Instructions / Opcodes _________________________________________________________________________ @@ -401,7 +401,7 @@ Fx BEQ r SBC (d),Y sbc (d) --- --- SBC d,X INC d,X --- SED SBC a,Y }; int m_bAsmFlags; - vector m_vAsmOpcodes; + std::vector m_vAsmOpcodes; int m_iAsmAddressMode = AM_IMPLIED; struct DelayedTarget_t @@ -412,7 +412,7 @@ Fx BEQ r SBC (d),Y sbc (d) --- --- SBC d,X INC d,X --- SED SBC a,Y int m_iOpmode ; // AddressingMode_e }; - vector m_vDelayedTargets; + std::vector m_vDelayedTargets; bool m_bDelayedTargetsDirty = false; int m_nAsmBytes = 0; @@ -886,7 +886,7 @@ void AssemblerStartup() void _CmdAssembleHashDump () { // #if DEBUG_ASM_HASH - vector vHashes; + std::vector vHashes; HashOpcode_t tHash; TCHAR sText[ CONSOLE_WIDTH ]; @@ -898,7 +898,7 @@ void _CmdAssembleHashDump () vHashes.push_back( tHash ); } - sort( vHashes.begin(), vHashes.end(), HashOpcode_t() ); + std::sort( vHashes.begin(), vHashes.end(), HashOpcode_t() ); Hash_t nPrevHash = vHashes.at( 0 ).m_nValue; Hash_t nThisHash = 0; @@ -1349,7 +1349,7 @@ void AssemblerProcessDelayedSymols() { bModified = false; - vector::iterator iSymbol; + std::vector::iterator iSymbol; for( iSymbol = m_vDelayedTargets.begin(); iSymbol != m_vDelayedTargets.end(); ++iSymbol ) { DelayedTarget_t *pTarget = & (*iSymbol); // m_vDelayedTargets.at( iSymbol ); diff --git a/source/Debugger/Debugger_Assembler.h b/source/Debugger/Debugger_Assembler.h index 88ffddd5..21b8588d 100644 --- a/source/Debugger/Debugger_Assembler.h +++ b/source/Debugger/Debugger_Assembler.h @@ -201,7 +201,7 @@ extern int g_aAssemblerFirstDirective[ NUM_ASSEMBLERS ]; bool _6502_IsOpcodeValid( int nOpcode ); int AssemblerHashMnemonic ( const TCHAR * pMnemonic ); -// bool AssemblerGetAddressingMode ( int iArg, int nArgs, WORD nAddress, vector & vOpcodes ); +// bool AssemblerGetAddressingMode ( int iArg, int nArgs, WORD nAddress, std::vector & vOpcodes ); void _CmdAssembleHashDump (); int AssemblerDelayedTargetsSize(); diff --git a/source/Debugger/Debugger_Console.cpp b/source/Debugger/Debugger_Console.cpp index 91bc4b2f..b6de5bbb 100644 --- a/source/Debugger/Debugger_Console.cpp +++ b/source/Debugger/Debugger_Console.cpp @@ -50,7 +50,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Buffer bool g_bConsoleBufferPaused = false; // buffered output is waiting for user to continue int g_nConsoleBuffer = 0; - conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: stl::vector< line_t > + conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: std::vector< line_t > // Cursor char g_sConsoleCursor[] = "_"; diff --git a/source/Debugger/Debugger_Console.h b/source/Debugger/Debugger_Console.h index 9d6fa9f2..f1be9e6c 100644 --- a/source/Debugger/Debugger_Console.h +++ b/source/Debugger/Debugger_Console.h @@ -189,7 +189,7 @@ // Buffer extern bool g_bConsoleBufferPaused; extern int g_nConsoleBuffer; - extern conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: stl::vector< line_t > + extern conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: std::vector< line_t > // Cursor extern char g_sConsoleCursor[]; diff --git a/source/Debugger/Debugger_DisassemblerData.h b/source/Debugger/Debugger_DisassemblerData.h index 9eed3b6d..403c24f1 100644 --- a/source/Debugger/Debugger_DisassemblerData.h +++ b/source/Debugger/Debugger_DisassemblerData.h @@ -14,6 +14,6 @@ void Disassembly_DelData( DisasmData_t tData); DisasmData_t* Disassembly_Enumerate( DisasmData_t *pCurrent = NULL ); - extern vector g_aDisassemblerData; + extern std::vector g_aDisassemblerData; #endif diff --git a/source/Debugger/Debugger_Help.cpp b/source/Debugger/Debugger_Help.cpp index f3c27ff8..2dfcde8d 100644 --- a/source/Debugger/Debugger_Help.cpp +++ b/source/Debugger/Debugger_Help.cpp @@ -1439,7 +1439,7 @@ Update_t CmdHelpList (int nArgs) int nMaxWidth = g_nConsoleDisplayWidth - 1; int iCommand; - extern vector g_vSortedCommands; + extern std::vector g_vSortedCommands; if (! g_vSortedCommands.size()) { diff --git a/source/Debugger/Debugger_Symbols.cpp b/source/Debugger/Debugger_Symbols.cpp index 288d0064..dfeee236 100644 --- a/source/Debugger/Debugger_Symbols.cpp +++ b/source/Debugger/Debugger_Symbols.cpp @@ -106,7 +106,7 @@ const char* FindSymbolFromAddress (WORD nAddress, int * iTable_ ) if (! (g_bDisplaySymbolTables & (1 << iTable))) continue; - map::iterator iSymbols = g_aSymbols[iTable].find(nAddress); + std::map::iterator iSymbols = g_aSymbols[iTable].find(nAddress); if(g_aSymbols[iTable].find(nAddress) != g_aSymbols[iTable].end()) { if (iTable_) @@ -131,7 +131,6 @@ bool FindAddressFromSymbol ( const char* pSymbol, WORD * pAddress_, int * iTable if (! (g_bDisplaySymbolTables & (1 << iTable))) continue; -// map::iterator iSymbol = g_aSymbols[iTable].begin(); SymbolTable_t :: iterator iSymbol = g_aSymbols[iTable].begin(); while (iSymbol != g_aSymbols[iTable].end()) { @@ -455,7 +454,6 @@ Update_t _CmdSymbolsListTables (int nArgs, int bSymbolTables ) int nSymbols = g_aSymbols[iTable].size(); if (nSymbols) { - // map::iterator iSymbol = g_aSymbols[iTable].begin(); SymbolTable_t :: iterator iSymbol = g_aSymbols[iTable].begin(); while (iSymbol != g_aSymbols[iTable].end()) { diff --git a/source/Debugger/Debugger_Types.h b/source/Debugger/Debugger_Types.h index f0140e6a..1cb06f97 100644 --- a/source/Debugger/Debugger_Types.h +++ b/source/Debugger/Debugger_Types.h @@ -1161,8 +1161,8 @@ const DisasmData_t* pDisasmData; bool m_bFound ; // }; - typedef vector MemorySearchValues_t; - typedef vector MemorySearchResults_t; + typedef std::vector MemorySearchValues_t; + typedef std::vector MemorySearchResults_t; // Parameters _____________________________________________________________________________________ @@ -1419,7 +1419,7 @@ const DisasmData_t* pDisasmData; NO_SOURCE_LINE = -1 }; - typedef map SourceAssembly_t; // Address -> Line # & FileName + typedef std::map SourceAssembly_t; // Address -> Line # & FileName // Symbols ________________________________________________________________________________________ @@ -1459,7 +1459,7 @@ const DisasmData_t* pDisasmData; SYMBOL_TABLE_PRODOS = (1 << 8), }; - typedef map SymbolTable_t; + typedef std::map SymbolTable_t; // Watches ________________________________________________________________________________________ diff --git a/source/Debugger/Util_MemoryTextFile.cpp b/source/Debugger/Util_MemoryTextFile.cpp index 3b2b4f69..dfd54fe4 100644 --- a/source/Debugger/Util_MemoryTextFile.cpp +++ b/source/Debugger/Util_MemoryTextFile.cpp @@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "StdAfx.h" -#include -using namespace std; #include "Util_Text.h" #include "Util_MemoryTextFile.h" diff --git a/source/Debugger/Util_MemoryTextFile.h b/source/Debugger/Util_MemoryTextFile.h index a5445d05..016a052e 100644 --- a/source/Debugger/Util_MemoryTextFile.h +++ b/source/Debugger/Util_MemoryTextFile.h @@ -4,8 +4,8 @@ class MemoryTextFile_t { - vector m_vBuffer; - vector m_vLines ; // array of pointers to start of lines + std::vector m_vBuffer; + std::vector m_vLines ; // array of pointers to start of lines bool m_bDirty ; // line pointers not up-to-date void GetLinePointers(); diff --git a/source/Frame.cpp b/source/Frame.cpp index 150dcded..ca248dfb 100644 --- a/source/Frame.cpp +++ b/source/Frame.cpp @@ -158,7 +158,7 @@ void ResetMachineState (); void SetFullScreenMode (); void SetNormalMode (); void SetUsingCursor (BOOL); -static bool FileExists(string strFilename); +static bool FileExists(std::string strFilename); bool g_bScrollLock_FullSpeed = false; bool g_bFreshReset = false; @@ -1854,10 +1854,10 @@ void ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive) RegLoadString(TEXT("Configuration"), REGVALUE_CIDERPRESSLOC, 1, PathToCiderPress,MAX_PATH); //TODO: A directory is open if an empty path to CiderPress is set. This has to be fixed. - string filename1= "\""; + std::string filename1= "\""; filename1.append( DiskGetDiskPathFilename(iDrive) ); filename1.append("\""); - string sFileNameEmpty = "\""; + std::string sFileNameEmpty = "\""; sFileNameEmpty.append("\""); // Load the menu template containing the shortcut menu from the @@ -2423,7 +2423,7 @@ void FrameReleaseVideoDC () //=========================================================================== // TODO: FIXME: Util_TestFileExists() -static bool FileExists(string strFilename) +static bool FileExists(std::string strFilename) { struct stat stFileInfo; int intStat = stat(strFilename.c_str(),&stFileInfo); diff --git a/source/Mockingboard.cpp b/source/Mockingboard.cpp index 22203bd3..d43d1e25 100644 --- a/source/Mockingboard.cpp +++ b/source/Mockingboard.cpp @@ -76,7 +76,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // #include "StdAfx.h" -#include +#include // Only needed for +#include // Only needed for #include +#include +#include #include #include