1 /* builtins.h -- What a builtin looks like, and where to find them. */
3 /* Copyright (C) 1987,1991 Free Software Foundation, Inc.
5 This file is part of GNU Bash, the Bourne Again SHell.
7 Bash is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 1, or (at your option)
12 Bash is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Bash; see the file COPYING. If not, write to the Free
19 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
23 #if defined (HAVE_UNISTD_H)
34 /* Flags describing various things about a builtin. */
35 #define BUILTIN_ENABLED 0x1 /* This builtin is enabled. */
36 #define BUILTIN_DELETED 0x2 /* This has been deleted with enable -d. */
37 #define STATIC_BUILTIN 0x4 /* This builtin is not dynamically loaded. */
38 #define SPECIAL_BUILTIN 0x8 /* This is a Posix `special' builtin. */
39 #define ASSIGNMENT_BUILTIN 0x10 /* This builtin takes assignment statements. */
41 /* The thing that we build the array of builtins out of. */
43 char *name
; /* The name that the user types. */
44 Function
*function
; /* The address of the invoked function. */
45 int flags
; /* One of the #defines above. */
46 char **long_doc
; /* NULL terminated array of strings. */
47 char *short_doc
; /* Short version of documenation. */
48 char *handle
; /* for future use */
51 /* Found in builtins.c, created by builtins/mkbuiltins. */
52 extern int num_shell_builtins
; /* Number of shell builtins. */
53 extern struct builtin static_shell_builtins
[];
54 extern struct builtin
*shell_builtins
;
55 extern struct builtin
*current_builtin
;