source: trunk/essentials/app-shells/bash/shell.h@ 3258

Last change on this file since 3258 was 3231, checked in by bird, 19 years ago

eol style.

  • Property svn:eol-style set to native
File size: 4.3 KB
Line 
1/* shell.h -- The data structures used by the shell */
2
3/* Copyright (C) 1993-2002 Free Software Foundation, Inc.
4
5 This file is part of GNU Bash, the Bourne Again SHell.
6
7 Bash is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 Bash is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License along
18 with Bash; see the file COPYING. If not, write to the Free Software
19 Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
20
21#ifdef HAVE_CONFIG_H
22#include "config.h"
23#endif
24
25#include "bashjmp.h"
26
27#include "command.h"
28#include "syntax.h"
29#include "general.h"
30#include "error.h"
31#include "variables.h"
32#include "arrayfunc.h"
33#include "quit.h"
34#include "maxpath.h"
35#include "unwind_prot.h"
36#include "dispose_cmd.h"
37#include "make_cmd.h"
38#include "ocache.h"
39#include "subst.h"
40#include "sig.h"
41#include "pathnames.h"
42#include "externs.h"
43
44extern int EOF_Reached;
45
46#define NO_PIPE -1
47#define REDIRECT_BOTH -2
48
49#define NO_VARIABLE -1
50
51/* Values that can be returned by execute_command (). */
52#define EXECUTION_FAILURE 1
53#define EXECUTION_SUCCESS 0
54
55/* Usage messages by builtins result in a return status of 2. */
56#define EX_BADUSAGE 2
57
58/* Special exit statuses used by the shell, internally and externally. */
59#define EX_BINARY_FILE 126
60#define EX_NOEXEC 126
61#define EX_NOINPUT 126
62#define EX_NOTFOUND 127
63
64#define EX_SHERRBASE 256 /* all special error values are > this. */
65
66#define EX_BADSYNTAX 257 /* shell syntax error */
67#define EX_USAGE 258 /* syntax error in usage */
68#define EX_REDIRFAIL 259 /* redirection failed */
69#define EX_BADASSIGN 260 /* variable assignment error */
70#define EX_EXPFAIL 261 /* word expansion failed */
71
72/* Flag values that control parameter pattern substitution. */
73#define MATCH_ANY 0x000
74#define MATCH_BEG 0x001
75#define MATCH_END 0x002
76
77#define MATCH_TYPEMASK 0x003
78
79#define MATCH_GLOBREP 0x010
80#define MATCH_QUOTED 0x020