/* * execute.h: things of global importance to programs executing */ #ifndef _EXECUTE_D #define _EXECUTE_D #include "glob.h" #include "kw.h" #define ST_UMASK 0x00ff /* user bits in status word */ #define ST_SMASK 0xff00 /* system bits in status word */ #define ST_SFLAG 0x8000 /* all system errors are <0 */ #define ST_INTR (0x0100|ST_SFLAG) /* user interrupted */ #define ST_SERR (0x0200|ST_SFLAG) /* system problem */ #define ST_NOT (0x0400|ST_SFLAG) /* program not there */ typedef struct iterator { char *i_control; /* control variable in for statement */ int i_current; /* the argument we are about to replace */ /* in for the control variables */ struct args_t i_arg; /* arguments in for statement */ } ITERATOR; #ifdef __STDC__ extern ITERATOR *foreach(CMD*); extern int fornext(ITERATOR*); extern void forgone(ITERATOR*); extern int runcommand(CMD*, int); #else extern ITERATOR *foreach(); extern int fornext(); extern void forgone(); extern int runcommand(); #endif #endif /*_EXECUTE_D*/