From 294a0c901b6fd612b45c2dcb825071726a346521 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 14 Dec 2014 19:52:33 -0500 Subject: [PATCH] PBSetCatInfo (stub for now) --- toolbox/os_hfs_dispatch.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/toolbox/os_hfs_dispatch.cpp b/toolbox/os_hfs_dispatch.cpp index 4f07e86..bcbd35a 100644 --- a/toolbox/os_hfs_dispatch.cpp +++ b/toolbox/os_hfs_dispatch.cpp @@ -25,6 +25,7 @@ */ #include + #include #include #include #include @@ -223,6 +224,37 @@ namespace OS { return 0; } + + uint16_t PBSetCatInfo(uint32_t parm) + { + + uint16_t d0; + + // yuck. this is sort of a getdirent/stat call.... + + //uint32_t ioCompletion = memoryReadLong(parm + 12); + uint32_t ioNamePtr = memoryReadLong(parm + 18); + //uint16_t ioVRefNum = memoryReadWord(parm + 22); + //uint8_t ioFVersNum = memoryReadByte(parm + 26); + //int16_t ioFDirIndex = memoryReadWord(parm + 28); + + if (!ioNamePtr) + { + memoryWriteWord(MacOS::bdNamErr, parm + 16); + assert("PGSetCatInfo - no name."); + return MacOS::bdNamErr; + } + + std::string sname = ToolBox::ReadPString(ioNamePtr, true); + + Log(" PBSetCatInfo(%s)\n", sname.c_str()); + + // todo -- should set the finder info, I suppose. + + return 0; + } + + uint16_t PBOpenDF(uint32_t paramBlock) { Log(" PBOpenDF\n"); @@ -288,6 +320,10 @@ namespace OS { return PBGetCatInfo(paramBlock); break; + case 0x000a: + return PBSetCatInfo(paramBlock); + break; + case 0x001a: return PBHOpenDF(paramBlock);