Simplify the common combination of sprintf() and OutputDebugString() (PR #1031)

- Update LogOutput() and LogFileOutput().
- Add StrFormat() to produce std::string out of snprintf() & add StrFormat.cpp to projects.
- Add PTRDIFF_T_FMT in parallel to SIZE_T_FMT to StdAfx.h, for completeness.
- In Log.cpp, changed to get timestamp using posix functions.
- Removed TCHAR usage throughout - simply use char.
This commit is contained in:
Kelvin Lee
2022-02-14 08:37:05 +11:00
committed by GitHub
parent 83e56924f7
commit 9a3832084a
22 changed files with 222 additions and 133 deletions

View File

@ -733,9 +733,7 @@ void DisasmCalcTopFromCurAddress(bool bUpdateTop)
// .20 Fixed: DisasmCalcTopFromCurAddress()
//if ((eMode >= AM_1) && (eMode <= AM_3))
#if 0 // _DEBUG
TCHAR sText[CONSOLE_WIDTH];
wsprintf(sText, "%04X : %d bytes\n", iAddress, nOpbytes);
OutputDebugString(sText);
LogOutput("%04X : %d bytes\n", iAddress, nOpbytes);
#endif
iAddress += nOpbytes;
}