Commit | Line | Data |
---|---|---|
ba5c0cce | 1 | /*- |
d1b73048 KB |
2 | * Copyright (c) 1991, 1993 |
3 | * The Regents of the University of California. All rights reserved. | |
ba5c0cce KB |
4 | * |
5 | * This code is derived from software contributed to Berkeley by | |
6 | * Kenneth Almquist. | |
7 | * | |
8 | * %sccs.include.redist.c% | |
9 | * | |
d1b73048 | 10 | * @(#)eval.h 8.1 (Berkeley) %G% |
ba5c0cce KB |
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 | ||
26 | #ifdef __STDC__ | |
27 | void evalstring(char *); | |
05037c2f | 28 | union node; /* BLETCH for ansi C */ |
ba5c0cce KB |
29 | void evaltree(union node *, int); |
30 | void evalbackcmd(union node *, struct backcmd *); | |
31 | #else | |
32 | void evalstring(); | |
33 | void evaltree(); | |
34 | void evalbackcmd(); | |
35 | #endif | |
36 | ||
37 | /* in_function returns nonzero if we are currently evaluating a function */ | |
38 | #define in_function() funcnest | |
39 | extern int funcnest; |