MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / ProfileSave

Function ProfileSave

source/Debugger/Debug.cpp:8846–8871  ·  view source on GitHub ↗

===========================================================================

Source from the content-addressed store, hash-verified

8844
8845//===========================================================================
8846bool ProfileSave ()
8847{
8848 bool bStatus = false;
8849
8850 const std::string sFilename = g_sProgramDir + g_FileNameProfile; // TODO: Allow user to decide?
8851
8852 FILE *hFile = fopen( sFilename.c_str(), "wt" );
8853
8854 if (hFile)
8855 {
8856 const int nLine = g_nProfileLine;
8857
8858 for ( int iLine = 0; iLine < nLine; iLine++ )
8859 {
8860 ProfileLine_t prfline = ProfileLinePeek( iLine );
8861 if ( prfline.buf )
8862 {
8863 fputs( prfline.buf, hFile );
8864 }
8865 }
8866
8867 fclose( hFile );
8868 bStatus = true;
8869 }
8870 return bStatus;
8871}
8872
8873
8874static void InitDisasm (void)

Callers 2

CmdProfileFunction · 0.85
DebugEndFunction · 0.85

Calls 1

ProfileLinePeekFunction · 0.85

Tested by

no test coverage detected