mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-22 00:32:44 +00:00
84ff99c177
commit f4807cd071ba5c4ce9ba4aa8c906ba335da07a2d Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Fri Feb 13 16:09:55 2015 -0500 merge in missing tool calls commit 6830ab51ce7c48e3d0d1352f04df8df914146b3e Merge:1675a47
24c17a9
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Fri Feb 13 16:06:05 2015 -0500 Merge branch 'feature_trap_address_2015' into merge_dispatcher Conflicts: bin/loader.cpp toolbox/rm.cpp toolbox/toolbox.cpp commit24c17a9a88
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Fri Feb 13 13:22:07 2015 -0500 SetOSTrapAddress stub commitb255937e6c
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sat Jan 24 14:40:45 2015 -0500 Use the $Commands environment variable as a list of directories where commands may be located. Conflicts: bin/loader.cpp commita3925747ce
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Fri Jan 23 10:26:52 2015 -0500 HWPriv OS Trap commit16d0038fd1
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Fri Jan 23 10:26:40 2015 -0500 HWPriv OS Trap commitbf92f80632
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Wed Jan 21 17:34:30 2015 -0500 RM::GetNamedResource commit540490d0c5
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Wed Jan 21 14:31:03 2015 -0500 GetNamedResource trap commit09aa8d0f26
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Tue Jan 20 19:32:04 2015 -0500 Set ApplZone global (ARMCFront) commit45fa54abca
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Tue Jan 20 13:58:24 2015 -0500 update test makefile commitb1e6635630
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Tue Jan 20 13:35:07 2015 -0500 SysEnvirons ($a090) OS Trap commita5126544b8
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Mon Jan 19 15:02:29 2015 -0500 undo HGetVolume cwd, for now commit912c874825
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Mon Jan 19 10:55:58 2015 -0500 Fix SetPtrSize commitc0fe74c1b8
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Jan 18 17:31:09 2015 -0500 support the auto-pop bit for tool calls (MPW Pascal IIgs 1.0b1) commit2e9ab5200c
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Jan 18 15:20:38 2015 -0500 update dispatch code... commitc7c548e5ac
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Jan 18 14:48:22 2015 -0500 add back new tool calls. commitcbb554174e
Merge:44d19f7
5e616d3
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Jan 18 14:43:58 2015 -0500 Merge branch 'feature_trap_address' into feature_trap_address_2015 Conflicts: toolbox/CMakeLists.txt toolbox/os.cpp toolbox/toolbox.cpp commit5e616d353b
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Dec 14 18:01:38 2014 -0500 new dispatcher. commitea5f213921
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Mon Dec 8 11:42:23 2014 -0500 get ready for trap overrides. commit17c5b40ac8
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Fri Dec 5 14:39:17 2014 -0500 remove dead code commitfc7df738cc
Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Fri Dec 5 14:32:18 2014 -0500 display trap name for GetToolTrap, etc.
44 lines
801 B
C++
44 lines
801 B
C++
#ifndef __mpw_toolbox_h__
|
|
#define __mpw_toolbox_h__
|
|
|
|
#include <string>
|
|
|
|
#include <cstdint>
|
|
#include <cstdio>
|
|
|
|
namespace ToolBox
|
|
{
|
|
extern bool Trace;
|
|
|
|
template<typename... Args>
|
|
inline void Log(const char *format, Args... args)
|
|
{
|
|
if (Trace) fprintf(stderr, format, args...);
|
|
}
|
|
|
|
inline void Log(const char *format)
|
|
{
|
|
if (Trace) fputs(format, stderr);
|
|
}
|
|
|
|
|
|
bool Init();
|
|
void dispatch(uint16_t trap);
|
|
|
|
|
|
std::string ReadCString(uint32_t address, bool fname = false);
|
|
std::string ReadPString(uint32_t address, bool fname = false);
|
|
|
|
std::string ReadString(uint32_t address, uint32_t length);
|
|
|
|
bool WritePString(uint32_t address, const std::string &s);
|
|
|
|
std::string TypeToString(uint32_t type);
|
|
|
|
|
|
std::string UnixToMac(std::string path);
|
|
std::string MacToUnix(std::string path);
|
|
}
|
|
|
|
|
|
#endif |