xref: /original-bsd/bin/sh/eval.h (revision b3c06cab)
1 /*-
2  * Copyright (c) 1991, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Kenneth Almquist.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)eval.h	8.2 (Berkeley) 05/04/95
11  */
12 
13 extern char *commandname;	/* currently executing command */
14 extern int exitstatus;		/* exit status of last command */
15 extern struct strlist *cmdenviron;  /* environment for builtin command */
16 
17 
18 struct backcmd {		/* result of evalbackcmd */
19 	int fd;			/* file descriptor to read from */
20 	char *buf;		/* buffer */
21 	int nleft;		/* number of chars in buffer */
22 	struct job *jp;		/* job structure for command */
23 };
24 
25 int evalcmd __P((int, char **));
26 void evalstring __P((char *));
27 union node;	/* BLETCH for ansi C */
28 void evaltree __P((union node *, int));
29 void evalbackcmd __P((union node *, struct backcmd *));
30 int bltincmd __P((int, char **));
31 int breakcmd __P((int, char **));
32 int returncmd __P((int, char **));
33 int falsecmd __P((int, char **));
34 int truecmd __P((int, char **));
35 int execcmd __P((int, char **));
36 
37 /* in_function returns nonzero if we are currently evaluating a function */
38 #define in_function()	funcnest
39 extern int funcnest;
40