xref: /csrg-svn/bin/sh/exec.h (revision 69808)
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*69808Schristos  *	@(#)exec.h	8.3 (Berkeley) 06/08/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 
3169272Schristos void shellexec __P((char **, char **, char *, int));
3269272Schristos char *padvance __P((char **, char *));
3369272Schristos int hashcmd __P((int, char **));
34*69808Schristos void find_command __P((char *, struct cmdentry *, int, char *));
3569272Schristos int find_builtin __P((char *));
3669272Schristos void hashcd __P((void));
3769272Schristos void changepath __P((char *));
3869272Schristos void deletefuncs __P((void));
3969272Schristos void getcmdentry __P((char *, struct cmdentry *));
4069272Schristos void addcmdentry __P((char *, struct cmdentry *));
4169272Schristos void defun __P((char *, union node *));
4269272Schristos int unsetfunc __P((char *));
43