summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rc/exec.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-01-03 18:41:48 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-01-03 18:41:48 +0000
commit189731aad01e09db1807c78af421c615ed3a3242 (patch)
tree4cec623654b4e4e9da03bb00f36ea49755c8ca98 /sys/src/cmd/rc/exec.h
parentc51a5cfa06dd982da839c4cfcba1610259d27e38 (diff)
rc: make it portable (for UNIX)
Fixup remaining Plan9 dependencies (chartorune()). Add Makefile for UNIX-like systems (tested with Linux and APE). Make error printing consistent, use Errstr() explicitely. Get rid of NSTATUS buffer limit, just malloc it.
Diffstat (limited to 'sys/src/cmd/rc/exec.h')
-rw-r--r--sys/src/cmd/rc/exec.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/src/cmd/rc/exec.h b/sys/src/cmd/rc/exec.h
index a696ece1e..308802679 100644
--- a/sys/src/cmd/rc/exec.h
+++ b/sys/src/cmd/rc/exec.h
@@ -11,8 +11,9 @@ extern void Xtrue(void), Xword(void), Xwrite(void), Xpipefd(void), Xcase(void);
extern void Xlocal(void), Xunlocal(void), Xassign(void), Xsimple(void), Xpopm(void), Xpush(void);
extern void Xrdcmds(void), Xwastrue(void), Xif(void), Xifnot(void), Xpipewait(void);
extern void Xpopredir(void), Xsub(void), Xeflag(void), Xsettrue(void);
-extern void Xerror(char*);
extern void Xerror1(char*);
+extern void Xerror2(char*,char*);
+extern void Xerror3(char*,char*,char*);
/*
* word lists are in correct order,
@@ -33,7 +34,6 @@ struct redir{
int from, to; /* what to do it to */
redir *next; /* what else to do (reverse order) */
};
-#define NSTATUS 128 /* length of status */
/*
* redir types
@@ -54,7 +54,7 @@ struct thread{
lexer *lex; /* lexer for Xrdcmds */
int iflag; /* interactive? */
int pid; /* process for Xpipewait to wait for */
- char status[NSTATUS]; /* status for Xpipewait */
+ char *status; /* status for Xpipewait */
thread *ret; /* who continues when this finishes */
};
@@ -82,3 +82,5 @@ void startfunc(var*, word*, var*, redir*);
char *srcfile(thread*);
char *getstatus(void);
+
+extern char *argv0;