sh - command interface — Inferno 1ed
sh - command interface
include "sh.m";
Command: module
{
PATH: con "/dis/sh.dis";
init: fn(ctxt: ref Draw->Context, argv: list of string);
};
Description
A generic module interface appropriate for modules launched by the Inferno shell.
Using this interface, a module (not just the Inferno control console) can launch a command-style module (specified at run time by filename, the second operand to Limbo's load operator).
Example
include "sh.m"; cmd:= load Command filename; define ctxt construct argv with module name at the head of the list cmd->init(ctxt, argv);
Caveat
The usual convention of using ModuleType ->PATH at load time is inappropriate in this case.
infernosupport@lucent.com Copyright © 1996,Lucent Technologies, Inc. All rights reserved.