mirror of
https://github.com/ksherlock/mpw.git
synced 2025-02-16 12:30:53 +00:00
get/set tabs
This commit is contained in:
parent
7196a85c36
commit
a97d8b08fe
@ -61,6 +61,38 @@
|
|||||||
namespace MPW
|
namespace MPW
|
||||||
{
|
{
|
||||||
|
|
||||||
|
uint32_t ftrap_get_tab_info(uint32_t name, uint32_t parm)
|
||||||
|
{
|
||||||
|
// get_tab_info(const char *name, uint32_t *tabSize)
|
||||||
|
|
||||||
|
// hard code for now.
|
||||||
|
// Could check xattr for actual value.
|
||||||
|
// That would be rather pointless unless some editor respected
|
||||||
|
// it.
|
||||||
|
// Could check an environment variable.
|
||||||
|
|
||||||
|
std::string sname = ToolBox::ReadCString(name, true);
|
||||||
|
|
||||||
|
Log(" get_tab_info(%s)\n", sname.c_str());
|
||||||
|
|
||||||
|
|
||||||
|
if (parm) memoryWriteLong(8, parm);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t ftrap_set_tab_info(uint32_t name, uint32_t parm)
|
||||||
|
{
|
||||||
|
// set_tab_info(const char *name, uint32_t tabSize)
|
||||||
|
|
||||||
|
std::string sname = ToolBox::ReadCString(name, true);
|
||||||
|
uint32_t tabSize = parm;
|
||||||
|
|
||||||
|
Log(" set_tab_info(%s, %04x)\n", sname.c_str(), tabSize);
|
||||||
|
|
||||||
|
// setxattr?
|
||||||
|
return 0x40000000 | kEINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t ftrap_delete(uint32_t name)
|
uint32_t ftrap_delete(uint32_t name)
|
||||||
{
|
{
|
||||||
@ -193,10 +225,11 @@ namespace MPW
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case kF_GTABINFO:
|
case kF_GTABINFO:
|
||||||
d0 = 0x40000000 | kEINVAL;
|
d0 = ftrap_get_tab_info(name, parm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kF_STABINFO:
|
case kF_STABINFO:
|
||||||
d0 = 0x40000000 | kEINVAL;
|
d0 = ftrap_set_tab_info(name, parm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user