Oberon || Library || Module Index || Search Engine || Definition || Module


Ulm's Oberon Library:
SysCommands


NAME

SysCommands - system-dependent interface to commands

SYNOPSIS

TYPE Name = POINTER TO ARRAY 1024 OF CHAR;
TYPE CommandList = POINTER TO CommandRec;
TYPE CommandRec =
   RECORD
      next: CommandList;
      name: Name;
      proc: PROCEDURE;
   END;
TYPE ModuleList = POINTER TO ModuleRec;
TYPE ModuleRec =
   RECORD
      next: ModuleList;
      name: Name;
      init: PROCEDURE;
      commands: CommandList;
   END;


VAR modules: ModuleList;

DESCRIPTION

SysCommands is an interface to the runtime system which collects commands (parameterless exported procedures) during the early runtime startup.

Because the modules where the commands belong to are not necessarily initialized it is important to call the init procedure of ModuleRec prior to calls of any commands. Only the first call of an initialization part is effective, all further calls are no-operations.

The order of modules is topological and in linkage order in case of unrelated modules. Command lists are in order of appearance (in source code).

It is important to note that the components of CommandRec are read-only because they are part of the UNIX text segment. The pointer components of the records CommandRec and ModuleRec are protected against tracing of garbage collectors.

SEE ALSO

oc
Oberon compiler
SysModules
list of modules

BUGS

Modules do not insert their parameterless exported procedures by default into the structure of SysCommands. The -C flag must be given at compile time (see oc) to enable this feature. The current version of the library does not export commands.
Edited by: borchert, last change: 1996/09/13, revision: 1.5, converted to HTML: 1997/04/28

Oberon || Library || Module Index || Search Engine || Definition || Module