147113Sbostic /*- 247113Sbostic * Copyright (c) 1991 The Regents of the University of California. 347113Sbostic * All rights reserved. 447113Sbostic * 547113Sbostic * This code is derived from software contributed to Berkeley by 647113Sbostic * Kenneth Almquist. 747113Sbostic * 847113Sbostic * %sccs.include.redist.c% 947113Sbostic * 10*47979Smarc * @(#)eval.h 5.2 (Berkeley) 04/12/91 1147113Sbostic */ 1247113Sbostic 1347113Sbostic extern char *commandname; /* currently executing command */ 1447113Sbostic extern int exitstatus; /* exit status of last command */ 1547113Sbostic extern struct strlist *cmdenviron; /* environment for builtin command */ 1647113Sbostic 1747113Sbostic 1847113Sbostic struct backcmd { /* result of evalbackcmd */ 1947113Sbostic int fd; /* file descriptor to read from */ 2047113Sbostic char *buf; /* buffer */ 2147113Sbostic int nleft; /* number of chars in buffer */ 2247113Sbostic struct job *jp; /* job structure for command */ 2347113Sbostic }; 2447113Sbostic 2547113Sbostic 2647113Sbostic #ifdef __STDC__ 2747113Sbostic void evalstring(char *); 28*47979Smarc union node; /* BLETCH for ansi C */ 2947113Sbostic void evaltree(union node *, int); 3047113Sbostic void evalbackcmd(union node *, struct backcmd *); 3147113Sbostic #else 3247113Sbostic void evalstring(); 3347113Sbostic void evaltree(); 3447113Sbostic void evalbackcmd(); 3547113Sbostic #endif 3647113Sbostic 3747113Sbostic /* in_function returns nonzero if we are currently evaluating a function */ 3847113Sbostic #define in_function() funcnest 3947113Sbostic extern int funcnest; 40