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

Function CmdVersion

source/Debugger/Debugger_Help.cpp:1485–1540  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1483
1484//===========================================================================
1485Update_t CmdVersion (int nArgs)
1486{
1487 unsigned int nVersion = DEBUGGER_VERSION;
1488 int nMajor;
1489 int nMinor;
1490 int nFixMajor;
1491 int nFixMinor;
1492 UnpackVersion( nVersion, nMajor, nMinor, nFixMajor, nFixMinor );
1493
1494 // Use ConsolePrint() like CmdMOTD does so the version is always displayed
1495 std::string sText = StrFormat(" Emulator: %s%s%s (%d-bit build) Debugger: %s%d.%d.%d.%d%s"
1496 , CHC_SYMBOL
1497 , g_VERSIONSTRING.c_str()
1498 , CHC_DEFAULT
1499 , GetCompilationTarget()
1500
1501 , CHC_SYMBOL
1502 , nMajor, nMinor, nFixMajor, nFixMinor
1503 , CHC_DEFAULT
1504 );
1505 ConsolePrint( sText.c_str() );
1506
1507 if (nArgs)
1508 {
1509 for (int iArg = 1; iArg <= g_nArgRaw; iArg++ )
1510 {
1511 // * PARAM_WILDSTAR -> ? PARAM_MEM_SEARCH_WILD
1512 if ((! strcmp( g_aArgs[ iArg ].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName )) ||
1513 (! strcmp( g_aArgs[ iArg ].sArg, g_aParameters[ PARAM_MEM_SEARCH_WILD ].m_sName )) )
1514 {
1515 ConsoleBufferPushFormat( " Arg: %" SIZE_T_FMT " bytes * %d = %" SIZE_T_FMT " bytes",
1516 sizeof(Arg_t), MAX_ARGS, sizeof(g_aArgs) );
1517
1518 ConsoleBufferPushFormat( " Console: %" SIZE_T_FMT " bytes * %d height = %" SIZE_T_FMT " bytes",
1519 sizeof( g_aConsoleDisplay[0] ), CONSOLE_HEIGHT, sizeof(g_aConsoleDisplay) );
1520
1521 ConsoleBufferPushFormat( " Commands: %d (Aliased: %d) Params: %d",
1522 NUM_COMMANDS, NUM_COMMANDS_WITH_ALIASES, NUM_PARAMS );
1523
1524 ConsoleBufferPushFormat( " Cursor(%d) T: %04X C: %04X B: %04X %c D: %02X", // Top, Cur, Bot, Delta
1525 g_nDisasmCurLine, g_nDisasmTopAddress, g_nDisasmCurAddress, g_nDisasmBotAddress,
1526 g_bDisasmCurBad ? '*' : ' '
1527 , g_nDisasmBotAddress - g_nDisasmTopAddress
1528 );
1529
1530 CmdConfigGetFont( 0 );
1531
1532 break;
1533 }
1534 else
1535 return Help_Arg_1( CMD_VERSION );
1536 }
1537 }
1538
1539 return ConsoleUpdate();
1540}
1541

Callers 1

CmdMOTDFunction · 0.85

Calls 8

UnpackVersionFunction · 0.85
StrFormatFunction · 0.85
GetCompilationTargetFunction · 0.85
ConsolePrintFunction · 0.85
ConsoleBufferPushFormatFunction · 0.85
CmdConfigGetFontFunction · 0.85
Help_Arg_1Function · 0.85
ConsoleUpdateFunction · 0.70

Tested by

no test coverage detected