00001 /*- 00002 * Copyright (c) 1991, 1993 00003 * The Regents of the University of California. All rights reserved. 00004 * 00005 * This code is derived from software contributed to Berkeley by 00006 * Kenneth Almquist. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions 00010 * are met: 00011 * 1. Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * 2. Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in the 00015 * documentation and/or other materials provided with the distribution. 00016 * 4. Neither the name of the University nor the names of its contributors 00017 * may be used to endorse or promote products derived from this software 00018 * without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 00021 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00022 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00023 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 00024 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00025 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00026 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00027 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00028 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00029 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00030 * SUCH DAMAGE. 00031 * 00032 * @(#)exec.h 8.3 (Berkeley) 6/8/95 00033 * $FreeBSD: src/bin/sh/exec.h,v 1.12 2004/04/06 20:06:51 markm Exp $ 00034 */ 00035 00036 /* values of cmdtype */ 00037 #define CMDUNKNOWN -1 /* no entry in table for command */ 00038 #define CMDNORMAL 0 /* command is an executable program */ 00039 #define CMDBUILTIN 1 /* command is a shell builtin */ 00040 #define CMDFUNCTION 2 /* command is a shell function */ 00041 00042 00043 struct cmdentry { 00044 int cmdtype; 00045 union param { 00046 int index; 00047 union node *func; 00048 } u; 00049 }; 00050 00051 00052 extern char *pathopt; /* set by padvance */ 00053 extern int exerrno; /* last exec error */ 00054 00055 void shellexec(char **, char **, char *, int); 00056 char *padvance(char **, char *); 00057 int hashcmd(int, char **); 00058 void find_command(char *, struct cmdentry *, int, char *); 00059 int find_builtin(char *); 00060 void hashcd(void); 00061 void changepath(const char *); 00062 void deletefuncs(void); 00063 void defun(char *, union node *); 00064 int unsetfunc(char *); 00065 int typecmd(int, char **); 00066 void clearcmdentry(int); 00067 00068 /* 00069 * $PchId: exec.h,v 1.5 2006/04/10 14:47:34 philip Exp $ 00070 */
1.5.8