37 #include "shell-run.h"
40 PROCESS(shell_run_process,
"run");
43 "run: load and run a PRG file",
53 if(name ==
NULL || strlen(name) == 0) {
55 "run <file>: filename must be given",
"");
67 print =
"Header error";
73 print =
"Data format error";
76 print =
"Not enough memory";
79 print =
"Could not open file";
82 print =
"Wrong architecture";
85 print =
"Wrong OS version";
88 print =
"Program loading not supported";
91 print =
"Unknown return code from the loader (internal bug)";
#define LOADER_ERR_ARCH
Wrong architecture.
void shell_output_str(struct shell_command *c, char *text1, const char *text2)
Output strings from a shell command.
#define LOADER_OK
No error.
#define PROCESS_EXIT()
Exit the currently running process.
#define PROCESS_BEGIN()
Define the beginning of a process.
#define LOADER_ERR_VERSION
Wrong OS version.
#define LOADER_ERR_OS
Wrong OS.
#define NULL
The null pointer.
#define LOADER_ERR_READ
Read error.
#define LOADER_ERR_HDR
Header error.
#define LOADER_ERR_MEM
Not enough memory.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
#define PROCESS_END()
Define the end of a process.
void shell_register_command(struct shell_command *c)
Register a command with the shell.
#define PROCESS(name, strname)
Declare a process.
#define LOADER_ERR_OPEN
Could not open file.
#define LOADER_ERR_NOLOADER
Program loading not supported.
#define LOADER_LOAD(name, arg)
Load and execute a program.
#define LOADER_ERR_FMT
Data format error.
#define SHELL_COMMAND(name, command, description, process)
Define a shell command.