date and time created 91/03/07 20:27:26 by bostic
[unix-history] / usr / src / bin / sh / eval.h
CommitLineData
ba5c0cce
KB
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * 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 5.1 (Berkeley) %G%
11 */
12
13extern char *commandname; /* currently executing command */
14extern int exitstatus; /* exit status of last command */
15extern struct strlist *cmdenviron; /* environment for builtin command */
16
17
18struct 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
26#ifdef __STDC__
27void evalstring(char *);
28union node;
29void evaltree(union node *, int);
30void evalbackcmd(union node *, struct backcmd *);
31#else
32void evalstring();
33void evaltree();
34void evalbackcmd();
35#endif
36
37/* in_function returns nonzero if we are currently evaluating a function */
38#define in_function() funcnest
39extern int funcnest;