clean up trailing whitespace / end of file linefeed.

This commit is contained in:
Kelvin Sherlock 2015-02-18 09:32:01 -05:00
parent ac4506b52e
commit 2766493398
57 changed files with 630 additions and 644 deletions

View File

@ -3,13 +3,13 @@
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -100,6 +100,3 @@ void ToolMap::remove(uint16_t tool)
map.erase(tool);
}

View File

@ -58,7 +58,7 @@ public:
{
return map.end();
}
size_t size()
{
return map.size();
@ -69,4 +69,4 @@ private:
};
#endif
#endif

View File

@ -29,16 +29,16 @@ namespace Debug {
char buffer2[16 + 1];
ssize_t offset = 0;
unsigned i, j;
while(size > 0)
{
{
std::memset(buffer1, ' ', sizeof(buffer1));
std::memset(buffer2, ' ', sizeof(buffer2));
unsigned linelen = (unsigned)std::min(size, (ssize_t)16);
for (i = 0, j = 0; i < linelen; i++)
{
unsigned x = data[i];
@ -46,16 +46,16 @@ namespace Debug {
buffer1[j++] = HexMap[x & 0x0f];
j++;
if (i == 7) j++;
// isascii not part of std:: and may be a macro.
buffer2[i] = isascii(x) && std::isprint(x) ? x : '.';
}
buffer1[sizeof(buffer1)-1] = 0;
buffer2[sizeof(buffer2)-1] = 0;
std::printf("%06x: %s %s\n", address + (unsigned)offset, buffer1, buffer2);
offset += 16;
data += 16;
@ -76,7 +76,7 @@ namespace Debug {
if ((int32_t)value > UINT16_MAX) return;
if ((int32_t)value < INT16_MIN) return;
uint16_t error = value;
printf("%d\n", (int16_t)error);
@ -106,7 +106,7 @@ namespace Debug {
{
printf("noErr\n");
return;
}
}
}
@ -184,7 +184,7 @@ namespace Debug {
uint32_t prevA6 = ReadLong(a6);
if (prevA6 <= a6) break;
uint32_t pc = ReadLong(a6+4); //
uint32_t pc = ReadLong(a6+4); //

View File

@ -3,13 +3,13 @@
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -104,7 +104,7 @@ namespace {
};
std::deque<BackTraceInfo> BackTrace;
@ -121,7 +121,7 @@ namespace {
break;
case 0x4E74: // rtd #
mboffset = 4;
break;
break;
default:
return;
break;
@ -137,7 +137,7 @@ namespace {
b -= 0x80;
pc++;
if (!b) b = Debug::ReadByte(pc++);
s.reserve(b);
for (unsigned i = 0; i < b; ++i)
{
@ -185,7 +185,7 @@ namespace {
}
else
{
printf("$%08X Tool #$%04X ; %04X\n",
printf("$%08X Tool #$%04X ; %04X\n",
pc, opcode, opcode);
}
@ -207,7 +207,7 @@ namespace {
{
case 0x4EBA: // jsr offset(pc)
{
int16_t offset = Debug::ReadWord(pc + 2);
int16_t offset = Debug::ReadWord(pc + 2);
address = pc + 2 + offset;
break;
}
@ -215,7 +215,7 @@ namespace {
{
address = Debug::ReadLong(pc + 2);
break;
}
}
case 0x4EF9: // jmp address
{
address = Debug::ReadLong(pc + 2);
@ -225,14 +225,14 @@ namespace {
{
// check if address is a jmp address (see above)
// and follow it. a5 should never change.
int16_t offset = Debug::ReadWord(pc + 2);
int16_t offset = Debug::ReadWord(pc + 2);
address = cpuGetAReg(5) + offset;
if (Debug::ReadWord(address) == 0x4EF9)
if (Debug::ReadWord(address) == 0x4EF9)
address = Debug::ReadLong(address + 2);
else address = 0;
break;
break;
}
// consider checking branches?
@ -297,7 +297,7 @@ namespace {
{
if (!trace) disasm(pc);
printf("CPU stopped\n");
return false;
return false;
}
if (sigInt)
@ -305,7 +305,7 @@ namespace {
if (!trace) disasm(pc);
printf("^C break\n");
sigInt = false;
return false;
return false;
}
if (memBreak)
@ -377,7 +377,7 @@ namespace {
break;
case 4:
fprintf(stdout, " [%08x]\n", value);
break;
break;
default:
fprintf(stdout, "\n");
break;
@ -607,7 +607,7 @@ void Print(uint32_t data)
if (data <= 0xffff)
printf(" '%s'", tmp + 2);
break;
case 0x08:
if (data <= 0xff)
printf(" '%s'", tmp + 3);
@ -690,15 +690,15 @@ void PrintRegisters(const BackTraceInfo &i)
{
const char *srbits = srBits(i.csr);
printf(" 0 1 2 3 4 5 6 7\n");
printf(" 0 1 2 3 4 5 6 7\n");
printf("D: %08x %08x %08x %08x %08x %08x %08x %08x\n",
i.d[0], i.d[1], i.d[2], i.d[3],
i.d[0], i.d[1], i.d[2], i.d[3],
i.d[4], i.d[5], i.d[6], i.d[7]
);
printf("A: %08x %08x %08x %08x %08x %08x %08x %08x\n",
i.a[0], i.a[1], i.a[2], i.a[3],
i.a[0], i.a[1], i.a[2], i.a[3],
i.a[4], i.a[5], i.a[6], i.a[7]
);
@ -711,15 +711,15 @@ void PrintRegisters()
uint16_t sr = cpuGetSR();
const char *srbits = srBits(sr);
printf(" 0 1 2 3 4 5 6 7\n");
printf(" 0 1 2 3 4 5 6 7\n");
printf("D: %08x %08x %08x %08x %08x %08x %08x %08x\n",
cpuGetDReg(0), cpuGetDReg(1), cpuGetDReg(2), cpuGetDReg(3),
cpuGetDReg(0), cpuGetDReg(1), cpuGetDReg(2), cpuGetDReg(3),
cpuGetDReg(4), cpuGetDReg(5), cpuGetDReg(6), cpuGetDReg(7)
);
printf("A: %08x %08x %08x %08x %08x %08x %08x %08x\n",
cpuGetAReg(0), cpuGetAReg(1), cpuGetAReg(2), cpuGetAReg(3),
cpuGetAReg(0), cpuGetAReg(1), cpuGetAReg(2), cpuGetAReg(3),
cpuGetAReg(4), cpuGetAReg(5), cpuGetAReg(6), cpuGetAReg(7)
);
@ -787,7 +787,7 @@ void PrintBackTrace()
disasm(prev->pc);
btdiff(*prev, current);
//
//
prev = &current;
}
@ -950,7 +950,7 @@ void Step(const Command &cmd)
int count = 0;
if (cmd.argc == 1) count = (int)cmd.argv[0];
if (count < 1) count = 1;
// TODO -- move to common function...
for (int i = 0; i < count; ++i)
{
@ -1001,7 +1001,7 @@ void SetXRegister(unsigned reg, uint32_t value)
if (value & 0x01)
{
fprintf(stderr, "Address is not aligned: $%08x\n", value);
return;
return;
}
if (value > Flags.memorySize)
{
@ -1084,7 +1084,7 @@ void Info(uint32_t address)
}
// 4 as an error
// almost all are negative 16-bit values,
// almost all are negative 16-bit values,
// but may also be a positive 16-bit value.
uint16_t error = 0;
if (address <= 0xffff) error = address;
@ -1155,7 +1155,7 @@ namespace {
auto end = iter;
if (!count) return NULL;
if (count > 100) return NULL;
if (count > 100) return NULL;
if (count == 1)
{
@ -1172,7 +1172,7 @@ namespace {
auto min_length = begin->first.length();
// item 0 is the longest match. (fill in later.)
buffer[i++] = NULL;
buffer[i++] = NULL;
for (iter = begin; iter != end; ++iter)
{
buffer[i++] = strdup(iter->first.c_str());
@ -1188,7 +1188,7 @@ namespace {
if (i >= min_length)
{
buffer[0][i] = 0;
buffer[0][i] = 0;
break;
}
@ -1319,5 +1319,3 @@ void Shell()
}
} // namespace Debugger

View File

@ -43,11 +43,11 @@ struct Token {
intValue(0), stringValue(0), subtype(0)
{}
Token(uint32_t i) :
Token(uint32_t i) :
intValue(i), subtype(0)
{}
Token(std::string *s, unsigned st = 0) :
Token(std::string *s, unsigned st = 0) :
intValue(0), stringValue(s), subtype(st)
{}
#endif

View File

@ -3,13 +3,13 @@
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -97,7 +97,7 @@ void code0(uint32_t data_size)
}
else
{
printf("$%08X ???\n", pc + 2);
printf("$%08X ???\n", pc + 2);
}
}
else
@ -208,7 +208,7 @@ void disasm(const char *name, int segment, uint32_t data_size)
ToolBox(pc, op);
pc += 2;
prevOP = op;
prevOP = op;
continue;
}
@ -305,4 +305,4 @@ int main(int argc, char **argv)
CloseResFile(refNum);
return 0;
}
}

View File

@ -13,9 +13,9 @@ namespace {
unsigned int hash = 5381;
for(size_t i = 0; i < length; ++i)
{
{
hash = ((hash << 5) + hash) + (begin[i]);
}
}
return hash;
}
@ -46,9 +46,9 @@ namespace Intern {
// insert it. I suppose this could throw, in which case a string would leak.
std::string *s = new std::string(std::move(str));
InternTable.emplace(std::make_pair(hash, s));
return s;
return s;
}
const std::string *String(const char *begin, size_t size)
{
if (!size) return &EmptyString;
@ -96,7 +96,3 @@ namespace Intern {
}

View File

@ -11,4 +11,4 @@ namespace Intern {
const std::string *String(const char *, const char *);
};
#endif
#endif

View File

@ -24,7 +24,7 @@
// hd / hexdump expression [:expression]
// stack ?
// brk expression
// tbrk expression
// tbrk expression
namespace {
int tox(char c)
{
@ -36,7 +36,7 @@ namespace {
uint32_t scan10(const char *begin, const char *end)
{
return std::accumulate(begin, end, 0,
return std::accumulate(begin, end, 0,
[](uint32_t value, char c){
return value * 10 + c - '0';
});
@ -44,7 +44,7 @@ namespace {
uint32_t scan16(const char *begin, const char *end)
{
return std::accumulate(begin, end, 0,
return std::accumulate(begin, end, 0,
[](uint32_t value, char c){
return (value << 4) + tox(c);
});
@ -237,7 +237,7 @@ bool ParseLine(const char *iter, Command *command)
'tbrk' | 'tbreak' | 'toolbreak' {
Parse(parser, tkTBREAK, 0, command);
continue;
continue;
}
'mbrk' | 'mbreak' | 'rwbrk' | 'rwbreak' {
@ -265,7 +265,7 @@ bool ParseLine(const char *iter, Command *command)
Parse(parser, tkPRINT, 0, command);
continue;
}
'r' | 'run' {
Parse(parser, tkCONTINUE, 0, command);
continue;
@ -324,4 +324,3 @@ bool ParseLine(const char *iter, Command *command)
} // namespace Debugger

View File

@ -4,13 +4,13 @@
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@ -121,7 +121,7 @@ void reloc1(const uint8_t *r, uint32_t address, uint32_t offset)
// %0xxxxxxx -> 7-bit value
// %1xxxxxxx xxxxxxxx -> 15-bit value
// %00000000 1xxxxxxx x{8} x{8} x{8} -> 31 bit value
// ^ that's what the documentation says..
// ^ that's what the documentation says..
// that's how the 32-bit bootstrap works
// DumpCode ignores the high 2 bytes.
for(;;)
@ -302,7 +302,7 @@ uint32_t load(const char *file)
}
ReleaseResource(h);
}
}
// now link the segment 0 jump table...
assert(a5);
@ -392,7 +392,7 @@ void GlobalInit()
// 0x0a06 - MinusOne
memoryWriteLong(0xffffffff, MacOS::MinusOne);
// 0x0130 -- ApplLimit
memoryWriteLong(Flags.memorySize - Flags.stackSize - 1, MacOS::ApplLimit);
memoryWriteLong(kGlobalSize, MacOS::ApplZone);
@ -562,7 +562,7 @@ void MemoryLogger(uint32_t address, int size, int readWrite, uint32_t value)
break;
case 4:
fprintf(stderr, " [%08x]\n", value);
break;
break;
default:
fprintf(stderr, "\n");
break;
@ -624,7 +624,7 @@ bool parse_number(const char *input, uint32_t *dest)
value *= 1024 * 1024;
else if (strcasecmp(end, "K") == 0)
value *= 1024;
else
else
{
fprintf(stderr, "%s - invalid input\n", input);
return false;
@ -747,7 +747,7 @@ void MainLoop()
if (cpuGetStop()) break; // will this also be set by an interrupt?
#ifndef CPU_INSTRUCTION_LOGGING
if (Flags.traceCPU || Flags.traceMacsbug)
{
@ -781,7 +781,7 @@ int main(int argc, char **argv)
kDebugger,
kMemoryStats,
};
static struct option LongOpts[] =
static struct option LongOpts[] =
{
{ "ram",required_argument, NULL, 'r' },
{ "stack", required_argument, NULL, 's' },
@ -831,7 +831,7 @@ int main(int argc, char **argv)
case kTraceMPW:
Flags.traceMPW = true;
break;
case kMemoryStats:
Flags.memoryStats = true;
break;
@ -968,7 +968,7 @@ int main(int argc, char **argv)
MPW::Trace = Flags.traceMPW;
ToolBox::Trace = Flags.traceToolBox;
if (Flags.traceCPU || Flags.traceMacsbug)
{
#ifdef CPU_INSTRUCTION_LOGGING
@ -995,6 +995,6 @@ int main(int argc, char **argv)
if (rv > 0xff) rv = 0xff;
exit(rv);
}
}

View File

@ -296,4 +296,3 @@ int main(int argc, char **argv)
}
#endif

View File

@ -83,7 +83,7 @@ namespace Debug {
if (iter != Types.end())
{
if (iter->second == type) return; // ok, just a duplicate.
fprintf(stderr, "Template Error: line %d - redefining %s\n",
fprintf(stderr, "Template Error: line %d - redefining %s\n",
info->LineNumber, name->c_str());
return;
@ -91,13 +91,13 @@ namespace Debug {
if (Templates.find(*name) != Templates.end())
{
fprintf(stderr, "Template Error: line %d - redefining %s\n",
fprintf(stderr, "Template Error: line %d - redefining %s\n",
info->LineNumber, name->c_str());
return;
return;
}
Types.emplace(std::make_pair(*name, type));
Types.emplace(std::make_pair(*name, type));
}
@ -110,16 +110,16 @@ namespace Debug {
if (Templates.find(*name) != Templates.end())
{
fprintf(stderr, "Template Error: line %d - redefining %s\n",
fprintf(stderr, "Template Error: line %d - redefining %s\n",
info->LineNumber, name->c_str());
return;
return;
}
if (Types.find(*name) != Types.end())
{
fprintf(stderr, "Template Error: line %d - redefining %s\n",
fprintf(stderr, "Template Error: line %d - redefining %s\n",
info->LineNumber, name->c_str());
return;
return;
}
firstField = Reverse(firstField);
@ -135,10 +135,10 @@ namespace Debug {
return isprint(c) ? c : '.';
});
if (s.size() > 40) {
s.resize(37);
if (s.size() > 40) {
s.resize(37);
s.append("...");
}
}
}
void PrettyPrint(uint32_t value, unsigned type)
{
@ -224,7 +224,7 @@ namespace Debug {
uint8_t value = ReadByte(address + offset);
printf(" %02x", value);
PrettyPrint(value, type);
break;
break;
}
case 2:
@ -232,7 +232,7 @@ namespace Debug {
uint16_t value = ReadWord(address + offset);
printf(" %04x", value);
PrettyPrint(value, type);
break;
break;
}
case 4:
@ -240,12 +240,12 @@ namespace Debug {
uint32_t value = ReadLong(address + offset);
printf("%08x", value);
PrettyPrint(value, type);
break;
break;
}
case 0:
// either a pointer or a struct
if (type & 0x8000) {
if (type & 0x8000) {
// pointer.
uint32_t value = ReadLong(address + offset);
printf("%08x", value);

View File

@ -79,4 +79,3 @@ int main(int argc, char **argv)
#endif
#endif

View File

@ -554,7 +554,7 @@ but a special error is needed to patch secondary inits.*/
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus

View File

@ -263,7 +263,7 @@ enum {
enum {
SysParam = 0x1F8, /*[GLOBAL VAR] Low-memory copy of parameter RAM (20 bytes)
system parameter memory [20 bytes]*/
CrsrThresh = 0x8EC, /*[GLOBAL VAR] Mouse-scaling threshold (word)
CrsrThresh = 0x8EC, /*[GLOBAL VAR] Mouse-scaling threshold (word)
delta threshold for mouse scaling [word]*/
JCrsrTask = 0x8EE, /*[GLOBAL VAR] address of CrsrVBLTask [long]*/
MTemp = 0x828, /*[GLOBAL VAR] Low-level interrupt mouse location [long]*/
@ -318,7 +318,7 @@ enum {
MaskPtr = 0x31A, /*[GLOBAL VAR] Memory Manager Pointer Mask [long]*/
MinStack = 0x31E, /*[GLOBAL VAR] Minimum space allotment for stack (long)
min stack size used in InitApplZone [long]*/
DefltStack = 0x322, /*[GLOBAL VAR] Default space allotment for stack (long)
DefltStack = 0x322, /*[GLOBAL VAR] Default space allotment for stack (long)
default size of stack [long]*/
MMDefFlags = 0x326, /*[GLOBAL VAR] default zone flags [word]*/
DSAlertTab = 0x2BA, /*[GLOBAL VAR] Pointer to system error alert table in use
@ -362,7 +362,7 @@ enum {
TagData = 0x2FA, /*[GLOBAL VAR] sector tag info for disk drivers [14 bytes]*/
BufTgFNum = 0x2FC, /*[GLOBAL VAR] File tags buffer: file number (long)
file number [long]*/
BufTgFFlg = 0x300, /*[GLOBAL VAR] File tags buffer: flags (word: bit 1=1 if resource fork)
BufTgFFlg = 0x300, /*[GLOBAL VAR] File tags buffer: flags (word: bit 1=1 if resource fork)
flags [word]*/
BufTgFBkNum = 0x302, /*[GLOBAL VAR] File tags buffer: logical block number (word)
logical block number [word]*/
@ -400,7 +400,7 @@ enum {
Z-ordered linked list of windows [pointer]*/
PaintWhite = 0x9DC, /*[GLOBAL VAR] Flag for whether to paint window white before update event (word)
erase newly drawn windows? [word]*/
WMgrPort = 0x9DE, /*[GLOBAL VAR] Pointer to Window Manager port
WMgrPort = 0x9DE, /*[GLOBAL VAR] Pointer to Window Manager port
window manager's grafport [pointer]*/
GrayRgn = 0x9EE, /*[GLOBAL VAR] Handle to region drawn as desktop
rounded gray desk region [handle]*/
@ -439,7 +439,7 @@ enum {
system map [handle]*/
SysMap = 0xA58, /*[GLOBAL VAR] Reference number of system resource file (word)
reference number of system map [word]*/
CurMap = 0xA5A, /*[GLOBAL VAR] Reference number of current resource file (word)
CurMap = 0xA5A, /*[GLOBAL VAR] Reference number of current resource file (word)
reference number of current map [word]*/
ResReadOnly = 0xA5C, /*[GLOBAL VAR] Read only flag [word]*/
ResLoad = 0xA5E, /*[GLOBAL VAR] Current SetResLoad state (word)

View File

@ -73,13 +73,13 @@ namespace MacOS {
return *this;
}
constexpr const T* operator->() const
{
return &_value;
}
constexpr const T& operator *() const
{
return _value;
@ -117,7 +117,7 @@ namespace MacOS {
{
public:
tool_return()
tool_return()
{}
tool_return(macos_error error) : tool_return_base(error)
@ -133,5 +133,5 @@ namespace MacOS {
};
} // namespace IIgs
} // namespace
#endif

View File

@ -7,10 +7,10 @@ const char *TrapName(uint16_t trap)
switch(trap)
{
/*
/*
; QuickDraw
*/
case 0xA817: return "_CopyMask";
@ -196,10 +196,10 @@ const char *TrapName(uint16_t trap)
case 0xA8FB: return "_MapRgn";
case 0xA8FC: return "_MapPoly";
/*
/*
; Toolbox
*/
case 0xA80D: return "_Count1Resources";
@ -511,34 +511,34 @@ const char *TrapName(uint16_t trap)
case 0xABF2: return "_ThreadDispatch";
case 0xABFF: return "_DebugStr";
/*
/*
; Resource Manager
*/
case 0xA822: return "_ResourceDispatch";
/*
/*
; PPCToolbox
*/
case 0xA0DD: return "_PPC";
/*
/*
; Alias Manager
*/
case 0xA823: return "_AliasDispatch";
/*
/*
; Device Manager (some shared by the File Manager)
*/
case 0xA000: return "_Open";
@ -549,10 +549,10 @@ const char *TrapName(uint16_t trap)
case 0xA005: return "_Status";
case 0xA006: return "_KillIO";
/*
/*
; File Manager
*/
case 0xA007: return "_GetVolInfo";
@ -595,27 +595,27 @@ const char *TrapName(uint16_t trap)
case 0xA241: return "_HSetFLock";
case 0xA242: return "_HRstFLock";
/*
/*
; dispatch trap for remaining File Manager (and Desktop Manager) calls
*/
case 0xA060: return "_FSDispatch";
case 0xA260: return "_HFSDispatch";
/*
/*
; High level FSSpec calls
*/
case 0xAA52: return "_HighLevelHFSDispatch";
/*
/*
; Memory Manager
*/
case 0xA019: return "_InitZone";
@ -652,10 +652,10 @@ const char *TrapName(uint16_t trap)
case 0xA08F: return "_DeferUserFn";
case 0xA08D: return "_DebugUtil";
/*
/*
; Event Manager
*/
case 0xA02F: return "_PostEvent";
@ -697,8 +697,8 @@ const char *TrapName(uint16_t trap)
// case 0xA057: return "_SetApplBase";
case 0xA198: return "_HWPriv";
/*
/*
; New names for (mostly) new flavors of old LwrString trap (redone <13>)
*/
@ -707,10 +707,10 @@ const char *TrapName(uint16_t trap)
case 0xA456: return "_UpperText";
case 0xA656: return "_StripUpperText";
/*
/*
; Temporary Memory routines
*/
case 0xA88F: return "_OSDispatch";
@ -765,10 +765,10 @@ const char *TrapName(uint16_t trap)
case 0xA087: return "_IOPMsgRequest";
case 0xA088: return "_IOPMoveData";
/*
/*
; Power Manager
*/
case 0xA09F: return "_PowerDispatch";
@ -782,19 +782,19 @@ const char *TrapName(uint16_t trap)
case 0xA48A: return "_SleepQRemove";
// case 0xA48A: return "_SlpQRemove";
/*
/*
; Comm. Toolbox
*/
case 0xA08B: return "_CommToolboxDispatch";
case 0xA090: return "_SysEnvirons";
/*
/*
; Egret Manager
*/
case 0xA092: return "_EgretDispatch";
@ -809,10 +809,10 @@ const char *TrapName(uint16_t trap)
// case 0xA9C3: return "_KeyTrans";
case 0xA9C3: return "_KeyTranslate";
/*
/*
; TextEdit
*/
case 0xA9CB: return "_TEGetText";
@ -842,10 +842,10 @@ const char *TrapName(uint16_t trap)
case 0xA83D: return "_TEDispatch";
case 0xA83E: return "_TEStyleNew";
/*
/*
; Color Quickdraw
*/
case 0xAA00: return "_OpenCPort";
@ -899,10 +899,10 @@ const char *TrapName(uint16_t trap)
case 0xAA4F: return "_CalcCMask";
case 0xAA51: return "_CopyDeepMask";
/*
/*
; Routines for video devices
*/
case 0xAA27: return "_GetMaxDevice";
@ -920,10 +920,10 @@ const char *TrapName(uint16_t trap)
case 0xAA32: return "_GetGDevice";
case 0xABCA: return "_DeviceLoop";
/*
/*
; Color Manager
*/
case 0xAA33: return "_Color2Index";
@ -933,10 +933,10 @@ const char *TrapName(uint16_t trap)
case 0xAA37: return "_GetSubTable";
case 0xAA38: return "_UpdatePixMap";
/*
/*
; Dialog Manager
*/
// case 0xAA4B: return "_NewCDialog";
@ -956,10 +956,10 @@ const char *TrapName(uint16_t trap)
case 0xAA4E: return "_SetStdCProcs";
case 0xABF8: return "_StdOpcodeProc";
/*
/*
; added to Toolbox for color
*/
case 0xAA41: return "_SetWinColor";
@ -976,10 +976,10 @@ const char *TrapName(uint16_t trap)
case 0xA809: return "_GetControlVariant";
case 0xA80A: return "_GetWVariant";
/*
/*
; added to Menu Manager for color
*/
// case 0xAA60: return "_DelMCEntries";
@ -991,36 +991,36 @@ const char *TrapName(uint16_t trap)
case 0xAA64: return "_GetMCEntry";
case 0xAA65: return "_SetMCEntries";
/*
/*
; Menu Manager
*/
case 0xAA66: return "_MenuChoice";
/*
/*
; Dialog Manager?
*/
case 0xAA67: return "_ModalDialogMenuSetup";
case 0xAA68: return "_DialogDispatch";
/*
/*
; Font Manager
*/
case 0xA814: return "_SetFractEnable";
case 0xA854: return "_FontDispatch";
/*
/*
; Palette Manager
*/
case 0xAA90: return "_InitPalettes";
@ -1044,10 +1044,10 @@ const char *TrapName(uint16_t trap)
case 0xAAA1: return "_CopyPalette";
case 0xAAA2: return "_PaletteDispatch";
/*
/*
; Sound Manager
*/
case 0xA800: return "_SoundDispatch";
@ -1079,26 +1079,26 @@ const char *TrapName(uint16_t trap)
case 0xA05E: return "_NMInstall";
case 0xA05F: return "_NMRemove";
/*
/*
; All QDOffscreen Routines go through one trap with a selector
*/
case 0xAB1D: return "_QDExtensions";
/*
/*
; UserDelay
*/
case 0xA84C: return "_UserDelay";
/*
/*
; Component Manager
*/
case 0xA82A: return "_ComponentDispatch";
@ -1114,10 +1114,10 @@ const char *TrapName(uint16_t trap)
case 0xAA59: return "_MixedModeDispatch";
case 0xAA5A: return "_CodeFragmentDispatch";
/*
/*
; Translation Manager
*/
case 0xABFC: return "_TranslationDispatch";

View File

@ -1,18 +1,18 @@
/*
File: Traps.h
Contains: A-Trap constants.
Version: Technology: Mac OS 9
Release: Universal Interfaces 3.4
Copyright: © 1985-2001 by Apple Computer, Inc., all rights reserved
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
#ifndef __macos_traps__
#define __macos_traps__
@ -1079,4 +1079,3 @@ enum {
#endif
#endif /* __TRAPS__ */

View File

@ -29,7 +29,7 @@ std::string EvalString(std::string &s, std::unordered_map<std::string, std::stri