mirror of
https://github.com/ksherlock/mpw.git
synced 2025-04-07 20:37:14 +00:00
logging refinements
This commit is contained in:
parent
acd4765317
commit
adc17ebe9c
@ -93,7 +93,6 @@ namespace MPW
|
||||
void ftrap_quit(uint16_t trap)
|
||||
{
|
||||
Log("%04x Quit()\n", trap);
|
||||
//fprintf(stderr, "%04x Quit()\n", trap);
|
||||
cpuSetStop(true);
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,6 @@ namespace MPW
|
||||
|
||||
sname = ToolBox::ReadCString(name);
|
||||
|
||||
//fprintf(stderr, " open(%s, %04x)\n", sname.c_str(), f.flags);
|
||||
Log(" open(%s, %04x)\n", sname.c_str(), f.flags);
|
||||
|
||||
// TODO -- can you create a resource file like this?
|
||||
@ -129,7 +128,6 @@ namespace MPW
|
||||
uint32_t op = memoryReadLong(sp + 8);
|
||||
uint32_t parm = memoryReadLong(sp + 12);
|
||||
|
||||
//fprintf(stderr, "%04x Access(%08x, %04x, %08x)\n", trap, name, op, parm);
|
||||
Log("%04x Access(%08x, %04x, %08x)\n", trap, name, op, parm);
|
||||
|
||||
switch (op)
|
||||
|
@ -40,7 +40,6 @@ namespace MPW
|
||||
f.buffer = memoryReadLong(parm + 16);
|
||||
|
||||
|
||||
//fprintf(stderr, "%04x Close(%08x)\n", trap, parm);
|
||||
Log("%04x Close(%08x)\n", trap, parm);
|
||||
|
||||
if (!parm)
|
||||
|
@ -39,7 +39,7 @@ namespace MPW
|
||||
f.buffer = memoryReadLong(parm + 16);
|
||||
|
||||
|
||||
fprintf(stderr, "%04x Read(%02x, %08x, %08x)\n", trap, f.cookie, f.buffer, f.count);
|
||||
Log("%04x Read(%08x)\n", parm);
|
||||
|
||||
d0 = 0;
|
||||
|
||||
@ -49,6 +49,9 @@ namespace MPW
|
||||
|
||||
int fd = f.cookie;
|
||||
|
||||
Log(" read(%02x, %08x, %08x)\n", f.cookie, f.buffer, f.count);
|
||||
|
||||
|
||||
if (f.flags & kO_BINARY)
|
||||
{
|
||||
size = ::read(fd, memoryPointer(f.buffer), f.count);
|
||||
@ -104,7 +107,7 @@ namespace MPW
|
||||
f.count = memoryReadLong(parm + 12);
|
||||
f.buffer = memoryReadLong(parm + 16);
|
||||
|
||||
fprintf(stderr, "%04x Write(%02x, %08x, %08x)\n", trap, f.cookie, f.buffer, f.count);
|
||||
Log("%04x Write(%08x)\n", trap, parm);
|
||||
|
||||
|
||||
d0 = 0;
|
||||
@ -114,6 +117,9 @@ namespace MPW
|
||||
|
||||
int fd = f.cookie;
|
||||
|
||||
Log(" write(%02x, %08x, %08x)\n", f.cookie, f.buffer, f.count);
|
||||
|
||||
|
||||
if (f.flags & kO_BINARY)
|
||||
{
|
||||
size = ::write(fd, memoryPointer(f.buffer), f.count);
|
||||
|
@ -44,7 +44,6 @@ namespace MPW
|
||||
|
||||
int fd = f.cookie;
|
||||
|
||||
//fprintf(stderr, " dup(%02x)\n", fd);
|
||||
Log(" dup(%02x)\n", fd);
|
||||
|
||||
if (fd < 0 || fd >= FDTable.size() || !FDTable[fd])
|
||||
@ -79,7 +78,6 @@ namespace MPW
|
||||
|
||||
int fd = f.cookie;
|
||||
|
||||
//fprintf(stderr, " bufsize(%02x)\n", fd);
|
||||
Log(" bufsize(%02x)\n", fd);
|
||||
|
||||
memoryWriteWord(f.error, parm + 2);
|
||||
@ -111,7 +109,6 @@ namespace MPW
|
||||
|
||||
int fd = f.cookie;
|
||||
|
||||
//fprintf(stderr, " interactive(%02x)\n", fd);
|
||||
Log(" interactive(%02x)\n", fd);
|
||||
|
||||
//d0 = kEINVAL;
|
||||
@ -152,7 +149,6 @@ namespace MPW
|
||||
|
||||
int fd = f.cookie;
|
||||
|
||||
//fprintf(stderr, " fname(%02x)\n", fd);
|
||||
Log(" fname(%02x)\n", fd);
|
||||
|
||||
memoryWriteWord(f.error, parm + 2);
|
||||
@ -177,7 +173,6 @@ namespace MPW
|
||||
|
||||
int fd = f.cookie;
|
||||
|
||||
//fprintf(stderr, " refnum(%02x)\n", fd);
|
||||
Log(" refnum(%02x)\n", fd);
|
||||
|
||||
if (fd < 0 || fd >= FDTable.size() || !FDTable[fd])
|
||||
@ -242,7 +237,6 @@ namespace MPW
|
||||
return kEINVAL;
|
||||
}
|
||||
|
||||
//fprintf(stderr, " lseek(%02x, %08x, %02x)\n", fd, offset, nativeWhence);
|
||||
Log(" lseek(%02x, %08x, %02x)\n", fd, offset, nativeWhence);
|
||||
|
||||
if (::isatty(fd))
|
||||
@ -289,7 +283,6 @@ namespace MPW
|
||||
uint32_t cmd = memoryReadLong(sp + 8);
|
||||
uint32_t arg = memoryReadLong(sp + 12);
|
||||
|
||||
//fprintf(stderr, "%04x IOCtl(%08x, %08x, %08x)\n", trap, fd, cmd, arg);
|
||||
Log("%04x IOCtl(%08x, %08x, %08x)\n", trap, fd, cmd, arg);
|
||||
|
||||
switch (cmd)
|
||||
|
Loading…
x
Reference in New Issue
Block a user