From f2efbb46ef89c7c1693400f7209113c50c959f02 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Wed, 13 Oct 2021 10:51:54 -0700 Subject: Feat(rc): working(ish) version of rc shell Removed compile commands --- sys/cmd/rc/unix.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'sys/cmd/rc/unix.c') diff --git a/sys/cmd/rc/unix.c b/sys/cmd/rc/unix.c index 32a744f..eb96813 100644 --- a/sys/cmd/rc/unix.c +++ b/sys/cmd/rc/unix.c @@ -21,7 +21,7 @@ char *Fdprefix = "/dev/fd/"; void execfinit(void); -struct builtin Builtin[] = { +struct Builtin builtin[] = { "cd", execcd, "whatis", execwhatis, "eval", execeval, @@ -39,15 +39,15 @@ struct builtin Builtin[] = { #define SEP '\1' char **environp; -struct word* +struct Word* enval(register char *s) { char *t, c; - struct word *v; + struct Word *v; for(t = s;*t && *t!=SEP;t++); c=*t; *t='\0'; - v = newword(s, c=='\0'?(struct word *)0:enval(t+1)); + v = newword(s, c=='\0'?(struct Word *)0:enval(t+1)); *t = c; return v; } @@ -104,7 +104,7 @@ Xrdfn(void) Xreturn(); } -union code rdfns[4]; +union Code rdfns[4]; void execfinit(void) @@ -134,8 +134,8 @@ char ** mkenv(void) { char **env, **ep, *p, *q; - struct var **h, *v; - struct word *a; + struct Var **h, *v; + struct Word *a; int nvar = 0, nchr = 0, sep; /* @@ -217,7 +217,7 @@ int Waitfor(int pid, int persist) { int wpid, sig; - struct thread *p; + struct Thread *p; int wstat; char wstatstr[12]; @@ -262,7 +262,7 @@ Waitfor(int pid, int persist) } char ** -mkargv(register struct word *a) +mkargv(register struct Word *a) { char **argv = (char **)emalloc((count(a)+2)*sizeof(char *)); char **argp = argv+1; /* leave one at front for runcoms */ @@ -279,7 +279,7 @@ Updenv(void) } void -Execute(struct word *args, struct word *path) +Execute(struct Word *args, struct Word *path) { char *msg="not found"; int txtbusy = 0; @@ -517,7 +517,7 @@ void execumask(void) /* wrong -- should fork before writing */ { int m; - struct io out[1]; + struct Io out[1]; switch(count(runq->argv->words)){ default: pfmt(err, "Usage: umask [umask]\n"); -- cgit v1.2.1