mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-25 04:31:52 +00:00
pretty print OSErr and OSType
This commit is contained in:
parent
f7bee265cc
commit
f6cc3925a7
@ -1,8 +1,14 @@
|
||||
#include "template.h"
|
||||
#include "debugger.h"
|
||||
#include "debugger_internal.h"
|
||||
|
||||
#include <toolbox/toolbox.h>
|
||||
|
||||
|
||||
namespace Debug {
|
||||
|
||||
using namespace Debug::Internal;
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@ -121,9 +127,17 @@ namespace Debug {
|
||||
{
|
||||
case kOSType:
|
||||
// print 4-cc code
|
||||
fputc(' ', stdout);
|
||||
fputs(ToolBox::TypeToString(value).c_str(), stdout);
|
||||
return;
|
||||
|
||||
case kOSErr:
|
||||
// print value + short name
|
||||
{
|
||||
printf(" %6d", (int16_t)value);
|
||||
auto iter = ErrorTableInvert.find(value);
|
||||
if (iter != ErrorTableInvert.end()) printf(" %s", iter->second.c_str());
|
||||
}
|
||||
return;
|
||||
|
||||
case kPStringPtr:
|
||||
|
Loading…
Reference in New Issue
Block a user