Skip to content

Commit

Permalink
[#64] Internal FDD improvements and bugfixes (Part 4: Fixed logging)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-nestorovic committed Sep 4, 2021
1 parent 32a4d7e commit 977509a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions Main/src/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,13 @@ namespace Debug{

CLogFile &CLogFile::operator<<(const TSectorId &rsi){
// writes given SectorId to the LogFile
TCHAR buf[32];
return operator<<( rsi.ToString(buf) );
return operator<<( rsi.ToString() );
}

CLogFile &CLogFile::operator<<(const TPhysicalAddress &rchs){
// writes given PhysicalAddress to the LogFile
TCHAR buf[64],si[32];
::wsprintf( buf, _T("[%d,%d,%s]"), rchs.cylinder, rchs.head, rchs.sectorId.ToString(si) );
TCHAR buf[64];
::wsprintf( buf, _T("[%d,%d,%s]"), rchs.cylinder, rchs.head, (LPCTSTR)rchs.sectorId.ToString() );
return operator<<(buf);
}

Expand Down
2 changes: 1 addition & 1 deletion Main/src/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace Debug{

#define LOG_SECTOR_ACTION(pSectorId,name)\
TCHAR __sectorActionName[200];\
::wsprintf(__sectorActionName,_T("Sector %s %s"),(pSectorId)->ToString(__sectorActionName+160),name);\
::wsprintf(__sectorActionName,_T("Sector %s %s"),(LPCTSTR)(pSectorId)->ToString(),name);\
LOG_ACTION(__sectorActionName)

#define LOG_DIALOG_DISPLAY(name)\
Expand Down
2 changes: 1 addition & 1 deletion Main/src/FDD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ error: switch (const TStdWinError err=::GetLastError()){
THead CFDD::GetHeadCount() const{
// determines and returns the actual number of Heads in the Image
//EXCLUSIVELY_LOCK_THIS_IMAGE();
LOG_CYLINDER_ACTION(cyl,_T("THead CFDD::GetHeadCount"));
LOG_ACTION(_T("THead CFDD::GetHeadCount"));
return 2; // latest PC floppy drives had two Heads
}

Expand Down

0 comments on commit 977509a

Please sign in to comment.