diff options
Diffstat (limited to 'src/cmd/rc')
-rw-r--r-- | src/cmd/rc/exec.c | 4 | ||||
-rw-r--r-- | src/cmd/rc/exec.h | 2 | ||||
-rw-r--r-- | src/cmd/rc/havefork.c | 4 | ||||
-rw-r--r-- | src/cmd/rc/lex.c | 2 | ||||
-rw-r--r-- | src/cmd/rc/plan9ish.c | 8 | ||||
-rw-r--r-- | src/cmd/rc/rc.h | 3 | ||||
-rw-r--r-- | src/cmd/rc/tree.c | 2 |
7 files changed, 12 insertions, 13 deletions
diff --git a/src/cmd/rc/exec.c b/src/cmd/rc/exec.c index 03c96d49..172acfa3 100644 --- a/src/cmd/rc/exec.c +++ b/src/cmd/rc/exec.c @@ -135,7 +135,7 @@ main(int argc, char *argv[]) code bootstrap[32]; char num[12], *rcmain; int i; - + /* needed for rcmain later */ putenv("PLAN9", unsharp("#9")); @@ -690,7 +690,7 @@ word* copynwords(word *a, word *tail, int n) { word *v, **end; - + v = 0; end = &v; while(n-- > 0){ diff --git a/src/cmd/rc/exec.h b/src/cmd/rc/exec.h index 06d2991f..06cfd64e 100644 --- a/src/cmd/rc/exec.h +++ b/src/cmd/rc/exec.h @@ -67,7 +67,7 @@ struct builtin{ }; extern struct builtin Builtin[]; int eflagok; /* kludge flag so that -e doesn't exit in startup */ -int havefork; +extern int havefork; void execcd(void), execwhatis(void), execeval(void), execexec(void); int execforkexec(void); diff --git a/src/cmd/rc/havefork.c b/src/cmd/rc/havefork.c index dc0ca2e8..63f83354 100644 --- a/src/cmd/rc/havefork.c +++ b/src/cmd/rc/havefork.c @@ -37,11 +37,11 @@ Xasync(void) * ssh foo & will reopen /dev/tty, try to read a password, * get a signal, and repeat, in a tight loop, forever. * Arguably this is a bug in ssh (it behaves the same - * way under bash as under rc) but I'm fixing it here + * way under bash as under rc) but I'm fixing it here * anyway. If we dissociate the process from the tty, * then it won't be able to open /dev/tty ever again. * The SIG_IGN on SIGTTOU makes writing the tty - * (via fd 1 or 2, for example) succeed even though + * (via fd 1 or 2, for example) succeed even though * our pgrp is not the terminal's controlling pgrp. */ if((tty = open("/dev/tty", OREAD)) >= 0){ diff --git a/src/cmd/rc/lex.c b/src/cmd/rc/lex.c index d9369e5c..973ddee8 100644 --- a/src/cmd/rc/lex.c +++ b/src/cmd/rc/lex.c @@ -50,7 +50,7 @@ advance(void) } /* * read a character from the input stream - */ + */ int getnext(void) diff --git a/src/cmd/rc/plan9ish.c b/src/cmd/rc/plan9ish.c index da9d8679..d52def7d 100644 --- a/src/cmd/rc/plan9ish.c +++ b/src/cmd/rc/plan9ish.c @@ -343,7 +343,7 @@ char **mkenv(){ } *ep=0; qsort((char *)env, nvar, sizeof ep[0], cmpenv); - return env; + return env; } void Updenv(void){} void Execute(word *args, word *path) @@ -556,7 +556,7 @@ int exitcode(char *msg) { int n; - + n = atoi(msg); if(n == 0) n = 1; @@ -579,7 +579,7 @@ void delwaitpid(int pid) { int r, w; - + for(r=w=0; r<nwaitpids; r++) if(waitpids[r] != pid) waitpids[w++] = waitpids[r]; @@ -596,7 +596,7 @@ int havewaitpid(int pid) { int i; - + for(i=0; i<nwaitpids; i++) if(waitpids[i] == pid) return 1; diff --git a/src/cmd/rc/rc.h b/src/cmd/rc/rc.h index 7778ff4c..46ff9510 100644 --- a/src/cmd/rc/rc.h +++ b/src/cmd/rc/rc.h @@ -71,7 +71,6 @@ union code{ char *s; }; char *promptstr; -int doprompt; #define NTOK 8192 char tok[NTOK]; #define APPEND 1 @@ -126,7 +125,7 @@ int mypid; char **argp; char **args; int nerror; /* number of errors encountered during compilation */ -int doprompt; /* is it time for a prompt? */ +extern int doprompt; /* is it time for a prompt? */ /* * Which fds are the reading/writing end of a pipe? * Unfortunately, this can vary from system to system. diff --git a/src/cmd/rc/tree.c b/src/cmd/rc/tree.c index 897597e2..2c3ff6bc 100644 --- a/src/cmd/rc/tree.c +++ b/src/cmd/rc/tree.c @@ -136,7 +136,7 @@ void freetree(tree *p) { if(p==0) - return; + return; freetree(p->child[0]); freetree(p->child[1]); freetree(p->child[2]); |