diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-10-13 16:46:20 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-10-13 16:46:20 -0700 |
commit | 566d54fe549286895fdef8aa9f385686405dd290 (patch) | |
tree | 184607f21a2e59f8896a0505fa5597a6976c76ab /sys/cmd/rc/exec.h | |
parent | f2efbb46ef89c7c1693400f7209113c50c959f02 (diff) |
RM(rc): old code. too many assumptions baked in
Diffstat (limited to 'sys/cmd/rc/exec.h')
-rw-r--r-- | sys/cmd/rc/exec.h | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/sys/cmd/rc/exec.h b/sys/cmd/rc/exec.h deleted file mode 100644 index faf29a5..0000000 --- a/sys/cmd/rc/exec.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Definitions used in the interpreter - */ -extern void Xappend(void), Xasync(void), Xbackq(void), Xbang(void), Xclose(void); -extern void Xconc(void), Xcount(void), Xdelfn(void), Xdol(void), Xqdol(void), Xdup(void); -extern void Xexit(void), Xfalse(void), Xfn(void), Xfor(void), Xglob(void); -extern void Xjump(void), Xmark(void), Xmatch(void), Xpipe(void), Xread(void); -extern void Xrdwr(void); -extern void Xrdfn(void), Xunredir(void), Xstar(void), Xreturn(void), Xsubshell(void); -extern void Xtrue(void), Xword(void), Xwrite(void), Xpipefd(void), Xcase(void); -extern void Xlocal(void), Xunlocal(void), Xassign(void), Xsimple(void), Xpopm(void); -extern void Xrdcmds(void), Xwastrue(void), Xif(void), Xifnot(void), Xpipewait(void); -extern void Xdelhere(void), Xpopredir(void), Xsub(void), Xeflag(void), Xsettrue(void); -extern void Xerror(char*); -extern void Xerror1(char*); -/* - * word lists are in correct order, - * i.e. word0->word1->word2->word3->0 - */ -struct Word -{ - char *word; - Word *next; -}; - -struct Words { - Word *words; - Words *next; -}; - -Word *newword(char *, Word *), *copywords(Word *, Word *); - -struct Redir -{ - char type; /* what to do */ - short from, to; /* what to do it to */ - struct Redir *next; /* what else to do (reverse order) */ -}; -#define NSTATUS ERRMAX /* length of status (from plan 9) */ -/* - * redir types - */ -#define ROPEN 1 /* dup2(from, to); close(from); */ -#define RDUP 2 /* dup2(from, to); */ -#define RCLOSE 3 /* close(from); */ -struct Thread -{ - union Code *code; /* code for this thread */ - int pc; /* code[pc] is the next instruction */ - struct Words *argv; /* argument stack */ - struct Redir *redir; /* redirection stack */ - struct Redir *startredir; /* redir inheritance point */ - struct Var *local; /* list of local variables */ - char *cmdfile; /* file name in Xrdcmd */ - struct Io *cmdfd; /* file descriptor for Xrdcmd */ - int iflast; /* static `if not' checking */ - int eof; /* is cmdfd at eof? */ - int iflag; /* interactive? */ - int lineno; /* linenumber */ - int pid; /* process for Xpipewait to wait for */ - char status[NSTATUS]; /* status for Xpipewait */ - Tree *treenodes; /* tree nodes created by this process */ - Thread *ret; /* who continues when this finishes */ -}; - -Code *codecopy(Code*); - -extern Thread *runq; -extern Code *codebuf; /* compiler output */ -extern int ntrap; /* number of outstanding traps */ -extern int trap[NSIG]; /* number of outstanding traps per type */ - -struct Builtin -{ - char *name; - void (*fnc)(void); -}; - -extern struct Builtin builtin[]; - -extern int eflagok; /* kludge flag so that -e doesn't exit in startup */ -extern int havefork; - -void execcd(void), execwhatis(void), execeval(void), execexec(void); -int execforkexec(void); -void execexit(void), execshift(void); -void execwait(void), execumask(void), execdot(void), execflag(void); -void execfunc(Var*), execcmds(Io *); |