/* This file was created by cosmos(1). */ #include #include "types.h" #include "main.h" extern bool docopy(); extern bool dotime(); extern bool dovector(); extern bool domult(); extern bool dounwatch(); extern bool doget(); extern bool doset(); extern bool dorename(); extern bool dostep(); extern bool doload(); extern bool docomment(); extern bool dosource(); extern bool dowatch(); extern bool dodump(); extern bool dohelp(); extern bool dounfreeze(); extern bool docycle(); extern bool dolimit(); extern bool doscript(); extern bool doverify(); extern bool dofreeze(); extern bool dophase(); extern bool dostatus(); extern bool doconstant(); extern bool doaliasinfo(); extern bool doclock(); extern bool doexit(); extern bool doinitialize(); extern bool doswitch(); extern bool doparmult(); extern bool doquit(); cmd commands[] = { {"copy filename (.cpy) : create wallpaper file", docopy}, {"time : print time and statistics", dotime}, {"vector name {node|vector} : define vector", dovector}, {"mult in1 in2 output : test the multiplication function", domult}, {"unwatch {node|vector|regex|%number|%*|%re|*} : reverse effect of watch", dounwatch}, {"get {node|vector|regex|constant|%format|%re} : get state", doget}, {"set {node:value|vector:value|%number|%format} : set node(vector) state", doset}, {"rename newname node|vector : Change the name printed for a node", dorename}, {"step [number|*] : simulate n unit steps", dostep}, {"load filename (.dmp) : load network state", doload}, {"comment : insert text into output", docomment}, {"source filename (.src) : read command file", dosource}, {"watch {node|vector|regex|%number|%*|%format|%re} : monitor node(vector)", dowatch}, {"dump filename (.dmp) : dump network state", dodump}, {"help [command|?] : print info about command", dohelp}, {"unfreeze {node|vector|%number|%*|*} : reverse effect of freeze", dounfreeze}, {"cycle [number] : simulate n cycles", docycle}, {"limit {limitname:number|?} : set runtime limits", dolimit}, {"script unix-command : execute output of Unix command", doscript}, {"verify {node:value|vector:value|%number|%format} : check node(vector) state", doverify}, {"freeze {node:value|vector:value|%number|%format} : freeze node(vector) state", dofreeze}, {"phase [number|*] : simulate n phases", dophase}, {"status {statusname [argument]|?} : print info about network", dostatus}, {"constant [%format] name {value|%format} : define constant", doconstant}, {"aliasinfo { nodename } : print info about a node's aliases", doaliasinfo}, {"clock {node:value} : define clock", doclock}, {"exit : exit", doexit}, {"initialize [number] : initialize to all X's", doinitialize}, {"switch {switchname:(0|1)|?} : set runtime switches", doswitch}, {"parmult in1 in2 output : parallel test of multiplication function", doparmult}, {"quit : free storage and exit", doquit}, {"", NULL} }; extern bool dostaperturbed(); extern bool dostanode(); extern bool dostanetwork(); extern bool dostastate(); extern bool dostafreeze(); extern bool dostaevent(); extern bool dostamodule(); sta status[] = { {"perturbed : print perturbed nodes", dostaperturbed}, {"node {%re|regex|node|vector|*} : print status of node(vector)", dostanode}, {"network [%all|%fanin|%fanout] [%re] {%modno/nodeno|node|vector|regex|*} : print network surrounding node", dostanetwork}, {"state {state} : nodes with specified state", dostastate}, {"freeze : print nodes with frozen state", dostafreeze}, {"event : print scheduled events", dostaevent}, {"module {%re|regex|module|*} : print status of module", dostamodule}, {"", NULL} }; extern bool ScrollPauseSwitch; extern bool echoswitch; extern bool oscillateswitch; extern bool EditSwitch; extern bool printOscSwitch; swi switches[] = { {"pause : pause when scrolling during output", &ScrollPauseSwitch}, {"echo : print commands read from source files", &echoswitch}, {"oscillate : set oscillating nodes to X", &oscillateswitch}, {"edit : edit input lines with Emacs control keys", &EditSwitch}, {"printosc : print oscillating nodes", &printOscSwitch}, {"", NULL} }; extern int pagewidthlimit; extern int ScreenLengthLimit; extern int errorlimit; extern int steplimit; lim limits[] = { {"pagewidth : maximum width of page for printout (in characters)", &pagewidthlimit}, {"screenlen : length of screen for scrolling (in lines)", &ScreenLengthLimit}, {"error : maximum number of error reports before aborting simulation", &errorlimit}, {"step : maximum number of unit steps", &steplimit}, {"", NULL} };