#include <layout.h> plcommand *pl_fread(string filename) int pl_lread(string line, plcommand *p) void pl_exec(plcommand *p) void pl_readlines(void);
With the routine pl_fread a layout(5NEMO) (regular text) file is read, it’s YAPP commands are interpreted and placed in a linked list of plcommand’s, returned as a pointer to that structure. Commands that are not understood are skipped and not saved.
The routine pl_lread reads a single line, parses it in YAPP commands, and stores the encoded command in the plcommand structure pointed to by p. Of course pl_fread calls pl_lread to do its work. pl_lread returns the number of arguments (including the YAPP command); 0 means no legal command (or a blank line) was encountered and the structures contents have no meaning.
The routine pl_exec executes a previously read LAYOUT file, by passing it a pointer to the linked list of plcommand. The linked list is traversed until it ends or the End command is encountered.
The routine pl_readlines keeps reading commands from stdin (via the READLINE library if present) and executing them, in effect giving a simple mongo/sm/wip type interface.
20-oct-92 written PJT 17-sep-05 added pl_readlines PJT
Table of Contents