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 * %sccs.include.redist.c% 9 * 10 * @(#)exec.h 8.2 (Berkeley) 05/04/95 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 void shellexec __P((char **, char **, char *, int)); 32 char *padvance __P((char **, char *)); 33 int hashcmd __P((int, char **)); 34 void find_command __P((char *, struct cmdentry *, int)); 35 int find_builtin __P((char *)); 36 void hashcd __P((void)); 37 void changepath __P((char *)); 38 void deletefuncs __P((void)); 39 void getcmdentry __P((char *, struct cmdentry *)); 40 void addcmdentry __P((char *, struct cmdentry *)); 41 void defun __P((char *, union node *)); 42 int unsetfunc __P((char *)); 43