* Header file for control.c
**********/
#ifndef ngspice_CONTROL_H
#define ngspice_CONTROL_H
#include "ngspice/bool.h"
* the cshpar history, for now at least) of commands and their event
* numbers, with a block considered as a statement. In a goto, the
* first word in co_text is where to go, likewise for label. For
* conditional controls, we have to call ft_getpnames and ft_evaluate
* each time, since the dvec pointers will change... Also we should do
* variable and backquote substitution each time... */
struct control {
int co_type;
wordlist *co_cond;
char *co_foreachvar;
int co_numtimes;
int co_timestodo;
wordlist *co_text;
struct control *co_parent;
struct control *co_children;
struct control *co_elseblock;
struct control *co_next;
struct control *co_prev;
};
enum co_command {
CO_UNFILLED,
CO_STATEMENT,
CO_WHILE,
CO_DOWHILE,
CO_IF,
CO_FOREACH,
CO_BREAK,
CO_CONTINUE,
CO_LABEL,
CO_GOTO,
CO_REPEAT
};
#define CONTROLSTACKSIZE 256
extern struct control *control[CONTROLSTACKSIZE];
extern struct control *cend[CONTROLSTACKSIZE];
extern int stackp;
#endif