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 * Redistribution and use in source and binary forms, with or without --- 16 unchanged lines hidden (view full) --- 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)exec.h 8.3 (Berkeley) 6/8/95 |
33 * $FreeBSD: head/bin/sh/exec.h 157601 2006-04-09 12:21:20Z stefanf $ |
34 */ 35 36/* values of cmdtype */ 37#define CMDUNKNOWN -1 /* no entry in table for command */ 38#define CMDNORMAL 0 /* command is an executable program */ 39#define CMDBUILTIN 1 /* command is a shell builtin */ 40#define CMDFUNCTION 2 /* command is a shell function */ 41 --- 5 unchanged lines hidden (view full) --- 47}; 48 49struct cmdentry { 50 int cmdtype; 51 union param { 52 int index; 53 union node *func; 54 } u; |
55 int special; |
56}; 57 58 59extern char *pathopt; /* set by padvance */ 60extern int exerrno; /* last exec error */ 61 62void shellexec(char **, char **, char *, int); 63char *padvance(char **, char *); 64int hashcmd(int, char **); 65void find_command(char *, struct cmdentry *, int, char *); |
66int find_builtin(char *, int *); |
67void hashcd(void); 68void changepath(const char *); 69void deletefuncs(void); 70void addcmdentry(char *, struct cmdentry *); 71void defun(char *, union node *); 72int unsetfunc(char *); 73int typecmd_impl(int, char **, int); 74int typecmd(int, char **); 75void clearcmdentry(int); |