exec.h (201343) | exec.h (204800) |
---|---|
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 | 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 201343 2009-12-31 16:13:33Z jilles $ | 33 * $FreeBSD: head/bin/sh/exec.h 204800 2010-03-06 16:57:53Z jilles $ |
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 --- 10 unchanged lines hidden (view full) --- 52 union param { 53 int index; 54 struct funcdef *func; 55 } u; 56 int special; 57}; 58 59 | 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 --- 10 unchanged lines hidden (view full) --- 52 union param { 53 int index; 54 struct funcdef *func; 55 } u; 56 int special; 57}; 58 59 |
60/* action to find_command() */ 61#define DO_ERR 0x01 /* prints errors */ 62#define DO_NOFUNC 0x02 /* don't return shell functions, for command */ 63 |
|
60extern const char *pathopt; /* set by padvance */ 61extern int exerrno; /* last exec error */ 62 63void shellexec(char **, char **, const char *, int) __dead2; 64char *padvance(const char **, const char *); 65int hashcmd(int, char **); 66void find_command(const char *, struct cmdentry *, int, const char *); 67int find_builtin(const char *, int *); 68void hashcd(void); 69void changepath(const char *); 70void deletefuncs(void); 71void addcmdentry(const char *, struct cmdentry *); 72void defun(const char *, union node *); 73int unsetfunc(const char *); 74int typecmd_impl(int, char **, int, const char *); 75int typecmd(int, char **); 76void clearcmdentry(int); | 64extern const char *pathopt; /* set by padvance */ 65extern int exerrno; /* last exec error */ 66 67void shellexec(char **, char **, const char *, int) __dead2; 68char *padvance(const char **, const char *); 69int hashcmd(int, char **); 70void find_command(const char *, struct cmdentry *, int, const char *); 71int find_builtin(const char *, int *); 72void hashcd(void); 73void changepath(const char *); 74void deletefuncs(void); 75void addcmdentry(const char *, struct cmdentry *); 76void defun(const char *, union node *); 77int unsetfunc(const char *); 78int typecmd_impl(int, char **, int, const char *); 79int typecmd(int, char **); 80void clearcmdentry(int); |