147115Sbostic /*- 260698Sbostic * Copyright (c) 1991, 1993 360698Sbostic * The Regents of the University of California. All rights reserved. 447115Sbostic * 547115Sbostic * This code is derived from software contributed to Berkeley by 647115Sbostic * Kenneth Almquist. 747115Sbostic * 847115Sbostic * %sccs.include.redist.c% 947115Sbostic * 10*69272Schristos * @(#)exec.h 8.2 (Berkeley) 05/04/95 1147115Sbostic */ 1247115Sbostic 1347115Sbostic /* values of cmdtype */ 1447115Sbostic #define CMDUNKNOWN -1 /* no entry in table for command */ 1547115Sbostic #define CMDNORMAL 0 /* command is an executable program */ 1647115Sbostic #define CMDBUILTIN 1 /* command is a shell builtin */ 1747115Sbostic #define CMDFUNCTION 2 /* command is a shell function */ 1847115Sbostic 1947115Sbostic 2047115Sbostic struct cmdentry { 2147115Sbostic int cmdtype; 2247115Sbostic union param { 2347115Sbostic int index; 2447115Sbostic union node *func; 2547115Sbostic } u; 2647115Sbostic }; 2747115Sbostic 2847115Sbostic 2947115Sbostic extern char *pathopt; /* set by padvance */ 3047115Sbostic 31*69272Schristos void shellexec __P((char **, char **, char *, int)); 32*69272Schristos char *padvance __P((char **, char *)); 33*69272Schristos int hashcmd __P((int, char **)); 34*69272Schristos void find_command __P((char *, struct cmdentry *, int)); 35*69272Schristos int find_builtin __P((char *)); 36*69272Schristos void hashcd __P((void)); 37*69272Schristos void changepath __P((char *)); 38*69272Schristos void deletefuncs __P((void)); 39*69272Schristos void getcmdentry __P((char *, struct cmdentry *)); 40*69272Schristos void addcmdentry __P((char *, struct cmdentry *)); 41*69272Schristos void defun __P((char *, union node *)); 42*69272Schristos int unsetfunc __P((char *)); 43