Commit | Line | Data |
---|---|---|
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 | ||
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 *); | |
28 | union node; | |
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; |