xref: /original-bsd/bin/sh/exec.h (revision 13deef58)
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  *	@(#)exec.h	5.2 (Berkeley) 06/23/92
11  */
12 
13 /* values of cmdtype */
14 #define CMDUNKNOWN -1		/* no entry in table for command */
15 #define CMDNORMAL 0		/* command is an executable program */
16 #define CMDBUILTIN 1		/* command is a shell builtin */
17 #define CMDFUNCTION 2		/* command is a shell function */
18 
19 
20 struct cmdentry {
21 	int cmdtype;
22 	union param {
23 		int index;
24 		union node *func;
25 	} u;
26 };
27 
28 
29 extern char *pathopt;		/* set by padvance */
30 
31 #ifdef __STDC__
32 void shellexec(char **, char **, char *, int);
33 char *padvance(char **, char *);
34 void find_command(char *, struct cmdentry *, int);
35 int find_builtin(char *);
36 void hashcd(void);
37 void changepath(char *);
38 void defun(char *, union node *);
39 int unsetfunc(char *);
40 #else
41 void shellexec();
42 char *padvance();
43 void find_command();
44 int find_builtin();
45 void hashcd();
46 void changepath();
47 void defun();
48 int unsetfunc();
49 #endif
50